Results 1 to 14 of 14

Thread: Reloading effects on script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Reloading effects on script

    I think I have encountered a problem whereby if I continually play my turns my code runs fine, but if I load a turn and continue from there the game apparently loads in all my counters and event counters, but after ending that turn on the next turn it seems to have forgotten some of them.

    e.g. play until turn 6, everything fine. reload turn 5. end turn. Turn 6 shows evidence of some code not running properly.



    I had heard that there were reloading effects on counters, but assumed this was in some old version of m2tw.

    So the question is, does anyone know what the situation is regarding counters and / or any reloading issues at all?
    Last edited by Byg; September 26, 2011 at 11:59 AM.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  2. #2
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Reloading effects on script

    Never had a problem like you describe, IIRC.

    The only thing I've heard about that might mess up counters is show_me scripts.
    Last edited by Taiji; September 26, 2011 at 12:28 PM.

  3. #3
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Reloading effects on script

    Not using any.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  4. #4
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Reloading effects on script

    Assuming it's not some weird problem with your system...

    I'd need to see the script to think about why it might be failing to count properly.

    Seem to remember autosave causing me some problems directly, but that was a weird script and I barely remember what happened.

    I recommend people don't use autosave or quicksave because they're use has coincided with occurances of corrupt savegames (that might have been caused by something else entirely). And in a corrupt savegame the states of counters might vary along with other stuff.

    That's why I rudely cast doubt about the integrity of your system, please forgive me
    Last edited by Taiji; September 26, 2011 at 12:36 PM.

  5. #5
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Reloading effects on script

    Not using autosaves to reload or quicksave to save.

    It can't be related to my script because in repeated tests it works fine if I dont load. I am doing nothing at all in continuous turns vs reloaded turn.
    Last edited by Byg; September 26, 2011 at 12:43 PM.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  6. #6
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Reloading effects on script

    Using a stable Windows 7 PC with UAC disabled, ownership of the modfolder, installed outside program files, no antivirus, and minimal background apps?

  7. #7
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Reloading effects on script

    UAC disabled, using vista. I can't believe this is related to a save being corrupted because the same counters are always effected

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  8. #8
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Reloading effects on script

    When are these counters set?

    edit:

    And are they incremented or decremented by the saving+reloading process?
    Last edited by Taiji; September 26, 2011 at 01:09 PM.

  9. #9
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Reloading effects on script

    The counters concerned are set in the script via characterturnstart. This always happens correctly, e.g on turn 6, unless I go back and load turn 5, end turn, i.e. approaching turn 6 via a reload. Other turns also have this problem i.e approaching turn 4 via a reload of turn 3.

    The code also relies on the FL being read first. I assume that reloading does not affect the order of character processing.

    These event counters do not store their values during the ai turns. They are reset and re-assigned every player turn.
    Last edited by Byg; September 26, 2011 at 01:57 PM.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  10. #10
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Reloading effects on script

    Quote Originally Posted by Byg View Post
    They are reset and re-assigned every player turn.
    OK, I'm still fairly clueless as to what the problem may be. But could you reset and run the same checks using GameReloaded as the event?

    Hopefully that way I can remain clueless and we're both happy

    edit:

    Of course that wouldn't work if you need a character exported ...
    Last edited by Taiji; September 26, 2011 at 01:38 PM.

  11. #11
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Reloading effects on script

    Well whatever it is I think it is a medieval kingdoms bug and will be affecting everyone the same. There must be something I am doing that is relatively unusual that is exposing this bug... actually it's all relatively unusual.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  12. #12
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Reloading effects on script

    I agree, but without seeing the code (which I can appreciate you might not want to show at this stage) I'm at a loss for guesses. Good luck finding a work around

  13. #13
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Reloading effects on script

    Right. I gradually nipped parts of the code out until the part that did not work sort of worked after a reload.

    My conclusion is that if you use characterturnstart in a script and make reference to a settlement then subsequent characterturnstarts on that turn will work as expected.

    However if the you load a save game then on the following turn the above same code wont work.
    Last edited by Byg; October 01, 2011 at 05:22 AM.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  14. #14
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Reloading effects on script

    Another kingdoms m2tw save & load game bug is apparent when refering to a settlement in prefactionturnstart in any code on the turn after loading a saved game. It will disable the function of characterturnstart (at least in the campaign_script).

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

Posting Permissions

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