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