[WIP] The Realm Community Balance Mod

Discussion in 'Work-In-Progress Mods' started by nanolathe, April 23, 2014.

  1. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    A quick question, can anybody give me tips as to how to get a mod working? I tried to create a test, making the AA fire up towards the sky with a machine gun style AA cannon, but when trying to check if the mod works I'd create a new server, it'd load for a couple of seconds and then I'd get a message: "Connection to server lost"
  2. shiwanabe

    shiwanabe Member

    Messages:
    82
    Likes Received:
    32
    At a guess (mostly based on my own poking, although I haven't caused that sort of issue yet), I'd say it's likely there's something off with the json you've put in.

    - Check for miss formed JSON; I know I left quite a bit when I was first poking around.
    - Make sure you've got accurate references to all the files you're using, and remember that it's worth poking the base_X files to see if they're actually implemented.

    Personally I've been running a duplicate client mod so as to use the Unit Blueprint Database mod to check I've gotten the changes right. If you screw up somewhere it doesn't stop loading so it's decent at checking for silly errors (but it doesn't much help finding them).
  3. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    Do you guys want me to get Travis CI working with the repo. Get some json linting in so it doesn't break the game.

    Here is my usual Travis CI workflow:
    • Have a Dev git branch
      • People submit changes to this branch(All the fun merging and such goes into this branch)
    • On each commit to the Dev branch Travis CI Lint's the code, in this case the json(Also for json you want to remove spaces and such with uglyify)
    • If the build passes the Dev branch is rebased into the live branch which people then get the mod from
    All this happens automatically with a Travis CI test script

    So for this exact repo
    • Setup Travis CI to run 'node test' on commit to the 'Dev' branch
    • 'node test' will run a gruntfile which will
      • Unglyify json with this
      • Lint json with this
        • Throws error on json error, so build will fail if bad json
      • If good json run bash script to rebase 'dev' branch into 'live' branch, bash script run from grunt with this
        • Can make a new github account or use existing for commits
        • Secure info will be encrypted with public private encryption and then made into env varrible for bash use. Read more
    Last edited: June 2, 2014
  4. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    This is where I think the problem is coming from:

    "identifier" : "Balanced_Annhilation_WIP",

    Code:
    {
        "enabled" : true,
        "context" : "server",
        "identifier" : "Balanced_Annhilation_WIP",
        "display_name" : "BalancedAnnihilation",
        "description" : "Balanced Gameplay",
        "author" : "SquishyPon3 and ZombieFan564",
        "version" : "0.1",
        "signature" : "(not yet implemented)"
    }
    As normally it seems to be a pseudo-website of some sort...

    Code:
    "identifier" : "com.uberent.pa.mods.stockmods.server.cheat.allow_change_control",
  5. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    Useless fact: usually identifiers use the
    com.name.bla.foo.who.cares
    scheme because it is easy to create readable unique identifiers for programs.
  6. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Ah alright then, do you think it's possible this could have been causing the server crashes? Without the mod enabled I could host a lobby correctly.
  7. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    Its very possible. When the server reads the identifier field it could only be looking for '.' And lowercase characters. Any other characters could cause a crash.
  8. stevenrs11

    stevenrs11 Active Member

    Messages:
    240
    Likes Received:
    218
    So, I am almost done with a graphical user interface that will let people work with the json files much easier. Right now, its pretty basic and just lets you edit/delete/make tokens without dealing with JSON syntax. What else do you guys think it should do?
  9. someonewhoisnobody

    someonewhoisnobody Well-Known Member

    Messages:
    657
    Likes Received:
    361
    Does it deal with arrays?

    New feature suggestions:
    -Check file paths
    -Git integration, automatically push to repo.
    Last edited: June 2, 2014
  10. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Ooh, I may love you for this. :D
  11. shiwanabe

    shiwanabe Member

    Messages:
    82
    Likes Received:
    32
    notes/issues/features/other:

    It would be nice to be able to create inheritance trees or such through it. There's a whole mess of stuff in the base files that could be inherited and isn't (and quite a few things that are, but not through the inheritance tree).

    There's also a few interesting cases with weapons where you can either have multiple weapons or one weapon firing from multiple muzzles (Dox for the former, fighter_adv for the latter).
  12. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    Work continues... No issues so far, PA is running and the Eco changes have taken. Still running this locally, but the changes will be pushed to the GitHub when we've tested each change is working correctly.
    Clopse likes this.
  13. stevenrs11

    stevenrs11 Active Member

    Messages:
    240
    Likes Received:
    218
    I can check file paths easily, sure. It already checks the json so it wont explode the server. Things like duplicate keys and circular references can slip through other parsers I have noticed.

    Yea, it deals with arrays. Arrays of arrays of objects full of arrays!
    I will have to see about pushing to git, though I cant see that being to hard.

    I'm honestly not very familiar with how PA is using these json files, so I will have to work on inheritance. That said, right now you can easily give the weapon token from one thing to another. Is that what you mean?

    Right now I am working on a basic searching utility, that would give a list of all tokens that satisfy a regex.
  14. Clopse

    Clopse Post Master General

    Messages:
    2,535
    Likes Received:
    2,865
    Best of luck.
  15. Clopse

    Clopse Post Master General

    Messages:
    2,535
    Likes Received:
    2,865
    350m~ for 260 radius seems a little harsh on the radar. Considering air scouts 30m and not energy reliant. Small nitpick, I gave it a good read and sounds incredibly playable for a first pass.
    cwarner7264 likes this.
  16. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    How do we get ahold of the server mod files to add to the server mod folder?

    I am interested in seeing them at the very least. Have you considered commander economy generation as a "economy balance", because getting rid of 1 mex and 1 pgen at game start would do wonders for what you can do in any direction.
  17. YourLocalMadSci

    YourLocalMadSci Well-Known Member

    Messages:
    766
    Likes Received:
    762
    Ok folks, the economy changes are up. Grab them here.

    https://github.com/cwarner7264/realm-rebalance/releases

    We decided to buff basic energy a little further still, but that is about it for initial balance changes. It would be very tempting to keep balancing this particular build further in order to try and really polish the economy, however, we think that is a poor idea in isolation with all the other changes we want to do. Instead, we are going to try and push ahead with the combat changes, then re-iterate with balance changes once we've got the mod more-or-less in place.

    A little note on tools to assist with editing the .json files. I think it's great that people want to make fancy tools and guis to make it easier to edit the files. However, I'm afraid that I won't be using them. I have a lot of experience when it comes to editing large numbers of data files, and a large gui based program is not my preferred workflow. I much prefer to build up a library of small scripts to assist with editing, that I can use and combine as I see fit. I will make these utilities available, but they are designed for people who are happy using a command line. They are currently available in the "tools" directory on the github.

    I would suggest that people discussing making tools for the general use of PA modmakers might want to move their discussion into a different thread, so as to avoid clutter.
    wondible, lokiCML and cwarner7264 like this.
  18. emraldis

    emraldis Post Master General

    Messages:
    2,641
    Likes Received:
    1,843
    How do I install said mod?
  19. YourLocalMadSci

    YourLocalMadSci Well-Known Member

    Messages:
    766
    Likes Received:
    762
    Assuming you are on windows, extract the downloaded file to [user name]\AppData\Local\Uber Entertainment\Planetary Annihilation\server_mods, then load up the PTE stream.

    On a second note, if anyone wants to experiment with global health changes, there is now a quick script in the github "tools" directory which can globally alter health values by a multiplier for any listed unit-types (currently assumes an "or" operator for multiple types). If anyone is happy playing about with command line operated perl utility scripts, then feel free to give it a whirl.
  20. nanolathe

    nanolathe Post Master General

    Messages:
    3,839
    Likes Received:
    1,887
    True, but it doesn't put itself in danger while it's "scouting". Also, Advanced Radar is dead (changing to give a much smaller radius of vision and renamed to "Observation Post"), so that's pretty much all you have for Radar coverage. :p

    It's only as expensive as an Ant, so

Share This Page