New Versions of (RAS) Notify

Everything about mods can be found here.

Moderator: Morax

New Versions of (RAS) Notify

Postby CodingSquirrel » 07 Mar 2015, 21:24

NOTICE: You must use version 3.7 or above with patch 3641. Previous versions of Notify 3 do not work with 3641.

The Notify mods by Crotalus are extremely useful, but I wasn't happy that they only sent notifications for certain ACU upgrades, and not all of them. As such, I took it upon myself to enhance these great mods to have the new functionality I was looking for.

I've updated both the V1 and V2 versions of Notify. V1 was a much easier change and the only change I've made is adding all of the upgrades. You can find that one as Notify Enhanced V1.2 on the mod vault.

V2 was a bit more complex mod which added queueing up commands, and showing an ETA. This took a bit more work, but I've updated that one as well. You can find that on the vault as well under Notify V3.7 Notify V3.8.

You can also download the mod from github. https://github.com/CodingSquirrel/Notify

My changes include:
  • notifying all of the upgrades
  • Notifying if you cancel an upgrade
  • The ETA will pause if you pause your ACU
  • The ETA should be more accurate on the first tick
  • Increased stability for upgrade tracking
  • Enhancement queue is interleaved into existing build queue
  • Enhancement that is queued between multiple orders of the same building will correctly split the order and place itself between them (e.g., if you queue 4 t1 pgens, then an upgrade, then 3 more pgens it will show as: 4, upgrade, 3)
    • Right clicking on any of the split items in the queue will decriment from the last. (e.g., if you right click on either sets of those t1 pgens the result will be: 4, upgrade, 2)
  • The queue is only displayed if only one unit is selected
  • Both build orders and upgrades are displayed in either the Construction or Enhancement tabs
  • If a single ACU or SCU is selected and you queue an upgrade, all other upgrades for that slot become disabled, except for progressions on the same upgrade (e.g., if you queue the UEF shield upgrade, only the heavy shield will not be disabled)
    • Once the upgrade is complete you are then able to queue up the other upgrades in that slot, which will throw the upgrade removal prompt as normal
  • If multiple SCUs are selected and you queue an upgrade none of the others become disabled, however it will only queue the upgrade for any SCU that doesn't currently have an upgrade queued for that slot
    • If any selected SCU does not currently have an upgrade in that slot queued, but does have a complete one in that slot, it will throw the warning dialog. If you click yes, all SCUs that aren't working on an upgrade in that slot will queue for that upgrade. If you click no, the ones without the conflict will upgrade as normal, while the ones with the conflict won't
  • When a new Engineering Suite is queued up, you will gain access to the higher tier construction tabs (this should respect all unit restrictions)
  • Hotbuild now works with the queued advanced engineering upgrades
  • Added chat commands to enable and disable the ally notify portion of the mod and the ETA/Percentage overlay. /enableNotify and /disableNotify will turn on and off both the chat notifications and the ETA/Percent overlay, /enableNotifyChat and /disableNotifyChat will turn on and off just the chat notifications, and /enableNotifyOverlay and /disableNotifyOverlay will turn on and off just the overlay. Adding "once" after any of these commands will keep the settings from being saved, it will only keep the changes for the current game (e.g., typing "/disableNotifyOverlay once" into chat will turn off the overlay for this game only).
  • Upgrades on your ACU and SCUs will show up as icons in the unit view panel.

Please let me know if you guys find any issues or have any comments on my changes.

And of course a huge credit to Crotalus for creating the mods in the first place.




**Note** If you're having trouble finding the mod in the vault, you might have to use the 'Server Search' button. So type in something like "notify" into the search box and then click 'Server Search'. That should make it show up.
Last edited by CodingSquirrel on 15 Mar 2016, 15:24, edited 14 times in total.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Versions of (RAS) Notify

Postby CodingSquirrel » 08 Mar 2015, 18:01

Sir Prize wrote:Yup, just confirming Notify 3.1 works fine. I don't know if it matters to people, perhaps people that play more team games than I do, but the notifications for starting an upgrade show up when you queue them, not when they start. No big deal, the "done" notification is on time so I think that's all that matters. CodingSquirrel, best squirrel.

Based on this issue report by SirPrize in another thread I tried a few more scenarios and I think I've figured out a shortcoming in my current code implementation. Originally I was simply checking that if you had an upgrade queued and you had no focus then I assumed you were upgrading. This works if you're currently building one thing and then doing the upgrade, but it fails to take into account that there is a short period of time between building multiple things where you have no focus yet, and also things like move commands.

I have two solutions to this, the first which I'm leaning towards is making sure that I have no focus and my building progress is > 0, this means that I'm currently building something but not actually targeting something. I don't think this could mean anything other than that I'm upgrading myself. The alternative would be to get the ACU's current command queue and checking that the first command is of type "Script", which is the type of command I'm issuing when you queue up the upgrade. This seems more 'correct', but also more likely to conflict with another mod, as it's not very specific. I don't know if I could replace "Script" when I order the command with anything else, or if it only accepts certain types.

I'll test my solution a little bit more and then upload it as V3.2. Again, if you guys find any issues please let me know.

Edit: Well apparently when reclaiming you have no focus, so screw it, you get both solutions. First queued command has to be of type "Script", you have to have no focus, and your progress has to be > 0.
Last edited by CodingSquirrel on 08 Mar 2015, 18:37, edited 1 time in total.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Versions of (RAS) Notify

Postby Aulex » 08 Mar 2015, 18:33

Any luck on fixing this issue
viewtopic.php?f=41&t=4364&p=85033#p85033
"Let's start beating ass and die" - drunk TA4Life

"Just because you have a d*** doesn't mean you need to be one...pussy" -Blackdeath

SCOUTING SAVES LIVES
http://imgur.com/YGk0W0o

How to play Sup Com by Ubilaz
http://goo.gl/je83z
User avatar
Aulex
Contributor
 
Posts: 1050
Joined: 17 Nov 2012, 05:29
Has liked: 299 times
Been liked: 225 times
FAF User Name: VoR_Aulex

Re: New Versions of (RAS) Notify

Postby CodingSquirrel » 08 Mar 2015, 18:41

Aulex wrote:Any luck on fixing this issue
viewtopic.php?f=41&t=4364&p=85033#p85033

Thanks for letting me know about this, I'll take a look and see if I can reproduce, then hopefully find out what's causing it.

Aulex wrote:Edit
Another bug I spotted while watching the replay
Code: Select all
WARNING: Error running /lua/sim/tasks/EnhanceTask.lua script in CScriptObject at 2aa0e8f0: ...rever\gamedata\lua.nx2\lua\sim\tasks\enhancetask.lua(40): *ERROR: Ordered enhancement does not have the proper slot available!
         stack traceback:
            [C]: in function `error'
            ...gramdata\faforever\gamedata\lua.nx2\lua\sim\unit.lua(2811): in function `OnWorkBegin'
            ...rever\gamedata\lua.nx2\lua\sim\tasks\enhancetask.lua(40): in function <...rever\gamedata\lua.nx2\lua\sim\tasks\enhancetask.lua:33>

I can tell you that this error is a side effect of being able to queue up multiple SCUs at a time. You could have a situation where one SCU has the first level shield upgrade, but the other doesn't. If you try to upgrade straight to the second level upgrade I could either have it issue the commands for both tiers of shield, which generates that error but both SCUs get the upgrade, or only issue the t2 shield, generating a different error and only having one SCU upgraded. I'm not sure of a good way of issuing the commands separately, except for playing around with the unit selection. In the end I'm not sure if avoiding a non-disruptive error in the log is worth it.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Versions of (RAS) Notify

Postby CodingSquirrel » 08 Mar 2015, 21:02

I've uploaded v3.2 to address the issue with the notifications activating early in certain scenarios. Also, fixed some issues with SCU upgrades as well as better display handling of canceled upgrades through the use of the Stop command.


Aulex, unfortunately, even when I use all of the mods you have enabled I wasn't able to reproduce the error at all. Also, I tried looking for those files in the repository where the error seems to be happening and they seem to either be moved or deleted. Was this something that would happen all the time or just occasionally? Do you still get the error if you try to use the mod? Would you be able to provide a series of instructions to get a stable reproducer? I don't think I'll be able to create a fix unless I can figure out what is happening to cause the errors.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Versions of (RAS) Notify

Postby Aulex » 08 Mar 2015, 21:54

CodingSquirrel wrote:I've uploaded v3.2 to address the issue with the notifications activating early in certain scenarios. Also, fixed some issues with SCU upgrades as well as better display handling of canceled upgrades through the use of the Stop command.


Aulex, unfortunately, even when I use all of the mods you have enabled I wasn't able to reproduce the error at all. Also, I tried looking for those files in the repository where the error seems to be happening and they seem to either be moved or deleted. Was this something that would happen all the time or just occasionally? Do you still get the error if you try to use the mod? Would you be able to provide a series of instructions to get a stable reproducer? I don't think I'll be able to create a fix unless I can figure out what is happening to cause the errors.


I believe it randomly started happening after some period of use of the mod, and from then on it would happen occasionally (always during acu ras). I haven't used the mod since the bug because it's extremely hard to play with it, but I'll work with you if you want more consistent results.
"Let's start beating ass and die" - drunk TA4Life

"Just because you have a d*** doesn't mean you need to be one...pussy" -Blackdeath

SCOUTING SAVES LIVES
http://imgur.com/YGk0W0o

How to play Sup Com by Ubilaz
http://goo.gl/je83z
User avatar
Aulex
Contributor
 
Posts: 1050
Joined: 17 Nov 2012, 05:29
Has liked: 299 times
Been liked: 225 times
FAF User Name: VoR_Aulex

Re: New Versions of (RAS) Notify

Postby CodingSquirrel » 11 Mar 2015, 01:11

Because I know someone was having issues finding the mod on the vault I've added some brief instructions on finding it to the bottom of the main post.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Versions of (RAS) Notify

Postby CodingSquirrel » 15 Mar 2015, 22:47

I've uploaded a new version of my mod today. The main changes are full integration of the enhancement queue into the build order queue. I've also fixed a lot of bugs with the build queue from the original version of the mod.

  • Enhancement queue is interleaved into existing build queue
  • Enhancement that is queued between multiple orders of the same building will correctly split the order and place itself between them (e.g., if you queue 4 t1 pgens, then an upgrade, then 3 more pgens it will show as: 4, upgrade, 3)
    • Right clicking on any of the split items in the queue will decriment from the last. (e.g., if you right click on either sets of those t1 pgens the result will be: 4, upgrade, 2)
  • The queue is only displayed if only one unit is selected
  • Both build orders and upgrades are displayed in either the Construction or Enhancement tabs
  • If a single ACU or SCU is selected and you queue an upgrade, all other upgrades for that slot become disabled, except for progressions on the same upgrade (e.g., if you queue the UEF shield upgrade, only the heavy shield will not be disabled)
    • Once the upgrade is complete you are then able to queue up the other upgrades in that slot, which will throw the upgrade removal prompt as normal
  • If multiple SCUs are selected and you queue an upgrade none of the others become disabled, however it will only queue the upgrade for any SCU that doesn't currently have an upgrade queued for that slot
    • If any selected SCU does not currently have an upgrade in that slot queued, but does have a complete one in that slot, it will throw the warning dialog. If you click yes, all SCUs that aren't working on an upgrade in that slot will queue for that upgrade. If you click no, none will (perhaps could be refactored so that it only skips the upgrade for those who already have an upgrade in that slot)
    • Lots of code refactor to be less hook-destructive (i.e., modifying existing code more often instead of overwriting)

The only real thing I'm not quite happy about with the mod's current status is that you can't right click to remove an upgrade from the queue. I looked, and asked a few people but was unable to find any way to do this, besides forcing a 'Stop' command, and then rebuilding the queue. Other than that I think these changes make the queuing functionality more intuitive and more "correct".

I hope you guys enjoy. And because of the amount of code-side changes this required, please please send me any issues you come across. I tried to catch as many corner cases as possible, but I doubt I did.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Versions of (RAS) Notify

Postby CodingSquirrel » 17 Mar 2015, 17:50

I started working on V3.4 which will include some bug fixes I came across on further testing (full details when I finish), and most importantly will add the ability to queue up higher tech buildings while the advanced Engineering Suite upgrades are queued up. I ran into a hiccup with this, where I would also be showing buildings of that tech level that should be restricted, such as items that have been set restricted through the lobby and also higher tech support factories which don't have their requisite HQ yet. However, I think I've come across a solution that should avoid that issue.

One other outstanding issue I have, that I don't think I'll be able to fix while keeping this UI only, is if you try to do a "clean" command while on an upgrade the mod will think you have canceled your upgrade despite the fact that it is still running. What I mean by "clean" command is if you try to issue a command without holding shift, which would normally reset your orders and issue the new one only. It technically does that, but will also leave your current upgrade running. The problem this causes for me in tracking what's going on, is that even though the upgrade is still running, the unit's queue completely forgets about it. I just don't know a way to interpolate that missing information accurately. Any solution I tried to come up with, I could also come up with scenarios where the data I had available could mean multiple things. So basically unless this can be fixed sim side (such as doing a full cancel on an upgrading ACU/SCU if given a clean order set), don't issue clean orders if you want the notify to properly print to chat. I believe right now it will result in a notification of the upgrade's cancellation, and will remove the upgrade from your displayed build queue, despite the fact that the upgrade is still running.
User avatar
CodingSquirrel
Avatar-of-War
 
Posts: 180
Joined: 19 Jan 2015, 19:01
Has liked: 9 times
Been liked: 63 times
FAF User Name: CodingSquirrel

Re: New Versions of (RAS) Notify

Postby Frozen_byte » 17 Mar 2015, 19:23

will add the ability to queue up higher tech buildings while the advanced Engineering Suite upgrades are queued up.
Best Feature. Stopped reading your Post just to instantly thank you for this Feature!
~¿Quis custodes custodit?~
User avatar
Frozen_byte
Avatar-of-War
 
Posts: 208
Joined: 21 Sep 2011, 22:03
Has liked: 37 times
Been liked: 22 times
FAF User Name: Frozen_byte

Next

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest