• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
I did a lot of testing on this when I made a leader file for Pirates (.pir). I thought it would be more fun to battle historical pirates. The file works marvelous, but it would always end up placing Caribbean pirates in the Far East or off the Pacific Coast in Mexico. Occasionally it would work. Finally, through a lot of testing, I figured out that I had to make an event the day before a leader spawns, placing units in that province, if I wanted the leader to appear there.
 
Norrefeldt said:
So some information is missing here then.
Suggestion:
"Leaders must appear in provinces you own and already have an army in, thus if set to an unowned province this will be ignored."

More is needed here. If the location = is ignored or is not used in the leader file for a general then the general will be randomly placed with an existing army located in an province controlled by the player. If no such army exists then the leader is placed in 0 Terra Incognita and lost.

I need to do more testing to see if the requirement is an owned province or just controlled. I assume this is not a requirement for an admiral or explorer.
 
Update Leader =

I have done more testing and I am not getting consistent results other than none of the leaders with location = 247 show up in 247 even if an army is in 247 - so I can no longer make any conclusions about why this does not work.

I thought I had understood using one test but the problem seems to be something different than I thought. The test is showing a leader with Location = 247 which consistently shows up in 385 in my largest army which is located in 385 otherwise if I move this army to another province such as 413 or 383 or 376 sometimes he shows up and other times he goes to Terra Incognita even if there are other armies available and even if there is an army in 247. All these provinces were controlled and owned by me. I am in 1509 as ENG and up to this point this is the only leader so far showing up in Terra Incognita but earlier leaders did not follow the location = 247.

This makes no sense. I am playing with the latest beta and the latest mymap - not agceep. There are no duplicate city ids and the leader id is not a duplicate. I know I have had this Terra Incognita error in the past once in a while in just plain vanilla with the vanilla map.
 
Last edited:
17blue17 said:
I have done more testing and I am not getting consistent results other than none of the leaders with leader = 247 show up in 247 even if an army is in 247 - so I can no longer make any conclusions about why this does not work.

I thought I had understood using one test but the problem seems to be something different than I thought. The test is showing a leader with Leader = 247 which consistently shows up in 385 in my largest army in 385 otherwise if I move this army to another province such as 413 or 383 or 376 sometimes he shows up and other times he goes to Terra Incognita even if there are other armies available and even if there is an army in 247. All these provinces where controlled and owned by me. I am in 1509 as ENG and up to this point this is the only leader so far showing up in Terra Incognita but earlier leaders did not follow the leader = 247.

This makes no sense. I am playing with the latest beta and the latest mymap - not agceep. There are no duplicate city ids and the leader id is not a duplicate. I know I have had this Terra Incognita error in the past once in a while in just plain vanilla with the vanilla map.

Now that you mention it, ( it's been awhile since I tested this ) there was a minimum size in order for it to work. I recall a navy had to have at least 4 ships in that province for it to work, if it was less than 4....the leader was sent elsewhere. Can't remember what it was for an army.

Sorry, forgot all about that.
 
Norrefeldt said:
That sounds strange. I wonder if all the new provinces are accounted for whan a new leader is placed, or if that has messed it up in some way? Btw 17blue17, I assume all "leader = 247" in your text should be "location = 247"?

yes
 
Update Location = 247

I did some looking in the save game file. The following is my largest army copied from the save game file. Note the location for the leader is 247 and the army is 385:

landunit = {
id = { type = 4712 id = 5446461 }
name = "Northumberland Fusiliers"
location = 385
date = { year = 1504 month = december day = 12 }
development = no
morale = 5.320
historicalleader = {
id = { type = 6 id = 52407 }
name = "Henry VII"
category = monarch
location = 247
rank = 0
fire = 3
shock = 3
movement = 4
startdate = { year = 1485 month = august day = 22 }
deathdate = { year = 1509 month = april day = 21 }
}
inf = 134947.000
cav = 16375.000
art = 11.000
}

Then I tried Khephren's suggestion of making a army in 247 different sizes compared to the one in 385 with the following results (note the tests were done by going through the list once then going back and trying them again - in other words I did not do the same test twice in a row):

247 at 30,000 versus 385 at 50,000 - leader goes to Terra Incognita
247 at 50,000 versus 385 at 135,000 - leader goes to 385
247 at 50,000 versus 385 at 135,000 - leader goes to Terra Incognita
247 at 55,000 versus 385 at 135,000 - leader goes to Terra Incognita
247 at 60,000 versus 385 at 135,000 - leader goes to Terra Incognita
247 at 60,000 versus 385 at 135,000 - leader goes to Terra Incognita (again)
247 at 75,000 versus 385 at 135,000 - leader goes to to 247
247 at 75,000 versus 385 at 135,000 - leader goes to to 247 (again)
247 at 100,000 versus 385 at 135,000 - leader goes to 247.
247 at 100,000 versus 385 at 135,000 - leader goes to 247 (again)
247 at 200,000 versus 385 at 135,000 - leader goes to 247

Edit - when the leader went to terra incognita it was being assigned to a army on a ship of 122,000
 
Last edited:
leader goes to Terra Incognita

In my last post I mentioned in my tests that the leader kept going to Terra Incognita - I was able to track this down. A army on a ship has a location in the save file as location = 0 which is Terra Incognita so when this happened in the tests the game was placing the leader with a army on a ship. The size of the army was 122,000.

The reason this started happening to me in 1509 was that I started using ships to haul large armys to africa. Prior to this I was using the fleet for naval battles and using the ENG-FRA strait to move armies from ENG to FRA rather than ships.

So at this point I conclude that the location = command in the leader file assigns a general:

1) not always to the location specified
2) not always to the largest army a player has
3) maybe to the location specified if the army at that location is 75,000 or more.
 
Last edited:
Indeed, Terra Incognita is boat location (weird but logical since location = 0, isn't it?). For your test, maybe you could avoid to have armies in ships and deal with only two armies on land (one in 247 and other in 385) to see the result and then reintroduce the biggest army you can have in a fleet and see the difference.
I have no idea but location of capital is maybe important (can't check right now, but is 247 or 385 your capital?)
 
YodaMaster said:
Indeed, Terra Incognita is boat location (weird but logical since location = 0, isn't it?). For your test, maybe you could avoid to have armies in ships and deal with only two armies on land (one in 247 and other in 385) to see the result and then reintroduce the biggest army you can have in a fleet and see the difference.
I have no idea but location of capital is maybe important (can't check right now, but is 247 or 385 your capital?)

247
 
Havard said:
Ok. Should be updated now. Thanks :)
Good news. I have been eagerly waiting for a long time. :D
Your guide is what got me into modding. :)
 
The trigger "leader = xxx" doesn't work properly.
The value doesn't change if the leader is killed in war (keep true).
It will only change at the next reload of the game.

So this trigger can't be used. :(
 
matteli said:
The trigger "leader = xxx" doesn't work properly.
The value doesn't change if the leader is killed in war (keep true).
It will only change at the next reload of the game.

So this trigger can't be used. :(

But is the value false before the leader comes into play?
 
Garbon said:
But is the value false before the leader comes into play?

I think but i'm not sure.

I think the value is changing directly when a leader comes and when he is dead because of the date of his death, but the value is changing at the reload when the leader is dead in a battle.
 
Garbon said:
But is the value false before the leader comes into play?

In this case, the trigger will be right.

The game didn't consider the dead of a leader during a war.... until the next reload
 
About war command...

War command doesn't work if one or more following conditions are fullfilled:
country DoWing has a military access on other country
country DoWing and other country are in same alliance
country DoWing is suzerain or vassal of the other country

First condition can't be checked in triggers but others should be.
If a war command is used in an action, be sure of intended result.

Since war can be avoided without control of modders, it is wiser to have it as single command of an action in an event where at least two actions are proposed.
Remember, an action where all commands are impossible is simply not displayed => if war is impossible, the event will work and will mean something anyway. In this case, avoid to ask a question in description unless two other choices can be made.
 
Country Definition

In the country definition I belive that the provinces listed in:

ownedprovinces = { } and controlledprovinces = { }

need to be in the same order for both lists. For example:

ownedprovinces = { 375, 800 }
controlledprovinces = { 375, 800 }

and not

ownedprovinces = { 375, 800 }
controlledprovinces = { 800, 375 }

I base this upon a game that crashed and when I tried to reload the most recent save it kept crashing again and again. I used the utility to check saved games and it found nothing wrong. The history file mentioned that a war had been declared and when I opened the save file in notepad and looked at the countries involved in the war one of them had their owned and controlled provinces in a different order as shown in the example above. I simply changed the order and the game loaded and kept running. It is strange in that the problem showed up in 1488 so the game had run 69 years before the problem came up. I suspect the game will run fine until someone trys to take one of the provinces and then it causes a crash to desktop.

Again I suspect they need to both be in the same order. I don't think they need to be in numerical order but it would not hurt to be safe.
 
I think has something to do with the controlled provinces, there could be problems if to nations control the same province and if you copied the "owned" and pasted in the "controlled" all the provinces that was under th enemy went back under there control again.

EDIT: When i war the provinces in "owned" doesn't match the ones in controlled so this rule isn't right...
Also when i make some changes to a scenario or savefile i don't set them up so the are in the same line.