Jump to content

badosu

Balancing Advisors
  • Posts

    859
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by badosu

  1. `GetNonGaiaEntities` is quite fast, the problem is `GetMultipleEntityStates` which performs a myriad of checks and operations to bring all possible state detail of a particular entity, considering all possible entity types, combat details for unit position, etc... I guess I can patch the gui interface to bring only the details I need and hopefully optimize a bit, not sure that won't trigger an OOS though.
  2. @nani Suggested I did some benchmarking and I noticed the performance is atrocious. 93% of time is spent on retrieving entity states from `GetMultipleEntityStates(Engine.GuiInterfaceCall("GetNonGaiaEntities"))`, making each production iteration spend ~100ms on mid game 4v4. Personally, I've not noticed any jittering or relevant performance loss in-game, but that may be due to the async nature of js. Anyway, trying to get entities per player is even slower as more IPC calls are needed. Is there a way to invoke the `RangeManager` passing some kind of query with the currently exposed interface? If it's possible, but the interface is not implemented, can that be done as a mod (and not cause OOS)? I appreciate any input here.
  3. New development version: - Adjusted positioning for production row when not observer and playerid > 1 - Small visual adjustments - Decreased update delay from 1s -> 500ms - Small optimizations and refactoring - Do not show remaining time for buildings without assigned workers - Do not display progress bar when foundation has not started - Small adjustments in preparation for Units display mode - Fixed transition when player resigns -> observer mode prodmod.pyromod
  4. The resources overlay is part of leite's mod. Mine is just the production for now, researching techs are displayed with the other production items (techs, buildings, units).
  5. Since we're touching this topic, is it possible to add a sprite with programatic color added? It could be a full alpha sprite with addEffect color if possible or something similar.
  6. Hmm... it seems the colormap is not working as expected. I copied it so I am not really familiar with, I'll find a solution and upload the fix. Are you using some kind of mod that changes players colors? I've specced some games already and the only error I had was when I resigned as a player so I am not sure how to reproduce.
  7. Well, `Engine.CameraMoveTo` will suffice for now. This is an early release, much of the code was borrowed from @leitoso's https://gitlab.com/xxleite/specmod. Kudos! It works for specs and also for players. For specs unfortunately, given the chat messages and hero buttons the position is a bit awkward, but should be usable. There are many adjustments necessary yet, like making the progress bars brighter for darker player colors, rearranging gui items other than the prod mod, hotkey and menu option for enabling/disabling production etc... These are on the backlog, as well as making an option to show all current units from players using the same system. Hope you find it useful. prodmod.pyromod
  8. If I can make the button selection work to move to the entity training/researching/building I can make an early release of the mod. Everything else is working reasonably as I want, apart from minor visual adjustments I want to perform.
  9. Serral is love, Serral is life. Does anybody know how to select an entity? I've tried stealing `ResearchProgress` code for that: (https://github.com/0ad/0ad/blob/1dc4682ce83f316437ded12032859d709e227ca5/binaries/data/mods/public/gui/session/ResearchProgress.js#L91). I noticed that it uses `EntitySelection.selectAndMoveTo` from the object instantiated in `session.js` passing `g_Selection` as the instance. I've tried using `g_Selection.selectAndMoveTo` but it seems that the global for some reason has no methods. I've also tried instantiating a new EntitySelection but it doesn't work too.
  10. Some progress: The buttons also have tooltips, which is quite helpful to know how many seconds it's missing to finish and the unit name. Additionally I'm considering to click on button to move to recruiter entity but that should take some effort. I'd like to improve the visual side though, in particular I want to make the left indicator (the vertical bar) with rounded borders. Most importantly I want to make put the same kind of canvas around the progress bar as the button has, any pointers would be welcome.
  11. Is it possible to add sprites and styles without having to copy paste the whole vanilla `gui/session/{sprites,styles}.xml`?
  12. Wow, this is huge! One of the biggest weaknesses of the Petra AI bot is the ability to be distracted by small raids, kiting units that would be working instead. Gonna try and see if it's still present. cc @ValihrAnt
  13. /me has sent bbgotbanned 500 Food.
  14. Well, quick and dirty it is then: The sharpness of the text leaves to be desired, I wonder if there's a way to improve it.
  15. Hello, I've been trying some approaches to the production queue overlay. So, the quick and dirty method would be to iterate over all players entities with ProductionQueue and query the production queue there. However I would not like to do that as it would be very inefficient. Instead I've been trying to hook onto Trigger, specifically the event "TrainingQueued" called here (https://github.com/0ad/0ad/blob/1dc4682ce83f316437ded12032859d709e227ca5/binaries/data/mods/public/simulation/components/ProductionQueue.js#L345-L351) Unfortunately it seems that I can't hook onto the trigger class as exemplified by the triggers demo scenario (https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/maps/scenarios/triggers_demo.js) I wasn't able to do that by registering with a new simulation component, neither by a custom component inside session/. Can anybody give any pointers? Also, it seems that by hooking or modifying any of these files I might trigger an OOS if the players don't have the mod? Can anybody tell me if this plan is not feasible?
  16. As it is, you will advance. Ideally you would have to play an additional match into the final stage but for some reason challonge put 'Set to advance', since the groups have already started I'm not sure that will change much. Unless someone can find a way to set @borg- to play an additional match on Final stage without changing groups and results. If you look at the Final stage currently, the 2nd from your group would play the 2nd from Group E, maybe that's a glitch due to challonge not refreshing the finals stage, unfortunately resetting might not be an option.
  17. I won against @Subotai_Mongol commands.txt metadata.json
  18. Is it possible to identify the resolution and make the panel larger? Otherwise add a row for lower resolutions
  19. Could a, not exactly great, solution be to increase the carry capacity for slower units? e.g. spearmen can carry 12 res instead of 10, etc... I feel like the combat implications of having melee units walking as fast as ranged not to be good for gameplay.
  20. I already did, why would you need to do it again? If you want to include @borg- I'd suggest seeding @Feldfeld directly to Final Stage since he's in similar tier but registered first. Otherwise you can randomize one of both to be seeded to Final Stage (last position alone in a group) Please bring Dizaka back to his original position
  21. Wait a bit, people are not available all the time for 0ad lel
  22. I think this is good then, thanks! So the first match of the group is Bal Mainland, the second Wrench and so on?
×
×
  • Create New...