• 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.

unmerged(11763)

Captain
Nov 19, 2002
431
0
Visit site
EDIT: In the end, this did not work - see note at bottom.


With Bolt talking about doing separate scenarios slanted one way or another, one of my thoughts for making things more difficult for the axis was to lower the loyalty of some of their leaders. Of course, the leader files are shared among all scenarios; so it would be necessary somehow embed the overrides into the scenario. However, since the purges have already happened in the 1941 scenario, it was obviously possible to have some level of control.

I have found that many commands from the save games can be loaded directly into a scenario file and they work just fine even though they are not typically included in a scenario. My first attempt was to simply enter a leader = {} command to try over writing a leader. While the game accepted the command (and updated the data) it produced a database warning message that would not be appropriate for a mod.

The purges and other such things are carried out by using the HISTORY command to trigger past events at the start of a scenario. That is a very powerful feature that has not been discussed much from what I have seen. But unfortunately, events do not allow leaders to be edited. However, they can be removed.

To replace a leader then, I can simply delete the current one and insert a new one with the exact same name and whatever stats I would like to give them. The ID will need to change, but players never see that anyway, so they are none the wiser.

So, to test things out, I decided to change Rommel to an 8 skill level in the Bolt scenario. I changes skill instead of loyalty simply because it is visible from within the game and therefore easier to test, but realistically, you can change anything you want.

First, I created the following event:

###############
# Replacing Rommel
###############
event = {
id = 9191
random = no
country = GER
name = "Replace Rommel"
desc = "Removing Rommel for Scenario modification."
style = 0

action_a = {
name = "Bye Bye Erwin"
command = { type = sleepleader which = 1 }
}
}

The event ID of 9191 is just something I knew would not be in use and "which = 1" specifies Rommel's current leader ID of 1 as specified in the German leader file. Note that this event will never trigger on its own. It is purely used for scenario modification purposes.

Next, in the Bolts of War scenario file I simply inserted the necessary

History = { 9191 }

above all the include statements. That is what causes the event to fire during the scenario start-up.

And then, in the German include file I inserted the new definition of Rommel just above the OOB using the available leader ID of 350 this time.

leader = {
id = { type = 6 id = 350 }
name = "Rommel (T)"
picture = "gfx\interface\pics\rommel_erwin_ger.bmp"
category = general
rank = 1
loyalty = 5
skill = 8
trait = trickster
}

If Rommel were to command any units at the start of the scenario, the leader ID would need to be updated in the OOB, but in this case we do not even have that problem. And there you have it, a modified Erwin Rommel that applies only to the modded scenario.


Actually - NEVERMIND. After a bit more testing, I end up with 2 Rommels. I can then fire the event manually and get rid of the old one, but he isn't automatically purged. Which led me to look into the Russian situation a bit more. It seems in the 1941 scenario, their purged officers are alive and kicking. It seems the HISTORY command does not work. Oh well, off to the bug forum.
 
Last edited:

Havard

Dark Power
49 Badges
Jun 28, 2001
15.686
170
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Cities: Skylines - Campus
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
It seems the HISTORY command does not work. Oh well, off to the bug forum.
Hold your horses.
The fact that things doesn't work the way you think doesn't make it a bug, you know... ;)

This "history command" does not cause any events to fire when you load. On the contrary - It prevents events from firing! Any ID you put in the history object will be understood by the game as "has happened". It will not trigger again, and can be used as trigger for other events using the 'trigger = [event id]' trigger.

It should be possible to create a scenario with your own leaders though - but it will be some work... You'll have to create a "savegame" instead of a scenario ('saved = yes') in the file header. That way the csvs with ministers and leaders won't be loaded.
 

unmerged(12007)

Lt. General
Nov 27, 2002
1.638
0
Visit site
I have several random events that are supposed to fire for minors only. Hence the only trigger condition is major = no.

This event fired for Germany during a test run. Reversing the trigger had no effect, still fired only for majors.

I've never seen these events fire for minors.

As to other problems, I'll give you a more complete and detailed list a bit later. Where do you want it?
 

unmerged(11763)

Captain
Nov 19, 2002
431
0
Visit site
Havard -
There are two separate sections, History and Sleepevent. As you suggest, History indicates that it has already occured. Sleepevent means that it is unavailable but did not fire. That History should fire at the beginning of the scenario was an assumption and was noted as such in the bug report. If it should not, then it will be properly ignored.

However, there are changes that are created by events that it appears cannot be saved. The Russian purges are a great example. After working on this a bit more, it seems that the purges are "undone" simply by saving the game. There should be some way to ensure against resurrections. Firing the historical event is one. Having a "sleep" command for leaders is another. But any method that becomes available to allow purged officers to stay dead could be used for this as well.

That said, my testing was not as thorough as it should have been. I made the mistake of looking at the purge events and identifying purged officers and then looked for them in game. When I did not see them, I assumed they were dead. I made the mistake though of assuming they were generals. They were not. That was my bad and it was the reason I posted this at all.

As for creating a save game instead of a scenario, obviously that is possible. But in my mind it should be possible to define a scenario or for the current scenarios to work. I want a scenario. That remains the goal. Perhaps it is not an achievable goal, but that is my goal.
 

Havard

Dark Power
49 Badges
Jun 28, 2001
15.686
170
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Cities: Skylines - Campus
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
Originally posted by jchastain
Havard -
There are two separate sections, History and Sleepevent. As you suggest, History indicates that it has already occured. Sleepevent means that it is unavailable but did not fire. That History should fire at the beginning of the scenario was an assumption and was noted as such in the bug report. If it should not, then it will be properly ignored.
It would make it easier for the bug forum mods if one check ones assumptions before filing a bug though. They have plenty of posts to wade through as it is... ;)


However, there are changes that are created by events that it appears cannot be saved. The Russian purges are a great example. After working on this a bit more, it seems that the purges are "undone" simply by saving the game. There should be some way to ensure against resurrections. Firing the historical event is one. Having a "sleep" command for leaders is another. But any method that becomes available to allow purged officers to stay dead could be used for this as well.
As mentioned in the bug forum thread: The reappearing officers on reload is a bug - a known one - and it should be taken care of in 1.03 :)

As for creating a save game instead of a scenario, obviously that is possible. But in my mind it should be possible to define a scenario or for the current scenarios to work. I want a scenario. That remains the goal. Perhaps it is not an achievable goal, but that is my goal.
Put a savegame in the scenario folder, and it'll appear to the player just like a regular scenario... ;)
 

Havard

Dark Power
49 Badges
Jun 28, 2001
15.686
170
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Conclave
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Cities: Skylines - Natural Disasters
  • Crusader Kings II: Monks and Mystics
  • Cities: Skylines - Mass Transit
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Cities: Skylines - Green Cities
  • Europa Universalis IV: Cradle of Civilization
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Rule Britannia
  • Cities: Skylines - Parklife
  • Europa Universalis IV: Dharma
  • Cities: Skylines Industries
  • Crusader Kings II: Holy Fury
  • Europa Universalis IV: Golden Century
  • Imperator: Rome Deluxe Edition
  • Imperator: Rome
  • Cities: Skylines - Campus
  • Crusader Kings III
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Wealth of Nations
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Res Publica
  • 500k Club
  • Cities: Skylines
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
Originally posted by Bolt
I have several random events that are supposed to fire for minors only. Hence the only trigger condition is major = no.

This event fired for Germany during a test run. Reversing the trigger had no effect, still fired only for majors.

I've never seen these events fire for minors.

As to other problems, I'll give you a more complete and detailed list a bit later. Where do you want it?
A post in the bug forum would be the best :)