Quick Modding Questions Thread

My guess is that init.log only displays functions that are run during the initialization of the game.

I probably should have thought of it... init.log ... :rolleyes:

In any case, you can write your own profiler if it seems things are too slow when the map begins to fill up.
 
What are some good tutorials on creating new units or modifying old ones? What are the best software programs to use?
 
What do I need to edit so that one can build three (and only three) of a special unit IF they have a particular world wonder? Hmm, might be a it too complicated for a "quick" question. . .
 
I have been busy tring to create a hyrule civilization for BTS and ive hit a sort of speed bump. I have used a usermade building .nif to create a temple to be hyrule's unique building. i have done everything i could think of to fix this problem, but, when i attempt to build the temple -ingame- BTS crashes. i have no idea why. the strange part is that it appears in the civilopedia just fine .... any help would be very much appreciated.
 
What do I need to edit so that one can build three (and only three) of a special unit IF they have a particular world wonder? Hmm, might be a it too complicated for a "quick" question. . .
I think that you can limit the number of instances with the "National unit" settings in the XML. But for the unit to be available/not available with/without the wonder you need to hack into the CvGameUtils.py file, which involves Python scripting. (PM me if you need code for this.) If you wanna polish it further you probably need to hack into the game interface modules to disable the unit entirely from the city building options menu. (Someone else would probably be able to help out.)
 
If you want it buildable in only the city with the wonder, then you can give the unit a prereq building of that wonder using the existing PrereqBuilding tag in the unit info XML. For doing it in any city of the civ that owns the wonder, you either need the Python scripting (or a DLL mod) or you need the wonder to put a building in every city (via the XML, like Stonehenge puts a Monument in every city, using a building that can not be built any other way) and then make the free building be the prerequisite.

By the way, a number limit is done via the unit class XML file rather than the unit file. Missionaries and corp executives are limited this way. Note that this is not an absolute limit, but a limit on the number that can exist at one time: if one is killed you can replace it. To make an absolute limit of only ever being able to make 3 of them you need to use Python scripting (or DLL modifications) to keep track of how many you have built and block more after the limit is reached (and you have to save the data when you save a game or it will forget and let you build more after loading a save).
 
i have done everything i could think of to fix this problem, but, when i attempt to build the temple -ingame- BTS crashes. i have no idea why. the strange part is that it appears in the civilopedia just fine .... any help would be very much appreciated.

Does it work in the civilopedia? Can you drop it in a city via the worldbuilder?

If yes: Check your button. It can max. be 64*64 pixels, and in the art defines, in front of the button, there shouldn't be a comma.
 
Does it work in the civilopedia? Can you drop it in a city via the worldbuilder?

If yes: Check your button. It can max. be 64*64 pixels, and in the art defines, in front of the button, there shouldn't be a comma.


yes it works in the civilopedia and can be added in world builder, and the button appears just fine wen i went to build it in the city screen, but wen i clicked to add it to the production list - bam crash .... i dont know possibly what is going on ...: confused:
 
And did you do what i said ;)?

Checking the size should be easy. If you didn't make the button, then ignore it, the size is probably right.
But since you are a "newb", you should definitely like mentioned check the art defines.
You probably did something like:
PHP:
<Button>,Art/somewhere/mynewbutton.dds</Button>

and the leading comma is always the problem for beginners, because the default style with the beginning commas is very missleading. Remove the comma, and you should be fine.
 
This might have already been asked but I'm too lazy to look for it.
How can I add the shovel animation to my Praetorians? I already gave them the ability to build roads and forts and it looks like that's working fine, except they just stand there instead of whipping out the shovels like a normal worker. Also, although this is less of a priority for me, I would like to change the name of the Praetorian to the more accurate "Legionary". I tried doing this in the CivInfo XML and the UnitInfo XML but it still shows up in the game as a Praetorian. Where do I need to change this?

Thanks!
 
This might have already been asked but I'm too lazy to look for it.
How can I add the shovel animation to my Praetorians? I already gave them the ability to build roads and forts and it looks like that's working fine, except they just stand there instead of whipping out the shovels like a normal worker. Also, although this is less of a priority for me, I would like to change the name of the Praetorian to the more accurate "Legionary". I tried doing this in the CivInfo XML and the UnitInfo XML but it still shows up in the game as a Praetorian. Where do I need to change this?

Thanks!

To change the name from Praetorian to Legionary, you need to edit TXT_KEY_UNIT_ROME_PRAETORIAN, which can be found in CIV4GameTextInfos_Objects.xml. It has the name of the unit in a few different languages. You might also want to change the relevant of the civilopedia entries...
(You don't actually have to put the txt key in the same file. In my mod I've put most of my replacement txt into a single xml file rather than replacing bits and pieces of all the different default files. This only works for txt data though. Game data, such as unit stats, needs to be in the correct file.)

It doesn't matter that the name of the txt key says "praetorian", nor does the name of the unit key matter in the units xml. Those names are only used internally - they are not visible to the player.
 
Hey guys.
I want to change the default camera view to show the isometric view (normally you get this perspective by hitting ctrl+arrow key). I can't figure out how to rotate the camera by default (no luck so far in xml, python and the dll). Any advice or help?
 
A wild guess: Global Defines XML.
 
Does your mod include a scenario (WBS file) or can it be used with any map script?

You can edit the turn increments in the Game Speed Info XML. Note that all values are expressed in months, so one year is 12, half-a-year is 6, and so on.

I think you should only have one game speed in your mod. Either you define your own, or you edit the "Normal" speed, and disable the rest.
 
Does your mod include a scenario (WBS file) or can it be used with any map script?

You can edit the turn increments in the Game Speed Info XML. Note that all values are expressed in months, so one year is 12, half-a-year is 6, and so on.

I think you should only have one game speed in your mod. Either you define your own, or you edit the "Normal" speed, and disable the rest.

Thanks for the help

And it doesnt has a scenario in it but for the time being does work, but im definatly going to put scenarios in, but i still want custom games to work. Ik how to do it for scenarios, but not for default custom games.

Also one more thing, where do you edit the unit categories?Im like blind i cant seem to find it
 
Back
Top Bottom