Unfortunately, the only base game usage (JD.40000, the event you found) is actually commented-out in on_actions, so it will never fire, so it was probably never fully tested. It's dead code.On the Scopes wiki page,any_trade_route_province
is listed as being from a province scope. This confused me (how do you scope to a province on a trade route from another province), so I checked for vanilla instances of it. It's used once in events, in jd_chinese_diplomacy_events.txt, where it's used from a Character scope.
Is this an error on the wiki maybe, or have I misunderstood something?
Assuming that it does work from Character scope, as in that events file, does it find only trade route provinces in one's demesne, or everywhere in your realm?
My best guess, with the ginormous unjustified assumption that the event is coded properly is:
any_trade_route_province
finds every province in the world that is in a trade route- Because JD.40000 is intended to fire with ROOT as the WP governor, who may be unlanded.
- And because the only usage contains a condition limiting the scope to the SR, which implies it could find Saharan trade provinces for the WP governor, and it's effectively impossible he will ever conquer that far (I think it would need a player to do a half-WC as a WP vassal).
- You can use
any_trade_route_province
from any scope- See previous - it seems more like any_province than any_realm_province.
Add the below to a mod. Trigger ATRPTest.1 on a character via the console. Observe which provinces are notified to the player: if it's provinces all over the world then my speculation is correct. If you think the random_list is filtering out too much, change the weights!
Code:
namespace = ATRPTest
character_event = {
id = ATRPTest.1
is_triggered_only = yes
hide_window = yes
immediate = {
any_trade_route_province = {
province_event = { id = ATRPTest.2 }
}
}
}
province_event = {
id = ATRPTest.2
is_triggered_only = yes
hide_window = yes
immediate = {
# Discard 90% of the returned provinces, to avoid swamping the player
random_list = {
10 = { any_player = { character_event = { ATRPTest.3 } } }
90 = { #Nothing }
}
}
}
character_event = {
id = ATRPTest.3
is_triggered_only = yes
desc = "[From.GetName]" # May need to put this in a real localisation file
picture = GFX_evt_battle
option = { name = OK }
}
Be sure to let us know if you find anything! (And/or update the wiki.)
Last edited:
- 1