• 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.
Status
Not open for further replies.

richvh

Preserver of the Light
62 Badges
Dec 1, 2001
14.706
2.021
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
test on has_improvement broken

Testing on has_improvement of this form:
Code:
condition = {
   type = has_improvement
   value = { church = no }
}
always returns true, whether or not the improvement exists in the province. This currently only affects a few usury events in Religious_Events.txt, all other tests on has_improvement use the form:
Code:
condition = {
   type = has_improvement
   value = { church = yes }
}
which works properly. has_advance seems to work correctly for both = yes and = no forms, I haven't tested the other has_* tests.
 
Upvote 0
It's easy to test - trigger event 1958 from the console (attract moneylenders) while you already have a moneylender building in the province. It should - but won't - say never happen, trigger not satisfied.
 
The workaround:
Code:
condition = {
	type = not
	value ={
		type = has_improvement
		value = { moneylenders = yes }
	}
}
do the trick, so I am not sure this one will be corrected.

Maybe I should update the event effect.txt again for this one.

Cat
 
Yes, it does, and as far as I know the only Paradox event this affects is 1458 Moneylenders Attracted.
 
richvh said:
Yes, it does, and as far as I know the only Paradox event this affects is 1458 Moneylenders Attracted.
In this case, we will probably correct the event, not the effect...

Cat
 
Make that event 1958 (bad memory! Bad! Bad! Bad!)
 
Fixed in 1.03
 
Is that "events rewritten to avoid buggy code" fixed or "buggy code corrected" fixed, for future reference?
 
richvh said:
Is that "events rewritten to avoid buggy code" fixed or "buggy code corrected" fixed, for future reference?
Decision was made to go with [improvment] = yes and use a not statement to invert it...this is for consistancy in scripting sake so you don't have to remember which arguments take "= no" as valid.
 
Status
Not open for further replies.