Results 1 to 7 of 7

Thread: Battle script for speed increase wanted

  1. #1
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Battle script for speed increase wanted

    It's related to this thread:
    Quote Originally Posted by mlc82 View Post
    Setting the time rate in game (on the battle screen) up to about 1.3 or 1.4 makes the unit animation look much more realistic, as opposed to moving under water. Hold shift and click the time compression arrow on the battle minimap and it will go up in increments of 0.1 instead of jumping from 1.0 to 2.0 then 6.0

    It will revert back to 1.0 when scrolling on the map, but as soon as you stop it'll jump back to whatever you set it to.
    It would be great if this feature could be automated, but as I said I can see an issue trying to figure out the UI element's name plus the required clicking action (Shift+Click).










  2. #2

    Default Re: Battle script for speed increase wanted

    What exactly are you trying to automate? The battle speed can be set using the battle_set_speed command and tested with the I_BattleSpeed condition. The speed can be set with a shortcut if we're talking about a campaign script. Probably need to use the advisor for custom battle.

    EOP doesn't return any names for the fast forward and slow down buttons on the battle UI. I can't tell what ffwd_button, ultra_ffwd_button, pause_button, and play_button actually do, if anything.

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

    Default Re: Battle script for speed increase wanted

    I saw an example of script that disables pause in battle in AI Workshop. I think it could be changed to this purpose.

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

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Battle script for speed increase wanted

    Quote Originally Posted by Callistonian View Post
    What exactly are you trying to automate? The battle speed can be set using the battle_set_speed command and tested with the I_BattleSpeed condition. The speed can be set with a shortcut if we're talking about a campaign script. Probably need to use the advisor for custom battle.

    EOP doesn't return any names for the fast forward and slow down buttons on the battle UI. I can't tell what ffwd_button, ultra_ffwd_button, pause_button, and play_button actually do, if anything.
    "Setting the time rate in game (on the battle screen) up to about 1.3 or 1.4"
    ffwd_button = single speed increment, I am guessing it's related to the battle replay speed, not the speed setting during battle


    Quote Originally Posted by bitterhowl View Post
    I saw an example of script that disables pause in battle in AI Workshop. I think it could be changed to this purpose.
    That would be a step into that direction I would think, any chance you may have the link?










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

    Default Re: Battle script for speed increase wanted


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

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,125
    Blog Entries
    35

    Default Re: Battle script for speed increase wanted

    That is a start, the battle_set_speed seems to allow increments which will solve the issue of finding a 'click' way.

    In other words it would be rather simple to set the speed like that at the start of a battle and then leave it to the player to change it as desired, not happy about the 'condition' event as that always adds tons of processor load. Also not sure what the 'f' is for, will have to check on that.:

    Code:
    script
    
        while ! I_BattleStarted
        end_while
    
              battle_set_speed 1.4f
    
        while I_InBattle
        end_while
    
    end_script
    Edit: I'd rather implement that through a show_me script like I edited now, there is a way that the advisor doesn't show I think. Like Germanicu5's script.
    Last edited by Gigantus; December 02, 2021 at 12:34 AM.










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

    Default Re: Battle script for speed increase wanted

    Totally agree.

    Tons of scripts I've seen in modern mods that still use monitor_conditions.

    We can change it to BattleConflictPhase event for single use in campaign battle. Or maybe there's a GameSpeedChange event?

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

Posting Permissions

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