Jump to content

Atrik

Community Members
  • Posts

    214
  • Joined

  • Days Won

    9

Everything posted by Atrik

  1. Atrik

    proGUI

    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.
  2. 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...
  3. 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
  4. 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.
  5. 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)
  6. Atrik

    proGUI

    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.
  7. Atrik

    proGUI

    Just wanted to clarify, I did primarily the mod to enjoy my games more and for fun, not for having a edge over unsuspecting players. Auto-tribute was the first thing I ever coded, I would have done something less visible if the goal was really to "cheat", or even being unfair.
  8. Atrik

    proGUI

    You are right, but a successful GUI could still allow for empowerment and customization. I admit my Quick-start sequence even is customize for myself. As for fairness, as pointed out earlier by @Kampot, you can't make it a too serious goal, you wouldn't force everybody to play with the smallest screen resolution or to set everybody's mouse to the lowest dpi. (I agree to most of what you say, you have good points, but I still don't come with your conclusions) The more powerful the GUI, the less a bot has speed advantages over a player. So I can't agree on your approach on this. Anyway, I wanted to see if it was worth working on my mod just for me, or to work out how to make it good for other players that wished to have something like this. (Hence making the thread title click-bait) I see I was alone wishing for theses features.
  9. Atrik

    proGUI

    Everything about that game is made so it's easy to make whatever. That's the magic about it and about open source collaborative projects in general. Too much overreaction... Nobody can truly believe you cheat because you have such @#$% script as QuickStart, or stuff in my mod that just saves you 3 clicks you make without any decision making (except if you are DoctorOrgans and want to gather chickens with females, you'll have to customize the code). I can even prove this subject is too fuzzy for anybody to really take a definite position: Example with @guerringuerrin you use boonGUI that actually display datas that the original GUI don't. You set yourself with a advantage. But you are against even displaying (with boonGUI just modified!!) idle barracks. Autociv save you time typing, which free your time for other tasks... I think we can agree that if the GUI makes the game more fun for you, you should use it. Also you can't "play" an AI so don't worry folks, fun is for life!
  10. Atrik

    proGUI

    I see a lot of people take cheats at heart when I already had doubts on player removing fog or displaying hidden data (meant to be hidden). Nothing in life is too serious but on the cheat spectrum that's clearly a cheat, it's up to the player to feel like a sucker if he exploit an open source game. To @chrstgtr point actually, my unfinished mod has limitations mainly because you can't customize behaviors enough. (every "auto" features like tribute and research) But the training thing just empower the player to manage much easier army composition. This feature could really be just another way to think the GUI. (Or a attempt to it). I think like Kampot. If the GUI make thing easier, to funnier it is to actually take skill in other aspects of the game then being just really fast clicker.
  11. Atrik

    proGUI

    Yes, playing with a bot isn't fun. QuickStart just manage the first 5 sec, it's not even optimized to make best possible moves. As for my GUI, it's just a empowerment: => instead of clicking in barracks to train units, you can use the panel. It just like a smarter queue. Also I think someone already cited your name @chrstgtr in people that should use Auto-Tribute, this because you always have 10k food and forget to share with an ally who lost all farms.
  12. Atrik

    proGUI

    You start the game with all units going into CC and unloading on resources. https://gitlab.com/mentula0ad/QuickStart Wasn't working with BoonGUI I think so I just added it to my bundle.
  13. ProGUI Is a fork of @Langbart 's BoonGUI with in mind game-play improvemt. -List idle units and buildings (first two rows on left), fast select. -Visualize productions and army composition (two smaller rows below). Additional useful features/hotkeys to master your boom. https://gitlab.com/4trik/proGUI Quickly install with Pyromod (V0.0.26) proGUI-3f6fdb1bfc90de18af423ba22168fb2f050bbe9e.pyromod Edit: Maintained version with @rossenburg: https://gitlab.com/4trik/proGUI
×
×
  • Create New...