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

Cenobite30

Colonel
68 Badges
Sep 19, 2006
1.189
22
  • Europa Universalis: Rome
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Europa Universalis III Complete
  • Knights of Pen and Paper +1 Edition
  • The Kings Crusade
  • Magicka
  • Majesty 2
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • For The Glory
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Teleglitch: Die More Edition
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Stellaris: Ancient Relics
  • Darkest Hour
  • Arsenal of Democracy
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • 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: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Hearts of Iron Anthology
  • Deus Vult
  • East India Company Collection
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
Hello. I'm trying to make an event to decrease the stats of a character. When I try to test the event in-game by selecting a character and typing "charevent XXXXX", the console says "Event not found". Here's the event:

character_event = { #Martial Malus
id = 30000

picture = "event_education"

trigger = {
condition = { type = age value = 17 }
condition = { type = not value = { type = age value = 90 } }
condition = { type = or
condition = { type = martial value = 10 }
condition = { type = and
condition = { type = martial value = 8 }
condition = { type = diplomacy value = 8 }
}
condition = { type = and
condition = { type = martial value = 8 }
condition = { type = intrigue value = 8 }
}
condition = { type = and
condition = { type = martial value = 8 }
condition = { type = stewardship value = 8 }
}
}
}

mean_time_to_happen = {
months = 999999
}

immidiate = {
effect = { type = random_list
1 = { type = no_effect }
99 = { type = martial value = -2 }
}
}
}

I used the wiz skill deterioration events from DVIP as my template. It's meant to be fired manually, but I left in most of the conditions because I didn't know how to properly delete them without breaking the event, so I just increased the MTTH to some absurd number. I saved the event in the same file as the wiz events (wiz.txt).

So what's my problem? Is the event itself incorrect? Is it saved in the wrong file? Sorry if these questions are noobish. It's my first time making an event, and I couldn't find the answer in the CK search engine.
 
Apparently all of the }s (brackets?) moved to the left side of the line when I pasted the event into the message. Before you tell me the brackets are in the wrong place, know that they are in their original place in the actual event file. :)
 
Did you add this event to an existing event-file ? Or did you create a new event-file ?

If you did the latter, then did you add that event-file to

Crusader Kings/db/events.txt


Code:
#
#
# Crusader Kings Events Database
#
#

event = "db\events\Provincial_Structure_Events.txt"
event = "db\events\Provincial_Conversion_Events.txt"
event = "db\events\Global_Diseases_Events.txt"
event = "db\events\Character_Health_Events.txt"
event = "db\events\Character_Development_Events.txt"
event = "db\events\Mongol_Invasion_Events.txt"
event = "db\events\Religious_Events.txt"
event = "db\events\Trait_Events.txt"
event = "db\events\Papal_Events.txt"
event = "db\events\Claims_Events.txt"
event = "db\events\Crusader_Events.txt"
event = "db\events\templar_events.txt"
event = "db\events\mercenary_events.txt"
event = "db\events\Lordship_Events.txt"
event = "db\events\sin_events.txt"
event = "db\events\improvement_events.txt"
event = "db\events\battle_events.txt"
event = "db\events\bankruptcy_events.txt"
event = "db\events\province_power_events.txt"
event = "db\events\illness_events.txt"
event = "db\events\csc_events.txt"
event = "db\events\evil_events.txt"
event = "db\events\regency_events.txt"
event = "db\events\courtier_events.txt"
event = "db\events\marshal_events.txt"
event = "db\events\chancellor_events.txt"
event = "db\events\steward_events.txt"
event = "db\events\heresy_events.txt"
event = "db\events\chaplain_events.txt"
event = "db\events\court_events.txt"
event = "db\events\pagan_events.txt"
event = "db\events\law_events.txt"
event = "db\events\intrigue_events.txt"
event = "db\events\bastard_events.txt"
event = "db\events\realm_disruption_events.txt"
event = "db\events\childhood_events.txt"
event = "db\events\rival_events.txt"
event = "db\events\friend_events.txt"
event = "db\events\romance_events.txt"
event = "db\events\stability_events.txt"
event = "db\events\fosterling_events.txt"


# Advances
event = "db\events\advances_discovery.txt"
event = "db\events\advances_spread.txt"


# DVIP
event = "db\events\bugfixes.txt"
event = "db\events\melting_pots.txt"

Also if you want the brackets to appear like they do in the event, post the event between the {code} {/code} (replace the {} with [])
 
Did you add this event to an existing event-file ? Or did you create a new event-file ?

If you did the latter, then did you add that event-file to

Crusader Kings/db/events.txt


Code:
#
#
# Crusader Kings Events Database
#
#

event = "db\events\Provincial_Structure_Events.txt"
event = "db\events\Provincial_Conversion_Events.txt"
event = "db\events\Global_Diseases_Events.txt"
event = "db\events\Character_Health_Events.txt"
event = "db\events\Character_Development_Events.txt"
event = "db\events\Mongol_Invasion_Events.txt"
event = "db\events\Religious_Events.txt"
event = "db\events\Trait_Events.txt"
event = "db\events\Papal_Events.txt"
event = "db\events\Claims_Events.txt"
event = "db\events\Crusader_Events.txt"
event = "db\events\templar_events.txt"
event = "db\events\mercenary_events.txt"
event = "db\events\Lordship_Events.txt"
event = "db\events\sin_events.txt"
event = "db\events\improvement_events.txt"
event = "db\events\battle_events.txt"
event = "db\events\bankruptcy_events.txt"
event = "db\events\province_power_events.txt"
event = "db\events\illness_events.txt"
event = "db\events\csc_events.txt"
event = "db\events\evil_events.txt"
event = "db\events\regency_events.txt"
event = "db\events\courtier_events.txt"
event = "db\events\marshal_events.txt"
event = "db\events\chancellor_events.txt"
event = "db\events\steward_events.txt"
event = "db\events\heresy_events.txt"
event = "db\events\chaplain_events.txt"
event = "db\events\court_events.txt"
event = "db\events\pagan_events.txt"
event = "db\events\law_events.txt"
event = "db\events\intrigue_events.txt"
event = "db\events\bastard_events.txt"
event = "db\events\realm_disruption_events.txt"
event = "db\events\childhood_events.txt"
event = "db\events\rival_events.txt"
event = "db\events\friend_events.txt"
event = "db\events\romance_events.txt"
event = "db\events\stability_events.txt"
event = "db\events\fosterling_events.txt"


# Advances
event = "db\events\advances_discovery.txt"
event = "db\events\advances_spread.txt"


# DVIP
event = "db\events\bugfixes.txt"
event = "db\events\melting_pots.txt"

Also if you want the brackets to appear like they do in the event, post the event between the {code} {/code} (replace the {} with [])

Thanks for the quick response and the code tip. I didn't create a new file, I added it to the bottom of wiz.txt. The end of the file looks like so:

Code:
character_event = { #Stewardship
   id = 9533 

   picture = "event_education" 

   trigger = { 
      condition = { type = age value = 12 } 
      condition = { type = not value = { type = age value = 16 } } 
	  condition = { type = or
		condition = { type = stewardship value = 10 }
		condition = { type = and
			condition = { type = stewardship value = 8 }
			condition = { type = martial value = 8 }
		}
		condition = { type = and
			condition = { type = stewardship value = 8 }
			condition = { type = diplomacy value = 8 }
		}
		condition = { type = and
			condition = { type = stewardship value = 8 }
			condition = { type = intrigue value = 8 }
		}
	  }
   } 

   mean_time_to_happen = { 
      months = 18 
   } 

   immidiate = { 
      effect = { type = random_list 
		 10 = { type = no_effect }
         25 = { type = stewardship value = -1 } 
         20 = { type = stewardship value = -2 } 
         18 = { type = stewardship value = -3 }  
         17 = { type = stewardship value = -4 } 
         10 = { type = stewardship value = -5 } 
      } 
   } 
}

character_event = { #Martial Malus
   id = 30000 

   picture = "event_education" 

   trigger = { 
      condition = { type = age value = 17 } 
      condition = { type = not value = { type = age value = 90 } } 
	  condition = { type = or
		condition = { type = martial value = 10 }
		condition = { type = and
			condition = { type = martial value = 8 }
			condition = { type = diplomacy value = 8 }
		}
		condition = { type = and
			condition = { type = martial value = 8 }
			condition = { type = intrigue value = 8 }
		}
		condition = { type = and
			condition = { type = martial value = 8 }
			condition = { type = stewardship value = 8 }
		}
	  }
   } 

   mean_time_to_happen = { 
      months = 999999 
   } 

   immidiate = { 
      effect = { type = random_list 
		 1 = { type = no_effect }
         99 = { type = martial value = -2 } 
      } 
   } 
}
9533 works (I tested it), but 30000 doesn't. It says event not found.
 
Did you install any other mods ? That mod might use ID 30000 already, possibly for a province-event. Since AFAIK there is no limit on the event-ID's.
 
Did you install any other mods ? That mod might use ID 30000 already, possibly for a province-event. Since AFAIK there is no limit on the event-ID's.

The only one I have is the DVIP with the DVIP add-on. It didn't mention anyone using that number in the Event ID clearing house, so I just assumed it would be free. I'll try a different number. Is there another file I might need to alter? I noticed the modtext.csv has the text descriptions for the events. Would I need to add something there to make the event able to fire? As for now, I'm mostly just interested in making a working event and can add text later, but I'll try messing with that as well.
 
The only one I have is the DVIP with the DVIP add-on. It didn't mention anyone using that number in the Event ID clearing house, so I just assumed it would be free. I'll try a different number. Is there another file I might need to alter? I noticed the modtext.csv has the text descriptions for the events. Would I need to add something there to make the event able to fire? As for now, I'm mostly just interested in making a working event and can add text later, but I'll try messing with that as well.

No, modtext.csv is only for the event-text.
 
Update: I changed the id to 34123 (almost certainly not in use) in the wiz.txt file, started a 1066 game as England, selected William the Conqueror so that we see him and his relatives/friends/rivals/heirs/etc., typed "charevent 34123" (without the quotation marks, of course), and got the same "Event not found" message.
 
I tried again with different IDs (a few other high numbers I just thought of), saved it in the same place, and still nothing. Have you an idea what I'm doing wrong? I checked the "Event scripting: tricks and traps" thread but didn't find anything.
 
I have no idea

I have added several events myself, all with very high numbers like, id = 20085650 f.e. and they work just fine.