kiooeht / ModTheSpire

External mod loader for Slay The Spire
MIT License
415 stars 87 forks source link

improvement(loader): add property parsers for all flags #184

Closed mechinn closed 2 years ago

mechinn commented 2 years ago

I'm not sure if I'm just doing something wrong or if steam only passes flags when selecting Play Slay the Spire and not to Play With Mods but with the Steam Deck not displaying the java UI of ModTheSpire quite right (black screen unless I'm moving the mouse by touching the screen) I wanted to skip the launcher most of the time when launching it and have my mods that I want enabled selected already as part of my default profile. Thought adding all the flags to the properties file and then setting the skip-launcher flag in that accordingly would do it.

I also noticed that there seemed to be a flag left lingering out there where it's impossible to have allowBeta==false because it's set to true whether or not the flag was set, figured that was done 4 years ago for a reason but moving that to a true default property, I wouldn't mind undoing that if desired

kiooeht commented 2 years ago

You weren't doing anything wrong. Play Slay the Spire launches the game directly, but Play With Mods does not launch ModTheSpire directly. Instead it launches a small program mts-launcher.jar which finds where Steam installed ModTheSpire from the Workshop and then launches ModTheSpire. Unfortunately, mts-launcher.jar does not pass any flags it received onto ModTheSpire and I don't control mts-launcher.jar, so it's impossible for ModTheSpire to receive flags from Steam.

Small history lesson on allowBeta: The allowBeta flag originally existed back when StS was in early access and getting updates every week. The beta branch was receiving updates every day or so that always had the chance to break mods. Mods would keep updated along with the stable weekly updates, but keeping up with beta changes would be too much work, so I made ModTheSpire disable the play button and include a warning that mods don't work on the beta branch if someone was playing on the beta branch. The allowBeta flag was so I could force it to work on the beta branch for testing to allow me to get ahead of the weekly updates by working on the beta branch. After Workshop support was added the devs asked me to disable the warning and allow mods to be played on the beta branch since the game was hitting its full release so beta updates would slow down a lot. Instead of removing that code entirely I just force allowBeta to always be true because it was easier.