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

Nein

Lt. General
2 Badges
Feb 19, 2013
1.258
2.796
  • Darkest Hour
  • For The Glory
I made this event to get claims in an specific province once it is adquired, adding "persistent = yes" so that it works any time a different country gets the province:
Code:
#Core in Tangiers
event = { 
	id = 99999999
	trigger = {
		NOT = {
			OR = {
				core_national = { province = 732 data = -1 }
			 	core_claim = { province = 732 data = -1 }
				}
		}
		 ownerchange = { province = 732 days = 1 }
	}
	province = 732 #Tangiers
	name = "Core in Tangiers"
	desc = "Core in Tangiers"
	persistent = yes

	date = { day = 1 month = january year = 1418 }
	offset = 30
	deathdate = { year = 1820 }
	
	action_a = {
		name = "Get core"
		command = { type = addcore_claim which = 732 }
	}
}

The problem is that once it runs I get multiple times (like 20 or so), I assume this is because of the new qualifier.
Since this event simply gives me a claim this problem it is only an annoyance, but in a different situation it could be a serious trouble, so I need to know how to fix this, any ideas?
 
I'm not sure if it'd be what is causing the problem, but have you tried with that OR bit in the trigger removed? NOT in FtG is really more like "NOR" in that none of the conditions listed in side can be true if you want the event to fire.
 
Is this how the event should look like?
Code:
#Core in Tangiers
event = { 
	id = 99999999
	trigger = {
		NOT = {
			core_national = { province = 732 data = -1 }
			core_claim = { province = 732 data = -1 }
		}
		 ownerchange = { province = 732 days = 1 }
	}
	province = 732 #Tangiers
	name = "Core in Tangiers"
	desc = "Core in Tangiers"
	persistent = yes

	date = { day = 1 month = january year = 1418 }
	offset = 30
	deathdate = { year = 1820 }
	
	action_a = {
		name = "Get core"
		command = { type = addcore_claim which = 732 }
	}
}

Same thing happened.
 
Is this how the event should look like?
...
Same thing happened.

I have no idea what could be the cause of your problem.
However what I would change in the event would be
- to use the controlchange trigger instead of the ownerchange trigger. If a country conquers Tangier but in a war someone else or rebels control it the event would make no sense for me;
- to use a larger period of time than 1 day even if it´s only for testing;
- to use additional restrictions. Does it really make sense that everyone could get that claim? Perhaps restrict it to nations with their capital in Europe or Afrcia?
- have you tried a smaller event number? What is the first free event ID for provincespecific events? 338499?
- are you using the event in the vanilla game or with AGCEEP mod?
- the event does give you the claimcore? So the problem is only that the event fires multiple times?
 
Finally solved the problem, the cause was the ownerchange time. Thanks!

Though not really a concern, I added the following trigger:
ownerchange = { province = 732 years = 1 }
Yet the event runs just a few months after I get the province.
 
Finally solved the problem, the cause was the ownerchange time. Thanks!

Though not really a concern, I added the following trigger:
ownerchange = { province = 732 years = 1 }
Yet the event runs just a few months after I get the province.

What exactly was the cause? That you used "day = 1" and 1 was not enough? Does the "day" counter doesn´t work at all and that´s why you now use years?
 
It certainly does work, otherwise the event would never have run at all. And I changed the ownerchange time because you told me to.
Now I changed the trigger to days = 100 and it works perfectly (and also runs close to the correct date).
 
Doesn't the "years = x" trigger only check for the year part of the date? So if you conquer Tangiers in Dec 1500, the event could trigger in Jan 1501.

Also, NOT = { OR = { x y } } is identical with NOT = { x y }.