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

BB4Life

First Lieutenant
3 Badges
May 5, 2007
219
0
  • Europa Universalis III
  • Rome Gold
  • 500k Club
I am not a programmer but lately I have been doing a lot of modding and tweaking to some of the notepad files in EU:Rome. It has been fairly easy so far but I am confused by some of the parenthesis in the code. For example in the objectives.txt I come across something like this:

obj_become_general = {
type = character
allow = {
can_hold_title = title_general
NOT = { has_title = title_general }
NOT = { martial = 7 }

From reading this, with my knowledge, it seems like a character is allowed to have the objective to become a general if he can hold the title and does not already have the title of general. I am not sure what the parenthesis around the martial stat mean and I don't know why the line above it needs parenthesis.

What does the bottom line mean? I'm not sure whether it means a martial stat of 7 and up, 8 and up, or just not 7. It could even work the opposite way for all I know.


I don't mean to make an extremely long thread but as long as we are talking about the objectives.txt, how does the chance/factor modifier work? I changed some of the factors but didn't see different results in game. My end goal is to modify objectives.txt to have higher goal requirements but better rewards.
 

stryhf

Second Lieutenant
48 Badges
Jul 31, 2009
122
0
  • Crusader Kings II
  • Victoria 2: A House Divided
  • Sengoku
  • Semper Fi
  • Europa Universalis: Rome
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Hearts of Iron III
  • For the Motherland
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Divine Wind
  • BATTLETECH: Season pass
  • BATTLETECH: Heavy Metal
  • Crusader Kings II: Holy Fury
  • Shadowrun: Dragonfall
  • Crusader Kings III
  • Shadowrun Returns
  • BATTLETECH - Digital Deluxe Edition
  • Crusader Kings II: Jade Dragon
  • BATTLETECH
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings II: Reapers Due
  • Stellaris
  • Crusader Kings II: Conclave
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • 500k Club
  • Rome: Vae Victis
  • Victoria 2
  • Cities in Motion
  • Sword of the Stars II
  • Sword of the Stars
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: Rajas of India
  • BATTLETECH: Flashpoint
  • Crusader Kings II: Sons of Abraham
  • Gettysburg
  • Europa Universalis III: Chronicles
  • Europa Universalis IV: Art of War
Code:
obj_become_general = {
	type = character
	allow = {
		can_hold_title = title_general
		NOT = { has_title = title_general }
		NOT = { martial = 7 }
I am not sure what the parenthesis around the martial stat mean and I don't know why the line above it needs parenthesis.

What does the bottom line mean? I'm not sure whether it means a martial stat of 7 and up, 8 and up, or just not 7. It could even work the opposite way for all I know.

The braces are associated with the NOT = { }, which is a binary negation for the existing statement. It inverts the true/false. This means the character does NOT have title_general and is NOT martial 7 or higher.
 

BB4Life

First Lieutenant
3 Badges
May 5, 2007
219
0
  • Europa Universalis III
  • Rome Gold
  • 500k Club
ok thanks for the reply. I have some more that I am unsure of:

allow = {
{ NOT } = martial = 7
{ martial = 7 }
martial = 7

Again I am mainly confused with the parenthesis and how they effect the statement. I am fairly sure that the bottom one means that it will allow a martial of 7 and up, but it could still mean only a martial of 7 is allowed. I'm still confused.


Also there are these chance things and I dont know what factor means. I am guessing that the factors add or multiply up but I am not sure of the exact calculations in this example:

chance = {
factor = 50
modifier = {
factor = 0.1
is_governor = yes
}
modifier = {
factor = 0.1
is_courtier = yes
}
modifier = {
factor = 1.5
finesse = 5
}
modifier = {
factor = 1.5
finesse = 7

If you would be able to explain these things in laymans terms to me it would be much appreciated.
edit: i am unsure why it came out like this in the forum, hopefully you can still read it.
 

Cheexsta

Veni, vidi, vici
60 Badges
Dec 22, 2005
2.894
59
  • Europa Universalis IV: Rights of Man
  • Rome: Vae Victis
  • 500k Club
  • Europa Universalis IV: El Dorado
  • Europa Universalis: Rome Collectors Edition
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Stellaris Sign-up
  • Victoria 2: Heart of Darkness
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Cradle of Civilization
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Europa Universalis IV: Rule Britannia
  • Stellaris: Distant Stars
  • Stellaris: Nemesis
  • Europa Universalis IV: Conquest of Paradise
  • 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
  • Europa Universalis IV: Art of War
  • Crusader Kings II
  • Europa Universalis IV: Wealth of Nations
  • Heir to the Throne
  • Europa Universalis III Complete
  • Magicka
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Victoria 2
ok thanks for the reply. I have some more that I am unsure of:

allow = {
{ NOT } = martial = 7
{ martial = 7 }
martial = 7

Again I am mainly confused with the parenthesis and how they effect the statement. I am fairly sure that the bottom one means that it will allow a martial of 7 and up, but it could still mean only a martial of 7 is allowed. I'm still confused.


Also there are these chance things and I dont know what factor means. I am guessing that the factors add or multiply up but I am not sure of the exact calculations in this example:

chance = {
factor = 50
modifier = {
factor = 0.1
is_governor = yes
}
modifier = {
factor = 0.1
is_courtier = yes
}
modifier = {
factor = 1.5
finesse = 5
}
modifier = {
factor = 1.5
finesse = 7

If you would be able to explain these things in laymans terms to me it would be much appreciated.
edit: i am unsure why it came out like this in the forum, hopefully you can still read it.

Your syntax with the braces is still incorrect. The braces must surround the subject of the NOT condition.

Regarding the martial = 7, it's worth noting that whenever you see an equals sign in the files followed by a numerical value, it is actually read as 'equal to or greater than'. If you wanted to restrict it to one exact number, you'd need to use martial = x followed by a NOT = { martial = x+1 }.
 

BB4Life

First Lieutenant
3 Badges
May 5, 2007
219
0
  • Europa Universalis III
  • Rome Gold
  • 500k Club
equal to or greater than, thanks. Anyone know about the chance/factor above and what it means? I kind of want to restrict low stat characters from getting ambitions but I dont know whether to change the factors or put a number like martial = 7 under the allow section.