Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Call To Power II > CtP2-Source Code Project > CODE/DESIGN: Building & Wonder flag limit removal
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
CivGroups
CTP2 Source Code Project (59): Not a Member - Join

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 14-02-2004 19:19
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
CODE/DESIGN: Building & Wonder flag limit removal Increase Your PM Length

Just a little progress report...

Currently I'm working on removing the limitations on how many Buildings and Wonders can have an effect on the game.

I'm using an adapted (included serialization, for game saves, and full cell access for network functionality) STL Bitvector to do the work of storage, instead of UINT64's.

I tested the concept of this on "achievements" which uses uint64's to store game "achievements" basically whether sea cities have been built, intended to trigger access to the different map layers, but wasn't needed, since they fudged the issue.

Bitvectors work fine, compile fine and run fine... I have to do some testing on MP, however.

I'm currently working on implementing city improvement and wonder flags this way... and the concept is essentially the same, except that there are hundreds more references to them.

A big issue is that you have to be really careful not to overload a virtual network packet (max 8192 bytes- frame size for CTP2 data, not TCP) by including too much data, or you'll have fragmented sends.

I don't see this as a big limitation... although we'll probably be limited to say... a max of 1024 flags (E.G. 1024 each of Wonders and City Improvements.)

If it becomes an issue, I'll split out separate network packet structures for them.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 15-02-2004 17:54
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Help yourself to an AD-FREE life

ROFL. There is just so much to change, with these bitvectors...

Its amusing to note that the code contains some wonderful nuggets such as

code:
C:\ctp2\ctp2_code\gs\gameobj\UnitData.cpp(294): sint32 wonderHPBonus = wonderutil_GetIncreaseHP (g_player[m_owner]->m_builtWonders);


Essentially the code is liberally sprinkled with public member variable access, when the access should almost always be public function returning protected/private member var.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 16-02-2004 23:49
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Civilization 2

Small implementation choice question...

code:
#define k_MAX_BUILDINGS 64 #define k_MAX_WONDERS 64 sint32 buildings[k_MAX_BUILDINGS + k_MAX_WONDERS];


This code is in CityData:estroyRandomBuilding

There was obviously some thought or intent to theoretically destroy Wonders with this code, however, wonders are ignored by the subsequent code.

My thought is that wonder destruction should probably be intentional and deliberate instead of being lumped in with a random destruction effect, so we should leave wonders out of this...

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:34
  Old Post 16-02-2004 23:52 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Support Apolyton

You are right but we should allow for the idea of attacks on wonders.



“something like a small amount of explosives under the forbidden city should do it”

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 16-02-2004 23:55
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations: Deluxe Edition

Right... however, it can be achieved through SLIC, unless there is some game effect that should include the destruction of Wonders by default...

Bombardment?
Conquest?

If there is any interest in this we should vote and decide a specific implementation method.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 17-02-2004 01:29
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton or Terrorists Win

(specific random destruction, that is)

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:34
  Old Post 18-02-2004 17:53
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Suffering from ads?

I was looking through citydata.cpp and noticed that nanoinfections can destroy wonders. I think there's a few other obscure cases like this.

E is offline E
King
July 24,2005 Ctp2 Tiles in sig!
May 1999
time: 21:34
  Old Post 18-02-2004 18:14 Visit E's homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Destroying wonders should also have a HUGE reputation hit too.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:34
  Old Post 18-02-2004 18:36 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Increase Your PM Length

To who the destroyer or owner.

epeterson is offline epeterson
Chieftain

Feb 2004
time: 05:34
  Old Post 18-02-2004 21:18
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Help yourself to an AD-FREE life

I think that if you destroy a wonder you should get the same amount of points subtracted from your score that the builder got added to his/her score for building it. It would at least discourage such a nefarious act! I mean really folks, could you even imagine destroying the colisseum or the pyramids??

If you build a wonder, it should give you some advantage. But the good part about some of the latter wonders is that they give the player that didn't build it the chance to compensate by building city improvements. (ie Internet Wonder=Computer Centers)

BTW, it's annoying as all get out that you can still build city improvements when you have already been given the equivalent advantage by building the wonder. (once again, the Internet Wonder). Even if you build them it doesn't help you because the wonder already took care of it! Can't we just remove those city improvements from the list of improvements for the build que once you have the wonder?? You can always make the CIs available again if the wonder is destroyed or captured.

Last edited by epeterson on 18-02-2004 at 22:08

Maquiladora is offline Maquiladora
Emperor

Jun 2001
time: 05:34
  Old Post 18-02-2004 23:41 Visit Maquiladora's homepage!
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Full PM-box? Change here!

quote:
BTW, it's annoying as all get out that you can still build city improvements when you have already been given the equivalent advantage by building the wonder. (once again, the Internet Wonder). Even if you build them it doesn't help you because the wonder already took care of it! Can't we just remove those city improvements from the list of improvements for the build que once you have the wonder?? You can always make the CIs available again if the wonder is destroyed or captured.


This was fixed before through SLIC IIRC so it shouldnt be a problem.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 18-02-2004 23:59
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Civilization: The Boardgame

Its kind of a choice a player has to make... IMO

Essentially the reasoning for still allowing you to build an improvement after you've gotten a particular Wonder, is that the virtual buildings that are created can disappear, and you might want to anticipate that, and build actual, real life buildings in their place.

If the city with the wonder in, is conquered, they disappear (for the original player,) as they would if the city was destroyed, or the wonder became obsolete.

Building a replacement wouldn't happen instantly, and a player should be given opportunity to have these building effects be uninterrupted.

Its a (reasonable) design decision, not a bug.

The Big Mc is offline The Big Mc
King
Of the universe / England
Oct 2001
time: 05:34
  Old Post 19-02-2004 00:27 Visit The Big Mc's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Yes so we should get the benefit of the buildings .

epeterson is offline epeterson
Chieftain

Feb 2004
time: 05:34
  Old Post 19-02-2004 00:33
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Get a bigger avatar today!

"Ohhhhhh, I see!", said the blind newbie.

But...instead of giving them the buildings, why not just give them the equivalent science bonus and not make them pay for the maintenance of the buildings? You can still allow them to build the CIs but this way they can negate the cost of maintaining them if they want to.

...I'm assuming the virtual buildings have a maintenance cost?

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 19-02-2004 00:42
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton buy from Amazon

Nope... no maintainance cost

Here's the way things are structured...

In the city data record, there is a function, "GetEffectiveBuildings()" that returns the "effective" buildings the city has. This function returns a combination of the real buildings and the virtual buildings.

For effects, "GetEffectiveBuildings()" is called. For upkeep, only the actual buildings are referenced.

epeterson is offline epeterson
Chieftain

Feb 2004
time: 05:34
  Old Post 19-02-2004 00:51
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Got spare money?

Roger that MrBaggins! Sorry about the trouble in bringing me up to speed guys.

So, is the first part of my first post still applicable??

quote:
I think that if you destroy a wonder you should get the same amount of points subtracted from your score that the builder got added to his/her score for building it. It would at least discourage such a nefarious act! I mean really folks, could you even imagine destroying the colisseum or the pyramids??

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 19-02-2004 01:04
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Browse Apolyton AD-FREE

Should it affect your score? Probably. The question is does that score matter, right now?

A player's score is pretty irrelevant at the moment, IMO... If the game is played through to completion (victory) regularly, and people care about how they did, relatively speaking, then it does. That should happen when we've "fixed" the game as it were.

If you want an effect which might make someone think twice about committing such an atrocity, then you should make it a diplomatic atrocity... your diplomatic regard with all civs goes down... (of course this is assuming that diplomacy means something in general.)

epeterson is offline epeterson
Chieftain

Feb 2004
time: 05:34
  Old Post 19-02-2004 01:21
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Full PM-box? Change here!

I agree! But neither the score or diplomatic reputation seem to have any real consequence in the game as they stand right now.

Perhaps automatic trade embargos, (technology included), should take place when your reputation is in the crapper?

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 19-02-2004 01:42
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Support Apolyton or Terrorists Win

Agreed.

An "embargo" is a very specific type of CTP2 restriction, restricting you from forming caravan trade deals for that nations goods... where you get gold in return.

The problem is that gold is effectively meaningless in CTP2, right now...

Thats why we are planning to make that more important, and for alliances to mean something (other than just another cheesy way for a human player to win.)

epeterson is offline epeterson
Chieftain

Feb 2004
time: 05:34
  Old Post 19-02-2004 21:17
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Remove this text

Since we are on the subject of wonders...

Has there been a discussion about the wonder that gives worldwide radar coverage?? My brother and I have agreed to NOT build the wonder as it gives an unfair advantage to one player that the other player can NEVER overcome. As a solution, I suggest that when one player builds a wonder the other player can somehow compensate albeit with some sort of penalty.

For example: If I build the Internet wonder, he can build computer centers in all his cities to play catch-up. It's better for play balance this way and it may give you the ability to have a long and fun game. I think the way you have it now is that not only can I build the wonder but I also can have computer centers virtually ensuring my scientific dominance!

Then again...If you have the ability to build the wonder AND computer centers why should you be handicapped just in the interest of play balance??:shrug: I still think the radar coverage wonder needs some serious addressing!

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 19-02-2004 21:24
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Make it a limited (or minor, depending on what we call the new feature,) wonder

Thus every civ can built it, but only once.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 19-02-2004 21:31
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Here's the thread on wonder balancing.

MrBaggins is offline MrBaggins
King

May 1999
time: 05:34
  Old Post 20-02-2004 20:27
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Avatar Enlargement: We've got the solution

BAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHH!!!!!!

Almost got everything to compile with bitvectors... and then I hit the GaiaController code... which has to be redone.

Kull is offline Kull

King
El Paso, TX USA
Mar 1999
time: 22:34
  Old Post 28-02-2004 10:11 Visit Kull<br><a href=/members><img src=/forums/images/lifer-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Inflate your Upload Space

quote:
Originally posted by MrBaggins
Its kind of a choice a player has to make... IMO

Essentially the reasoning for still allowing you to build an improvement after you've gotten a particular Wonder, is that the virtual buildings that are created can disappear, and you might want to anticipate that, and build actual, real life buildings in their place.

If the city with the wonder in, is conquered, they disappear (for the original player,) as they would if the city was destroyed, or the wonder became obsolete.

Building a replacement wouldn't happen instantly, and a player should be given opportunity to have these building effects be uninterrupted.

Its a (reasonable) design decision, not a bug.


One problem: This advantage (such as it is) accrues only to the human player. The AI isn't smart enough to determine it's about to lose the city containing the Wonder and thus to "plan ahead" by building replacement improvements. Even worse is the far more likely scenario that AI Civs will build both a Wonder AND the related city improvements. While the human player recognizes a waste of production when he sees it, I'm guessing the AI won't make that distinction.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:34.
Apolyton Time is 00:34.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0506 seconds (90.26% PHP - 9.74% MySQL) with 36 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net