Results 1 to 3 of 3

Thread: How to Script Province-Specific Events?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to Script Province-Specific Events?

    I have done a fair bit of R2TW modding, but I'm pretty clueless when it comes to scripting events. Would appreciate any help...

    I'd like to mod in events that would add a public order modifier to a province for one or a few turns. (Really, I would like the provinces to rebel, but if that is not possible than scripting in -200 PO per turn will do.) Ideally, the likelihood of this happening could be based on province-specific factors like culture, but even if it was random (e.g. a 1% chance of occurring per turn for every province) that would be fine.

    The problem is that I have absolutely no idea how to go about doing this. What files should I look at? I don't need my hand held for the details, but a point in the right direction would really help. Thanks.

  2. #2
    Litharion's Avatar Artifex
    Join Date
    Sep 2013
    Location
    Germany
    Posts
    2,622

    Default Re: How to Script Province-Specific Events?

    So far, I have not found a scripting command to apply an effect to a region/province. It is possible to set the public order of any region with a simple script command.

    scripting.game_interface:set_public_order_of_province_for_region("REGIONNAME" (string), PUBLIC ORDER VALUE (Integer -100 to 100))

    example: scripting.game_interface:set_public_order_of_province_for_region ("rom_italia_latium",-100);

    For a basic scripting tutorial use http://www.twcenter.net/forums/showt...-Script-o-Rama

  3. #3

    Default Re: How to Script Province-Specific Events?

    Thank you Litharion. That is helpful, as is the tutorial.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •