@jables New unit server mods currently require players to install a separate client mod for strategic icons as they are not published via the server. Ideally any player should be able to join a modded game and all files are downloaded automatically from the server. Download times for bigger server mods and custom maps are an ongoing issue and both need high compression to reduce lobby lag while downloading from the server. Longer term server mods and maps would also benefit from versioning and client side caching to eliminate repeated downloads.
For discussion about how models cannot be shadowed see the following: https://forums.uberent.com/threads/server-mod-bug-compendium.67355/
I just want to say that the faction mod will not be very sucessful if icons are client side only. Also, in general, ANYTHING that you want to do, should be ABLE to be a server side mod. I'm planning on making a checkbox to enable the faction in the lobby, but this is impossible right now because server mods don't load that kind of thing. So for now a checkbox to enable the faction will have to be client side, which kinda defeats the purpose of the server mod idea. pls pls pls @jables @masterdigital this stuff would be so awesome to have for mods! Server mods should be more powerful PS. Large server mods like the faction mod will also lag the UI when loading, not sure if this is fixed in the current PTE but if not I hope this is planned to be fixed too; the faction mod will probably be well over 50MB.
the server mod stuff is in dire need for 3 things: 1.) bugfixes for the issues with icons and models that cannot be shadowed at all 2.) a caching system for larger mods plus a "downloading mod now, currently at x%..." 3.) a server side gameplay script hooking system for gameplay scripts plus way more APIs to make such scripts really powerful. With the last point and you will get people to make mods that are as manifold as warcraft 3 custom maps, with the other two you'll at least enable them to use the current balancing and "add units" stuff to the fullest without scaring of random newbies who don't understand why the lobby is lagging for a minute with no indicator that it is downloading those 50mb. Just don't try to do all this complex "modded servers" stuff again that apparently took ages to develop and then didn't work out. Transient mods are totally fine if you add a few caching systems here and there.
I don't know the details of what JavaScript can do in a PA context, but to be honest, I'm not a fan of having server mods that can execute any arbitrary JavaScript code in the context of the PA client. Yes, you can run JavaScript code from a client mod, but that's different in a sense that you have to willingly install that mod beforehand. A modded server that can alter lobby.js would be able to run code at the moment you join a server. On the other hand, from an architectural point of view, the lobby is an integral part of the game logic which resides on the server. In vanilla this problem is hidden, because you only have one game logic. It would make sense that it is the server who provides the lobby for you.
Well if the system stays the way it is, then I think that's the end of large mods like the faction mod.
Why would you want to have a toggle in lobby? If you don't want people to use the new faction, don't have the mod enabled when you host games?
That's the temporary fix but it's not the best idea. At this point i'm not even sure if it's possible to limit the UI based on new UNITTYPES while in the lobby. I'm not good enough to do that yet.
Possible among ladies and gentleman (anything that is UI only can be cheated) Just store something in sessionStorage or localStorage; local would perform better on crash and reconnect. I think you'd need the blueprint loading to use actual unittypes.
Oh, read this in subjunctive mood: If a modded server could alter lobby.js the mod would be able to run code the moment you open the lobby. That's too early for my taste. On the other hand, the lobby is an essential part of the gamelogic. One solution would be that the server "provides" the lobby as web site. It already is a local one, but the difference would be that it is treated like browsers do: It is run in a server/domain dependent security context. The big question is if CoherentUI is able to handle different contexts.
Right now there are mods from @mikeyh which do mod the lobby and people without mods at all do get those just by joining. Providing a different scene from a webserver is something which I tried in the past. However coherent does care about the same origin policy, which makes it a big big big pain if you want to interact with the localstorage (= all settings) of PA.