• 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.
In misc_colony.txt, there's also a hiatus for Surinam.

Events 210307, -308 and -309 have the wrong coreprovince and provinceowned triggers. The events may fire one after another, since the cores given don't match the requirement.
 
Nikolai II said:
215 is in all options by it's placement outside the OR-lines.

However it is quite obvious that there are several bugs in the trigger, seeing as how there are dozens of OR where there should be one OR and several AND - like this..

Code:
event = {
	id = 210339 
	random = no
	province = 215 
	trigger = {
		NOT = { core = { province = 215 data = -1 } }
		owned = { province = 215 data = -1 }
		OR = { 
			AND = {
				owned = { province = 214 data = -1 }
				owned = { province = 216 data = -1 }
				owned = { province = 217 data = -1 }
				}
			AND = {
				owned = { province = 214 data = -1 }
				owned = { province = 216 data = -1 }
				owned = { province = 218 data = -1 }
				}
			AND = {
				owned = { province = 214 data = -1 }
				owned = { province = 217 data = -1 }
				owned = { province = 218 data = -1 }
				}
			AND = {
				owned = { province = 216 data = -1 }
				owned = { province = 217 data = -1 }
				owned = { province = 218 data = -1 }
				}
			}
		continent = europe #not so sure about this one
		}

		name = "Claim of Uruguay"
		desc = "Congratulations! We have now established a strong colonial base in Uruguay."
		style = 2
		date = { day = 1 month = january year = 1419 }
		offset = 3600
		deathdate = { day = 30 month = december year = 1819 }

		action_a = {
			name = "Excellent"
			command = { type = addcore which = 214 }
			command = { type = addcore which = 215 }
			command = { type = addcore which = 216 }
			command = { type = addcore which = 217 }
			command = { type = addcore which = 218 }
			command = { type = vp value = 10 }
		}
	}

Nice spot - there is a lot of text in that file, making it dull to check (obviously)

All of the other 'claim' events have the core province, for want of a better term (Uruguay in this case, 215), in the OR portion of the trigger conditions. As it stands we have two 216 entries in them. If whenever 216 appears in the first line of the OR triggers it was changed to 215 it would be consistent and remove all of the redundancies. Also the adding of cores would have to be editted as there's also two 216s and no 215 there too.
 
nlilith said:
All of the other 'claim' events have the core province, for want of a better term (Uruguay in this case, 215), in the OR portion of the trigger conditions. As it stands we have two 216 entries in them. If whenever 216 appears in the first line of the OR triggers it was changed to 215 it would be consistent and remove all of the redundancies. Also the adding of cores would have to be editted as there's also two 216s and no 215 there too.

No - since if using the event you posted (with the changes mentioned) it will be enough to own two provinces (f.ex 214 and 216) to get the event, which means that fifteen-twenty lines of code is just there to clutter it up.

My changes means you need four provinces, 215 and any three others and if you rewrite it a bit it can be 215 and any two others, but at least the whole trigger is relevant. (I also noted the effects bug, I figure that was how you found the bug to begin with, but as you note that is also fixed in my suggestion ;))
 
Is there a script in place to generate the colonial events? If not, there really ought to be to save work and cut down on typos (I could write one, if I knew exactly what the basic rules were). If there is, we shouldn't be discussing direct changes to the files, but instead making sure that the colonial event generator receives the correct input, and possibly tidying up the script to make it more efficient (as per Nikolai's suggestion of switching ANDs and ORs, for example).

Also, I notice that Siberia doesn't have any colonial events, not even 'Claim of XXX', whereas there is the possibility of cores on virtually anywhere else in the colonial sphere. Is this deliberate?
 
Yes Nikolai, your solution is more elegant and efficient, I was merely trying to keep the event consistent with every other event in the file, as it's pretty obvious there's an incorrect substitution of 216 for 215.

Restructuring all of the events is a noble ambition, I've merely done a quick edit in my file which took about 60 seconds.
 
Incompetent said:
Is there a script in place to generate the colonial events? If not, there really ought to be to save work and cut down on typos (I could write one, if I knew exactly what the basic rules were). If there is, we shouldn't be discussing direct changes to the files, but instead making sure that the colonial event generator receives the correct input, and possibly tidying up the script to make it more efficient (as per Nikolai's suggestion of switching ANDs and ORs, for example).

Also, I notice that Siberia doesn't have any colonial events, not even 'Claim of XXX', whereas there is the possibility of cores on virtually anywhere else in the colonial sphere. Is this deliberate?

There is in fact a script... it's a few hundred lines of code and several hundred lines of parameters, written in MS Basic. I can send it to you if you want to inherit it :)
I wasn't quite sure what the best way to implement the events was, the way it was scripted worked, in a general sense, so I didn't worry too much about optimizing it further.

And yeah, the lack of events for Siberia is pretty much deliberate. They'd be easy to add in, though, if you had any idea what to call the regions.
 
nlilith said:
All of the other 'claim' events have the core province, for want of a better term (Uruguay in this case, 215), in the OR portion of the trigger conditions. As it stands we have two 216 entries in them. If whenever 216 appears in the first line of the OR triggers it was changed to 215 it would be consistent and remove all of the redundancies. Also the adding of cores would have to be editted as there's also two 216s and no 215 there too.

There's a reason for it to be the way it is. The original intention for the events was to work for any group of provinces in the region in general, not discrimnating about any one critical province. But because of the way the triggering works, the implementation ended up being a bit more limited.
Believe it or not, it's actually a heck of a lot better optimized than it used to be.
I may work on it further when I get my next break off work, seeing as Archduke's picked up the project again.

Specifically, if Uruguay and Surinam are screwed... I'll focus on fixing those. South America was the second continent I did - after North America - so it's possible I made a couple of typos in the parameter file.
 
Two of the AI files lack some quotation marks:

brittany.ai: region = { Carribean India Indonesia "North America" }
hungary.ai: region = { "Central Europe" "North America" }
 
I played as Sicily and conquered part of Mameluks. They had only two provinces: Egypt and Nubia, and in 1513 game crashed. I think that problem is in event 202020:

event = {
id = 202020
trigger = {
NOT = { exists = EGY }
}
random = no
country = MAM
name = "The death of Quasim Aziz al-Sharay"
desc = "According to the traditions, Wahîd Aziz al-Sharay, the son of Quasim Aziz al-Sharay would be the rightful leader of the Mameluks. However, the relation between Wahîd Aziz al-Sharay and his uncle, Salah Aziz al-Sharay, was not very good. The conflict between them was later known as 'The al-Sharay family struggle'."
date = { day = 13 month = february year = 1513 }
offset = 0
action_a = {
name = "Support Wahîd Aziz al-Sharay"
command = { type = capital which = 744 } #Alexandria, just in case
command = { type = country which = FAT }
command = { type = independence which = EGY }
command = { type = independence which = SUD }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = inf which = 744 value = 15000 }
command = { type = cav which = 744 value = 15000 }
command = { type = trigger which = 202022 } #Egypt breaks with Mameluks
command = { type = sleepevent which = 202023 } #Fatamids cedes land
command = { type = ai which = "fatamids.ai" }
}
action_b = {
name = "Support Salah Aziz al-Sharay"
command = { type = capital which = 746 } #Egypt, just in case
command = { type = country which = EGY }
command = { type = independence which = FAT }
command = { type = independence which = SUD }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = desertion which = -1 value = 5000 }
command = { type = inf which = 746 value = 15000 }
command = { type = cav which = 746 value = 15000 }
command = { type = trigger which = 202021 } #Mameluks breaks with Egypt
command = { type = sleepevent which = 202024 } #Egypt cedes land
command = { type = ai which = "egypt.ai" }


Perhaps there should be trigger ' owned = { province = 744 data = MAM } ' ?
 
Ramzes said:
I played as Sicily and conquered part of Mameluks. They had only two provinces: Egypt and Nubia, and in 1513 game crashed. I think that problem is in event 202020:

Perhaps there should be trigger ' owned = { province = 744 data = MAM } ' ?

AND owned = { province = 746 data = MAM } #just in case ;)
 
I think he has create more confusion, since Province 307 is Sjaelland, not Zeeland.

But he's right in that there might be a problem with the Sund series of events. Event HSA 200206 triggers 200207, and 200208. The outcome events for the Sund Crisis are actually 200208 and 200209.

200208 is triggered by ownership of Sjaelland and Event 200207 (which MrMister claims is a Ragusa event, but I haven't checked this).

200209 is triggered by failure to own Sjaelland and Event 200208, the event above which is triggered by actually owning the island.

Then 40 years later an ALT Event (200961) triggers 200207 all over again.

I am not sure this can be right, but I'd love someone to clarify this for me. Thanks,
 
I have an odd bug which occured to me during my yesterday's MP game:


Code:
event = {
	id = 202107
	trigger = {
		event = 202106 #The Arsenal was built
	}
	random = no
	province = 388
	name = "The fire of Freiburg in 1502"
	desc = "In the early afternoon on the 19th of April in 1502, the arsenal of Freiburg..."
	date = { day = 19 month = april year = 1502 }
	offset = 0
	deathdate = { day = 1 month = january year = 1503 }
	action_a = {
		name  = "Citizens should learn to be careful"
		command = { type = losemanufactory which = 388 }
		command = { type = losebuilding which = 388 value = bailiff }
		command = { type = population which = 388 value = -2000 }
		command = { type = provincemanpower which = 388 value = -1 }
		command = { type = infra value = -500 }
	}
	action_b = {
		name  = "Restore and rebuild the city and the arsenal"
		command = { type = gainmanufactory which = 388 } #If previously lost
		command = { type = population which = 388 value = -2000 }
		command = { type = cash value = -500 }
	}
	action_c = {
		name  = "Only restore and rebuild the city"
		command = { type = losemanufactory which = 388 }
		command = { type = population which = 388 value = -2000 }
		command = { type = cash value = -100 }
	}
	action_d = {
		name  = "Only restore and rebuild the arsenal"
		command = { type = gainmanufactory which = 388 } #If previously lost
		command = { type = losebuilding which = 388 value = bailiff }
		command = { type = population which = 388 value = -2000 }
		command = { type = provincemanpower which = 388 value = -1 }
		command = { type = infra value = -500 }
		command = { type = cash value = -400 }
	}
}
I, as Savoy, got the event because I now hold Bern for some 50 years. I chose Action D (WTF did I do that? :wacko: ) and my still existing Manu disappeared into the wind. I retested every possible action and on every occasion the existing Manu was killed.

This doesn't happen on one of the vanilla events that I rewrote for the test. Probably this is caused by the "province = 388"-trigger?
 
Two bugs one of my MP-guys found:

Scottish Event 200315 has missing values for the CBs on both action_b and action_c.

And action_c should be named "type = addcore which = 248".
 
Two major bugs I just found in the AI files:

ai/teutonic.ai:

Code:
region = { acadie carribean "grand lacs" greenland "hudson bay" labrador maine newfoundland quebec }
area = { }
needs to be:

Code:
region = { carribean }
area = { acadie "grand lacs" greenland "hudson bay" labrador maine newfoundland quebec }


ai/ukraine.ai:
Code:
continent = { Siberia }
region = { }
needs to be:

Code:
continent = { }
region = { Siberia }