• 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.
Just guessing that´s a typo in post 2:

Code:
command = { type = goods which = x value = y }
Changes the goods produced in province x.

command = { type = terrain which = x value = y }
Changes the [color=red]goods[/color][color=yellow]terrain[/color] produced in province x.

Thanks, I edited my post.
 
A peculiar bug I just discovered.

The "provinceculture" command used to change the culture of a province to a non-state culture of the country receiving the event does work, but then the culture will automatically change to the primary state culture (not necessarily the former one of the province) on the first day of the next month after the event has fired.
 
I am not seeing this. Are you sure there are no other unusual circumstances?
 
A peculiar bug I just discovered.

The "provinceculture" command used to change the culture of a province to a non-state culture of the country receiving the event does work, but then the culture will automatically change to the primary state culture (not necessarily the former one of the province) on the first day of the next month after the event has fired.

I don´t quite understand what you mean here.
Could you give an example when that happens? What country had what event for which province firing where that happens?

e.g. in my ottoman game "Ragusa" changed from dalmatian to albanian by event - and after several decades is still albanian and has not become turkish.
 
Ok, so it looks like I was a bit hasty with my previous post. The command does work correctly in vanilla, but it does not with my mod. If anyone is interested and cares to help me, here is an event that you can add to any DoK events file:

Code:
event = {
    id = 900000
    random = no
    country = NST

    name = "test"
    desc = ""

    date = { day = 0 month = january year = 888 }
    offset = 30
    deathdate = { day = 29 month = january year = 888 }

    action = {
        name = "ok"
        command = { type = provinceculture which = 209 value = lombard }
    }
}
You will see that the culture of Touraine reverts back to frankish on 1 February 888. Any idea would be useful because, after several hours trying to understand why that happens, I must admit that I am quite lost. :wacko:
 
Ok, so it looks like I was a bit hasty with my previous post. The command does work correctly in vanilla, but it does not with my mod. If anyone is interested and cares to help me, here is an event that you can add to any DoK events file:
...
}[/CODE]You will see that the culture of Touraine reverts back to frankish on 1 February 888. Any idea would be useful because, after several hours trying to understand why that happens, I must admit that I am quite lost. :wacko:

It´s not only vanilla. In my current ottoman campaign I´m playing AGCEEP and have not had that issue.

What did you change in that mod? Perhaps population so low that the game thinks it´s a colony that changes culture?
 
Thanks a lot ConjurerDragon. :)

Changing the population of Touraine from 3000 to 6000 solved the problem. Still, provinces with population above 1000 are not supposed to change culture anymore, and even below 1000 they may only change with the arrival of a colonist so I would still call that a bug.
 
Thanks a lot ConjurerDragon. :)

Changing the population of Touraine from 3000 to 6000 solved the problem. Still, provinces with population above 1000 are not supposed to change culture anymore, and even below 1000 they may only change with the arrival of a colonist so I would still call that a bug.

Is the province in your mod pagan? Then it instantly changes culture with a religious conversion.

Is your province in your mod located in Europe? If you have changed the region it belongs to then culture may change even between 1000 and 5000
http://forum.paradoxplaza.com/forum/showthread.php?150554-Culture-1.08
 
Ok, so after many tests, I think I understand things better. To get things to work the way I described above, the province has to be under 5000 and not in Europe (vanilla map), religion has nothing to do with it as far as I can tell.

So I had a look at my geography.txt and I guess I forgot to add this in the Europe entry:
Code:
    culture_change = no
Still a bug in my opinion because this is not how it is described:
Code:
#culture_change = yes/no            If yes, culture of the colonial cities turns to primary culture of the country when nationalism fades away (default is yes if not specified).
I will try this tonight when I have some more time, and hopefully my events will work correctly, I'll let you know. Thanks again ConjurerDragon for your suggestions that finally put me on the right track.
 
Would it be possible having a leader appear in a certain continent in a random province?

Of course, the leader shoud appear in a province already owned and controlled by the receiving country.

For example:
Code:
historicalleader = {
	id = { type = 6 id = 049829 }
	category = explorer
	name = "Jacques Cartier"
	startdate = {
		year = 1534
	}
	deathdate = {
		year = 1542
	}
	location = 384 #Caux
	rank = 12
	movement = 4
	fire = 2
	shock = 2
	siege = 0
	dormant = no
	remark = "he discovered Canada"
}

it would be good having him in whatever French port in the continent:

Code:
historicalleader = {
	id = { type = 6 id = 049829 }
	category = explorer
	name = "Jacques Cartier"
	startdate = {
		year = 1534
	}
	deathdate = {
		year = 1542
	}
	location = [COLOR="Yellow"]-1004 #Europe[/COLOR]
	rank = 12
	movement = 4
	fire = 2
	shock = 2
	siege = 0
	dormant = no
	remark = "he discovered Canada"
}

That would avoid weirdnesses such as having Napoleon popping up in the Caribbeans!
 
Would it be possible having a leader appear in a certain continent in a random province?

Of course, the leader shoud appear in a province already owned and controlled by the receiving country.
...

Isn´t the current setup that you can determine a specific province of a specifc continent - and if that province is not owned the leader simply appears in the geographically closest owned province?
 
Yes:

discovered = x
Is true if province x has been discovered by the country receiving the event.

This can of course be placed in a TAG = { } block to check another country if desired.
 
doesnt discover only work once only and never again as you already discovered this land..........
 
A question about the breakvassal command:

"command = { type = breakvassal which = aaa }
Breaks vassalage with liege country aaa (-1 works towards any suzerain). This command does not work if invoked in an event for the liege country if the vassalage was created after the game was last loaded from save. Also note that if a vassalage is broken in event, a new vassalisation for that tag cannot be created by an event triggered from that same event."

Back in EU2 in events we always had to check if a country really was a vassal of a state before breaking a vassalage because it suffered the stability hit even if was not a vassal of that state.

Is that still the case so that in any event we should check if there really is the right vassalage? Or does the breakvassal command only incur the stability hit if it actually does something and does nothing if the vassalage to be broken does not exist?
 
And another question that I had when modifying the "loss of Massawa" event for Ethiopia:

We can check the religion of a province. And with FtG religions have been grouped together, e.g. "Sunni" is in the "muslim" group:

Code:
sunni = {
	group = muslim
	subgroup = sunni
	color = Green
	heretic = {
		shiite
	}
	annex_same_penalty = yes
	tech_speed = -1.00
	stability_bonus = 6.00
	stability_cost = 60.00
	missionaries = 1.00
	missionary_placement_chance = 0.30
	missionary_sprite = 3
	slaves_effect = 1.00
}

Is it possible to check provincial religion for "sunni" only or is it possible to check if a province is "muslim" (= sunni or shiite)?
 
Just trying to make an event about the Hungarian Invasions in the Tenth century (Dawn of Kingdoms mod).

Here should be commands to target two random "Italian" provinces with loss in pupulation and taxbase value:

Code:
command = { type = population which = -1238 value = -1000 } #AREA_Italy
command = { type = provincetax which = -3 value = -1 }
command = { type = population which = -4238 value = -1000 }
command = { type = provincetax which = -3 value = -1 }

Is this correct?

Are the third and fourth lines supposed to fire as meant? That is, another random province will get loss in pop and btv?

Taken from a post at the beginning of this very thread:

Third Angel said:
Special values for provinces in commands:

-1 means a random province
-2 is used to target the capital province of the country receiving the event
-3 is used to target again the province that was randomly picked in the last command
-4 is used to not target again a province that was already randomly picked in the same action
-5 is used to not target the capital province of the country receiving the event


You can also target a random province in a specific continent/region/area by adding 1000 to its id number. Id's can be found in \Db\Map\geography.txt. So we'd have:

-1004 for a province in Europe
-1013 for a province in West Africa
-1151 for a province in Quebec
 
Last edited:
-1238 will work (assuming Italy is area 238), but -4238 will not work.