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

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.
However, the only way to be sure is to test it. Eg:
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
Reactions:
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?

It appears to have been added way back, after the 2.4 update, so if it wasn't used back then, some of the documentation may have been a guess, or its functionality could have changed since. There are probably more errors on that scopes page, since I mostly filled in missing information, but didn't check all that was already there.

I can run some quick tests and then update the wiki page for this scope.
Edit: Preliminary testing shows this one always scopes to all trade route provinces, so it's global and runs from any scope.
 
  • 2
Reactions:
Other than editing the can_join_society and potential blocks individually for each society in \common\societies\00_societies.txt, is there a way to exclude people with a certain trait from joining any societies, period? I didn't find a scripted trigger for it, so I'm guessing there's not, but if anyone knows of a way, I'd appreciate it.
 
Other than editing the can_join_society and potential blocks individually for each society in \common\societies\00_societies.txt, is there a way to exclude people with a certain trait from joining any societies, period? I didn't find a scripted trigger for it, so I'm guessing there's not, but if anyone knows of a way, I'd appreciate it.

There's no such flag available to add to trait definitions, so you'll have to edit the aforementioned blocks instead.
 
Other than editing the can_join_society and potential blocks individually for each society in \common\societies\00_societies.txt, is there a way to exclude people with a certain trait from joining any societies, period? I didn't find a scripted trigger for it, so I'm guessing there's not, but if anyone knows of a way, I'd appreciate it.

Not really... though if you see yourself doing it a lot, maybe create a can_join_any_society_trigger scripted_trigger, hook that into all societies, and update that as needed.