Results 1 to 8 of 8

Thread: various economy scripts

Hybrid View

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

    Default various economy scripts

    I'm starting a multi-faceted economy script with various components, both at a faction/local level and a global viewpoint. As it is rather ambitious (and as of yet nonexistent) undertaking I'm going to have a lot of questions/qualms along the way, and rather than posting multiple small queries I'm going to put it all here.

    Starting off, I want a script to measure every time a settlement is sacked, exterminated, or otherwise suffers a calamity, siege, blockade, plague etc.

    The docudemons show "SackSettlement" "ExterminatePopulation" and "CitySacked" events. The first two do not export "settlement" (I had hoped to measure the settlement level via a building check...) but it does export a "character record" which could be used to check if a "governor building exists" i.e. if the conquering army has a wall, stone wall, etc. as a core building.
    My questions are 1. is this going to fire for any city being sacked/exterminated, and .2 will it work for both captains "generals" and named characters/family members?

    Also the "CitySacked" event only says "whether a settlement has been razed" which makes me think that it could be either sack or exterminate, I don't know for certain. ExterminatePopulation might work for sacking- people are killed, after all- but I don't understand that either.

    Is there any way of telling when a port has been blockaded? There's a "transgression" event which might be useful but I have no idea what it would do.

    plague is a tricky thing... it's only mentioned in reference to the "settlementhasplague" condition which has a settlement condition. Rather counterintuitively tbis doesn't need to refer to a specific settlement- any "settlementturnstart/end" can fire the script, as can the devastatetile and so on.
    One thing I'm not clear on. SettlementTurnStart- does it operate independently of the faction? IE French Tolouse fights off an English army- is the settlement starting a turn? If England captures it, does the settlement then start and/or end another turn with English rule?

    The GeneralDevastatesTile event is quite promising- it can use the settlementBuildingExists or IsRegionOneOf commands, and so on. My main gripe is that there isn't any solid method of measuring the region's religion.
    Given that I'm replacing religion with social class, it would make sense for religion parameters to have an effect, i.e. merchant class. Is there any workaround for this? Getting even a general idea of the faction's religion percentages would really be helpful. The only thing I could find was "neighbourReligionCheck" which might be useful in a roundabout way. At the least it could give a general overview of the area's religions, but everything else depends on a religion check (is it catholic? Islamic?) or a character being present.
    Maybe using the placeholder faction I've been reserving?
    A well informed opinion is a well formed opinion.

  2. #2
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: various economy scripts

    I'm not sure, particularly regarding that "razed" comment, but I would have thought that SackSettlement and CitySacked are the same thing but from different perspectives (general's and city's, respectively). i.e. When city X gets sacked then both events will fire; you only need to handle one of them.

    ExterminatePopulation exports region_id which is essentially the same thing as settlement: a region can only have one settlement so if you know the region then you also know the settlement.

    It would be easy enough to test. Create one monitor for all three events and attack a city to see what fires. e.g. Use a different historic event in response to each.


    For religion there is also PopulationOwnReligion. Again, it's using the region_id from which you can infer the settlement, but it's for characters not settlements so it won't fire at all for a given region if no-one's there.


    Does SettlementTurnStart fire twice for the same settlement if a faction captures it? That's a good question.

    The sequence is:
    Code:
    END-OF-TURN:
    	LOCAL:
    		CharacterTurnEnd  [..n]
    		SettlementTurnEnd [..n]
    		FactionTurnEnd
    		
    	NON-LOCAL (one faction at a time):
    		PreFactionTurnStart
    		CharacterTurnStart [..n]
    		SettlementTurnStart [..n]
    		FactionTurnStart
    		CharacterTurnEnd [..n]
    		SettlementTurnEnd [..n]
    		FactionTurnEnd
    
    	LOCAL:
    		PreFactionTurnStart
    		CharacterTurnStart [..n]
    		SettlementTurnStart [..n]
    		FactionTurnStart
    Hmm. Depends when the attack happens. If France has their turn before England and England does the attack during its PreFactionTurnStart then ... yes? I've never considered this before. Maybe the game knows to only fire it once per turn, even if it is changing hands. I don't know.

  3. #3

    Default Re: various economy scripts

    Well, that could be tested in a similar fashion- create a monitor for SettlementTurnStart for a specific faction, start as that faction and give that settlement to another faction before your first turn. An event message could pop up on the second start.
    A well informed opinion is a well formed opinion.

  4. #4
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: various economy scripts

    That's right. I'd be interested in the result.

  5. #5

    Default Re: various economy scripts

    As am I. I'll test it out.
    A well informed opinion is a well formed opinion.

  6. #6

    Default Re: various economy scripts

    N00B question- how do you get the actual message in game? I haven't really played around with the string files, as I heard that you need a converter or somesuch and I never felt the inclination.
    A well informed opinion is a well formed opinion.

  7. #7
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: various economy scripts

    historic_events.txt
    {test_body}This is the text
    {test_title}This is the title

    campaign_script.txt:
    historic_event test

    Just replace all three "test"s with whatever you wish to name it.

    If you don't already have unpacked files then you'll need to do that first.

  8. #8

    Default Re: various economy scripts

    Thanks.
    I have an unpacked read only desktop folder for reference. Takes up nearly as much space as the game itself, but 80% of my HD is gaming anyway.
    A well informed opinion is a well formed opinion.

Posting Permissions

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