Quick Modding Questions Thread

It does exactly that. I'm using it in my mod since a long time (range 9 to 90) and it does make a difference.

perhaps it only works effectively in a range from 0-100, so increasing it above 100 appears negligible, but decreasing them all to achieve the balance you want may make a better outcome.

Hm, maybe I should try that. What I did was leave some at 100 while increasing the others, one even to 250.
 
yeah maybe try 25, 50, 75 see if that does any better.

Civ has some weird math design in some places. airstrength is one where the math pretty much renders player inputs meaningless, it seems to either give I think something like 33% or 100% no matter how extreme you change the available xml inputs.

We changed that For FTTW to make it work 'properly'. It could be the same with ispread.
 
Well now I feel like an idiot: I wanted to increase the spread of Buddhism, Islam and Christianity, and put their spreadfactors to 150, 250 and 200 respectively (or so I thought), but in all my test games so far Hinduism, which remained at 100 (or so I thought!) spread like weed with nothing else even remotely catching up.

Now I opened the file again to enact your suggestions only to find out that I accidentally set Hinduism's spread factor to 250 instead of Islam. :crazyeye:

I'll get back to you after running some tests with the values set to what they were supposed to be in the first place.
 
As far as I can tell it only affects the spread to cities which currently don't have a religion. Which is why latter religions need to work at it to spread using missionaries.
 
As far as I can tell it only affects the spread to cities which currently don't have a religion. Which is why latter religions need to work at it to spread using missionaries.

I am modmodding a mod in which later religions can also spread into cities that already have a religion present, but don't ask me about the exact mechanics behind that.
 
Hi.

I have a mod with 47 players. The score player list (in game) is too large and i want to reduce it, maybe downscaling the font of the list. Where i can do it? What file?

I also want to change, the diplomacy screen. Actually, the players are in a semi circle pattern. I want to do a 360 pattern with the human player in the center. What file i need to mod?

Thanks.
 
You could try to reduce the font in CvMainInterface.py (def updateScoreStrings) from 2 to 1, but I don't know what will be left of it... or, you could use this version which allows a scrolling scoreboard. You can either merge it with your mod or if that function was not altered in your mod, simply replace the whole function.

Alternatively, you could try Platyping's Ultrapack with a total revamp of the screens used in BtS. That's where the code from the scrolling scoreboard comes from.

The Diplomacy Screen is the CvExoticForeignAdvisor.py file, more specifically the def drawGlance function.
 
What really mean war weariness BTS ?

ps:
And how AI choose which is best civic for them ? How AI calculate that (which .cpp file ?) ? I know how calculate promotions, but civic i don't know and can't find that mechanic.
 
Hello and question of the day is:

in unit_info:

UnitClassTargets Unit attacks first against the specified unitclass(es).
UnitClassDefenders Unit defends first against the specified unitclass(es).

My question is, if I have unit classes A, B and C, where A is set to automatically target B when attacking and C is set to defend first against A, how would resulting combat look like?
will Defender special overwrite attacker special? or in other words, will A still hit B, or will C step in and defend against A?
 
You could try to reduce the font in CvMainInterface.py (def updateScoreStrings) from 2 to 1, but I don't know what will be left of it... or, you could use this version which allows a scrolling scoreboard. You can either merge it with your mod or if that function was not altered in your mod, simply replace the whole function.

Alternatively, you could try Platyping's Ultrapack with a total revamp of the screens used in BtS. That's where the code from the scrolling scoreboard comes from.

The Diplomacy Screen is the CvExoticForeignAdvisor.py file, more specifically the def drawGlance function.

I used the mod allowing scrolling... perfect! It´s that i was looking for.

Thanks
 
Another Question :

I found the file where it determines the spread of religions.
If I set my game with Choose religion options, how does it work with spread factor?
Does the spread factor will still affect the specific religion choosen or will the game automaticaly adjust and apply the specific spread to the religion found by appropriate tech?

For exmaple:

Let say I set spread factor of Islam to 500 (from original 100) which is normally found with Divine Right.
If I then play with Choose Religion options and choose Islam after discovering Meditation, will Islam still carry 500 spread factor or will the game auto-adjust and instead grant the 500 spread factor to the religion which will be chosen from discovery of Divine Right?

thanks!
 
Another Question :

I found the file where it determines the spread of religions.
If I set my game with Choose religion options, how does it work with spread factor?
Does the spread factor will still affect the specific religion choosen or will the game automaticaly adjust and apply the specific spread to the religion found by appropriate tech?

For exmaple:

Let say I set spread factor of Islam to 500 (from original 100) which is normally found with Divine Right.
If I then play with Choose Religion options and choose Islam after discovering Meditation, will Islam still carry 500 spread factor or will the game auto-adjust and instead grant the 500 spread factor to the religion which will be chosen from discovery of Divine Right?

thanks!

I will give you answer, every RELIGION is separate object for itself for example, if Islam have 500 spread in ReligionInfo.xml, they will have that spread rate whatever option you will choose, because game read that from xml file. That is same as for missionaries, if Islam get 3 missionaries when found, Taoism get 1 missionary, Islam will get 3 missionaries always and Taoism will get 1 missionary whatever option you will choose, because that is attribute for that object (RELIGION) in this case.
 
How does one make a new ArtStyleType?

It appears that they are stored in the GlobalTypes.xml but do not appear to have any corresponding nif.

If making a new ArtStyleType is too cumbersome or simply not worth the effort does anyone know how to change an existing one?

Thank you for any assistance.
 
In the Buildings folder, you have CIV4CityLSystem.xml and CIV4PlotLSystem.xml. That's about all I know... never tried to modify them. :sleep:
 
I will give you answer, every RELIGION is separate object for itself for example, if Islam have 500 spread in ReligionInfo.xml, they will have that spread rate whatever option you will choose, because game read that from xml file. That is same as for missionaries, if Islam get 3 missionaries when found, Taoism get 1 missionary, Islam will get 3 missionaries always and Taoism will get 1 missionary whatever option you will choose, because that is attribute for that object (RELIGION) in this case.

thank you!
 
How does the game sort leaderheads in the 'Custom Game' dropdown menu? The Civilopedia is purely based on the actual name, as defined in one of the text files (where, for example, you can say that LEADER_RAGNAR is 'Ragnar'). But the 'Custom Game' dropdown menu is different; even in vanilla Beyond the Sword you can see Mao Zedong being in the wrong alphabetical place. But, he is LEADER_CHINESE_LEADER in the .xml files, and based on that, he is actually in the correct place.

The answers I have found say it's simply the order within CIV4LeaderHeadInfos.xml, but that isn't true; for example, I have a LEADER_CIVILIS and a LEADER_HUSSEIN after Zara Yaqob

The game also doesn't sort them alphabetically based on the LEADER_XYZ tag; changing LEADER_AUGUSTUS to LEADER_GAIUS_OCTAVIANUS changes nothing. Similarly, changing the folder of a custom leader (Tandi, in this case) to 'ZZZTandi' doesn't change anything; Tandi still appears on the normal alphabetical place.

So... How does the game sort the dropdown menu?
 
According to me, it's in the order of appearance in the LeaderHeadInfos. I had to rearrange them to have them appear in alphabetical order (in French). Now, they all come in order for me.

Modules, I don't use.

PS: just tested again by putting Zara Yaqob at the top of the file and he appears first on the list.
 
Well, that doesn't work for me... And I use one single Civ4LeaderHeadInfos.xml file.

Could you test it out, per chance (yeah, you'll get lots of missing text and art errors, but the game should launch and you should be able to see the dropdown menu)?

http://www.filedropper.com/civ4leaderheadinfos (that should allow you to download it freely without any account or whatnot - why does this forum not support .xml files?)

EDIT: Ah, see the attached .rar file if the above link doesn't work.
 

Attachments

  • XMLFilesAreApparentlyNotSupportedByThisForum.rar
    18.3 KB · Views: 26
This has probably been asked before, but is there an easy way of making buildings and/or units "consume" a certain amount of resources when built? I am just wondering if there is infrastructure already in place. I know of some mods that do that but if I were to seek inspiration there, which files would I have to check?
Thanks for your help.
 
Top Bottom