| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Emperor
Join Date: Dec 2003
Location: Hampton VA
Posts: 1,981
|
I have 7 special buildings (National Wonders), all with different names that coincide with an era. I want to be able to build one of these buildings in each era. I do not want to give any of the the wonders a prerequisite tech. For example, any Tech in the Medieval era meets the prerequisite to build the Medieval version of this building. In SDK, how can I parse the name of a building to get an era? Once I have the building era, I can then compare it to the Player's current era to confirm "canBuild" elligibility. Here is what I have so far. I'd like to make it more efficient.
Spoiler:
__________________
Check Out Orion's Grand Inquisitions Mod http://forums.civfanatics.com/downlo...=file&id=13380 Last edited by OrionVeteran; Feb 21, 2012 at 08:30 PM. |
|
|
|
|
|
#2 |
|
Emperor
Join Date: May 2009
Posts: 1,247
|
Unless you want to add in an XML tag that assigns a specific era to buildings, that's pretty much the way to do it.
You can get rid of all those getNumRealBuilding checks, though. That should already be handled if you have the buildings defined as National Wonders. You could also replace those multiple calls to getCurrentEra with a variable instead. Code:
EraTypes eCurrentEra = GET_PLAYER(getOwnerINLINE()).getCurrentEra();
__________________
More Naval AI (an AI mod for FFH2) - focusing on bugfixes, stability and AI improvement |
|
|
|
|
|
#3 | |
|
Emperor
Join Date: Dec 2003
Location: Hampton VA
Posts: 1,981
|
Quote:
__________________
Check Out Orion's Grand Inquisitions Mod http://forums.civfanatics.com/downlo...=file&id=13380 |
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|