Quick Modding Questions Thread

Does anyone know what CvCity function is called when the player or AI orders the construction of a unit? I couldn't find it.
 
I attempted to edit the Civ4UnitInfos file to make it so that Destroyers are not made obsolete when Stealth Destroyers are available. I deleted the following lines (and the same for the Missile Cruiser as well):

UnitClassUpgrade
UnitClassUpgradeType: UNITCLASS_STEALTH_DESTROYER
bUnitUgradeClass: 1

However, I am still unable to build regular destroyers once Stealth is discovered. Did I do something wrong in the XML, or is my problem that I am trying to do this with a game that was already started and saved (IOW, would it work properly if I started a new game?)
 
Voyhkah: they push an order. The AI uses "pushOrder(ORDER_TRAIN, eBestUnit, eUnitAI, false, false, false);" in CvCityAI::AI_chooseUnit. This would add an order to train the unit to the city's build queue - the boolean arguments control thing like whether it appends to the queue or replaces everything in the queue or adds it to the front of the queue or things like that (not sure which does what - you can figure that out).

Unclesam: In an existing game, changes to unit properties only affect new units. Units that were built already have their properties set to what they were at the time they were built. (Ditto for buildings, in case you try that.) Each unit has a full copy of all the properties in the XML (and then some) - they don't point to a single list of properties.
 
I would really like to be able to pillage roads within my own cultural borders. I've scanned several of the XML files but haven't found anything useful. Can anyone provide any information on how I might be able to do this, or is this effect hard-coded in the game engine?

Thanks in advance.
 
@ HardwarProphet: it's not in the XML, it's coded in the DLL. Some mods (like K-Mod) have made the appropriate changes.
 
I know this has been asked a hundred times before, but I'm too lazy to dig through search results and I don't feel like starting a new thread.

The religion-founding mechanism sucks. I'd like to see a system in which religions are founded just like corporations: you have a Great Prophet, you have a particular technology, you use that GP to build their special building, thus founding the religion (i.e, if you have Theology, you can pop a Great Prophet to build the Church of the Nativity, which founds Christianity). Where can I find, or how can I make, a mod like this?
 
That's a very interesting concept.
 
Really need some1s help on this one

Trade routes has always been confusing to me
I cant figure out how to make trade routes to every city, i have a modern mod and i want every city you have to have trade routes, or at minimum have trade routes to the rest of your cities, as long as they are on the coast

Now ik the tech option you can do, i have my default tech taht every1 starts with to give trade routes through every type of terrain, yet still if i have cities on the other side of the world, no trade routes, for some reason if they are somewhat in the area of another city (and that of another etc untill it gets to the capital) it has a route, is there somewere to have a building make a city has trade route? i put +1 trade routes for airport but idk what that does honustly, it definatly doesnt give a trade route, its annoying having post of ur cities not have oil
 
Really need some1s help on this one

Trade routes has always been confusing to me
I cant figure out how to make trade routes to every city, i have a modern mod and i want every city you have to have trade routes, or at minimum have trade routes to the rest of your cities, as long as they are on the coast

Now ik the tech option you can do, i have my default tech taht every1 starts with to give trade routes through every type of terrain, yet still if i have cities on the other side of the world, no trade routes, for some reason if they are somewhat in the area of another city (and that of another etc untill it gets to the capital) it has a route, is there somewere to have a building make a city has trade route? i put +1 trade routes for airport but idk what that does honustly, it definatly doesnt give a trade route, its annoying having post of ur cities not have oil

Have you considered the building of road systems or railway connecting from your land resources in specific to your intended cities?
 
Hello. I have a question: It is possible to replace the Germany panzer unit icon from regular game BTS for the TigerI icon from RTW-Historical?

Which tools must be used?? Where can I start? I'm a complete newbie in this stuff.

Thanks and sorry for my english.
 
Replacing buttons should be fairly simple.

Art for units is defined in Assets\XML\Art\ArtDefines_units.xml. Mods have this file too in the respective mods subfolders.
XML files are text files, you can open them with a text editor (right click -> "open with..." -> wordpad or notepad).
So, create a mod with that file (means: You create a new folder in the mod folder, and create the mentioned subfolders and copy the mentioned file to this place).

Then you have to search for the units. Normally the entries begin with something like ART_DEF_UNIT_HereTheUnitName, so e.g. ART_DEF_UNIT_GERMAN_PANZER.

An entry begins like this:
PHP:
		<UnitArtInfo>
			<Type>ART_DEF_UNIT_GERMAN_PANZER</Type>
			<Button>,Art/Interface/Buttons/Units/Panzer.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,3,11</Button>
			<fScale>0.47</fScale>
			<fInterfaceScale>0.9</fInterfaceScale>

Search then the tiger entry, and replace the button section from the panzer with the button section from the tiger.
Then you just have to put the tiger button in your mod, which you should be able to find at the in the ArtDefines mentioned place in the RtW subfolders.
 
I have a problem with "button" text. In BTS shows "Atlas_Resource_Unit" or something else, but in the RTW Tiger "button" it doesn't appear.

If that text isn't put in the xml archive, the game crash. If I put it in, a red ball appears intead the Tiger unit icon. What can I do? I'm surely doing somethig wrong, sorry.

And thanks for answer me. Appreciate.
 
I have a problem with "button" text. In BTS shows "Atlas_Resource_Unit" or something else, but in the RTW Tiger "button" it doesn't appear.

If that text isn't put in the xml archive, the game crash. If I put it in, a red ball appears intead the Tiger unit icon. What can I do? I'm surely doing somethig wrong, sorry.

And thanks for answer me. Appreciate.

What does it exactly show for the tiger?
(sorry, don't have RTW-Historical currently here)

What decides the order in which production options appear? (I mean units, buildings and wonders at the city window / choose next production popup).

I think besides the recommendations, the rest is alphabetically (...or isn't it?).
 
I have a problem with "button" text. In BTS shows "Atlas_Resource_Unit" or something else, but in the RTW Tiger "button" it doesn't appear.

If that text isn't put in the xml archive, the game crash. If I put it in, a red ball appears intead the Tiger unit icon. What can I do? I'm surely doing somethig wrong, sorry.

And thanks for answer me. Appreciate.
It may pay to read these tutorials - It worked for me - after a lot of trial and error

http://forums.civfanatics.com/showthread.php?t=139721
http://forums.civfanatics.com/showthread.php?t=176460
 
I know this question has been asked before, but how is the amount of experience needed for a promotion determined?
 
I have a problem with "button" text. In BTS shows "Atlas_Resource_Unit" or something else, but in the RTW Tiger "button" it doesn't appear.

If that text isn't put in the xml archive, the game crash. If I put it in, a red ball appears intead the Tiger unit icon. What can I do? I'm surely doing somethig wrong, sorry.

And thanks for answer me. Appreciate.

The buttons specification has two formats. One if it is just a single image, a different one if it is in an atlas (a file containing multiple buttons).

1) would looks something like this:
<Button>Art/Interface/Buttons/Units/Panzer.dds</Button>
There are no commas anywhere in there.


2) like in the The_J's example above:
<Button>,Art/Interface/Buttons/Units/Panzer.dds,Art/Interface/Buttons/Unit_Resource_Atlas.dds,3,11</Button>
Note that the very fist character is a comma, and there are 3 more later. This first file specification is apparently never used, the second is the atlas file, and the two numbers are the position in the atlas.

If you mix your formats and put a leading comma into the first one it does not work and can even cause crashes.
 
Top Bottom