Atrik
Community Members-
Posts
284 -
Joined
-
Days Won
11
Everything posted by Atrik
-
I know the scripts in ProGUI, are seen by some as a way to get an edge in game, and they are in some way. But just like @Helicity described, it is also a way to enjoy the game more, focus on fun stuff and "not feeling like a click slave". As @panda demonstrated, you can use the mod, and selectively use the script you want or not (Very good deal of efforts where put in so it's customizable at will). The overlay (modified from boonGUI) displaying idles units or building could actually be seen as the main feature. And will save you a lot clicks and save you resources. Clicking to get "all idle barracks" and so on, are enjoyable features. My view on this is that it doesn't feel like cheating, and players I played with never felt I was. After all, It's just a different UI. And.... It make games more much more enjoyable .
-
Yes! Maybe some changes have to be brought into the "Queue Next Phase" feature. I had a few feedback for this one but I'll have to do something simple and intuitive. ProGUI has already 3 pages of settings . So for this, I'll recommend you modify it on your end since it's very simple: In /ProGUI/gui/session/EcoHelp.js: Line 308, Replace Engine.PostNetworkCommand({ "type": "tribute", "player": playerID, "amounts": { [resType]: Math.round(((userRes - value - resReserve) * shareratio) / 3 + userGatherers) } }); by something like: warn(state.name + " may need some " + resType + "."); You should probably actually want to use "Engine.PostMessage" but I've never used it. And haven't figure out (took the time to) understand it. Maybe someone that read this can be of better help. Done! And all the buttons and settings you can use for how to tribute allies, will now be buttons settings for how often to spam this warning . Including the filter of players you don't want it to check for, ofc, so it would be neat:
-
Thanks @panda! If you don't use auto-research, you may still have your forges showing up as idle buildings when no techs are queued, on the idle building tab. How exactly do you imagine the reminder to look like instead? It's not just you forgetting stuff btw, I started this mod because I was always forgetting to tribute allies, or having idle buildings like forge or barracks. Indeed I tried to put in as much settings and options for players to be able to choose what they wanted the mod to do, and how. I'm glad it's useful!
-
Hey @seeh! From your video, I guess you are probably using a very old version, that had some bugs (or more then latest at least lol). The maintained version can be found on gitlab: https://gitlab.com/4trik/proGUI If you make a tutorial video on it, it could be soo cool! But I think you may have missed on some of the features, I'd love to show you when you have a minute.
-
I've fixed a few issues found in initial release thanks to Lary's feedback.
-
If you know how to do this, I'll do it I've tried few syntax's like "Step: 1" "Increment: 1" ... But didn't work. Also the value are rounded in the script anyway.
-
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.
-
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.
-
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. 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!
-
But then can the horses be killed? The garrisoned cavalry would become it's infantry equivalent? (trolling)
-
https://gitlab.com/4trik/proGUI/ for stuff like queuing research, I made it very customizable to automate or not what you want. (no OSS online) https://gitlab.com/mentula0ad/FieldManager from @Mentula mod for managing farms (no OSS online) https://0ad.old.mod.io/better-scouting-mod from "Justus_Avramenko" (sorry I don't know his forum name) mod for some scouting perks (may OSS online)
-
I think like you @BreakfastBurrito_007, I like to get more free time to manage units for: Building stuff; Micro units for Battle; Plan Eco. The feature you describe for queuing techs I wanted it too I have something resembling that in proGUI: the added forge menu let you select what techs to queue automatically when the resources and a forge are available. You have the same for eco techs. This menu comes as an overlay, not in the native's game forge building menu. The benefit of it, is that is doesn't change any of your game reflexes, but adds new possibilities. Also if queuing of higher tier techs in the native GUI would be exactly like @BreakfastBurrito_007 described, you'll (very probably) still have to lock resource in order to queue it. So all of these design choices are actually more tricky then it seems.
-
Maybe rams should have some hack resistance with this. Otherwise they'll have no more roles as they'll be too brittle against melees AND melees would now be decently effective against buildings.
-
Hey guys! ProGUI is now stable and well-featured. My git was reported by a clown so it has been "hidden to public". I'm posting new links to the mod here. You can finely customize this mod's behavior to fit it to your game-style. Fair version: https://0ad.old.mod.io/progui?preview=d6c030099ea38bca44e9d36d6d6fd30f With BetterQuickStart: https://gitlab.com/4trik/proGUI/-/blob/main/proGUI.zip Some players may consider the version with QuickStart cheating as it can move units for you the first 3 secs of a game. Please make sure players you play with, are OK with you using this mod. ProGUI offers a new way to train units: you can select the army composition you want and units will start training in buildings when the resources are available. It also includes a set of features for you to save you clicks and focus more on your game. Enjoy!
- 1 reply
-
- 4
-
I wonder if this would make ranged units useless or sniping of melees really important.
-
"Script component Player of entity 3 failed to serialize"
Atrik replied to Atrik's topic in Game Modification
It seems I need to have boonGUI active and some code trying to do "g_UnitActions["set-rallypoint"].execute()" on a resource that will disappear. The bug occurs when units finish producing and the rally point has been set by a script with the "execute" method. So I know what's causing it and how to reproduce it, but my digging wasn't too successful to understand why this occurs when using boonGUI only. Anyway, don't worry @Freagarach a patch sanitizing AddResourceGatherer works just fine, and the triggering of this bug seems niche enough to just go for this easy fix. Nothing breaks, the gatherers still go for instance to the next closest tree, but something tries to add a "undefined" gatherer. -
"Script component Player of entity 3 failed to serialize"
Atrik replied to Atrik's topic in Game Modification
I will just go for sanitizing AddResourceGatherer. Doesn't cause OOS so no cons. Thank you so much @Freagarach for finding where the problem was and helping/explain me how to debug this. -
"Script component Player of entity 3 failed to serialize"
Atrik replied to Atrik's topic in Game Modification
Ok sorry for the mess above. Now I have logged the stack: if (type === undefined) warn(new Error().stack); WARNING: Caught error: Player.prototype.AddResourceGatherer@simulation/components/Player_MyMod.js:234:27 ResourceGatherer.prototype.AddToPlayerCounter@simulation/components/ResourceGatherer.js:435:13 enter@simulation/components/UnitAI.js:2410:26 FSM.prototype.SwitchToNextState@globalscripts/FSM.js:366:14 FSM.prototype.ProcessMessage@globalscripts/FSM.js:274:8 UnitAI.prototype.PushOrder@simulation/components/UnitAI.js:3949:16 UnitAI.prototype.AddOrder@simulation/components/UnitAI.js:5302:8 UnitAI.prototype.GatherNearPosition@simulation/components/UnitAI.js:5656:8 gather-near-position/<@simulation/helpers/Commands.js:258:14 gather-near-position@simulation/helpers/Commands.js:257:67 ProcessCommand@simulation/helpers/Commands.js:53:23 Trainer.prototype.Item.prototype.Spawn@simulation/components/Trainer.js:294:18 Trainer.prototype.Item.prototype.Finish@simulation/components/Trainer.js:201:7 Trainer.prototype.Item.prototype.Progress@simulation/components/Trainer.js:347:7 Trainer.prototype.Progress@simulation/components/Trainer.js:688:24 ProductionQueue.prototype.Item.prototype.Progress@simulation/components/ProductionQueue.js:128:31 ProductionQueue.prototype.ProgressTimeout@simulation/components/ProductionQueue.js:423:16 Timer.prototype.OnUpdate@simulation/components/Timer.js:139:44 ERROR: Cannot serialize NaN values. I can't really make sens of it. I've pinpointed the event triggering the bug: the rally point is set to a resource that no longer exist. That shouldn't make bugs normally, but it seems with my others mods it does. It also only triggers it if you let the rally point set where the "g_UnitActions["set-rallypoint"].execute()" have previously set it. The only components edited in my setup are unedited (excepted the GUIInterface): https://github.com/LangLangBart/boonGUI/tree/main/simulation/components Deleting the RallyPoint~boongui.js doesn't change anything to it. The GUI has a function GuiInterface.prototype.DisplayRallyPoint but not sure it does anything. -
Yes! For me BoonGUI had good structure and a powerful class "BoonGUIStats" for me to get the datas I wanted and do my dream features! It have it's own mess but you can navigate through it. Not sure reworking another mod would be advised by others but for what I wanted to do, it was perfect. I'll be so glad to help you! But not sure I'm the right person, as I mostly don't understand what I'm doing.
-
"Script component Player of entity 3 failed to serialize"
Atrik replied to Atrik's topic in Game Modification
I will get the OOS turn 20 as you do but the game doesn't crash. Weirdly it also happens for replays of online game where no OOS errors prompted then. I did, now if nothing is printing even with a "warn" in the init, that can only be that the component isn't read, right? g_UnitActions["set-rallypoint"].execute( closestResourcePosition, { data: { command: "gather", resourceType: resourceType, resourceTemplate: closestResourceTemplate, target: closestResource } } I think the command above possibly adding that unknown Resource Gatherer. That does make sens? It's executed around turn 20 and the only command "gather" executing in my code. I just haven't though about it because I was in a method I haven't edited... Edit: Testing with warn(JSON.stringify(GetSimState().players[Engine.GetPlayerID()].resourceGatherers)); The change doesn't occur at turn 20, but much later. WARNING: {"food":0,"wood":39,"stone":0,"metal":0} WARNING: {"food":0,"wood":39,"stone":0,"metal":0,"undefined":null} But disabling "QuickStart", the class with the code in question do remove the bug. Trying to understand... -
"Script component Player of entity 3 failed to serialize"
Atrik replied to Atrik's topic in Game Modification
Thanks that seems like the perfect thing to do! However I'm probably doing something wrong, with the following code only "player" will ever print. (Also tested until getting game crash). function Player() { } warn("player"); Player.prototype.Schema = [...] Player.prototype.Serialize = function () { warn("Serialize"); let state = {}; [...] Player.prototype.Init = function () { warn("init"); [...] Player.prototype.GetNeededResources = function (amounts) { // Check if we can afford it all. warn("GetNeededResources"); let amountsNeeded = {}; for (let type in amounts) if (type === undefined) warn(new Error().stack); if (this.resourceCount[type] != undefined && amounts[type] > this.resourceCount[type]) amountsNeeded[type] = amounts[type] - Math.floor(this.resourceCount[type]); [...] Engine.ReRegisterComponentType(IID_Player, "Player", Player); Context: I've installed 0ad with snap. I haven't figure out how to write on the original file (on Windows I think I was able to do it somehow). So it is ReRegistered in a mod by Player_MyMod.js. I haven't ever tried to add resource to the game, and the bug really seems to occur randomly.. commands.txt -
"Script component Player of entity 3 failed to serialize"
Atrik replied to Atrik's topic in Game Modification
Thanks @Yekaterina! I don't quite get what files you are referring to, I haven't touched them, where are they located? Also I must insist this isn't like a code typo or something as you can play entire games without problems and the games when it occurs are really when I push the speed up. Also doesn't seems to occur on any specific player action or game event. I fear a bad practice in my code like maybe too much deepcloning but nothing (looks) susceptible to inject a new unknown resource. -
I get the error below on games when I play in local: (seems to occur only when the game is fast paced). Any ideas on why this could occur or how to debug this? I'm still pretty noob. Could this be occur because I deepclone player state multiple times per tick? Any interpretations or idea on where this serialization fail could occur? Or how could I gain this information? ERROR: Cannot serialize NaN values. ERROR: Script component Player of entity 3 failed to serialize: Serialize_InvalidScriptValue Serializing: ({playerID:1, color:{r:0.08235294117647059, g:0.21568627450980393, b:0.5843137254901961, a:1}, diplomacyColor:(void 0), displayDiplomacyColor:false, popUsed:42, popBonuses:70, maxPop:300, trainingBlocked:false, resourceCount:{food:48250, wood:47799, stone:50000, metal:49700}, resourceGatherers:{food:0, wood:10, stone:0, metal:0, undefined:NaN}, tradingGoods:[{goods:"food", proba:25}, {goods:"wood", proba:25}, {goods:"stone", proba:25}, {goods:"metal", proba:25}], team:0, teamsLocked:true, state:"active", diplomacy:[-1, 1, 1, -1], sharedDropsites:false, formations:["special/formations/null", "special/formations/box", "special/formations/column_closed", "special/formations/line_closed", "special/formations/column_open", "special/formations/line_open", "special/formations/flank", "special/formations/battle_line", "special/formations/skirmish", "special/formations/wedge", "special/formations/phalanx"], startCam:(void 0), controlAllUnits:false, isAI:false, cheatsEnabled:true, panelEntities:[], resourceNames:{food:"Food", wood:"Wood", stone:"Stone", metal:"Metal"}, disabledTemplates:{}, disabledTechnologies:{}, spyCostMultiplier:1, barterEntities:[], barterMultiplier:{buy:{food:"1.0", metal:"1.0", stone:"1.0", wood:"1.0"}, sell:{food:"1.0", metal:"1.0", stone:"1.0", wood:"1.0"}}}) terminate called after throwing an instance of 'PSERROR_Serialize_InvalidScriptValue' what(): Serialize_InvalidScriptValue Aborted (core dumped)
-
This thread inspired me to make of my mod, as customizable as possible. @guerringuerrin starting sequences vary from players to players, you are right so now you can make it your own: @Mentula arbitrary constants that I've put in the code are now customizable: Buttons and customizable shortcuts. You are always in control of everything. All original GUI features works along side proGUI. If you already know how to boom, understanding all features takes less than 1 game. I'll gladly take features suggestions if you try it, as now that I own the code, some features are trivial to add/improve.