• 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.
Status
Not open for further replies.

FrEDa

Deus Vult
98 Badges
Oct 9, 2000
943
0
  • Europa Universalis III Complete
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
  • The Kings Crusade
  • Hearts of Iron II: Armageddon
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Semper Fi
  • Sengoku
  • 500k Club
  • Europa Universalis IV: Pre-order
  • Stellaris: Galaxy Edition
  • Crusader Kings II
  • Divine Wind
  • Europa Universalis III Complete
  • Europa Universalis III: Chronicles
  • Europa Universalis III
  • Diplomacy
  • Deus Vult
  • Arsenal of Democracy
  • Europa Universalis IV: Art of War
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Conclave
  • Europa Universalis: Rome Collectors Edition
  • Crusader Kings II: Way of Life
  • Pillars of Eternity
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Cossacks
  • Rome: Vae Victis
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Leviathans Story Pack
  • Europa Universalis III: Collection
  • Crusader Kings II: Reapers Due
  • 200k Club
  • Victoria 2
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Colonel
  • Stellaris: Digital Anniversary Edition
  • Victoria 3 Sign Up
  • Europa Universalis IV: Rights of Man
  • Hearts of Iron IV: Cadet
Possible CtD for Marcenaries Defect! event

Got a CTD when pressing the OK (Aargh) button for this event. Searched for it but couldn't find it.

I was at war with Germany (HRE) at the time so they defected to Germany. I assume it was my Hospitalars regiment that defected (stationed in the ME).

One possible cause was that I had merged that regiment with a regiment of Templars.

I have a savegame (before declaring war on Germany though) so if I find the event id I'll try to reproduce the CtD.

/F
 
Upvote 0
Had another one in the same game, about 20 years later. So that's 2 out of 2, now I just need to find the event #. Saved the game before clicking on Aargh.

Wondering if the problem could be that there are severl regiments of mercenaries to choose from. Though I find it quite odd that Templars would sway over to Syria :)

/F
 
Not trying to spam here..

BUT, a fix for this is to save the game when the event fires, and then reload. The event will be gone and you can continue..

/F
 
I've reported this as well but no response. Good to know I wasn't imagining it though..

Have you found the event? I've been searching for it but can't find it..

/F
 
That's only the events for receiving regiments, not them defecting to your enemy, or am I missing something?

Aha. Found it.. it's in the lordship_events.txt and is triggered by a previous event..

#########################################
# Mercenaries defect! #
#########################################

character_event = {
id = 1962
picture = "event_intrigue"

action_a = {
effect = { type = mercenaries_defect }
}
}

Doesn't look very complicated so I have no idea why is causes a CTD..

/F
 
This is the event in lordship_events.txt:
Code:
#########################################
# Mercenaries defect!					#
#########################################

character_event = {
	id = 1962
	picture = "event_intrigue"

	action_a = {
		effect = { type = mercenaries_defect }
	}
}
 
#########################################
# Enemy mercenaries defect to you #
#########################################

character_event = {
id = 1104
picture = "event_intrigue"

trigger = {
condition = { type = is_independent }
condition = { type = atwar }
condition = { type = enemy_has_mercenaries }
}

mean_time_to_happen = {
months = 1200

modifier = {
condition = { type = intrigue value = 1 }
condition = {
type = not
value = {
type = intrigue
value = 2
}
}
factor = 3
}
... more modifiers...

action_a = {
effect = { type = trigger for = random_enemy value = 1962 }
}
}

One possibility for the CTD.. The starting event checks a flag by the name of enemy_has_mercenaries.. which according to the help file says it checks if any of the enemies has mercenaries. So if we have 4 guys fighting a bloke and 1 of them have mercenaries that would mean YES.

On the other hand, the trigger part of that event triggers the Mercenaries Defect! event for a random_enemy. Unless that's not as random as I understand it it could mean that it selects one of the enemies that didn't have a mercenary regiment. If so, what happens when the defection event is triggered for this player and he has no mercenaries to loose? Possible CTD unless protection for this is in the effect itself..

Also, can the mercenaries_defect effect handle the selection of *a* regiment if you have several, if you have them merged etc?

/F
 
The event_effects.txt file seems to suggest that the add_regiment effect should set a mercenaries=yes|no flag. However, none of the Mercenary events do this.. nor the Templar events.

type = add_regiment strength = {..mil compos..) mercenaries = yes/no region = regionname culture = culturename

So, how does the game know what regiments are mercenaries? The events in Mercenaries use tech_prov = # as an option, while the Templar events use region = middle_east or none for the Teutonic order (should perhaps be region = eastern_europe). The region thing is probably just where to place the unit (in the capital if not present) though..

Something wrong here? IF we check the savegame files regiments of mercenaries will have a mercenaries = yes tag. Perhaps the add_regiment set's this flag automatically?

But, should Templars, Hospitalers and Teutonic Knight be considered mercenaries in this case? Would be kind of weird if a Christian nation is at war vs. a Pagan/Islam nation and the Templar regiment decides to switch sides as I encountered the other day (going to Sheikdom of Syria)!?


/F
 
Last edited:
Yes, found it actually but didn't make me any wiser. Only caused me to question whether or not Templars should defect at all, or especially to non-christian nations :)

One possible cause for the CTD might be that Templars are set as mercenaries for the enemy_has_mercenary trigger, but not for the mercenaries_defect effect.. thus causing the player to remove a mercenary regiment, when he has none..

But why would they have mercenaries = yes in the savegame files.. Ah well, someone from Pdox will perhaps notice and figure it out.

/F
 
FrEDa said:
One possibility for the CTD.. The starting event checks a flag by the name of enemy_has_mercenaries.. which according to the help file says it checks if any of the enemies has mercenaries. So if we have 4 guys fighting a bloke and 1 of them have mercenaries that would mean YES.

On the other hand, the trigger part of that event triggers the Mercenaries Defect! event for a random_enemy. Unless that's not as random as I understand it it could mean that it selects one of the enemies that didn't have a mercenary regiment. If so, what happens when the defection event is triggered for this player and he has no mercenaries to loose? Possible CTD unless protection for this is in the effect itself..
That may well be the cause...

You're right. From what I know, this event is not consistent with the CK logic. There is no way I know you can verify you are removing the mercenaries from the ennemy who has them...

Thanks for reporting. :)

Cat
 
FrEDa said:
The event_effects.txt file seems to suggest that the add_regiment effect should set a mercenaries=yes|no flag. However, none of the Mercenary events do this.. nor the Templar events. So, how does the game know what regiments are mercenaries?
IIRC if you look into your savegame, you'll see this flag is set properly anyway. I will verify tonight.
FrEDa said:
The events in Mercenaries use tech_prov = # as an option, while the Templar events use region = middle_east or none for the Teutonic order (should perhaps be region = eastern_europe). The region thing is probably just where to place the unit (in the capital if not present) though..
techprov = # is used to give your mercenary the tech of the province they are coming from. So if you get welsh mercenaries, they will have the Welsh Province bow tech (so if your own bow tech is still primitive, as Welsh get a tech bonus for bows, chances are their tech would be better than yours). There is a bug underlying here BTW, but it is not related to your current problem.

"region" is to place the regiment in that region if possible, if I remember well.
But the Templars will have the tech of your capital (IIRC) anyway. Not the tech of any templar-existing country. Which make sense: There are probably Templars from a house inside your desmene...

FrEDa said:
Something wrong here? IF we check the savegame files regiments of mercenaries will have a mercenaries = yes tag. Perhaps the add_regiment set's this flag automatically?
Here you go, the flag is set properly :)

FrEDa said:
But, should Templars, Hospitalers and Teutonic Knight be considered mercenaries in this case? Would be kind of weird if a Christian nation is at war vs. a Pagan/Islam nation and the Templar regiment decides to switch sides as I encountered the other day (going to Sheikdom of Syria)!?
The mercenaries flag, AFAIK, is used so that if you disband them, they won't be added to the pool of their "home province".

Otherwise, you will be artificially increasing your pool of troops each time you disband mercenaries...

Cat
 
Cat Lord said:
That may well be the cause...

You're right. From what I know, this event is not consistent with the CK logic. There is no way I know you can verify you are removing the mercenaries from the ennemy who has them...

Thanks for reporting. :)

Cat

Ok. But this was probably not the case in my 2 CTDs so far as I really DID have mercenaries (3-4 Templar Regiments, 1 Hospitalers). But, it could still acount for various CTDs people are experiencing..

/F
 
Cat Lord said:
The mercenaries flag, AFAIK, is used so that if you disband them, they won't be added to the pool of their "home province".

Otherwise, you will be artificially increasing your pool of troops each time you disband mercenaries...

Cat

Well, ok. That makes sense.

However, loosing a set of Chrstian Templars to a Muslim nation (as I would have done to Syria if not causing a CTD) is perhaps a bit weird. I'm sure that some Templars switched sides during this era.. but not a whole regiment.

I can't see a way to enforce this though, not unless random_enemy can somehow be checked to see if_christian, and has_mercenaries, while the nation that's going to get them can check if_muslim or something.

/F
 
Actually, this could be done quite easily in the "receiving" event by adding the necessary trigger conditions and then preventing the receiving event from firing. It would still result in the loss of the mercenary unit, but would not give it to a muslem or pagan enemy.
 
How do you mean? Since it's the benefactor of the event that triggers the defection by random_enemy, the starting event has no way of telling who that random enemy is, nor if it's a "Religious Enemy".

Similarly, the receiving event has no idea who triggered the event, unless the trigger code automatically throws in a "link" so to speak to the entity that caused it to trigger. Then things could work..

Some sort of global variable is needed, that's transfered between the events. I'm quite sure you can do this in HoI so perhaps it's possible in CK as well?

/F
 
MrT said:
Actually, this could be done quite easily in the "receiving" event by adding the necessary trigger conditions and then preventing the receiving event from firing. It would still result in the loss of the mercenary unit, but would not give it to a muslem or pagan enemy.
MrT, if your event is triggered by a command, it is triggered by a command, and that bypasses any trigger conditions of the said event.

Cat
 
Status
Not open for further replies.