Jump to content

ResizeQueue


Atrik
 Share

Recommended Posts

A few players asked me to make a mod that would allow for the auto-queue (native) feature to be able to resize itself. And I now I've done it. :thumbsup:

https://gitlab.com/4trik/resizequeue

It's a light mod, for players that can't play with heavier mods. But you still have a bunch of settings to customize its behavior.

Features:

- Resize batch training every time to adapt to resource and pop available.

- Stop / Resume auto-queue after no resource or pop-limit reached.

- Prevent autoqueue from using the resources you'll need when placing a building.

If anything doesn't work as expected, please tell me.

Enjoy! :D

Edited by Atrik
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

Understandably, a queue resizing itself can't be in native game tho, since either you have settings like in this mod to "not consume resource under a limit" either the auto-queue become a nightmare, always taking out all resource and leaving nothing for buildings and stuff.

  • Like 2
Link to comment
Share on other sites

Hi Atrik, I have tested the mod and I see that it keeps the autotrain button pressed, but is unable to queue in the next batch automatically even after we have gathered enough resources. Can you make it such that it maintains the same batch size, waits for enough resources to be gathered (while keeping the future units blue), then start training the next batch after enough resources have been gathered? The prevents us from having to click again in the barracks. Thanks.

It would be even better if it automatically decreases to the biggest batch size the player can afford if there is not enough resources for the original batch size. For example I would like to train women three by three: if I only have 120 food now, can it automatically decrease the batch size down to 2 and keep training two by two from now on? Currently the mod the flashes and stops the queue.

Link to comment
Share on other sites

Hi Helicity, I wasn't able to reproduce the bug you had.
I forget to mention that there isn't any pre-set default settings, the most likely reason the trainer won't do anything is that you have "MaxBatchSize" and "Batch Multiple" set to 0.

Other reasons that could make the queue not resume itself are :
- Pop limit reached (But will resume if units die or more houses are built)

- Resource are under the "reserve" threshold (also a setting)

Please, if you test it again, tell me if you still have the problem. ^_^

Edited by Atrik
Link to comment
Share on other sites

  • 2 months later...

I've updated this mod to have a setting where you can make it work for corrals. As it was suggested to me.
You can also choose to make it work just on corrals (and vanilla auto-queue on other buildings are unmodified).

Auto-queue will restart animals production after interruption if you missed out on resources or reached max count.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • Atrik changed the title to ResizeQueue
  • 5 months later...
Quote

ResizeQueue isn't on mod.io, so you need to install it from git.

  1. Download the archive from git : https://gitlab.com/4trik/resizequeue/-/archive/master/resizequeue-master.zip 
  2. Locate your Mod folder:

    Linux: ~/.local/share/0ad/mods/
    macOS: ~/Library/Application\ Support/0ad/mods/
    Windows: ~\Documents\My Games\0ad\mods\
    snap : snap/0ad/592/.local/share/0ad/mods

  3. Unzip the zip your downloaded into the mods folder.

  4. Restart 0ad and enable it in mod selection

Done!

I did it, i see it in settings .. enabled mods, i see it in settings/options/resize qeueue

but looks dont work, once i had feeling  looked it blinked and really started again after food was again, but tested more times in single player (it works same way in single as in multiplayer?) and mostly it writes that unlimited qeueue was stopped and then is not runned again when enough food for example. What i am doing bad?

Link to comment
Share on other sites

47 minutes ago, SKAcz said:

I did it, i see it in settings .. enabled mods, i see it in settings/options/resize qeueue

but looks dont work, once i had feeling  looked it blinked and really started again after food was again, but tested more times in single player (it works same way in single as in multiplayer?) and mostly it writes that unlimited qeueue was stopped and then is not runned again when enough food for example. What i am doing bad?


Please check if
1) you have enough housing space
2) you have more then 150 wood (if you are training a unit that require 50 wood, then with default settings, 100wood will always be spared so will only  start production at 100 + 50 wood. For females i would still be 0 wood needed. This is to prevent production to take some wood you could need for other buildings. You change it to lower or higher value in settings.
3) Auto-queue is effectively turned on for this building. You should see the icon below WITH the red cross blinking or on.

image.png.05b53a377665486bb3cc0305fd8fa1d9.png

4) Double check settings for resize queue. The defaults setting should work like this:

Spoiler

image.thumb.png.56c6a92af428427b7b42b16bd3e44f4f.png

 

Link to comment
Share on other sites

I have all the settings (i added all into one picture),

but simply i start infinite queue and it never blinking , just is there checked red crossing (btw should it be vice versa it is now showing status or demanded status, looks like demanded status right, so if it with red crossing it doesnt mean that is infinite off but that is on, but ok anyway i saw that infinite number of units appear, then when food is not enoug is showed message that is infinite off and nver will start when food ready, tried multiple times). I can maybe even try make video.

0ADQueueDeactivatedAndWillNotBerActivatedagain.jpg

  • Thanks 1
Link to comment
Share on other sites

Thanks for the screenshot I've discovered the problem. That was a oversight from me... For testing it again in some more context, you should never get the "Could not auto-queue unit, deactivating." message with this mod, excepted if something is wrong like in your case.

If you patch the mod (https://gitlab.com/4trik/resizequeue/-/archive/master/resizequeue-master.zip) your issue should be fixed. Just delete/replace the old ResizeQueue folder to patch and it should work.

Link to comment
Share on other sites

I made full reinstall of mod, looks like in skirmish map it works (or its because its start with 5 workers to do that infinity i dont know yet), but on  random map nomad doesnt work, can it be ?

I tested also in random map and it not works when its nomad otherwise works, where is problem? I even collected more food but still not works after nomad start.

Edited by SKAcz
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...