• 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.
Could a -1 targeting country be used? For example event BUR_3597 the independence commands could be changed with a first command targeting -1 tag, and some other commands (according to possibly from 5 to 10 annexed countries) targeting further -4 tags.

Good idea, this is exactly the kind of things that could be improved with the FTG script engine. Not sure it would work though, you would have to test it or wait for MichaelM to notice this thread again.
 
Good idea, this is exactly the kind of things that could be improved with the FTG script engine. Not sure it would work though, you would have to test it or wait for MichaelM to notice this thread again.

I would actually prefer to hear from MichaelM as he could simply and directly give more information about each new command.

As for the well known errors in Havard's scripting bible, about which a thread was dedicated and constantly updated, is the cedeprovince command targeted to the capital city still causing a CTD?

As I am talking about this, even a cedeprovince -1 and -4 could be implemented... if it works only for the continent in which both the countried receiving the event are in: the exchange of provinces after a peace treaty is signed, for example.

Apart from this, I think that we shouldn't try to change the coding of already existing event if they work as intended. At least we could try to include triggers in actions or commands, instead of at the beginning of events.

An example could be the already known BUR_3597 that fires only if both France and Austria exist. Considering the sister event covering the possibility that France doesn't exist (HYW and such) we could simply move the exist HAB into action A dealing with the marriage of Maximilian of Austria.

In this case, if HAB doesn't exist, are the probabilities redetermined for the remaining actions? That is, with normal AI evfent selection, given action A with 89,4% and B and C both with 5,3%, in case A conditions aren't met (HAB doesn't exist), are the selection probabilities for B and C recalculated up to 94,4% and to 5,6% ?

In conclusion, if conditions in one or more actions in a scripted event aren't met, are the probabilities for remaining actions newly determined according the alphabetical order given to them in the event? I can't remember how it was in eu2.
 
What I don't completely understand, and principally for the modifications which I have planned in the event files for AGCEEP 1.59, is to which extent we can use that -4 for countries? Which are the commands able to target -4?
I know that breakvassal -1 has been implemented towards any suzerain but what about the other commands?

independence -1 and -4? breakoverlord -1 and -4?

Here is what MichaelM said about values targeting countries:
MichaelM said:
-1 = random
-2 = not implemented
-3 = last randomly picked country
-4 = a country that has not been randomly picked in this action
-5 = not implemented
-6 = emperor
-7 = random elector

-2 and -5 could be implemented in this way for an eventually coming 1.3 patch:



-2 targeting countries with "minimal" provinces in revolt.txt which are owned by the country receiving the events that has no national/claim/cb core on them.

-5 targeting countries with "extra" provinces in revolt.txt which are owned by the country receiving the events that has no national/claim/cb core on them.


The country receiving the event (eventually after a peace treaty or whatever else...) would give a random province ("national core" or "claim core") to the country with proper revolt.txt entries.




Since the values targeting provinces are:

Third Angel said:
-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

And 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




-6 could be implemented for targeting "national core" provinces of other countries and owned by the country receiving the events that has no national/claim/cb core on them

-7 could be implemented for targeting "claim core" provinces of other countries and owned by the country receiving the events that has no national/claim/cb core on them

--------------------------------------------------------------------


Here is the command:

command = { type = cedeprovince which = aaa value = x }
Cedes province x to country aaa.




As for the first case the implementation I suggest could then be this example:

France owns Piemonte (prov. #404) and Piemonte is a core national of Savoy (SAV),
and France only owns this kind of provinces without having any core on it.
Code:
command = { type = cedeprovince which = -2 value = -6 }
With this command France cedes province Piemonte (-6) to country Savoy (-2).



However, considering random provinces if France has got, let's say, also Schwyz (prov. # 1612), she would either cede Schwyz to Switzerland (388 Bern and 1612 Schwyz are minimum province of HEL in revolt.txt) or Piemonte to SAV.

But
Code:
command = { type = cedeprovince which = -2 value = -6 }
command = { type = cedeprovince which = -2 value = -6 }
or
Code:
command = { type = cedeprovince which = -2 value = -6 }
command = { type = cedeprovince which = -4 value = -6 }

would mean that France cedes both provinces to both countries.



In case France owns Marche (prov. # 392 is extra province for Papal States PAP) we would have:
Code:
command = { type = cedeprovince which = -5 value = -7 }



All commands should give France a boost in relations with both countries (+25?) and BB (-1 each province?) reduction or minor boost (+15?) with all other countries.
 
Last edited:
In the new commands and triggers I have seen these ones:

Code:
command = { type = elector which = aaa value = x }

command = { type = hre which = x value = yes / no }

Do you need to be emperor or they could just be used in a global event not country/province specific?
 
Hmm, I don't know how I missed the last several posts in this thread. I'll try to address all the questions that I can see.

Yes, "breakoverlord which = -1" should work. No, "independence which = -1" will not. That's an interesting idea, though.

Using cedeprovince on the capital city should simply be a no-op instead of crashing now. However, -1 and -4 don't work with it.

If an action has a trigger which is not met and there are no ai_chances present, then the chances for the other actions are calculated as if that action did not exist. So yes, if there are three actions and the first is not valid, then the second action would have a 94% or so chance of being selected with normal AI event choices.

Any command which implements -1 also implements -4. Some commands, of course, only have one possible target, so -4 isn't really useful for those.

I'll keep your suggestions for -2, -5, -6, and -7 in mind.

The elector and hre commands don't have anything to do with the emperor. They should work in global events; in fact, the hre command was designed with the old EU2 Edict of Tolerance behavior in mind.


Does that cover everything?
 
I'll keep your suggestions for -2, -5, -6, and -7 in mind.
OK, but maybe instead of having them codified in events, they should be actually part of game mechanism, in the diplomatic window as to be more precise...

That's to avoid any distortion or weirdness such as Spain owning provinces in Finland or else, because she won a war against Sweden or Russia. The game should balance the pros and the cons in having to administer a so remote province which is not colonial (such as not any kind of core on it, big differences in culture or religion...)

That is also the suggestion I posted in the "what should be in 1.3 ?" thread... :eek:o
Does that cover everything?
Yes, thanks! :)

Just this, a confirmation:

is then -4 no more involving colonial province, correct? In this case we should use, as Third Angel said,
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
according to what continent you want to deal with. Since in AGCEEP 1.58 there are already events dealing with old -4 commands, they be updated as they couldn't even work without a -1 targetted province before...
 
Last edited:
Just this, a confirmation:

is then -4 no more involving colonial province, correct? In this case we should use, as Third Angel said,

according to what continent you want to deal with. Since in AGCEEP 1.58 there are already events dealing with old -4 commands, they be updated as they couldn't even work without a -1 targetted province before...
Yes, -4 used by itself acts the same as -1.
 
...
I'll keep your suggestions for -2, -5, -6, and -7 in mind.
...
Does that cover everything?

Wasn´t -2 pointing to the capital in EU2? Why has that been removed?

Edit: So while there is a trigger to check how much gold one has, there are still no triggers to check how many traders/diplomats/missionaries someone has currently?
 
Wasn´t -2 pointing to the capital in EU2? Why has that been removed?
It still does point to the capital. The discussion above is about -2 as a country selector, not a province selector.

Edit: So while there is a trigger to check how much gold one has, there are still no triggers to check how many traders/diplomats/missionaries someone has currently?
That is correct. But now that you mention it...
 
It still does point to the capital. The discussion above is about -2 as a country selector, not a province selector.
...

With the new commands is there a way to create a repeatable event that
makes a vassal cede owned non-core provinces of his to his liege in case the liege has a core?

e.g. Crimea owns Bujak. Crimea becomes a vassal of the Ottomans. Crimea has no core on Bujak. The Ottomans gain a core on Bujak --> Crimea cedes Bujak to Ottomans.

It´s no problem to create an event like that for a specific province and checking if a specific state owns
owned = { province = 322 data = WAL } or owned = { province = 322 data = -1 }
it and is liege of another specific state
vassal = { country = WAL country = TUR } or vassal = { country = -1 country = TUR }
and that the vassal has no core on that specific province and the liege has
NOT = { core = { province = 322 data = WAL } } or NOT = { core = { province = 322 data = -1 } }
core = { province = 322 data = TUR } }

However that would need 1 event for every possible province owned by every possible vassal.

But is there a way to make that more generic that the liege´s statetag has not to be specified and insted of "TUR" one could use some number, e.g. like -6 for emperor say -3 for "liegelord of current state"?
And that it would check for every province? Like soldiers placed at "-1" province are placed in a random owned province so that the event would check every province of the vassal?
 
Last edited:
Demolition of the HRE

In my current game as the Ottoman Empire I conquered several provinces of the HRE.

When I joined the France/Savoy/Straßburg alliance in their defensive war against Austria/Bavaria/Genua I was suddenly surpriseattacked in several of my provinces - because Austria as Emperor was marching armies through MY lands to attack France...

The emperor does have military access to all lands of the HRE when at war - but through lands of the Ottoman Empire like the sunni Ansbach or the muslim mountains of the Sudeten?

Now I wonder how to create an event to dismantle the HRE.

The new command:

command = { type = hre which = x value = yes / no }
Adds or removes province x as a part of the Holy Roman Empire.

would do that. But how to apply it?
Making a provincesspecific event for each and every province would be quite a task.

Does the event work only for provinces you own or for those not owned too?

If the first is true would a random event for TUR work that has a huge OR trigger about owning ever HRE province and as action a
command = { type = hre which = x value = no }
for every province of the HRE?

So that if any HRE province is owned by TUR the random event may trigger to remove any owned provinces from the HRE?

Or would this event fire in vain several times as there is no way to check if the province has already been removed from the HRE?
 
The hre command works for any province, not just those you own. Otherwise, as you note, it would be of little use. This is also the case for the goods and terrain commands, for the record.

For removing any provinces owned by TUR, you could use either a bunch of province-specific events or else use triggers in the commands.
 
In my current game as the Ottoman Empire I conquered several provinces of the HRE.

When I joined the France/Savoy/Straßburg alliance in their defensive war against Austria/Bavaria/Genua I was suddenly surpriseattacked in several of my provinces - because Austria as Emperor was marching armies through MY lands to attack France...

The emperor does have military access to all lands of the HRE when at war - but through lands of the Ottoman Empire like the sunni Ansbach or the muslim mountains of the Sudeten?

Now I wonder how to create an event to dismantle the HRE.

The new command:

command = { type = hre which = x value = yes / no }
Adds or removes province x as a part of the Holy Roman Empire.

would do that. But how to apply it?
Making a provincesspecific event for each and every province would be quite a task.

Does the event work only for provinces you own or for those not owned too?

If the first is true would a random event for TUR work that has a huge OR trigger about owning ever HRE province and as action a
command = { type = hre which = x value = no }
for every province of the HRE?

So that if any HRE province is owned by TUR the random event may trigger to remove any owned provinces from the HRE?

Or would this event fire in vain several times as there is no way to check if the province has already been removed from the HRE?

this is anti- historical on what you propose, armies marched anywhere they wanted until the emergence of nations in the 18th century.
What we have in this game is that the HRE can do it while others cannot.
What we need is for all to do it with a relation penalty and the HRE to have no relation penalty.

OR

a system when HRE borders are reset once a nation with non catholic religion owns that land, So in your case non-permission
 
trigger condition?

A question to that new trigger:

"controlchange = { province = x years = y months = m days = d }
Is true if province x has been controlled by the current controller for at least y years, m months and d days (not all time fields have to be filled, one is enough). "

Is that the time of control added up since a nation conquered a province?
Or is it the time since the last control started?

e. g. TUR conquers Malta in 1450 and owns and controls it. 1455 rebels take the province for 2 years then they are defeated. 1500 spain sieges the provinces and occupies it for 5 years until a peace treaty is signed. Now would be 1600 - does TUR control Malta then for 150 years, for 143 years (time substracted when someone else controled it but TUR owned it) or 95 years (only since last time they got control?
 
this is anti- historical on what you propose, armies marched anywhere they wanted until the emergence of nations in the 18th century.
What we have in this game is that the HRE can do it while others cannot.
What we need is for all to do it with a relation penalty and the HRE to have no relation penalty.

OR

a system when HRE borders are reset once a nation with non catholic religion owns that land, So in your case non-permission

Or a system in which the AI bribes relations up with the right states and asks them for military access to get where it wants - and no longer asks states for access that are located god knows where out of the way of the nation they are at war with ^^
 
e. g. TUR conquers Malta in 1450 and owns and controls it. 1455 rebels take the province for 2 years then they are defeated. 1500 spain sieges the provinces and occupies it for 5 years until a peace treaty is signed. Now would be 1600 - does TUR control Malta then for 150 years, for 143 years (time substracted when someone else controled it but TUR owned it) or 95 years (only since last time they got control?
95 years. ownerchange would be 150 years.

controlchange and ownerchange are just a way to programmatically access the info given on mouseover of the shields in the province info screen.
 
Cores?

Questions about the new cores:

Does every type of core (national/claim/casusbelli) REPLACE every other type of core on a province that existed before?
Or could a state have more than one type of core on a province?

Do the 3 remove core commands remove only the approbiate type of core and leave the other two intact?

What happens if a claimcore turns to a national core after 50 years? Will it be removed only by the nationalremovecore command? Or still by the removeclaimcore command?
 
Removing any type of core will also remove any weaker type. The removecore_national command will remove any type, removecore_claim will remove claim or CB, and removecore_CB will only remove a CB.

All of these act on whatever type of core is currently active.
 
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.

Is it possible to substract ships?
e.g. by adding a negative amount of galleys? Or is desertion only possible for land troops with the desertion command?
 
Last edited:
No, it is not possible.