1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Updated Fortified Alert 1.11

Added Guard command in new experimental version

  1. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    I can't do much today because I have to get ready to go to work for 10 or 11 hours, but I had thought of two other ways I could do this mod.
    one would be to give all the units the sleep command, then attach the alert wake to that, the other was to trigger a notification instead of actually waking the unit.
    I'm not sure if either of these methods would be preferable to people, but I'll play around with them when I have time and see.
     
  2. Daft73

    Daft73 ¯\_(ツ)_/¯

    Joined:
    Jan 23, 2008
    Messages:
    498
    Location:
    Baba Yaga's Hut
    Good thoughts, and RL b4 games so I understand mate.

    Looking forward to your next update. :thumbsup:
     
  3. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
  4. Mentos

    Mentos Prince

    Joined:
    Sep 29, 2010
    Messages:
    377
    Thanks for the update!
    Waking up air and naval units in sleep mode would be great too, but I'm somewhat afraid of performance loss as I noticed some slowdowns later in a match with many units. I don't know yet if it's related to this mod.
     
  5. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    The mod cycles though all of your units at the beginning of the turn, so would imagine later game with many units would slow the turn a little. I will see about adding air/sea units, I was hoping either sdk would come out so I could do this proper, or more so that they would just include alert with update so it would be moot.
     
  6. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    gyogen2 updated Updated Fortified Alert with a new update entry:

    Fortified Alert Update

    Read the rest of this update entry...
     
  7. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    It is now waking fortified units all the time. I thought it only did it during war.
     
  8. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    Oh, forgot to change something while testing, will update in a moment
     
  9. Mentos

    Mentos Prince

    Joined:
    Sep 29, 2010
    Messages:
    377
    Here too. If you remove the dashes before if and end in InGameTopOptionsMenu.lua below then it should wake only for hostile units again:
    Code:
                                       if localPlayerVis:IsUnitVisible(kUnit) then
                                           local otherPlayer = kUnit:GetOwner();
                                           local bIsAtWarWith = pPlayer:GetDiplomacy():IsAtWarWith(otherPlayer);
                                           --if(bIsAtWarWith) then
                                               UnitManager.RequestCommand( pUnit, UnitCommandTypes.WAKE);      
                                           --end
                                       end
    
    Edit: Oh okay, gyogen2 replied faster than me.
     
  10. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
  11. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    Sorry about that, I accidentally added the file I was testing to make sure wake worked, instead of one I intended
     
  12. Vladesch

    Vladesch Chieftain

    Joined:
    Nov 22, 2005
    Messages:
    207
    Location:
    Adelaide, Australia
    IMO best would be to leave fortified units fortified, and add sentry sleep command to everything.
    If I want a unit to sleep through nearby enemy units then I can just fortify it.

    Great mod though, game is too frustrating to bother playing without it.
     
  13. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    I can confirm air units on patrol do not wake up (even when an enemy units is in an adjacent hex).
     
  14. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    When the unit is awakened by the code I cannot skip its turn. I must fortify again. I don't remember if this always functioned like that or not.
     
  15. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    That was one of the plans, but I could not figure out how to add an operation to a unit. If anyone knows how to assign an operation, I would be glad to. I tried adding an operation, but it would not show in unit panel. It seemed the operations some operations are based on type of unit/class and may be hardcoded, but I may have missed something. The mod itself was mainly intended as a sorta placeholder mod until the tools come out and I can do it properly.
     
  16. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    I will check, I was working on a code to keep the number of fortified turns if the unit was refortified, but the command would not work in the ui context. I will check if I neglected to remove all the code.
     
  17. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    I will post an update in a little bit when I am done with some other things. but for now, you can fix yourself if you like, in the lua ~ line 552 change:

    UnitCommandTypes.WAKE to
    UnitCommandTypes.ALERT and you will be able to skip turn.
     
  18. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
  19. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    I apparently was wrong about ALERT, it will allow sleeping units to skip turn but not fortified ones it seemed (although since it will wake again next turn if unit still in range setting fortified again is kinda like skip)
     
  20. gyogen2

    gyogen2 Chieftain

    Joined:
    May 8, 2014
    Messages:
    1,201
    Just an update -- I have managed to make a Guard operation for units that can fortify mostly working, the current problem is I am having trouble removing those untis from the wake function if they are then put into fortify after being in guard. It might be the method I am using to share info between luas. Hopefully I'll get it working pretty soon.
     

Share This Page