Quick Modding Questions Thread

@ Tims
You are probably looking for gameinfo/CIV4erainfos.xml. Look through the modiki to find out what the various xml tags do.


Question:
Does anyone know where the placement of these buttons (plus the unit order buttons, but I think it is the same place) is in the python?

I looked through maininterface.py but couldn't find them..
 

Attachments

  • buttons placement query.jpeg
    buttons placement query.jpeg
    129.2 KB · Views: 49
Does anyone know where the placement of these buttons (plus the unit order buttons, but I think it is the same place) is in the python?

I looked through maininterface.py but couldn't find them..

In that file, look for def updateSelectionButtons. It's all about the "BottomButtonContainer".
 
I don't know how to open a .ani file. I just want a picture of the Beyond the Sword "waiting" cursor, the golden circle with a sort of blade or pointer through it.
 
Any Idea how to get it to display 1 line of buttons instead of 2?

Also any idea how it places it's scroll bar? It seems with the changes I have made the scroll bar has gone down and right, which puts it off of the screen...

In Platy UI, locate:
Code:
screen.addMultiListControlGFC( "BottomButtonContainer", u"", iMultiListXL, yResolution - 113, iWidth, iHeight, 2, iIconSize, iIconSize, TableStyles.TABLE_STYLE_STANDARD )
and try to replace the isolated 2 by 1. Disclaimer: not tested, not guaranteed, repair computer/home/neighbourhood at your own expense :nuke:

Edit: you could also play with the iSelectionLayer set as 2 in the def __init__ section at the top.

I think the scroll bar is an integrated feature of the table.
 
Doh... that was what I tried :D It didn't work...

ok, I am trying self.iSelectionLayer from 2 to 1, I have a feeling this may throw a whole load of hooky out of whack..

I figured the scroll bar may have been integrated, I am trying to remember what it looked like before, I think I need to figure out what defines the whole box of the table, so I can 'pull up' that bottom right corner as it currnetly extends below the screen.

EDIT: Well... it sort of worked... I can see the scroll bar again, and only 1 line of buttons, but the icons are now massive and fall off the bottom of the screen!

Can that be defined as progress?

EDIT2: Good News, Bad News:

Good News: I seem to have been able to adjust the icons to just the right spot and they look lovely there. (Who knows what will happen when I change the resolution!)

Bad News: The scroll bar has gone for a walk somewhere, so you can only view another row of icons if you have a mouse scroll wheel!

EDIT3: Scroll bar is back and it's Y placement is just about perfect, if I can move it a couple inches to the left I will have it!

EDIT4:
iMultiListXL = 318
iMultiListXR = 500

These are the ones, I am about 1 mm from perfection at this resolution!

EDIT5: OH FOR LAKMFNOPIQWJFQOPJF!!!

Now I have one errant unit picture up near the top right corner of the lower area... All the other units are behaving themselves and sitting where they should, it just seems that the first one in the line always want to run off!!

EDIT6: Ok just a glitch, on reload they were back behaving themselves!
 
I remember seeing something about values that affected production bonuses through the course of the game...wish I could be more specific...but I'd like to find and adjust those values. I'd like to strengthen the AI more as the game progresses than it does.

I find that if I set difficulty higher the early game is not really much fun, but if I set it lower the runaway effect ruins the late game.
Setting iAIPerEraModifier in CIV4HandicapInfo.xml to minus x should result in an AI discount of x% per era on city production, upkeep costs and upgrade costs. AI cities also need less food for growth and experience less war weariness. (I think that covers all the effects.) For example, on Prince difficulty (x=1): 99% unit cost in the Classical era, 98% in Medieval etc. On Deity, it's x=5, i.e 95%, 90% ...

To my knowledge, CIV4EraInfos.xml affects all civs alike, not just the AI.
 
I remember seeing something about values that affected production bonuses through the course of the game...wish I could be more specific...but I'd like to find and adjust those values. I'd like to strengthen the AI more as the game progresses than it does.

I find that if I set difficulty higher the early game is not really much fun, but if I set it lower the runaway effect ruins the late game.

Check out this tag in Civ4HandicapInfo.xml
Code:
<iAIPerEraModifier>0</iAIPerEraModifier>
The lower the number is (e.g. -5 for Deity), the lower many things cost for the AI every era. So simply make a mod that adjusts one of the lower handicaps that you like to start the game at, and change this number so the AI will have cheaper costs for things as the game goes on.

EDIT: Didn't see the post above me. Sorry for that double answer. :lol:
 
Hi there

Anyone know which .XML file controls the effects of corporations (and which folder is it under)? Can't seem to find it all of a sudden >_>
 
Is there an easy way to give a civ trait, like organized, a promotion for all siege units, except machine guns (which are considered siege units).

I noticed machine_guns dont get to pick barrage or city raider promos, even though they are considered siege.
 
Where do I save modded XML files to after modifying them? I plan on editing and/or creating some civics, but I don't know where to save it.

By the way, I'm not sure on how to create a civic from scratch; how would I do that?

Thanks for any help. :)
 
Is there an easy way to give a civ trait, like organized, a promotion for all siege units, except machine guns (which are considered siege units).
Not with XML, unfortunately.

I noticed machine_guns dont get to pick barrage or city raider promos, even though they are considered siege.
The promotions probably require being able to attack, which makes sense because they are useless if you can't.

Where do I save modded XML files to after modifying them? I plan on editing and/or creating some civics, but I don't know where to save it.
General answer: just edit and save them and the change will take effect the next time you restart the game.

Recommended: you probably don't want to permanently change the base game itself, so it makes sense to create a mod. Sounds daunting, but in the end it's just a new folder in the Mods directory with only the XML file you've changed. This guide should explain it.

By the way, I'm not sure on how to create a civic from scratch; how would I do that?
What exactly do you want to do? Replace a civic in a category? Add an additional civic to a category?
 
The promotions probably require being able to attack, which makes sense because they are useless if you can't.

IIRC, the dll restricts units from gaining promotions that grant attacking benefits if the unit cannot attack, such as city raider series. But that doesn't make those promotions useless to units which cannot attack, because the dll doesn't check that those promotions do not grant any other benefits.

City Raider III for instance grant bonus against other units, which is useful even for defenders.

At the very least, they can also be used for instant heal, when the unit has no other promotions available.
 
So I wonder if the trait system would override the 'cannot attack block' and give the machine gun a promotion along with all other seige weapons, if it has an attack function?

If not you could give the promotion +1% city attack, to block the machine gun.

I am guessing it probably would override though.
 
What exactly do you want to do? Replace a civic in a category? Add an additional civic to a category?

I was hoping to add a civic, or add several new ones.

If I saved multiple modified XML files in a new folder within the mods folder (such as civics info and traits info) would all of these mods be loaded?
 
Just look at how it is done in any of the BTS mods like next war?
All you need to do is make a new mod folder and dump whatever files you want to modify in respective locations.
 
Back
Top Bottom