Modding number of delegates

jamesphillip89

Chieftain
Joined
Jun 17, 2014
Messages
6
Hey there, I'm kind of new here, but I'd like to know if there is a way to mod the number of delegates given to each Civ and CS's.

I'm using a mod that restricts the techs to renaissance era, so civs only get 1 delegate, founder gets 2 and CS gets none.

I'd like to mod it so that the Founder gets maybe 3 delegates, other civs would get 2 and cs's would get one.

Also it would be nice if the resolution to change host was changed for the renaissance as well so the host isn't always the same, and maybe the world leader as well.

I have no idea what entries I have to change and what to do, so that's why Im asking here, many thanks
 
Yes.

The LeagueSpecialSessions table contains entries for CivDelegates, HostDelegates, and CityStateDelegates (note HostDelegates means extra delegates over and above CivDelegates).

With XML:
Code:
<GameData>
    <!-- ... -->
    <LeagueSpecialSessions>
        <Update>
            <Where Type="LEAGUE_SPECIAL_SESSION_START_WORLD_CONGRESS" />
            <Set CivDelegates="2" HostDelegates="1" CityStateDelegates="1" />
        </Update>
    </LeagueSpecialSessions>
    <!-- ... -->
</GameData>

Or with SQL:
Code:
UPDATE LeagueSpecialSessions
    SET CivDelegates = 2, HostDelegates = 1, CityStateDelegates = 1
    WHERE Type = 'LEAGUE_SPECIAL_SESSION_START_WORLD_CONGRESS';
 
And I'd only have to add that to an .xml and its done? Starting in renaissance? I also modded for more frequent sessions.

Would look like this (after some googling):

<LeagueSpecialSessions>
<Update>
<Where Type="LEAGUE_SPECIAL_SESSION_START_WORLD_CONGRESS" />
<EraTrigger>ERA_RENAISSANCE</EraTrigger>
<Set CivDelegates="2" HostDelegates="1" CityStateDelegates="1" />
<ImmediateProposal>RESOLUTION_CHANGE_LEAGUE_HOST</ImmediateProposal>
<TurnsBetweenSessions>20</TurnsBetweenSessions>
</Update>
</LeagueSpecialSessions>
 
No, Nutty's way is correct. Your's would result in syntax errors, specifically because of these lines:
Code:
<LeagueSpecialSessions>
	<Update>
		<Where Type="LEAGUE_SPECIAL_SESSION_START_WORLD_CONGRESS" />
		[B][COLOR="red"]<EraTrigger>ERA_RENAISSANCE</EraTrigger>[/COLOR][/B]
		<Set CivDelegates="2" HostDelegates="1" CityStateDelegates="1" />
[B][COLOR="Red"]		<ImmediateProposal>RESOLUTION_CHANGE_LEAGUE_HOST </ImmediateProposal>
		<TurnsBetweenSessions>20</TurnsBetweenSessions>[/COLOR][/B]
	</Update>
</LeagueSpecialSessions>
Those lines only belong when using <Row> rather than <Update>.

As a side note, code on these forums shows up better if you wrap it in
Code:
 blocks.
 
Many thanks for the info guys, what if I want the change host to come more often in the renaissance era? is that enough for it to do it? or do I have to change to recurringproposal instead of immediate?

would it look like this then:

Code:
                <LeagueSpecialSessions>
		<Row>
                        <EraTrigger>ERA_RENAISSANCE</EraTrigger>
		</Row>
		<Row>
                        <RecurringProposal>RESOLUTION_CHANGE_LEAGUE_HOST</RecurringProposal>
		</Row>
		<Row>
                        <TurnsBetweenSessions>20</TurnsBetweenSessions>
		</Row>
                <Update>
                        <Where Type="LEAGUE_SPECIAL_SESSION_START_WORLD_CONGRESS" />
                        <Set CivDelegates="3" HostDelegates="2" CityStateDelegates="1" />
               </Update>
        </LeagueSpecialSessions>
 
Nope.
Let's run through this: <Row> is for adding new entries to a table, where that entry does not already exist. <Update> is for changing parts of an existing entry, which is what you're trying to do.

Neither <Row> nor anything that would work with <Row> is welcome in your coding therefore. You need to take everything you want to change and put it within <Set/> within <Update>, which takes a form like this:
Code:
<LeagueSpecialSessions>
	<Update>
		<Where Type="LEAGUE_SPECIAL_SESSION_START_WORLD_CONGRESS"/>
		<Set CivDelegates="3" HostDelegates="2" CityStateDelegates="1" EraTrigger="ERA_RENAISSANCE" RecurringProposal="RESOLUTION_CHANGE_LEAGUE_HOST" TurnsBetweenSessions="20"/>
	</Update>
</LeagueSpecialSessions>
 
Put that in an XML file and all of that after <GameData> and before </GameData> and you should be set, yes.
 
Thanks once again, tried to find a mod that changed it but there weren't any yet, so I had to get my hands dirty (not really since you guys did almost all the dirty work for me). Well thanks again, I'll return if something goes ill, hopefully not :goodjob:

Edit: Yeah, it's working flawlessly. Every 2 sessions there is a host decision coming up, the number of delegates is right, sweet.
 
I did this in a mod once to make the voting within each 'era' session occur more often, but I never posted it to steam or anywhere else.
Code:
<GameData>
	<LeagueSpecialSessions>
		<Update>
			<Set TurnsBetweenSessions="20"/>
			<Where Type="LEAGUE_SPECIAL_SESSION_START_WORLD_CONGRESS"/>
		</Update>
		<Update>
			<Set TurnsBetweenSessions="15"/>
			<Where Type="LEAGUE_SPECIAL_SESSION_WELCOME_CITY_STATES"/>
		</Update>
		<Update>
			<Set TurnsBetweenSessions="10"/>
			<Where Type="LEAGUE_SPECIAL_SESSION_LEADERSHIP_COUNCIL"/>
		</Update>
	</LeagueSpecialSessions>
</GameData>
I think there's since been added a mod to the steam workshop that does essentially the same thing, but I don't remember seeing any that added more delegates like what you want to do.


You can also make updates like this, which actually is pretty useful since you can directly copy a command from the existing XML and then edit the values for each command as needed. The <Set> -- </Set> pair (shown red) encapsulate the changes you wish to make (shown blue), and the "Where" command is the same as in the example Agressive showed. I also find it a little easier to 'read' what I am changing when I wish to make multiple changes that all apply to the same 'Where' statement.
Code:
<LeagueSpecialSessions>
	<Update>
		<Where Type="LEAGUE_SPECIAL_SESSION_START_WORLD_CONGRESS"/>
		[COLOR="Red"]<Set>[/COLOR]
[COLOR="Blue"]			<CivDelegates>3</CivDelegates>
			<HostDelegates>2</HostDelegates>
			<CityStateDelegates>1</CityStateDelegates>
			<EraTrigger>ERA_RENAISSANCE</EraTrigger>
			<RecurringProposal>RESOLUTION_CHANGE_LEAGUE_HOST</RecurringProposal>
			<TurnsBetweenSessions>20</TurnsBetweenSessions>[/COLOR]
		[COLOR="red"]</Set>[/COLOR]
	</Update>
</LeagueSpecialSessions>
 
Back
Top Bottom