Quick Modding Questions Thread

Ah, thanks, knew that something was missing :).

I can't build bomb shelter while I do not finish MANHATTAN_PROJECT. I can do similar like this for some magic project and magic buildings.

Sure, that will work :yup:.

Where is defined Nuclear weapon ban/unban?

SDK, I think.

When i finish MANHATTAN_PROJECT i can build NUKES, where i can change that, for example need some another project for nukes?

Sadly only possible for nukes, via ProjectInfos.xml, the line:
PHP:
<bAllowsNukes>1</bAllowsNukes>
 
If you want project A and project B before you can build nukes, easiest way out is set A as requirement for B.
Then B is the one that allows nukes.
Else use canTrain python callback.
 
Yes, possible, but would be totally overpowered, maybe even gamebreaking.
Should this be a victory condition, or something like that?
That's actually a good idea,I will introduce the "Utopian Victory".
But I first need a code and some instruction how to make the Utopia Project trigger the Utopian Victory.
 
Thanks The_J

If you want project A and project B before you can build nukes, easiest way out is set A as requirement for B.
Then B is the one that allows nukes.
Else use canTrain python callback.

Thanks, its better :)
 
I don't understand Al thinking..
CIV4BuildingInfos.xml:
Spoiler :

<BuildingInfo>
<BuildingClass>BUILDINGCLASS_STOCKADE</BuildingClass>
<Type>BUILDING_STOCKADE</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>Stockade</Description>
<Civilopedia>TXT_KEY_BUILDING_WALLS_PEDIA</Civilopedia>
<Strategy>TXT_KEY_BUILDING_WALLS_STRATEGY</Strategy>
<Advisor>ADVISOR_MILITARY</Advisor>
<ArtDefineTag>ART_DEF_BUILDING_STOCKADE</ArtDefineTag>
.
.
.
</BuildingInfo>
<!-- NEW WALL -->
<BuildingInfo>
<BuildingClass>BUILDINGCLASS_PALISSADES</BuildingClass>
<Type>BUILDING_PALISSADES</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>Wooden Walls</Description>
.
.
<BuildingClassNeededs>
<BuildingClassNeeded>
<BuildingClassType>BUILDINGCLASS_STOCKADE</BuildingClassType>
<bNeededInCity>1</bNeededInCity>
</BuildingClassNeeded>
</BuildingClassNeededs>
.
.
</BuildingInfo>
<!-- NEW WALL -->
<BuildingInfo>
<BuildingClass>BUILDINGCLASS_WALLS</BuildingClass>
<Type>BUILDING_WALLS</Type>
.
.
<BuildingClassNeededs>
<BuildingClassNeeded>
<BuildingClassType>BUILDINGCLASS_PALISSADES</BuildingClassType>
<bNeededInCity>1</bNeededInCity>
</BuildingClassNeeded>
</BuildingClassNeededs>
.
.
</BuildingInfo>
<!-- NEW WALL -->
<BuildingInfo>
<BuildingClass>BUILDINGCLASS_ADVANCED_WALLS</BuildingClass>
<Type>BUILDING_ADVANCED_WALLS</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>Advanced Walls</Description>
.
.
<BuildingClassNeededs>
<BuildingClassNeeded>
<BuildingClassType>BUILDINGCLASS_WALLS</BuildingClassType>
<bNeededInCity>1</bNeededInCity>
</BuildingClassNeeded>
</BuildingClassNeededs>
.
.
</BuildingInfo>
<!-- NEW WALL -->
<BuildingInfo>
<BuildingClass>BUILDINGCLASS_HIGH_WALLS</BuildingClass>
<Type>BUILDING_HIGH_WALLS</Type>
<SpecialBuildingType>NONE</SpecialBuildingType>
<Description>TXT_KEY_CHARL_BUILDING_HIGH_WALLS</Description>
.
.
<BuildingClassNeededs>
<BuildingClassNeeded>
<BuildingClassType>BUILDINGCLASS_ADVANCED_WALLS</BuildingClassType>
<bNeededInCity>1</bNeededInCity>
</BuildingClassNeeded>
</BuildingClassNeededs>


Why Al doesn't build any wall :undecide:. I noticed when for some buildings need more than 2 buildings Al don't build that building, Al build but much less (Maybe). Example: Library--> University (Al will build this), herbalist--> Apothecary--> Clinic (Al build but much less) WHY??? And when for some unit need some building, Al much less build that unit.

Statistic from one test playing Creatures in war:
Spoiler :

Era=ERA_ANCIENT
Speed=GAMESPEED_NORMAL
Calendar=CALENDAR_DEFAULT
Option=GAMEOPTION_AGGRESSIVE_AI
Option=GAMEOPTION_COMPLETE_KILLS
Victory=VICTORY_TIME
Victory=VICTORY_CONQUEST
Victory=VICTORY_DOMINATION
Victory=VICTORY_CULTURAL
GameTurn=212
MaxTurns=500
...
After 212 turns (Not all tech researched) :
Number of cities: 58
Civilizations: 10
BUILDING_STOCKADE: 2 (Only i am build this)
Other walls: 0
BUILDING_SLAVE_CAGE: 38
BUILDING_SLAVE_MARKET: 16
BUILDING_NATIONAL_SLAVE_AUCTION: 7 (National Wonder 1 allow)
BUILDING_BARRACKS: 47
BUILDING_MILITARY_ENCAMPMENT: 13
BUILDING_STABLE: 15
BUILDING_TRAINING_YARD: 39
BUILDING_ARCHERY_RANGE: 28
BUILDING_SIEGE_WORKSHOP: 30
BUILDING_DRAKE_NEST: 32
BUILDING_GRANARY: 55
BUILDING_HUNTING_LODGE: 18
BUILDING_SMOKEHOUSE:46
BUILDING_HERBALIST: 16
BUILDING_APOTHECARY: 11 (req BUILDING_HERBALIST)
BUILDING_CLINIC: 6 (req BUILDING_HERBALIST and BUILDING_APOTHECARY)
BUILDING_WELL: 9
BUILDING_AQUEDUCT: 5 (req BUILDING_WELL)
BUILDING_LIGHTHOUSE: 26
BUILDING_ANCIENT_SHIPS: 12
BUILDING_SHIPYARD: 6 (req BUILDING_ANCIENT_SHIPS)
BUILDING_HARBOR: 5
BUILDING_FORGE: 34
BUILDING_FORGE_INDUSTRY: 27 (req BUILDING_FORGE)
BUILDING_OBELISK: 24
BUILDING_CITYSQUARE: 3 (req BUILDING_OBELISK) <-- It's very low
BUILDING_ACADEMY:5 (can be build by great people)
BUILDING_ELDER_COUNCIL: 15
BUILDING_LIBRARY: 27
BUILDING_UNIVERSITY: 0 (No one researched tech for this building after 212 turns)
BUILDING_THEATRE: 4
BUILDING_COLOSSEUM: 2
BUILDING_MARKET: 13
BUILDING_GROCER: 14
BUILDING_BANK: 2
BUILDING_COURTHOUSE: 9
BUILDING_JAIL: 5
BUILDING_KI_TEMPLE: 9
BUILDING_KI_CATHEDRAL: 5
BUILDING_KI_MONASTERY: 7
etc...
 
Maybe just not enough time/hammers? Might be that the AI just thinks that they'll not be able to build that all, and concentrates on something else.
-> I'd try making the buildings cheaper.

Maybe, but FORGE and FORGE_INDUSTRY (req. FORGE) cost: FORGE=120 hammers, FORGE_INDUSTRY=250 hammers, and Al massive build this buildings, but Walls cost: 12, 25, 50, 75, 100 hammers and Al don't want build this.
 
I'm going to add an "Utopia Project" into my mod 2100.
It will be very costly,but it has many positive effects.
I will need codes for this:
-Removes unhappiness from all cities in the WORLD
-All AIs become friendly to the player
-Nobody can declare war on anyone
Would that be possible?
Thank you!

That's actually a good idea,I will introduce the "Utopian Victory".
But I first need a code and some instruction how to make the Utopia Project trigger the Utopian Victory.

Seems you cannot remove unhappiness from a city. Would a ton of :) also do the job?

The other stuff is more or less working. I just have a few problems with the extension of the victory screen for my second victory type, and would like to deal with that before releasing anything.
Edit: OH, screen problem fixed, that was easy :D.
Now just have to think about a clever idea about how to load the correct data for that victory :think:.


------------------
No idea about above, sorry.
 
1) Add a dummy building to each city that removes happiness
2) setWinner (TeamType eNewWinner, VictoryType eNewVictory)
 
Although... whats the point of adding all these benefits when the game already ends... :D
 
Seems you cannot remove unhappiness from a city. Would a ton of also do the job?

The other stuff is more or less working. I just have a few problems with the extension of the victory screen for my second victory type, and would like to deal with that before releasing anything.
Edit: OH, screen problem fixed, that was easy .
Now just have to think about a clever idea about how to load the correct data for that victory .
Thank you very much for your help,The_J!
What's the problem with the data?
 
Although... whats the point of adding all these benefits when the game already ends... :D

Flavour :dunno:?

Thank you very much for your help,The_J!
What's the problem with the data?

Not yours, the other victory.
The other one is that civ X wins if civ Y is destroyed.
Since I guess that for some scenario some people would like to add multiple cases there (X wins when Y destroyed, Z when A, B when C or D, etc), I think at the moment if there's not a more comfortable way to load the data.
Could make it read from XML, obviously, but have not decided yet.
 
Where can I find where the amount of culture "Create Artwork" is set ? - FOUND

EDIT: <iGreatWorkCulture>4000</iGreatWorkCulture>
 
I'm trying to turn off ships from being able to pillage. I've found the <bPillage> tag in the unitinfos.XML however when setting that from 1 to 0 it turns off pillage while also turning off blockade. Is there a way to only turn off pillage while leaving blockade?

I'm guessing there's another setting somewhere since transports can normally pillage but not blockade so the two actions shouldn't be completely tied together.

Also, after I turn off pillage and put the updated file on both computers I wish to play multiplayer on, and start the game (after clearing the XML cache) the computers don't recognize each other as having the same version of the game files. I'll get the *MOD* tag next to the name of a person even though the files should be identical. I realize the game is still playable with the mod tag next to someones name but I've found that it creates Out of Sync errors any time an action occurs that has been removed from the game on one machine but not the other. Is there a fix for this?
 
...you didn't modify the original files, did you?

XML COmmenting seems to cause strange behavior. Is that correct? Anybody know anymore than that?

That's correct. And it depends on the file. Some are parsed better without any problems, but in some files (like the different sound XML files) it can really break stuff.
Sadly no idea which files are all affected.
 
Back
Top Bottom