Results 1 to 10 of 10

Thread: What is the processing sequence of TurnStart?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default What is the processing sequence of TurnStart?

    I am trying to figure out in which sequence all the TurnStart events are being progressed - someone was telling me that Settlement is actually before Faction which sounds illogical to me.

    I always thought it to be this sequence, albeit not sure of the last two.
    1. PreFactionTurnStart
    2. FactionTurnStart
    3. SettlementTurnStart
    4. CharacterTurnStart










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

    Default Re: What is the processing sequence of TurnStart?

    PreFactionTurnStart
    CharacterTurnStart [..n]
    SettlementTurnStart [..n]
    FactionTurnStart
    (Moves, etc.)
    (For player: end turn button clicked)
    (Buildings constructed, units recruited)
    CharacterTurnEnd [..n]
    CharacterTurnEndInSettlement [..n]
    SettlementTurnEnd [..n]
    FactionTurnEnd

    EdIt: I'm not 100% sure on the sequence of CharacterTurnEndInSettlement and SettlementTurnEnd, which one is first I mean.
    Last edited by Withwnar; June 11, 2015 at 04:33 AM.

  3. #3

    Default Re: What is the processing sequence of TurnStart?

    Quote Originally Posted by Withwnar View Post
    CharacterTurnEnd [..n]
    CharacterTurnEndInSettlement [..n]
    SettlementTurnEnd [..n]
    FactionTurnEnd

    EdIt: I'm not 100% sure on the sequence of CharacterTurnEndInSettlement and SettlementTurnEnd, which one is first I mean.
    it's the order you wrote

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: What is the processing sequence of TurnStart?

    Much obliged - it explains why some of my scripts have displayed some curious behavior.










  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: What is the processing sequence of TurnStart?

    Here is an interesting find from this thread: the GeneralDevastatesTile event only fires after the end of the slave turn. Credit to Erken for the find.

    Quote Originally Posted by Gigantus View Post
    It appeared strange to me that devastation would occur at the utter end of a turn instead of the end of a faction turn - after all the seasonal change of textures is after the end of the slave faction's turn, so a summer texture for devastation would turn into winter texture anyhow. Setting up 'log always' entries for devastation as well as faction preturn start and faction end however confirms it:

    Line 56318: 08:46:49.938 [game.script] [always] start of papal_states turn
    Line 56337: 08:46:49.948 [game.script] [always] end of papal_states turn
    Line 56339: 08:46:49.948 [game.script] [always] start of aztecs turn
    Line 56392: 08:46:49.959 [game.script] [always] end of aztecs turn
    Line 56394: 08:46:49.959 [game.script] [always] start of slave turn
    Line 56514: 08:46:50.092 [game.script] [always] end of slave turn
    Line 56700: 08:46:50.111 [game.script] [always] devastation by england
    Line 58374: 08:46:50.271 [game.script] [always] start of england turn
    Line 58540: 08:46:53.122 [game.script] [always] end of england turn
    Line 58542: 08:46:53.122 [game.script] [always] start of france turn
    Line 58695: 08:46:53.266 [game.script] [always] end of france turn
    Line 58697: 08:46:53.267 [game.script] [always] start of hre turn
    Line 58779: 08:46:53.299 [game.script] [always] end of hre turn
    Last edited by Gigantus; December 22, 2016 at 09:37 PM.










  6. #6
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,568

    Default Re: What is the processing sequence of TurnStart?

    Quote Originally Posted by Gigantus View Post
    Here is an interesting find from this thread: the GeneralDevastatesTile event only fires after the end of the slave turn. Credit to Erken for the find.
    Seems that in this case England devastating Slave territory. Because in my research for Ironborn devastation fires after end of faction turn which territory was devastated.

    I'm scripting public_order penalty in EDB for devastated areas and wanted to find out when to change event_counter.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

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

    Default Re: What is the processing sequence of TurnStart?

    That makes sense. It would take time for the countryside to be damaged by their presence and end of slave turn is when time jumps forward months/years.

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: What is the processing sequence of TurnStart?

    The character is standing on the same spot since the last turn already (prerequisite) and then didn't move at all in the new turn - that's one full game turn, not just a faction turn. Hence my initial thought: why wait until slave turn end?










  9. #9

    Default Re: What is the processing sequence of TurnStart?

    In the case of a siege, a devastation also appears around the settlement, which one necessarily belongs to another faction. If this devastation is linked to the fact of being besieged a full turn rather than directly to the general, it could be logic that GeneralDevastatesTile fires after the SettlementTurnEnds of all factions, simply to synchronize the visual changes of the (possible) two different devastations.

    Another possiblity is that any visual change can only be done during one windows of opportunity, after the slave faction turn end. In this case, it could be more interesting to test the devastation in real time rather than to keep in memory the status of each tile, devastated or not, and update the map ultimately.

    But all of this is pure speculation...

  10. #10

    Default Re: What is the processing sequence of TurnStart?

    Does anyone knows when exactly are rebel armies spawned?
    Just discovered for sure that it is not before slave's FactionTurnStart
    I''l be testing soon if it's before slave's FactionTurnEnd, however if someone already knows it would save some time hehe

    Update:
    Nope, it's not before or during FactionTurnEnd either apparently, so my best guess is that it happens between slave FactionTurnEnd and Player1 PreFactionTurnStart

Posting Permissions

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