• 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(15101)

Second Lieutenant
Feb 25, 2003
179
0
Visit site
this command was added in one of the beta patches
- Added a new target for character-events, called "this" to allow to trigger further events for that character.
It doesn't seem to work. No error message when loading, but trigger effects with 'this' as the target don't appear in the event effects popup.

remove_improvement for = x value = y
The event_effects file says leaving the value blank will remove a random improvement, but the command doesn't work in character events when a value is specified. This is currently used in event 7224 in bankruptcy_events.txt, the code on option B looks like this:

Code:
		effect = { type = random
				chance = 10
				effect = {
					type = add_trait
					value = excommunicated
				}
			}
		effect = { type = random
				chance = 50
				effect = {
					type = remove_improvement 
					value = monastery
				}
			}

but in the game the effect popup shows this:
10% chance x gains the trait 'excommunicated'
50% chance x gains the trait 'excommunicated'

courtier_defect value = random_neighbor/random_enemy etc.
These commands are working, but the text displays the wrong character's name. If courtier X is being relocated to a province owned by King Y, the event text reasds "Y moves to..."
 
Upvote 0
Fallout_Boy said:
but in the game the effect popup shows this:
10% chance x gains the trait 'excommunicated'
50% chance x gains the trait 'excommunicated'
This is the case only if there is no monastery to remove, I believe. But it will not give you 50% chance of being excommunicated, AFAIK.

Cat

PS: I am surprise the code doesn't check you have at least one monastery somewhere :confused: I will have a look.
 
Cat Lord said:
This is the case only if there is no monastery to remove, I believe. But it will not give you 50% chance of being excommunicated, AFAIK.

Cat

PS: I am surprise the code doesn't check you have at least one monastery somewhere :confused: I will have a look.
You're right that there is no 50% chance of being excommunicated, that's just a text error. When I tested this before I got the same thing even when there was a monastery in the province. However I ran another test, triggering the event for a ruler who I know for sure had several monasteries. The event came up with this:

10% chance x gains the trait 'excommunicated'
50% chance improvement lost 'glass-works'

I triggered the event several times, each time it was the glass-works that was removed event though the script says value = monastery. Once all the glass-works in my demesne were removed, it went back to:

10% chance x gains the trait 'excommunicated'
50% chance x gains the trait 'excommunicated'

Next I tried replacing the remove_improvement value with another type of building, but no matter what it was (monastery, traininggrounds, tilefactory) the improvement removed by the event was always the glass-works.
 
But that is firing the event using the console right ?

Cat
 
Cat Lord said:
But that is firing the event using the console right ?

Cat
Right, although I only started testing from the console when some events I wrote using remove_improvement weren't working right even when they triggered normally. I can do some more tests without triggering from the console, but that will take more time. I'll have to get back to you with the results this evening.