[WIP] Up to 11 (server mod)

Discussion in 'Work-In-Progress Mods' started by trialq, May 25, 2014.

  1. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    This is in preparation for server mods being possible, hopefully soon: https://forums.uberent.com/threads/coming-up-soon-server-mods.59738/

    The idea is to make units 11 times faster, because that sounds hilarious. Currently I've multiplied the values of these fields in a units json by 11: move_speed, acceleration, brake, turn_speed. Any other fields that should be altered?

    The current design problem is projectiles, namely many units can now outrun them. I don't know if it's really a problem, as units cannot be told to move indefinitely without stopping to shoot at things (well, it may be a problem for air units). If it is a problem, I can try multiplying initial_velocity and max_velocity of tools by 11, and dividing the lifetime by 11 (hopefully this will mean weapons have the same range). Multiplying projectiles speed by 11 puts the numbers into scary territory (don't know how well the engine can cope with values like 15400 for a sniper bot projectile), and hell if I know what it means for projectiles affected by gravity. Maybe gravity would need to be increased by 11 as a counter. Which may break other things. Hopefully I can ignore projectile speeds.

    If and when it becomes possible to modify json on the fly, a future refinement may be to add sliders so the host can change the multiplication factor. When dynamically created json is possible, it would also mean other things could be changed, like damage, health etc. If and when all that happens, the UI will of course have to be styled like a guitar amp.

    edit: Attached is the first version. All units have been sped up by 5x, because 11x was too much, especially for air units. Pathing is an issue.

    Attached Files:

    Last edited: May 31, 2014
  2. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    That sounds so funny. I'm thinking that some sort of json modification is possible in game.

    Think about it. In galactic war you can pick up tech that modifies pretty much json values(build speed, storage, ect). So it should be possible to make your own.
  3. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    what about the planets?

    I just joined one with 9 planets, wasn't it limited to 8?
  4. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    The thread derailment award surely has to go to tatsujb :p
  5. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    I think the limit is 10.
  6. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Didn't someone say something like 13 or 16 on the livestream?
  7. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089

    Yes, GW sends units specs for each game. The code may not be easily usable outside GW, and I haven't looked to see if there is some sort of GW flag that enables the feature.
  8. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    PeggleFrank likes this.
  9. zaphodx

    zaphodx Post Master General

    Messages:
    2,350
    Likes Received:
    2,409
    How did you pick 11? :p

    5 sounds ample for making your brain melt :)
  10. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    PeggleFrank likes this.
  11. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    that clip's amazing XD
  12. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    There is also vertical move speed for aircraft & orbital, and a few other stats for those types of units too.
    trialq likes this.
  13. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    Here's a concept video for this mod. It's not actually this mod yet, it's a galactic war mod that does the same thing only in single player. The proper mod will apply to everyone and be multi-player.

    PeggleFrank and cola_colin like this.
  14. Corang

    Corang Well-Known Member

    Messages:
    772
    Likes Received:
    313
    I feel like if we can do this through galactic war, we can also do it with a normal game...
  15. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    Maybe, but I doubt it. If we can do it in a normal game, that's a backdoor to cheating. Plus the server mods announcement indicates server mods should be pretty much for json on the first pass, if we could do it the galactic war way that would seem to steal it's thunder.
  16. Corang

    Corang Well-Known Member

    Messages:
    772
    Likes Received:
    313
    My thinking is if the right JS calls are made when creating a normal game then these "cheats" are possible
  17. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I've looked at a bit and could not really figure out how exactly it works.
    What I know:

    - GW basically modifies the json definitions for the units in memory and then calls some api to replace the virtual files with modified versions. So it can modify unit jsons on the fly from js. This seems to be a rather crash ridden process so far, especially when experimenting with it I had a LOT of client and server crashes.
    - After GW has set the modified game files (units json as well as some ui scripts) it calls the typical start game function, however it sets the mode to "gw". This causes the server to skip the lobby state entirely and directly push the player into the game.

    I've not figured out if setting the virtual replacements in step 1 is what tells the server to use a non standard config or if there is some other magic at work I missed.
    However I'd guess the mode "gw" prevents any multiplayer useability and the modification of unit data is not possible in any other mode.
  18. Corang

    Corang Well-Known Member

    Messages:
    772
    Likes Received:
    313
    Did you check what happens when you remove the mode=gw flag from the coui:// call?
    Last edited: May 27, 2014
  19. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Crashes.
  20. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    Gravity does not appear to affect fast projectiles (often have GilEs shooting into space, it's often how I know about their presence) SO I think we can predict what will happen when everything gets sped up 11 times.

Share This Page