User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Modding Leaders Question

Tue Jul 12, 2011 12:38 pm

What is it that makes new leaders appear in game in PoN? As far as I can tell it's not an event like in past versions of AGEOD games. At least if it is via event I can't find the event.

Do they just show at a certain (random? pre set?) date during their DateIn year? Or is there something else?

I ask because I've created a new leader and can't get him to show in game. Everything seems correct, the new model file, unit file and entries in the uni_Alias and mdl_Alias files. Other leaders set to appear in 1850 show up but not the newly created leader.

So I'm stumped as to what's the problem. Presumably I could just write an event but I'd prefer not to unless it's needed. Anyone have any insight?

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Tue Jul 12, 2011 12:54 pm

What the game looks for is the following...

Date Entry year
Seniority
Max number of leaders allowed

Basically, you have a set number of leaders allowed at one time, when you fall below that number the game searches for a new leader. If that leader has a start date and end date within that range of the currrent year, then they are a viable choice. The game then targets the general with the highest seniority out of those viable choices to be selected as the new general introduced.

So, if it is the year 1850 then in order for your new general to appear the following must happen...

They have a Start Date of at least 1850, and an end date of sometime after (if end date is 1850 you will not see them).

They have to have a seniority higher than any other allowed general at that time to appear next in line (i.e., if their seniority is 999, then you will have to go through a lot of other allowed generals to see them).

Critically so, you must actually need another general. If you are at your max allowed general, then regardless of seniority or start/end date you will not see him (as no room for promotion).

Also, I am not entirely sure about how to get modded things in, but do think you have to 're-create' a scenario in order to get new additions made (am unsure, an AGEOD chief could better explain).

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Tue Jul 12, 2011 1:04 pm

Ok. Thanks, that's good to know. Do you know if it's possible to change the max allowed leader cap? Or is it hardcoded?

My hopes were not just to add one more leader but a lot of new leaders especially for Great Britan but perhaps even eventually for the other major countries. So a "hard cap" to the amount of leaders available is something of an anathema to me ;)

If the leader cap isn't currently changeable then I'd like to ask one of the devs if it might be possible to include this in the settings files for the next patch? Or, even better, eliminate it altogether?

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Tue Jul 12, 2011 1:39 pm

I just wanted to add that I mean no criticism of Paradox for not having enough leaders. I'm actually pleased with the amount of leaders included with the game There are far more historical leaders than I ever expected would be in PoN and certainly far more leader pics. Massively more than were in Vicky1.

It's just that I love leaders and would like to be able to add as many as possible given my time and research constraints. Since I know a lot about the era I can always think of three or four or five or... more leaders that could be present. Then I want to add them. It's just that simple.

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Tue Jul 12, 2011 3:10 pm

The number of leaders in the game are designed to represent the actual number needed in order to command historic forces (at present, 1850 forces are probably too large in scale, which may result in some command difficulties, to be remedied though).

I am not sure where, but everything in PoN is moddable, I provided the suggested numbers, as well as the changes over time to those numbers (they are all raising for the major nations as the game progresses).

Probably something for the main developers to answer (being a small cog in a giant machine I somewhat miss the greater picture as am focussed on small components).

One thing to take into account though, if too many leaders are brought into the game, then it is very likely that players will totally avoid using the poor leaders, given that the opportunity to ignore seniority and just send your good leaders into the fray will become commonplace (as it stands now, you need each and every leader, which is by design, meaning you have to use your horrid commander as he is better than no commander at all!).

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Tue Jul 12, 2011 3:12 pm

On a side note, who were you looking to add? I may be able to add/replace a leader if you feel that someone deserving is not getting a fair share of the prize. ;)

Czert
Sergeant
Posts: 94
Joined: Mon Mar 21, 2011 4:55 pm

Tue Jul 12, 2011 5:20 pm

And if missed - to have you mod to leaders have any chances to apper in game (including cretuing we units, not only moding them) you need to delete file named models.chached (biggest file unded models directory).
Dont worry, game will recreate it at new starting of game (aplication, not campaign/scenario).

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Tue Jul 12, 2011 9:20 pm

@Mc Naughton: Thanks for clarifying some of that. It makes sense that the player should be forced to use leaders who were historically high ranking but not very good. So for 99.9% of the users of the game the current system provides the best of both worlds, an abundance of accurate historical leaders and the compulsion to use them historically. :thumbsup:

I'm kinda one of the .01% though. I've always wanted to work on adding as many people (leaders, politicians etc) as possible to any game I've played. I've created some mods that nearly double the amount of leaders for many countries in Hearts of Iron. It's not because it helps with gameplay but that it greatly deepens the historical immersion. Plus I love researching and creating historical people. If politicians were represented in Pon I'd want too add as many as possible of them too. I'd love to get tot the point where I had a leader for each stack, however small. Not that that's likely to ever happen, but I can try :wacko:

So, long story short, there's probably no change needed in the default system, and as far as specific leaders go you've done a great job with creating most of the "right" ones during a given time period.

Personally though, I'd really love to know how to mod the leader cap so that I can play with adding new leaders to my hearts content. I've been unable to find the cap in any of the settings files. So hopefully someone can let me know how to do so. It'd be very much appreciated.

@Czert: Thanks a lot for that info. That's new to me.

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Tue Jul 12, 2011 9:45 pm

I just found the file 1850GRC_LeadersSystem. Does this control the amount of leaders allowed? Does anyone know what's represented by this file? It looks like this:

SelectFaction = $GBR
ChangeLeadersPool = 1;5
ChangeLeadersPool = 2;7
ChangeLeadersPool = 3;4
ChangeLeadersPool = 11;0
ChangeLeadersPool = 12;7
ChangeLeadersPool = 13;6

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Tue Jul 12, 2011 10:29 pm

lukasberger wrote:I just found the file 1850GRC_LeadersSystem. Does this control the amount of leaders allowed? Does anyone know what's represented by this file? It looks like this:

SelectFaction = $GBR
ChangeLeadersPool = 1;5
ChangeLeadersPool = 2;7
ChangeLeadersPool = 3;4
ChangeLeadersPool = 11;0
ChangeLeadersPool = 12;7
ChangeLeadersPool = 13;6


Yes, that is it...

ChangeLeadersPool = 1;5

This means you get five 1* Generals

1 = 1* General
2 = 2* General
3 = 3* General

11 = 1* Admiral
12 = 2* Admiral
13 = 3* Admiral

User avatar
Gray_Lensman
Posts: 497
Joined: Mon Jun 18, 2007 4:04 am
Location: Who is John Galt?

Tue Jul 12, 2011 10:39 pm

deleted

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Tue Jul 12, 2011 10:55 pm

Thanks guys. I'll check this out. Should be just what I was looking for.

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Wed Jul 13, 2011 2:32 pm

I'm still having some problems with getting more leaders to appear. I've followed the instructions here by changing the entries for GBR in the 1850GRC_LeadersSystem (to anything from 9 each up to 50 each) and by deleting the models.chached file. I've also fixed some typos in the models files that had some leaders available starting in 1950 rather than 1850.

Now when new leaders are added in game on the second turn I get different leaders, including some that weren't appearing before because of the 1950 typos. But I still only get three 2* admirals, two 2* generals and two 1*generals along with one general promoting to 3*.

That's the same amount as appear before modding the 1850GRC_LeadersSystem. This doesn't change no matter what number I set the numbers in the second column to. Clearly there are still more leaders eligible to appear since some of those who were showing up before I fixed the typos aren't showing up now. They don't show up in any of the next turns either.

So I'm forced to conclude that the 1850GRC_LeadersSystem file doesn't actually change anything. Does anyone have any idea what might be going on?

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Wed Jul 13, 2011 2:59 pm

Noticed some info in the wiki here http://www.ageod.net/agewiki/Include

Does this mean that the scenario has to be recompiled using modding tools before the includes file have any effect?

User avatar
Gray_Lensman
Posts: 497
Joined: Mon Jun 18, 2007 4:04 am
Location: Who is John Galt?

Wed Jul 13, 2011 5:54 pm

deleted

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Wed Jul 13, 2011 9:27 pm

I guess I'll be eagerly awaiting the release of the modding db.

User avatar
denisonh
Captain
Posts: 196
Joined: Tue Apr 24, 2007 12:22 pm
Location: Northern Virginia

Adding in a Leader

Thu Jul 14, 2011 3:56 am

Added a leader into the GC without modifying the scenario file.

Did the following:

Create Model files

- Created additional leader model(.mdl files) files 11276-11279 (general 1/2/3). Must either edit cached file (topic unto itself) or delete it. - (I edited it)

Create Unit files

- Created additional unit (.uni files)files 10372-10374 (general 1/2/3). Must either edit cached file (topic unto itself) or delete it.(I edited it)

Edit Alias Files

- Added lines in mdl_alias file at the end to coorespond with added leader mod files
e.g.
$ldr_GBR_Denison1 = 11276
$ldr_GBR_Denison2 = 11277
$ldr_GBR_Denison3 = 11278
- Added lines in uni_alias file at the end to coorespond with added leader mod files
e.g.
$uni_GBR_Denison1 = 10372
$uni_GBR_Denison2 = 10373
$uni_GBR_Denison3 = 10374

- Modified event into file in the events folder called: Plugin_1850GC.sct and add event creating leader:

SelectFaction = $GBR
SelectRegion = $Peshawar
StartEvent = evt_nam_Reinforcements_GBR_January1850|1|2|evt_txt_Reinforcements_GBR_January1850|Event-img_GBR_Chief|$Peshawar|NULL

Conditions
FixedDate = 1850/01/16

Actions

SelectFaction = $GBR
SelectRegion = $Peshawar
CreateGroup
Posture = $Defensive
SetKind = $Land
Entranch = 0
InCS = 0
FixType = 0
SetName = Denison
Apply
CreateUnit
SetType = $uni_GBR_Denison1
SetName = Harvey C. Denison
Apply

EndEvent

I added graphics files and used the stock scenario added in a leader starting the second turn.
Attachments
Denison Leader Mod Files.zip
(1.1 MiB) Downloaded 245 times
HD Leader.jpg

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Thu Jul 14, 2011 10:32 am

Cool. Thanks a lot denisonh, much appreciated. :thumbsup:

So it is still possible to add leaders via event as in other AGEOD games. I wondered since I didn't find any events that actually did so. That's probably the best solution for me.

That way it should also be possible to kill off leaders at their actual death or retirement years via event rather than letting the game randomly do it (and possibly not kill Wellington until 1910 or so).

Now once I finish figuring out how to create PoN style leader pictures I'll be a very happy camper.

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Sun Jul 17, 2011 12:26 am

Can anyone help me out with the proper syntax to create an event to kill a leader? I've tried to slightly modify events both from RUS and BOA2 to kill leaders but haven't been able to get them to work. They trigger but the leader doesn't die. This is what I have now:

SelectFaction = $GBR
SelectRegion = $$Anglia
StartEvent = evt_nam_GBR_Generals_GBR_Retirement|1|1|evt_nam_GBR_Generals_GBR_Retirement|Event-img_GBR_Chief|$Anglia|NULL

Conditions
FixedDate = 1850/01/16
EvalUnqUnit = Charles J. Napier

Actions

SelUnqUnit = Charles J. Napier
RemoveCuSubUnit = = Charles J. Napier
Apply

EndEvent

Napier isn't in Anglia, he's in Calcutta but I'm trying to make the event kill a leader wherever they are, not only if they're in a specific province.

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Sun Jul 17, 2011 1:14 am

Here's something that does work, check to see what is parallel to what you did above... This is another way to remove a leader (you do not need to state where to look)...

SelectFaction = $FRA
StartEvent = evt_nam_FPW_MacMahon_FRA|0|0|NULL|NULL|NULL|NULL

Conditions
MinDate = 1870/09/01
EvalEvent = evt_nam_FPW_FallOfEmpire;>=;3
Probability = 50

SelUnqUnit = Patrice de Mac-Mahon

Actions

SelUnqUnit = Patrice de Mac-Mahon
RemoveCuUnit
GenMsg

EndEvent





However, I think what your event has that is a problem is the = = in this line...

RemoveCuSubUnit = = Charles J. Napier

Should be...

RemoveCuSubUnit = Charles J. Napier

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Sun Jul 17, 2011 1:21 am

McNaughton wrote:However, I think what your event has that is a problem is the = = in this line...

RemoveCuSubUnit = = Charles J. Napier

Should be...

RemoveCuSubUnit = Charles J. Napier


:bonk: Thanks, not my brightest moment. The event you posted looks like it's exactly what I want.

Athens
Brigadier General
Posts: 431
Joined: Wed Dec 22, 2010 8:46 pm
Location: definitly elsewhere

Sun Jul 17, 2011 1:23 am

lukasberger wrote:Can anyone help me out with the proper syntax to create an event to kill a leader? I've tried to slightly modify events both from RUS and BOA2 to kill leaders but haven't been able to get them to work. They trigger but the leader doesn't die. This is what I have now:

SelectFaction = $GBR
SelectRegion = $$Anglia
StartEvent = evt_nam_GBR_Generals_GBR_Retirement|1|1|evt_nam_GBR_Generals_GBR_Retirement|Event-img_GBR_Chief|$Anglia|NULL

Conditions
FixedDate = 1850/01/16
EvalUnqUnit = Charles J. Napier

Actions

SelUnqUnit = Charles J. Napier
RemoveCuSubUnit = = Charles J. Napier
Apply

EndEvent

Napier isn't in Anglia, he's in Calcutta but I'm trying to make the event kill a leader wherever they are, not only if they're in a specific province.


In any case, there was another error:

SelectRegion = $$Anglia


Should have been SelectRegion = $Anglia

But indeed, region isn't needed
Fatal Years mod for RUS: http://www.matrixgames.com/forums/tm.asp?m=2875975

My blog: http://moddercorner.com/about/

[SIZE="2"]Players quotes about Fatal Years:[/size]

the more I play this the more I become convinced that RUS is one of the best strategy games I have ever played... and I have played many since the mid 80's. The AI in this mod is at level with Sid Meier's best efforts.

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Sun Jul 17, 2011 1:27 am

I need a better proofreader :)

User avatar
lukasberger
AGEod Veteran
Posts: 782
Joined: Thu Dec 07, 2006 5:59 pm

Sun Jul 17, 2011 2:19 am

Using this now. But the event still doesn't fire. There's no record of it in the log and Napier's still sitting in Calcutta.


SelectFaction = $GBR
StartEvent = evt_nam_GBR_Generals_GBR_Retirement|0|0|NULL|NULL|NULL|NULL
Conditions
FixedDate = 1850/01/16

SelUnqUnit = Charles J. Napier

Actions

SelUnqUnit = Charles J. Napier
RemoveCuUnit
GenMsg

EndEvent

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Sun Jul 17, 2011 3:25 am

Try instead of "FixedDate" "MinDate" instead (this says the event will process after this date, where as FixedDate only happens exactly at this time, it could be that the date is off somewhat).

This way your event has more than one chance at triggering.

Athens
Brigadier General
Posts: 431
Joined: Wed Dec 22, 2010 8:46 pm
Location: definitly elsewhere

Sun Jul 17, 2011 6:44 am

lukasberger wrote:Using this now. But the event still doesn't fire. There's no record of it in the log and Napier's still sitting in Calcutta.


SelectFaction = $GBR
StartEvent = evt_nam_GBR_Generals_GBR_Retirement|0|0|NULL|NULL|NULL|NULL
Conditions
FixedDate = 1850/01/16

SelUnqUnit = Charles J. Napier

Actions

SelUnqUnit = Charles J. Napier
RemoveCuUnit
GenMsg

EndEvent


evt_nam_GBR_Generals_GBR_Retirement|1|0|NULL|NULL|NULL|NULL

With 0, your event will never fire :) Oh, indeed change the FixedDate into MinDate too, it will help. But first, give your event achance to fire :)
Fatal Years mod for RUS: http://www.matrixgames.com/forums/tm.asp?m=2875975



My blog: http://moddercorner.com/about/



[SIZE="2"]Players quotes about Fatal Years:[/size]



the more I play this the more I become convinced that RUS is one of the best strategy games I have ever played... and I have played many since the mid 80's. The AI in this mod is at level with Sid Meier's best efforts.

Return to “Pride of Nations”

Who is online

Users browsing this forum: No registered users and 17 guests