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

gauffa

Sergeant
85 Badges
Nov 20, 2002
50
0
Visit site
  • Europa Universalis IV: Cossacks
  • Sword of the Stars II
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Sengoku
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Necroids
  • Europa Universalis IV: Art of War
  • 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
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • King Arthur II
  • Magicka
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
Hey folks,

I'm trying to add an event that will add a trait to the player's character only once. I have finally gotten to the point where the game no longer calls out errors in the event but it still doesn't seem to fire regardless of the MTTH.

Any help would be greatly appreciated.

Code:
character_event = {
	id = 8998

	picture = "event_spymaster"

	trigger = {
		condition = { type = age value = 16 }
		condition = { type = ruler }
		condition = { type = not value = { type = ai } }
		condition = { type = not value = { type = trait value = user_defined_a } }
			}		
			
		}
	}

	mean_time_to_happen = {
		days = 1

	}

	action_a = {
		ai_chance = 0
		effect = { type = add_trait value = user_defined_a }
				}
	}
	action_b = {
		ai_chance = 100
		effect = { type = remove_trait value = user_defined_a }
	}
}
 

jordarkelf

01_TITLE_STRING
164 Badges
Jul 13, 2005
8.040
647
erbkaiser.nl
  • Impire
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Galactic Assault
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Divine Wind
  • Europa Universalis III Complete
  • Iron Cross
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Legio
  • Leviathan: Warships
  • The Kings Crusade
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Victoria 3 Sign Up
  • Crusader Kings II: Sons of Abraham
  • Ancient Space
  • Hearts of Iron Anthology
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • 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
  • A Game of Dwarves
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Commander: Conquest of the Americas
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Dungeonland
  • East India Company
  • East India Company Collection
  • Europa Universalis III
It doesn't work because there is no such thing as user defined traits :(

You can see this for yourself if you edit it into a scenario or savegame, as soon as the game is loaded it is removed (if the game loads at all).
 

Veldmaarschalk

Cool Cat
151 Badges
Apr 20, 2003
30.122
1.858
  • 200k Club
  • 500k Club
Try to manually fire the event

Start a scenario
Click on character
Open the console with F12
type in: charevent 8998
See what happens

The game engine has a problem with very short or very long MTTH, that might be the problem

EDIT
jordarkelf said:
It doesn't work because there is no such thing as user defined traits :(

You can see this for yourself if you edit it into a scenario or savegame, as soon as the game is loaded it is removed (if the game loads at all).

There are, they are added in DV, look in C:\Program Files\Paradox Entertainment\Crusader Kings\config\deus_vult.csv

Code:
TRAIT_NAME_USER_DEFINED_A;User Defined;;;;;;;;;;X
TRAIT_DESC_USER_DEFINED_A;This trait is free to use for user-modifications.;;;;;;;;;;X
TRAIT_NAME_USER_DEFINED_B;User Defined;;;;;;;;;;X
TRAIT_DESC_USER_DEFINED_B;This trait is free to use for user-modifications.;;;;;;;;;;X
TRAIT_NAME_USER_DEFINED_C;User Defined;;;;;;;;;;X
TRAIT_DESC_USER_DEFINED_C;This trait is free to use for user-modifications.;;;;;;;;;;X
 

gauffa

Sergeant
85 Badges
Nov 20, 2002
50
0
Visit site
  • Europa Universalis IV: Cossacks
  • Sword of the Stars II
  • Warlock: Master of the Arcane
  • 500k Club
  • Cities: Skylines
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis IV: El Dorado
  • Pride of Nations
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Horse Lords
  • Sengoku
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Stellaris: Necroids
  • Europa Universalis IV: Art of War
  • 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
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Crusader Kings II
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • King Arthur II
  • Magicka
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
I found my mistake. I was 'closing' more commands than I was opening and somehow this was preventing the game from reading the event properly so it was unable to fire even when I tried to do it manually.

It's working now.

Thanks for your time, all!