Updating sponsor mods for Rising Tide

Lord Shadow

General
Joined
Oct 14, 2005
Messages
2,005
Location
Buenos Aires
So I've been delving into the files some, trying to find out what I'd need to do to make my sponsor mod compatible with Rising Tide.

At first glance it seems it'll take a considerable amount of work, since the new traits are completely different from the old ones, XML-wise, and the data is rather all over the place.

From what I could gather, it seems factions have a "personality", which is referenced to in another file and linked to a "personality trait", which is defined, given levels and associated with "foreign policies" (agreements) and "player perks" (the actual effect on the sponsor). All in different sections of that one file. Then it's referenced to in the player perks file, which also references foreign policies and assigns them their effects. Foreign policies are defined in yet another file. Then there's also scripts referenced to some traits and personalities, which I glanced upon and couldn't make heads or tails of. Most of them do... nothing?

So it's a big mess, with data sprinkled all over several files and many sections.

Then there's all the diplomacy text, every little reaction for every little thing the player does that the sponsor leader might want to comment on. I haven't really looked into that structure, though. I need a break after examining the other one.

I'm sure the structures will start to make more sense the longer I stare at them, but it all looks very inefficiently organized, with unnecessary extra "steps" here and there, and the occasional apparent dead end. I get the feeling people won't be making sponsors by the dozens from here on out. At least not fully unique, fleshed out ones. But then, the game pools all the default sponsors' data together, so once someone manages to extract and build a structure for the stuff a single custom sponsor would use, it'd be a nice template and make things easier.

Thoughts appreciated.
 
My thoughts: Rising Tide is a gigantic mess when it comes to modding, and we're better off sticking to BE, if we're going to mod this game at all.

Seriously. This is incredibly depressing. Did any of the devs stop to consider that we'd be looking at their work at some point?
 
I tried to update my factions to this new standard as well but to no avail so far. Whomever is the first one to make a successful faction mod should make a list of the steps involved and post it here, so we can all update our factions, right?

Right now my European Confederation, Spartan Federation and Japan are waiting for an update, looking forward for some instructions. :-D
 
Well, it's all over the place, but it shouldn't be too hard to understand. The basic structure:

- In the Civilizations-Table there's a <Personality>-Entry, that's where it all starts
- That Personality-Entry is tied to Expansion1\Gameplay\XML\Diplomacy\CivBEPersonalities.xml

The personalities look like this:

Code:
		<Row>
			<Type>PERSONALITY_BRASILIA</Type>
			<ScriptName>BrasiliaPersonality</ScriptName>
			<UniquePersonalityTrait>PERSONALITY_TRAIT_CHARACTER_COMBAT_A</UniquePersonalityTrait>
		</Row>

The <ScriptName> seems to still be unused (files are pretty much empty), so you should be able to just copy-paste an existing one (or even use an existing one).

The <UniquePersonalityTrait> is the interesting one, that's the new System that handles all the other stuff. You can find the CivBEPersonalityTraits.xml in the same folder as the previous one.

That file has 3 Tables, if you just copy-paste the parts of one of the existing sponsors and then use auto-replace there shouldn't be any problem with them once you know what they're there for:

Code:
	<PersonalityTraits>
		<!-- Unique Sponsor Traits -->
		<Row>
			<Type>PERSONALITY_TRAIT_CHARACTER_GROWTH_A</Type>
			<Description>TXT_KEY_PERSONALITY_TRAIT_CHARACTER_GROWTH_A</Description>
			<Help>TXT_KEY_PERSONALITY_TRAIT_CHARACTER_GROWTH_A_HELP</Help>
			<TraitCategoryType>PERSONALITY_TRAIT_CATEGORY_CHARACTER</TraitCategoryType>
			<Unique>true</Unique>
			<ScriptName>PersonalityTrait_Character_Growth</ScriptName>
			<PortraitIndex>30</PortraitIndex>
		</Row>
[...]
That's the general table that acts as the "host" for the rest.

The <ScriptName>-Scripts can be found in \Expansion1\Gameplay\Lua\PersonalityTraits

It's lua, but you don't have to script and can just copy-paste one of the existing lua files (or, in theory, reuse an existing one, but I wouldn't recommend that because Firaxis might edit them later). Add the script in the Content-Tab, as Type: PersonalityTraits (You have to first choose your Lua-File from the Dropdown-Menu first and and then type it manually).

Second Table:

Code:
<PersonalityTraits_Perks>
		<Row>
			<PersonalityTraitType>PERSONALITY_TRAIT_CHARACTER_GROWTH_A</PersonalityTraitType>
			<PlayerPerkType>PLAYERPERK_PERSONALITY_TRAIT_CHARACTER_GROWTH_A1</PlayerPerkType>
			<Level>1</Level>
		</Row>
		<Row>
			<PersonalityTraitType>PERSONALITY_TRAIT_CHARACTER_GROWTH_A</PersonalityTraitType>
			<PlayerPerkType>PLAYERPERK_PERSONALITY_TRAIT_CHARACTER_GROWTH_A1</PlayerPerkType>
			<Level>1</Level>
		</Row>
		<Row>
			<PersonalityTraitType>PERSONALITY_TRAIT_CHARACTER_GROWTH_A</PersonalityTraitType>
			<PlayerPerkType>PLAYERPERK_PERSONALITY_TRAIT_CHARACTER_GROWTH_A2</PlayerPerkType>
			<Level>2</Level>
		</Row>
		<Row>
			<PersonalityTraitType>PERSONALITY_TRAIT_CHARACTER_GROWTH_A</PersonalityTraitType>
			<PlayerPerkType>PLAYERPERK_PERSONALITY_TRAIT_CHARACTER_GROWTH_A3</PlayerPerkType>
			<Level>3</Level>
		</Row>
[...]
That's where PlayerPerks are added to the Traits (the ones that only you get when you play as the sponsor). The game will do that stuff automatically, you just have to define which ones to use. I assume anyone who has a Civilization released probably knows what playerperks are and where to find them). Not sure if it works if you don't have a 3-Level-System.

Third Table:
Code:
	<PersonalityTraits_ForeignPolicies>
		<Row>
			<PersonalityTraitType>PERSONALITY_TRAIT_CHARACTER_COMBAT_A</PersonalityTraitType>
			<ForeignPolicyType>FOREIGN_POLICY_CAPITAL_MILITARY</ForeignPolicyType>
		</Row>
		<Row>
			<PersonalityTraitType>PERSONALITY_TRAIT_CHARACTER_COMBAT_A</PersonalityTraitType>
			<ForeignPolicyType>FOREIGN_POLICY_TERRITORY_MILITARY</ForeignPolicyType>
		</Row>
[...]
Those are the Perks available to other players. It seems like you HAVE to use them as a pair, when I only created one the whole system didn't display anything.
Finally, the <ForeignPolicyType>s are one again in their own file, called CivBEForeignPolicies.xml - that system used in that file should be self-explanatory.

So... yeah, a lot of different pieces to put together, but not all that hard really.


But yeah, updating the Diplomacy texts - especially with the new "Line"-System looks like a TON of work, with no way around it.
At least there's a set of standard-lines for the Communiques, so you can easily skip that step if it's too much work for now.
 
Yes. I've got my bearings to a reasonable extent at this point. I've managed to get some work done, but there's a few of annoyances bugging me:

A minor one is that all traits, foreign policies and their effects have very generic names, making it difficult to tell what's what without rummaging through other files to see which trait is associated to which leader or agreement.

A more significant one is that the new traits are entirely PlayerPerk-based, the old vanilla trait system is discarded, and not all of the old system's effects seem to be supported by PlayerPerks.

Another major one, though not unexpected as vanilla BE was the same, is that for the most part the XML tables only contain effects which are strictly required by the game's existing leaders and agreements. It's still a very specific, inflexible system. I mean, for example, there's a PAC agreement which reduces building maintenance in the capital. Want to do something slightly different, like reduce building maintenance in all cities? No dice: the effect has only one purpose, and you'll have to jump through hoops and/or use Lua to achieve what you want.

These factors impose a challenge which can be resolved creatively sometimes. I had to replace Nuevos Aires' old trait since strategic resource tile modifiers don't seem to be supported in percentage form by the PlayerPerks system. So I went from a static +25% yield mod to a +1/+2/+3 flat increase to improved deposits.

Now I need to come up with a couple of unique agreements, which is quite hard since there are lots of them in the game by default. So many possible combinations already used, in addition to the aforementioned inflexibility.

It doesn't appear to be much to add from the graphics standpoint, but I'm wondering about the sponsor "watermark" present in the diplomatic screens. Perhaps a new size of CIV_ALPHA_ATLAS?
 
It doesn't appear to be much to add from the graphics standpoint, but I'm wondering about the sponsor "watermark" present in the diplomatic screens. Perhaps a new size of CIV_ALPHA_ATLAS?
Yes, that's an 128-sized Alpha Atlas Icon.
Not sure if the Icon on the top left of the diplo screen is a standard size (I didn't have it in my atlases), but it's size 80.

To the rest: Well... yes, I agree that it's sad that old effects are gone, but in the end the way I see it is that it's just a new system. I'll use this chance to re-thing my sponsors and create new bonuses that fit them, because the old bonuses were made to fit the old system.
 
Minor thing: seems they slightly changed the size of leader icons within the same size category. They're now slightly larger.

MAJOR THING: the map graphics screw up considerably when I load up my sponsor mod! The mod itself seems to work okay, but the map doesn't at all and even shows some graphical glitches to boot. I remember you posted a screenshot showing the same issue somewhere, Ryika. The map appears flattened and units, resources and cities disappear to a large extent. I've no idea why this might happen. Anyone got any leads?
 
Yes, happened to me, too. In that specific case it was because I hard-deleted some Loadout-Options in one of my mods. Don't quite understand the connection between cause and effect though.
 
OK, I think I followed Ryika´s instructions to the letter, but still my factions are not showing up in-game and I´m at a loss as to what could be causing it??
 
OK, I think I followed Ryika´s instructions to the letter, but still my factions are not showing up in-game and I´m at a loss as to what could be causing it??
What did it for me was deleting the IntroductionImage line from your Civilizations entry. It's not used anymore, and it seems its presence is troublesome.

EDIT: I'm noticing strange behaviour in some Lua files. PersonalitySystem.lua got corrupted to 0 KB around the loading of my mod, verifying my game files didn't help but sometime after loading the game with no mods, the file appeared to restore itself. All the (apparently unused) files in the Personalities folder got zeroed and later restored as well. HintedWorld.lua is at 0 KB but hasn't been restored. Also noticed a couple of times that the game doesn't close properly (have to kill the process), which may have a hand in this. Who knows if any of that could've produced the map issue.
 
Yay! Thx Lord Shadow, removing that line did the trick for me as well, now I only need to get my buildings to work... :-D
 
As usual Riyeka to the rescue. I usual adapt existing mods for my own need. But without a proper comparison to an existing working mod my attempts were doomed.
Got my own Waterland mod (Future Low Countries) to work but borrowed the NSA traits for the time being.

PS: Riyeka in your Mod you forgot the new flavor "Aquatic" for your civ. I think it's for how likely they start to build aquatic cities!

It was disappointing to find out that they still haven't made it possible to add modded civs without turning all animations/voices off for the existing sponsors. Strange was that if you play against a modded civ (that uses non animated pictures) as an original sponsor. You see yourself as an animated character but all the other sponsors are not.
Probably because that part (seeing yourself) is new, and they correctly fixed it for that part, but forgot to fix the old bug.
 
So I did a number of things and prevented the map from glitching. Not sure what actually fixed it.

- Made up properly unique agreements for my sponsor instead of borrowing a vanilla faction's. The log had complained about the Unique constraint, so maybe that was a problem.
- Removed Lua files from the mod, using the seemingly unused default sponsor personalities instead. Not 100% recommended, I know, but I wasn't sure I was integrating them properly.
- Completed the extra leader parameters: aquatic AI flavour and fear and respect entries.

Now I need to make sure which diplomacy text is vital and which can be temporarily covered by default lines.
 
Top Bottom