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

unmerged(241678)

Second Lieutenant
3 Badges
Dec 23, 2010
185
0
  • Crusader Kings II
  • Europa Universalis III Complete
  • Warlock 2: The Exiled
I am looking for some way to compare a characters stats so that I can edit the ambitions to only be allowed for the "better" stats (the 3 best ones).
Since I am absolutly new to modding the basic question is, is it possible at all or do I have to compromise by using fix minima values as in (allow= { diplo = 10 })? And if it is how can I do it?

I have tried the following, but it didnt work as intended....

(My amature addition is the stuff in red :eek:o)

Code:
obj_become_chancellor = {
	type = character
	
	expectation_of_liege = yes

	allow = {
		prisoner = no
		age = 16
		is_councillor = no
		liege = {
			NOT = { character = ROOT }	
			[COLOR="#FF0000"]{
				{	
			 	{diplomacy > martial}
					AND
					{diplomacy > stewardship}
					OR
					{diplomacy > intrigue}
					OR
					{diplomacy > learning}
				}
				OR
				{
				{diplomacy > stewardship}
					AND
					{diplomacy > intrigue}
					OR
					{diplomacy > learning}
				}
				OR
				{
				{diplomacy > intrigue}
					AND
					{diplomacy > learning}
				}
		       }[/COLOR]
		}
[...]
 
I have no idea whether you can compare or not, but either way your code is off. With keeping the greater-than-sign (which I am sure doesn't exist in the code), it should be like this.

Code:
allow = {
		prisoner = no
		age = 16
		is_councillor = no
		liege = {
			NOT = { character = ROOT }	
			OR = {
	                        AND = {
			 	        {diplomacy > martial}
					OR = {
					{diplomacy > stewardship}
					{diplomacy > intrigue}
					{diplomacy > learning}
                                        }
				}

...

Or to explain it, you have to put NOT, OR and AND before the actual conditions, not between them, so A and B is AND = {A B}, A or B is OR = {A B} and A and either B or C is AND = { A OR = { B C } }.

Hope you understand it.
 
Thanks a lot, I think I understood and learned something (change_learning = 1 ;)). At least it helped to make the code easier to look over and I was able to find some missing }'s *facepalm
But even though I think I have the semantic(?) right now the > and < seem not to work and the "=" that seems to mean equal or greater like in "age = 16" (and above) it doesnt work either.

I guess for now I stop trying around and start playing... cant believe I waited 12 hours today for the game and now after having it 7 hours I havent even started to play.
Still if anyone can help about the comparing I'll be grateful (tomorrow).