Page 1 of 2 12 LastLast
Results 1 to 20 of 22

Thread: Script not fully working?

Hybrid View

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

    Default Script not fully working?

    Okay, so I decided to start another campaign as SPQR, because at one point there was a constant CTD when I was assaulting a mini-region.

    I actually did really well in the battle against Pyrrhus, losing only 30% of my troops while slaughtering his retreating mess. However, the battle between the rebels and Carthage did not take place afterwards.

    From my observations, an army did not retreat from that battle (they were crushed pretty badly). Does an army have to retreat for the script to continue? I mean, I even tried restarting the script, and it adamantly refuses to continue the script to the other battle.

    Any way to fix this issue other than not beating Pyrrhus piecemeal?

  2. #2
    Maurits's Avatar ЯTR
    Join Date
    Dec 2008
    Location
    The Netherlands
    Posts
    5,047

    Default Re: Script not fully working?

    Isn't it logical that when playing SPQR you won't find yourself fighting as the Carthagians in a second-opening battle??

    RTR: Imperium Surrectum Team Member
    My AAR: For Glory and the Republic!

    Proud to be patronized by ybbon66

  3. #3
    Carados's Avatar Senator
    Join Date
    Nov 2009
    Location
    England
    Posts
    1,380

    Default Re: Script not fully working?

    You haven't started it properly. Not completely sure what the best way to get it working is, I don't play FOE all that often, but what you should do is try and completely disable and restart everything (so pushing the ? on the options screen, completely quitting the game and firing it up again). When you start a new campaign, don't click anything at all for a few seconds, then click ok to get rid of the opening message. It should work then.

    If it doesn't, you might need to mess around and see what works for you.

  4. #4
    Caligula Caesar's Avatar Horse Lord
    Join Date
    Dec 2008
    Location
    England
    Posts
    5,510

    Default Re: Script not fully working?

    I think it is more likely that HoH (the one that made the script) didn't code in the possibility that your entire army would disappear, because he didn't quite expect people to do that badly (or did you thrash Pyrrhus?)
    RTR-VII Team Leader and Leader of Fortuna Orbis, an RTR Submod

    "History has only one concern and aim, and that is the useful; which again has one single source, and that is truth." -Lucian of Samosata

    Fortuna Orbis Beta is released!

  5. #5

    Default Re: Script not fully working?

    Quote Originally Posted by Caligula Caesar View Post
    I think it is more likely that HoH (the one that made the script) didn't code in the possibility that your entire army would disappear, because he didn't quite expect people to do that badly (or did you thrash Pyrrhus?)
    Nah, I completely thrashed pyrrhus, though I did "cheat" a bit by moving two units from Grunmentum into that army before starting the script. In fact, I chased his fleeing men so relentlessly that I think only 5 Rhodian slingers and like 20 pikemen got away, and afterwards I did not see an army retreat (nor were they present when I besieged Herakleia and Tarentum later, so I think they were completely killed off).

    Quote Originally Posted by Arkaeyn View Post
    No, the script shows Carthage fighting the Syracuse rebels. Sometimes after the first battle it seems to disconnect, particularly if there's a result other than Pyrrhos winning. If Eperios withdraws instead of routing (which requires just one unit to withdraw), for example, it can stop the script so you never see the Carthaginian battle.
    I am going to assume that if Pyrrhus's units actually retreated to a nearby settlement, the script would have kept going (but I have not tested this yet; the battle is difficult to win already, and fighting those elites later... well, it would just suck ). The basis of my assumption occured when I played the Epirus side of the battle twice: the first time, a lot of Roman units withdrew, and the script showed Grunmentum revolting, following by the Carthaginians owning the Syracusan tyrant. However, when I was unsatisfied by the results and played the battle again, I completely decimated the Roman army, leaving none to retreat, yet the script just stopped.

    Quote Originally Posted by Carados View Post
    You haven't started it properly. Not completely sure what the best way to get it working is, I don't play FOE all that often, but what you should do is try and completely disable and restart everything (so pushing the ? on the options screen, completely quitting the game and firing it up again). When you start a new campaign, don't click anything at all for a few seconds, then click ok to get rid of the opening message. It should work then.

    If it doesn't, you might need to mess around and see what works for you.
    I indeed believe the script was started correctly: if it didn't, then I wouldn't be fighting that battle in the first place! Not to mention, the 4-turn season seemed to be working fine afterwards, so...

    Is there any way to fix this problem? Will a patch 1.4 be coming out soon?

  6. #6
    Carados's Avatar Senator
    Join Date
    Nov 2009
    Location
    England
    Posts
    1,380

    Default Re: Script not fully working?

    Quote Originally Posted by Nameless92145 View Post
    I indeed believe the script was started correctly: if it didn't, then I wouldn't be fighting that battle in the first place! Not to mention, the 4-turn season seemed to be working fine afterwards, so...

    Is there any way to fix this problem? Will a patch 1.4 be coming out soon?
    Yeah but the exact same thing happened to be when I was Epirus. I could continue playing the game but I never saw the Carthage battle, and I didn't get Grunmentum. Anyway, it would seem the script needs the opposing army to survive for it to continue. I tend to autoresolve the Rome-Epirus battle when I start a new campaign now, and so far I haven't had any trouble.

  7. #7
    Maurits's Avatar ЯTR
    Join Date
    Dec 2008
    Location
    The Netherlands
    Posts
    5,047

    Default Re: Script not fully working?

    and it adamantly refuses to continue the script to the other battle.
    From wat I understand he expects to be able to play more opening battles?

    RTR: Imperium Surrectum Team Member
    My AAR: For Glory and the Republic!

    Proud to be patronized by ybbon66

  8. #8

    Default Re: Script not fully working?

    No, the script shows Carthage fighting the Syracuse rebels. Sometimes after the first battle it seems to disconnect, particularly if there's a result other than Pyrrhos winning. If Eperios withdraws instead of routing (which requires just one unit to withdraw), for example, it can stop the script so you never see the Carthaginian battle.
    • RTR VII Beta Tester


  9. #9

    Default Re: Script not fully working?

    If you're moving troops before the script starts, you're definitely behaving outside the normal script boundaries.
    • RTR VII Beta Tester


  10. #10

    Default Re: Script not fully working?

    Okay, but I just tried the battle with the 18-unit army.

    It took a few tries (the battle is hard!), but on the fifth try or so I managed to completely crush Pyrrhus, with Pyrrhus dead and only ~30 survivors (on normal scale).

    I did not see a retreating army, so I'm going to assume that no one survived. However, the battle between Carthage and Syracusan independents still did not occur. The script stopped right there.

    Besides, even if I did move those two units from Grunmentum, I have reason to believe that the script still works. At the very least, the battle with Pyrrhus still goes on, as usual. In addition, when I use the Epeirites, I did not move any units when I completely decimated the Roman army. With no retreating troops, Grunmentum did not revolt, and the script did not continue.

  11. #11
    Maurits's Avatar ЯTR
    Join Date
    Dec 2008
    Location
    The Netherlands
    Posts
    5,047

    Default Re: Script not fully working?

    I don't believe that you should be able to win the battle or defeat Pyrrhus completely as the Romans, but I don't know for sure. I do know that the economical balancing for SPQR was based upon the fact that you'd loose the opening battle

    At what dificulty are you playing? I myself have never won it on M/M (on which the game is balanced)

    RTR: Imperium Surrectum Team Member
    My AAR: For Glory and the Republic!

    Proud to be patronized by ybbon66

  12. #12

    Default Re: Script not fully working?

    Quote Originally Posted by Maurits View Post
    I don't believe that you should be able to win the battle or defeat Pyrrhus completely as the Romans, but I don't know for sure. I do know that the economical balancing for SPQR was based upon the fact that you'd loose the opening battle

    At what dificulty are you playing? I myself have never won it on M/M (on which the game is balanced)
    I was playing VH campaign/M battle (meaning the battles themselves are balanced). In my opinion, VH campaign allows the AI to adjust more to the new economic rules, so they would not be forever bankrupt (like the independent states/the barbaroi).

    Quote Originally Posted by Carados View Post
    Yeah but the exact same thing happened to be when I was Epirus. I could continue playing the game but I never saw the Carthage battle, and I didn't get Grunmentum. Anyway, it would seem the script needs the opposing army to survive for it to continue. I tend to autoresolve the Rome-Epirus battle when I start a new campaign now, and so far I haven't had any trouble.
    Yes! It would definitely seem that a retreating army is necessary.

    The mechanics are still over my head though... For example, 30 retreating pikemen were so stressed out by the loss of the battle that they decided to rout. I was not able to even touch them with my equites, but were still not enough to let a retreating army fight another day. It's as if either Pyrrhus needs to survive, or at least 1 unit needs to be completely untouched.

    I'm also kinda curious as to what goes on after the Romans win: does the script continue as usual? Or do the Romans get something extra (like the Epeirites did) and receive a popular revolt for their side?

  13. #13
    Caligula Caesar's Avatar Horse Lord
    Join Date
    Dec 2008
    Location
    England
    Posts
    5,510

    Default Re: Script not fully working?

    Well, there is a simple solution: Let a few Epirotes live!
    RTR-VII Team Leader and Leader of Fortuna Orbis, an RTR Submod

    "History has only one concern and aim, and that is the useful; which again has one single source, and that is truth." -Lucian of Samosata

    Fortuna Orbis Beta is released!

  14. #14
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Script not fully working?

    There is only so much the script can do for the simple reason that the game's scripting engine is rudimentary and buggy as hell. You wouldn't believe the sort of hoops I had to jump through to make it continue in at least the most common scenarios after the first battle.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  15. #15

    Default Re: Script not fully working?

    Sorry for resurrecting this thread, but i think i found a solution for this problem.

    The problem occurs if the player kills the enemy general and the army disperses because of too much casualties.
    In this case an event in the ...\RTW Installation Folder\FOE\Data\scripts\show_me\background_script.txt won't be executed.
    monitor_event PostBattle I_TurnNumber = 0
    suspend_unscripted_advice true
    console_command clear_messages

    if I_CompareCounter battleFoughtBy2AIFactions = 0
    if I_LocalFaction rome_republic
    if I_WonBattle rome_republic
    console_command create_unit "Grumentum" "fac rome hastati" 3 2 1 1
    advance_advice_thread Rome_BoH_Victory_Thread
    end_if

    if I_WonBattle epirus
    console_command create_unit "Tarentum" "merc greek hoplites" 2 2 1 1
    console_command create_unit "Tarentum" "merc cretan archers" 1 2 1 1
    console_command damage_wall "Grumentum" gate breach
    console_command set_building_health "Grumentum" core_building 0
    console_command damage_wall "Rhegion" gate breach
    console_command set_building_health "Rhegion" core_building 0
    advance_advice_thread Rome_BoH_Defeat_Thread
    end_if
    end_if

    if I_LocalFaction epirus
    if I_WonBattle epirus
    console_command capture_settlement "Grumentum"
    console_command create_unit "Grumentum" "merc greek hoplites" 2 2 1 1
    console_command create_unit "Grumentum" "merc cretan archers" 1 2 1 1
    advance_advice_thread Epeiros_BoH_Victory_Thread
    end_if

    if I_WonBattle rome_republic
    console_command create_unit "Grumentum" "fac rome hastati" 3 2 1 1
    advance_advice_thread Epeiros_BoH_Defeat_Thread
    end_if
    end_if
    end_if

    if I_CompareCounter battleFoughtBy2AIFactions = 1
    console_command toggle_fow
    set_counter battleFoughtBy2AIFactions 0
    advance_advice_thread BoH_HistoricResult_Thread
    end_if

    suspend_unscripted_advice true
    set_counter finished1stBattle 1
    terminate_monitor
    end_monitor
    The cause of this bug is that the script engages the player and after the battle the army that initiated the battle didn't exist anymore.

    If you change the following line(Epeiros in this example)
    set_counter introBattleRunning 1

    if I_LocalFaction epirus
    engage_armies Publius Valerius Laevinus, Pyrrhos of_Epeiros
    end_if
    into

    set_counter introBattleRunning 1

    if I_LocalFaction epirus
    engage_armies Pyrrhos of_Epeiros, Publius Valerius Laevinus
    end_if
    Now the script will work as intended.


    This will cause changes in the battle map area and army deployment because the battle will occur in the map area x287\y124(original: x287\y125)

    If you want a nearly correct battle map and army deployment you have to adjust some positions in the ...\RTW Installation Folder\FOE\Data\scripts\show_me\background_script.txt and ...\RTW Installation Folder\FOE\Data\world\maps\campaign\barbarian_invasion\descr_strat.txt

    background_script:
    From
    move Pyrrhos of_Epeiros, 287, 125
    To
    move Pyrrhos of_Epeiros, 287, 126
    From
    and I_CharacterTypeNearTile rome_republic named_character, 0 287, 124
    To
    and I_CharacterTypeNearTile rome_republic named_character, 0 287, 125
    descr_strat:
    From
    character Publius Valerius Laevinus, named character, heir, age 24, x 287, y 124
    To
    character Publius Valerius Laevinus, named character, heir, age 24, x 287, y 125

  16. #16
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Script not fully working?

    Who's the attacker/defender is determined by what faction you're playing. Changing the line you mentioned when playing as SPQR would have zero effect as it would never get executed.

    Code:
        if I_LocalFaction epirus
            engage_armies Publius Valerius Laevinus, Pyrrhos of_Epeiros
        end_if
    
        if I_CompareCounter battleFoughtBy2AIFactions = 1
            engage_armies Publius Valerius Laevinus, Pyrrhos of_Epeiros
        end_if
    
        if I_LocalFaction rome_republic
            engage_armies Pyrrhos of_Epeiros, Publius Valerius Laevinus
        end_if
    Player is intentionally made the defender in this battle to make the AI behave actively. The battle wouldn't be anywhere nearly as intense if the AI was defending.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  17. #17

    Default Re: Script not fully working?

    Inside the brackets I said the changes were made for Epeiros. I think everyone who is able to change scripts will notice that the corresponding lines have to be changed.


    To the other point. I won the battle several times with a decicive victory just to note that nothing happens. I think a less aggressive AI is ok in exchange for a working script.
    If I really want to cheat there are lots of other ways to decrease the difficulty of the first battle by manipulating the scripts.

  18. #18
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Script not fully working?

    Quote Originally Posted by Eleanya View Post
    Inside the brackets I said the changes were made for Epeiros. I think everyone who is able to change scripts will notice that the corresponding lines have to be changed.
    Oh, yes, I see now, in parentheses.

    Quote Originally Posted by Eleanya View Post
    To the other point. I won the battle several times with a decicive victory just to note that nothing happens.
    Not sure what this is referring to. When, before or after you made the change? What did you expect to happen?

    Quote Originally Posted by Eleanya View Post
    I think a less aggressive AI is ok in exchange for a working script.
    Mmm... I would have to disagree with you there. We wanted to provide a challenge that even the most experienced players would enjoy. Having AI be the defender reduces the difficulty to the point where it wouldn't be worth going to such length to set it up in the first place.

    Quote Originally Posted by Eleanya View Post
    If I really want to cheat there are lots of other ways to decrease the difficulty of the first battle by manipulating the scripts.
    Yes, but can you make it work without making it so much easier?

    Anyhow, I've stepped down from the developer position a long time ago. Patricians handles the script stuff now, so if he wants to make these changes, he's more than welcomed to.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  19. #19

    Default Re: Script not fully working?

    Quote Originally Posted by HouseOfHam View Post
    Quote Originally Posted by Eleanya View Post
    To the other point. I won the battle several times with a decicive victory just to note that nothing happens.
    Not sure what this is referring to. When, before or after you made the change? What did you expect to happen?
    That was reffering to your statement that a change of the attacker/defender roles leads to a less aggressive AI. Thats true.

    But if the romans are the attackers then in 90% of my battles the roman general dies when he charges into my phalangites. Very heroic, but not very smart.
    So the real challenge is to pick out the general with your missle cav and go with him for a walk during you crush his army. After the battle the army disappears because of a dead general and too much casualties and the script is not further executed.

    THEN I decided to look through the scripts. I don't know much about the RTW scripting engine, but it looks very rudimentary.
    The change of the attacker/defender role was the the onliest thing i foudn to avoid a script hang-up in the case of an disappearing roman army.
    Last edited by Eleanya; February 15, 2011 at 03:42 AM.

  20. #20

    Default Re: Script not fully working?

    Ok, another approach.

    if I_TurnNumber = 0
    and not I_CharacterTypeNearTile rome_republic named_character, 0 287, 124
    and not I_CharacterTypeNearTile rome_republic named_character, 0 277, 135
    and I_CharacterTypeNearTile epirus named_character, 0 287, 125
    and I_LocalFaction epirus
    and I_CompareCounter finished1stBattle 0
    and I_SettlementOwner Grumentum = rome_republic
    console_command capture_settlement "Grumentum"
    console_command create_unit "Grumentum" "merc greek hoplites" 2 2 1 1
    console_command create_unit "Grumentum" "merc cretan archers" 1 2 1 1
    advance_advice_thread Epeiros_BoH_Victory_Thread
    suspend_unscripted_advice true
    set_counter finished1stBattle 1

    end_if
    Adding this trigger this trigger to the background script should fix the problem with the script hang-up for the epeiros faction.
    Only a restart of the script is necessary.

    I don't know how to solve this problem with a trigger for the rome faction. It seems like the "finished1stBattle" argument resets with every restart of the background script. This causes a CTD if you restart the script several times during the first turn.

Page 1 of 2 12 LastLast

Posting Permissions

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