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

Corporal
8 Badges
Apr 26, 2008
34
0
  • Hearts of Iron Anthology
  • Deus Vult
  • Europa Universalis III
  • Hearts of Iron III Collection
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis: Rome
  • Rome Gold
I'm trying to make an event that occasionally lowers badboy a little bit, but I can't get it to work. Most of the text has been taken from other events, so it's quite puzzling to me where the fault lies.

When the scenario loads, a message tells me there is an unknown event in the line mean_time_to_happen. What have I got wrong?

Code:
#################################################
# New event to lower badboy for Player		#
#################################################

character_event = { # You have been allowed acts of contrition and penitence that will somewhat improve your status in the eyes of Our Lord and the Christian Community
	id = 9145

	picture = "event_religion"

	trigger = {
		condition = { type = ruler }
		condition = { type = religion value = catholic }
		condition = { type = exists value = PAPA }
		condition = { type = badboy value = 1.5 }
		condition = { type = not value = { type = ai } }
		condition = { type = not value = { type = trait value = heretic } }
		condition = { type = not value = { type = trait value = excommunicated } }
		condition = { type = not value = { type = trait value = sceptical } }
		condition = { type = not value = { type = trait value = kinslayer } }
		}
	}

	mean_time_to_happen = {
		months = 120

		modifier = {
			condition = { type = not value = { type = piety value = 0 } }
			factor = 2.0
		}
		modifier = {
			condition = { type = piety value = 200 }
			factor = 0.8
		}
		modifier = {
			condition = { type = piety value = 500 }
			factor = 0.8
		}
		modifier = {
			condition = { type = piety value = 1000 }
			factor = 0.8
		}
		modifier = {
			condition = { type = not value = { type = prestige value = 0 } }
			factor = 1.25
		}
		modifier = {
			condition = { type = prestige value = 200 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 500 }
			factor = 0.9
		}
		modifier = {
			condition = { type = prestige value = 1000 }
			factor = 0.9
		}
		modifier = {
			condition = { type = trait value = zealous }
			factor = 0.8
		}
		modifier = {
			condition = { type = trait value = crusader }
			factor = 0.66
		}
	}

	action_a = { # Praise The Lord!
		effect = { type = badboy value = -0.5 }
		effect = { type = ruler_piety value = 5 }
		effect = { type = gold scale = -0.5 }
	}

	action_b = { # I can't afford that!
		effect = { type = ruler_piety value = -5 }
	}

Any help will be greatly appreciated.

edit: I also noted the ugly colors in my post, how can I get rid of them?
 
Last edited by a moderator:
There were two mistakes in the event

1. After the triggers you had one } to many
2. In the effect you have written 'ruler_piety value =, that effect only works with province-events. Since this is an character-event you must use the effect 'piety value ='

Below the correct event :)

Have fun !

Code:
################################################# 
# New event to lower badboy for Player        # 
################################################# 

character_event = { # You have been allowed acts of contrition and penitence that will somewhat improve your status in the eyes of Our Lord and the Christian Community 
    id = 9145 

    picture = "event_religion" 

    trigger = { 
        condition = { type = ruler } 
        condition = { type = religion value = catholic } 
        condition = { type = exists value = PAPA } 
        condition = { type = badboy value = 1.5 } 
        condition = { type = not value = { type = ai } } 
        condition = { type = not value = { type = trait value = heretic } } 
        condition = { type = not value = { type = trait value = excommunicated } } 
        condition = { type = not value = { type = trait value = sceptical } } 
        condition = { type = not value = { type = trait value = kinslayer } } 
        } 
   

    mean_time_to_happen = { 
        months = 120 

        modifier = { 
            condition = { type = not value = { type = piety value = 0 } } 
            factor = 2.0 
        } 
        modifier = { 
            condition = { type = piety value = 200 } 
            factor = 0.8 
        } 
        modifier = { 
            condition = { type = piety value = 500 } 
            factor = 0.8 
        } 
        modifier = { 
            condition = { type = piety value = 1000 } 
            factor = 0.8 
        } 
        modifier = { 
            condition = { type = not value = { type = prestige value = 0 } } 
            factor = 1.25 
        } 
        modifier = { 
            condition = { type = prestige value = 200 } 
            factor = 0.9 
        } 
        modifier = { 
            condition = { type = prestige value = 500 } 
            factor = 0.9 
        } 
        modifier = { 
            condition = { type = prestige value = 1000 } 
            factor = 0.9 
        } 
        modifier = { 
            condition = { type = trait value = zealous } 
            factor = 0.8 
        } 
        modifier = { 
            condition = { type = trait value = crusader } 
            factor = 0.66 
        } 
    } 

    action_a = { # Praise The Lord! 
        effect = { type = badboy value = -0.5 } 
        effect = { type = piety value = 5 } 
        effect = { type = gold scale = -0.5 } 
    } 

    action_b = { # I can't afford that! 
        effect = { type = piety value = -5 } 
    }

EDIT
Use the 'code-tags' (#) instead of the PHP-tags to get rid of the colours :)

Welcome to the forum btw
 
Thank you.

I thought I copied it right and proofed it, but there are all these } to keep track of.
The text of the piety effect I was unsure of, and was going to play around with as the next step, but first I had to get around the first obstacle.

Thanks a lot for your help.
 
Follow-up question.

How do I get my choice of text in the pop-up window instead of the "unknown string wanted" that is displayed both in the main window and on the second button (the first button seems to have a default OK on it)?

Also, how do I separate the three effects for button A (as seen when hovering over the button) onto different lines? As they are now displayed they are a bit hard to read.

I have written a small number of events for HoI2 and there was never any problem like these above.
 
You have to create a csv-file called modtext.csv in Crusader Kings/config (if it doesn't already exist of course, then just add the event-lines, not the EOF-lines)

Add these lines to that file

Code:
EVT_9145_NAME;You have been allowed acts of contrition and penitence that will somewhat improve your status in the eyes of Our Lord and the Christian Community;@;@;@;@;;;;;;X
ACTIONNAME9145A;Praise The Lord! ;@;@;@;@;;;;;;X
ACTIONNAME9145B;I can't afford that! ;@;@;@;@;;;;;;X

#EOF;;;;;;;;;;;X
#EOF;;;;;;;;;X