Dev mode but dev console doesn't work? How to set up a dev environment?

Discussion in 'Mod Discussions' started by swizzlewizzle, October 22, 2014.

  1. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    Hello everyone.

    I launched into the game under --devmode but none of the dev console commands work. I've got the "Dev mode" box in the top left to change vision/control but even clicking this doesn't actually give me vision, haha. All of the dev console commands do not work either.

    What am I doing wrong?

    Also, how should I set up my game so that I can debug crashes and errors as I come across them and iterate rapidly? Is there any way to change code on the fly and reload it while playing?
  2. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    I know the last one, there is a mod that comes pre built with PA by the devs, don't remember the name, but if you have PAMM you can enable it in the server mods catagory.
  3. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    First of all only thing --devmode doing it's likely switch you to use different master server for the game: "uberentdev.com" instead of standard "uberent.com". Obviously normal logins won't work there and it's only used as testing environment.

    Also can you please clarify what exactly console commands you talking about? I ask because there is only few of them and as far as I aware all works without any special mode. In general it's just jQuery console so it's only execute javascript.

    If you mean PA crashes then you'd likely can't do anything about that. PA don't have any advanced logging modes and most of output in logs is useless in case of crashes. Though it's give some hints about invalid JSON or assets.

    I doubt you can get appropriate output from PA to stdout/stderr on Windows so you'll need to check logs here:
    Code:
    C:\Users\%USERNAME%\AppData\Local\Uber Entertainment\Planetary Annihilation\log\
    If you mean UI code then you need to use Coherent UI debugger that available in "Coherent/Debuger" directory. And you can as well use it from any web browser you like:
    https://forums.uberent.com/threads/hint-improve-ui-debugging-expirience-on-windows-os-x.57888/
  4. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    This. There is no need for --devmode to do modding. What you need is the UI debugger for UI stuff and a lot of trial and error for json-modifications. Though if you modify those the first thing to always check is: "Is the json still valid?" via some validator. The server crashes pretty bad if it encounters invalid json.
  5. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    Colin, by trial and error do you mean "restart the entire game after each try" trial and error or "some way to reload and update files while in a match" trial and error? Honestly, the first type of trial and error is going to be a total pain in the you know what. :) (I'm talking about non-UI modding)
  6. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    PA, at least on windows, does reload assets on the fly. So i.e. when I build ReScalePA I made it output modified papa files directly on top of the existing ones and PA showed the rescaled model within a second or two. However when I made some mistake that produced a massively broken papa file PA tried to reload that as well... and crashed. So if you are created hard crashes you'll have to restart the game ;)
    But if you replace a valid file with another valid file it should be reloaded by itself, if you directly replace the game files. If you use a server mod there is a debug hotkey and a cheat-mod to "reload" server mods.
    squishypon3 likes this.
  7. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    Do I need to hit a refresh key like F5 does for the UI? Or simply replacing a unit's JSON file and then building another? Are you talking about for clientside only files?
  8. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Dunno if the server reloads unit files on the fly. You can try by using a local server.
    If you change UI files you need to press F5. If you replace a papa model the client picks that up by itself usually.
  9. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Dunno about unit jsons. They might need the cheatmod that is meant for that.
    Clientside stuff like papa models are reloaded automatically, no need for F5
  10. swizzlewizzle

    swizzlewizzle Active Member

    Messages:
    216
    Likes Received:
    56
    @cola_colin i am replacing the papa model file and not seeing any changes while ingame. Did you need to exit to menu and restart?
  11. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    If you have Uber's cheats enabled then press Ctrl + Alt + P. That will reload server mods.

    Could it be that you are shadowing a vanilla model?
  12. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    The game is supposed to reload papa (and maybe more) files that you replace directly within the normal game directory, that worked mostly when I used it a few weeks ago.
    Server mods need to be reloaded + there is that bug liquius is talking about.
  13. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    There is in fact 1 of 4 pre-included cheat server mods included by devs for PA. One is resend server yadda yadda something or another. I believe it usually is ctrl-alt-p. The game will go black like an F5 hit. It will take a while to rebuild planet, and the more times done, more units in-game, ect, will make it more likely to disconnect after reloading, but at least you get 5-6 in-game code demonstrations from the same match. If disconnect., load another match, no need to restart PA.

Share This Page