Originally Posted by
Withwnar
The best
next heir: when the leader dies then the current heir becomes leader (always) and the guy with highest Authority becomes the new heir*.
* This behaviour only applies when the leader dies. If it was the heir who died then the game does not use Authority to decide who becomes the new heir. Mentioned
here.
So, your script: when Napolean dies the current heir becomes leader, the best next heir becomes the new heir, and your scripted 2nd Napolean becomes the best next heir. So you'd need to then kill both that new leader and new heir for Naoplean2 to be leader. Which you can't do because you won't know for sure the names of those two guys, which the kill_character command needs.
(All of the above is for family tree factions only, not teutonic.)
What you could do is make Napolean2 the heir in descr_strat and send him off map. Then bring him back when Napolean1 dies. However, he will eventually die of old age while off map, in which case your bring-him-back (a spawn) will in fact be spawning yet another guy named Naploean who is not leader.
An alternative is to make france teutonic. There, the guy with highest Command becomes leader,
the heir does not regardless of his Command. So you could make some other guy heir in descr_strat, add Napolean2 to descr_strat as well with massive Command (so next leader), send them both off map so they can't be killed, then when Napolean1 dies bring back Napoean2, and you may as well bring back that heir and kill him as his job is done now (which was filling the heir slot so Napolean2 will never be in it so not prevented from becoming leader).
Okay, so, lets see if I did things correctly. I'm taking into consideration your first method, since the aging is not an issue - I use a 12 TPY scrpit.
First, I created the new characters in the descr_strats, with convenient labels, like so
Code:
character Napoleon Bonaparte, named character, male, heir, age 37, x 167, y 107, portrait napoleon, label napoleon2
traits FrenchTraits 1
army
units
character Napoleon Bonaparte, named character, male, heir, age 37, x 167, y 107, portrait napoleon, label napoleon3
traits FrenchTraits 1
army
units
character Napoleon Bonaparte, named character, male, heir, age 37, x 167, y 107, portrait napoleon, label napoleon4
traits FrenchTraits 1
army
units
character Napoleon Bonaparte, named character, male, heir, age 37, x 167, y 107, portrait napoleon, label napoleon5
traits FrenchTraits 1
army
units
character Napoleon Bonaparte, named character, male, heir, age 37, x 167, y 107, portrait napoleon, label napoleon6
traits FrenchTraits 1
army
units
..etc...
napoleon1 is, of course, the label of the very first and original that will spawn on the map. I creted 10 labels up to napoleon11.
Then I went and changed the monitor like so:
Code:
monitor_event FactionTurnStart FactionType france
and I_TurnNumber = 0
send_character_off_map napoleon2
send_character_off_map napoleon3
send_character_off_map napoleon4
send_character_off_map napoleon5
send_character_off_map napoleon6
send_character_off_map napoleon7
send_character_off_map napoleon8
send_character_off_map napoleon9
send_character_off_map napoleon10
send_character_off_map napoleon11
end_monitor
monitor_event FactionTurnStart FactionType france
if not I_CharacterExists napoleon1
and I_SettlementOwner Paris_c = france
historic_event nap_wounded
spawn_army
faction france
character Napoleon Bonaparte, named character, male, heir, age 37, x 167, y 107, portrait napoleon, label napoleon2
traits FrenchTraits 1
army
units
end
end_if
if not I_CharacterExists napoleon1
and not I_CharacterExists napoleon2
and I_SettlementOwner Paris_c = france
historic_event nap_wounded
spawn_army
faction france
character Napoleon Bonaparte, named character, male, heir, age 37, x 167, y 107, portrait napoleon, label napoleon3
army
units
end
end_if
if not I_CharacterExists napoleon1
and not I_CharacterExists napoleon2
and not I_CharacterExists napoleon3
and I_SettlementOwner Paris_c = france
historic_event nap_wounded
...etc...
So if I understood this correctly I just simply increse the numbers of napoleonXX where XX is the number until I reach 10 in the condition and everything should work fine, right?
Originally Posted by
Erken
There is a command to make a general invulnerable in battle:
Code:
Identifier: invulnerable_general
Parameters: character_name
Description: invulnerable_general <character_name> : makes that named general invulnerable in battle
Sample use: Invulnerable_general <rufus>
Class:BATTLE_INVULNERABLE_GENERAL
Depending on the result of the battle, you could then use "reposition_character" and "move" to make Napoléon rejoin Paris.
I was reluctant to use this command because having a single unit that is invincible during a battle can effectively break the game. What's stopping a player from using only the Napoleon unit to massacre everyone on the field? That's a bit too overpowered.