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

Bismarck

ChancellAAR
118 Badges
Jan 5, 2002
1.759
0
rantocracy.blogspot.com
  • Majesty 2
  • 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
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Age of Wonders: Planetfall Deluxe edition
  • Commander: Conquest of the Americas
  • 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
  • Ancient Space
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • 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
Character Event scripting problems with the for = syntax

I have found that:

effect = { type = intrigue for =
effect = { type = diplomacy for =
effect = { type = stewardship for =
effect = { type = piety for =
effect = { type = gold for =
effect = { type = prestige for =
effect = { type = fertility for =

are not working(they cause an lhs error when trying to start a scenario/existing game with events with such types of increases)

I have not had a problem using these types with no target... it is only when I tried using them in "for = target" situations that I am getting these errors.

M
 
Upvote 0

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Call to arms event
  • 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
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
What about the two stats that aren't on your list: health and martial? Can those take targets, or didn't you test that?
 

Bismarck

ChancellAAR
118 Badges
Jan 5, 2002
1.759
0
rantocracy.blogspot.com
  • Majesty 2
  • 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
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Age of Wonders: Planetfall Deluxe edition
  • Commander: Conquest of the Americas
  • 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
  • Ancient Space
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • 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
richvh said:
What about the two stats that aren't on your list: health and martial? Can those take targets, or didn't you test that?

martial and health have both checked out in my preliminary tests... and they are already part of existing events in the lordship_events.txt

M
 

Bismarck

ChancellAAR
118 Badges
Jan 5, 2002
1.759
0
rantocracy.blogspot.com
  • Majesty 2
  • 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
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Age of Wonders: Planetfall Deluxe edition
  • Commander: Conquest of the Americas
  • 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
  • Ancient Space
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • 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
From lordship_events.txt(event 1114):

Code:
action_a = { # Friendly Champion win
		effect = { type = gold value = -25 }
		effect = { type = prestige value = 75 }
		effect = { type = health for = random_courtier value = -1 }
	}

I changed the type = health to type = intrigue and got an error... then I changed it back, and it ran fine...

M
 

Bismarck

ChancellAAR
118 Badges
Jan 5, 2002
1.759
0
rantocracy.blogspot.com
  • Majesty 2
  • 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
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Age of Wonders: Planetfall Deluxe edition
  • Commander: Conquest of the Americas
  • 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
  • Ancient Space
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • 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
I just ran this event:

Code:
character_event = {
	id = 20850
	picture = "event_crime"
	
	trigger = { 
	}
	mean_time_to_happen = {
		months = 360

		modifier = { 

		}
	}
action_a = {
		effect = { type = health for = random_courtier value = -1 }
		effect = { type = martial for = random_courtier value = -1 }
		effect = { type = intrigue for = random_courtier value = -1 }
		effect = { type = diplomacy for = random_courtier value = -1 }
		effect = { type = stewardship for = random_courtier value = -1 }
		effect = { type = piety for = random_courtier value = -50 }
		effect = { type = gold for = random_courtier value = -50 }
		effect = { type = prestige for = random_courtier value = -50 }
		effect = { type = fertility for = random_courtier value = -1 }
		effect = { type = health for = best_courtier value = -1 }
		effect = { type = martial for = best_courtier value = -1 }
		effect = { type = intrigue for = best_courtier value = -1 }
		effect = { type = diplomacy for = best_courtier value = -1 }
		effect = { type = stewardship for = best_courtier value = -1 }
		effect = { type = piety for = best_courtier value = -50 }
		effect = { type = gold for = best_courtier value = -50 }
		effect = { type = prestige for = best_courtier value = -50 }
		effect = { type = fertility for = best_courtier value = -1 }
		effect = { type = health for = worst_courtier value = -1 }
		effect = { type = martial for = worst_courtier value = -1 }
		effect = { type = intrigue for = worst_courtier value = -1 }
		effect = { type = diplomacy for = worst_courtier value = -1 }
		effect = { type = stewardship for = worst_courtier value = -1 }
		effect = { type = piety for = worst_courtier value = -50 }
		effect = { type = gold for = worst_courtier value = -50 }
		effect = { type = prestige for = worst_courtier value = -50 }
		effect = { type = fertility for = worst_courtier value = -1 }
		
}
}

Lines 17-23, 26-32 and 35-41 all resulted in errors... I invite you to try this for yourself.

I have made the .txt file of this script available for testing here. Just right click and save it.

M
 
Last edited:
Dec 20, 2003
772
0
Can you make those lines bold, because i don't want count! :D
 

Bismarck

ChancellAAR
118 Badges
Jan 5, 2002
1.759
0
rantocracy.blogspot.com
  • Majesty 2
  • 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
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Age of Wonders: Planetfall Deluxe edition
  • Commander: Conquest of the Americas
  • 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
  • Ancient Space
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • 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
the lines that have the errors are the ones that DO NOT have a type of either health or martial... all the others record as errors.

M
 

unmerged(6777)

Field Marshal
Dec 10, 2001
12.470
5
Confirmed that that isn't working - neither on 1.02 or my version of 1.03. I don't have a 1.00 gold installer handy but if you happen to have a clean, un-pathced release version could you check to see if it will run on that. (Just want to see if it's omething that's become broken or if it's always been broken)

Overall, though, very odd... :confused:

I will ask Bjering about it on Tuesday too (Monday being a holiday in Sweden).
 

Bismarck

ChancellAAR
118 Badges
Jan 5, 2002
1.759
0
rantocracy.blogspot.com
  • Majesty 2
  • 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
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Age of Wonders: Planetfall Deluxe edition
  • Commander: Conquest of the Americas
  • 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
  • Ancient Space
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • 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
Still broken in a fresh 1.03 install.

M
 

Bismarck

ChancellAAR
118 Badges
Jan 5, 2002
1.759
0
rantocracy.blogspot.com
  • Majesty 2
  • 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
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Lead and Gold
  • Leviathan: Warships
  • The Kings Crusade
  • Magicka
  • Europa Universalis IV: Wealth of Nations
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Pirates of Black Cove
  • Europa Universalis IV: Res Publica
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Sword of the Stars
  • Sword of the Stars II
  • Supreme Ruler 2020
  • Age of Wonders: Planetfall Deluxe edition
  • Commander: Conquest of the Americas
  • 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
  • Ancient Space
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • 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
If you ignore the error, events with the for = syntax will still run... however, the effects will hit the person that triggered the event and not the one targeted.

For example, if your king triggered an event that was supposed to increase the intrigue of his spymaster, the King would get the benefit, not the spymaster.

M