Policies - Lualess modding

TheMarshmallowBear

Benelovent Chieftain of the Ursu Kingdom
Joined
Dec 27, 2006
Messages
8,179
Location
Inside a Ziggurat
Simple. What are the DOs and DONTs of modding strictly through XML.

Since for some reason I am set on re-doing all the policies :lol: (don't ask)
 
Check the base game's stock Civ5Policies XML files. At the very top will be the 'schema' -- this is a list of every table and column that can be used to make Policies in XML with. This goes for pretty much any other XML file in the game. (There are the odd exceptions where there are unused columns that may or may not work.)

Mix and match to your heart's content.
 
Check the base game's stock Civ5Policies XML files. At the very top will be the 'schema' -- this is a list of every table and column that can be used to make Policies in XML with. This goes for pretty much any other XML file in the game. (There are the odd exceptions where there are unused columns that may or may not work.)

Mix and match to your heart's content.

That is until you break the entire system though :lol: which is why I'm asking.

For example I see the lack of background image definition in the XML which means I am stuck with the pictures backgrounds (or even more precisely, the tree locations).

I deleted the Tradition's policies and I managed to break the rest of the actual trees (except Liberty.. for some magical reason) :lol: YAY MODDING

It might because the game is attemptign to refrerence non-existing policies in other tables.
 
Brave New World...

And yes, I am aware that I'm playing with fire here, but I am just playing around, I'm having doubts about playing with Policies because it's a very complicated and delicate feature.
 
BNW assumes there are EXACTLY three policy branches that are actually ideologies - this is hard-coded in the DLL ... as are the type names. SocialPolicyPopup.lua makes a few assumptions about how many level 1, 2 and 3 tenets (policies) there are - probably not a good idea to change the number in the base game without digging into the popup lua code.

WRT actual policies, the number of, branch types and locations are hard-code in the popup. So while you can re-purpose the branches, you can't add to or delete them. Within each branch there are more hard-coded assumptions. Every branch MUST have an opener, a finisher and at least one other policy. The max policies a branch can have is six (two columns of three rows) and IIRC the lua crashes if you put policies outside of the expected co-ordinates or two policies at the same co-ordinates in the branch if a connection is needed (although even without the connection, one of them will be un-selectable)

CivV, the most moddable civ yet - so long as you don't want to actually change anything :mischief:
 
BNW assumes there are EXACTLY three policy branches that are actually ideologies - this is hard-coded in the DLL ... as are the type names. SocialPolicyPopup.lua makes a few assumptions about how many level 1, 2 and 3 tenets (policies) there are - probably not a good idea to change the number in the base game without digging into the popup lua code.

WRT actual policies, the number of, branch types and locations are hard-code in the popup. So while you can re-purpose the branches, you can't add to or delete them. Within each branch there are more hard-coded assumptions. Every branch MUST have an opener, a finisher and at least one other policy. The max policies a branch can have is six (two columns of three rows) and IIRC the lua crashes if you put policies outside of the expected co-ordinates or two policies at the same co-ordinates in the branch if a connection is needed (although even without the connection, one of them will be un-selectable)

CivV, the most moddable civ yet - so long as you don't want to actually change anything :mischief:

Haha Thanks, so let me get this straight

There can only be two policies per row, and 3 per column., so I can't have 3 policies side by side at all (well that was one of my ideas) but I can have up to 6 individiual policies (not counting the starter and finisher).

Yes, I feel the love from the modding, hopefully this will be changed.

I might just stick to existing Policies since there's so much to consider anyway.
 
Ah, I had thought you only wanted to modify the policies themselves.

The whole popup is terribly hardcoded, so it's very annoying to modify, as whoward has described. There should be a mod that revamps it, though, so you can probably take a look at it for reference.
 
You may be able to get three on a row (didn't tradition used to have three in row 1?), if so you may be able to get 9 polices plus the opener and finisher into a branch. The point is that the Lua is horribly coded and makes tons of assumptions, so without recoding it, you're going to bump into arbitrary limits where you may reasonably think there shouldn't be any. Definitely step-by-step and not big-bang changes needed!
 
You may be able to get three on a row (didn't tradition used to have three in row 1?), if so you may be able to get 9 polices plus the opener and finisher into a branch. The point is that the Lua is horribly coded and makes tons of assumptions, so without recoding it, you're going to bump into arbitrary limits where you may reasonably think there shouldn't be any. Definitely step-by-step and not big-bang changes needed!

Thank you all, this was very helpful, I needed to double check, nothing is more annoying that the game acting up because of a single typo :lol:
 
I increased the number of policies to 9 per branch (3 rows x 3 columns, not counting openers and finishers), and haven't encountered any problems so far.
 
Top Bottom