Coming up soon... Server Mods!

Discussion in 'Mod Discussions' started by chargrove, May 22, 2014.

  1. chargrove

    chargrove Uber Alumni

    Messages:
    107
    Likes Received:
    350
    Yeah the cheat mods are special cased; the server loads them from those specific files. If you want to make a cheat_all mod, just include all of those files in their appropriate locations together in your mod bundle, and it should work fine.

    By the way I believe I've fixed the OSX resource folder stockmods issue now; after the next build goes up take a look and see if it works again (sorry about that).
    wondible likes this.
  2. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    So I am trying to do test games with Murder Party and it seems people with a MAC cannot join the game. They crash.
    Download the zip from github in the link at the end of this post:
    https://forums.uberent.com/threads/wip-murder-party.60312/
    The folder with the modinfo.json is the folder of the mod.
    Maybe shadowing UI files does not work on mac?

    EDIT:
    wondible (who uses a mac) was able to join though. Weird.
    Last edited: June 5, 2014
  3. chargrove

    chargrove Uber Alumni

    Messages:
    107
    Likes Received:
    350
    Did wondible copy the stock mods to his user data folder as a workaround for the OSX stock mods issue (mentioned previously in this thread; should be fixed in the next build)? That could be a factor.
  4. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
    Good thought. Did the new build change this, or could I still test it?
  5. byte01

    byte01 Member

    Messages:
    76
    Likes Received:
    33
    Where are the settings for the PA Install Location stored at? PAMM is pointing to an outdated folder and i have no idea how to change it (its greyed out). Thanks in advance!
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    It's probably rather far fetched and only applicable on certain problems, but I just realized that the PA client allows to have multiple threads working on javascript: scenes, which are tabs, which are single processes. You can make your own scene(s) and let them do expensive work. Assuming the host has enough cpu cores they won't slow down anything. Only issue is that passing messages between scenes is probably rather expensive. Though you can even have your scene render an image and show it in the main scene. That's how the speedup for the alerts stuff in PTE works.
  7. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
    I believe that it also prevents excessive redraws - this was the reason cited for making the economy bar it's own scene, since it's receiving constant updates. It's limited to a small section while the main ui has the whole screen.
  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    Yes, however the excessive redraws are more about the fps rate I think. Having the alerts in an extra scene means that even if the extra scene is processing alerts all the time the main live game scene has free time to process player input.
  9. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    Look at the code for In Game Browser. The In Game Browser always lives in the Uberbar scene but you can communicate with it in any scene. What I did is have an IndexedDB database that every scene can read. I then have a Client -> Master system. The client puts a command into the shared DB and then the master will pull one command out of the DB at a time and handle it, then it will put a response in another shared database. The client will pull that response out and run a callback specified when the client first ran the command(B/c the calls are async)

    In Game Browser Repo

    The files that contain this code is coui://ui/main/shared/js/inGameBrowserEngine.js
  10. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    No need for mods, PA's panels system allows to send messages and do queries between scenes via handlers and engine calls. Read the changed alerts UI parts in the PTE as a nice example.
    Dunno how it is implemented internally, did not investigate.
  11. YourLocalMadSci

    YourLocalMadSci Well-Known Member

    Messages:
    766
    Likes Received:
    762
    I don't know where the best place to report this is without creating yet another thread.

    I'm getting what looks like a server crash with my latest modding attempts. I'm attempting to add a new unit which can be described as a orbital kamikaze unit. It's json files are mostly a mix of the orbital_fighter and bot_bomb units in order to produce the desired behaviour. For the time being, I'm using air_scout.papa as the model, although I intend to change this when we get the ability to upload our own models.

    The unit can be built fine by the orbital launcher, and launches in to space fine. It can be selected fine. However, as soon as it is given a move command, the server crashes. The json files for the unit can be examined here:

    https://github.com/cwarner7264/real...-Balance/src/pa/units/orbital/orbital_missile

    Any Ideas on what is causing the crash?
  12. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
  13. YourLocalMadSci

    YourLocalMadSci Well-Known Member

    Messages:
    766
    Likes Received:
    762
    Interesting. Normally, syntax errors seem to manifest themselves as the unit simply not appearing as a buildadble unit, rather than crashing the server. Hence why I didn't catch that.

    Either way, it has fixed the problem. Cheers.
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,125
    Likes Received:
    16,255
    somewhere it was written that stuff from the json files is loaded lazily. So parts that are only important to move the unit are only fully read in once you move the unit.
  15. squawkers13

    squawkers13 Member

    Messages:
    58
    Likes Received:
    11
    Are server mods still PTE-only?
  16. stuart98

    stuart98 Post Master General

    Messages:
    6,026
    Likes Received:
    3,905
    No, they were available in the last stable build. Latest build broke all of them so we're working hard on fixing it.
  17. squawkers13

    squawkers13 Member

    Messages:
    58
    Likes Received:
    11
    Oh. Cool!
  18. stuart98

    stuart98 Post Master General

    Messages:
    6,026
    Likes Received:
    3,905
    The words "Modded" in red text appearing next to the lobby would work better as it would accomplish two things:
    1. Tell people that the lobby is modded without unintentionally hiding the feature from them.
    2. Help those who want to play modded games find them.
    Raevn likes this.
  19. wondible

    wondible Post Master General

    Messages:
    3,279
    Likes Received:
    2,078
    Noticed something interesting... I have some very lightweight server mods that are taking an inordinate amount of time to upload. I think it must be sweeping up everything in the directory - scripts, node_modules, and maybe event .git

    I suppose the workaround is to make a task to copy just the game files to a different directory and load that.
  20. Raevn

    Raevn Moderator Alumni

    Messages:
    4,234
    Likes Received:
    4,338
    That's the expected behaviour. Anything you have in the mod folder will be uploaded, because there's no way to selectively tell what's important.

Share This Page