Support for Strategic Icons in Server Mods

Discussion in 'Mod Discussions' started by mikeyh, May 29, 2015.

  1. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    @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.
    Last edited: May 30, 2015
    elodea, Gorbles, Nicb1 and 5 others like this.
  2. mikeyh

    mikeyh Post Master General

    Messages:
    1,869
    Likes Received:
    1,509
    elodea and stuart98 like this.
  3. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    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.
    Nicb1 and stuart98 like this.
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    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.
  5. crizmess

    crizmess Well-Known Member

    Messages:
    434
    Likes Received:
    317
    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.
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    From all I know that file can be shadowed by a server mod?
  7. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    Well if the system stays the way it is, then I think that's the end of large mods like the faction mod.
  8. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    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?
  9. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    People are supposed to have a choice to select the faction they want to play with.
  10. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Make that be based on commander?

    Imperial and Quad are vanilla, Raptor and Tank are the new faction.
  11. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    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.
  12. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    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.
  13. crizmess

    crizmess Well-Known Member

    Messages:
    434
    Likes Received:
    317
    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.
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    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.

Share This Page