Stationeers

Stationeers

Stationeers
Share the best world creations and game modifications with the community for Stationeers through Steam workshop.
4ndr34 5 23 Oct, 2019 @ 2:00pm
How to mod a prefab???
I have seen the AttributesExampleMod.zip in <gameFolder>\rocketstation_Data\StreamingAssets and its content, I have read the prefabsettings.xml, it is really interesting, but if I would to mod a prefab that there isn't an example in such example file, where could i find the infos?

Where could I find a meaningful list of attributes for each prefab, that I could mod?

One of my target is to mod the analog pipe meter, changing its scale, I mean changing its scale min and max pressure, is there a way to achieve this? How?

Another target of mine is to change some of the gasses produced when I burn ices, that is 2:1 ratio of volatiles and oxites, in the furnace, is there a way to achieve this? How?
< >
Showing 1-7 of 7 comments
Kastuk 9 23 Oct, 2019 @ 2:39pm 
Attributes only for that opened xml-rooted parameters from dll classes with ModData in name.

But you can try to mod that dll with dnSpy
Stationeers\rocketstation_Data\Managed\Assembly-CSharp.dll

class PipeGasMeter
[Tooltip("Minimum degrees rotation on local Y")] public float NeedleMinimum; // Token: 0x04002FD1 RID: 12241 [Tooltip("Maximum degrees rotation on local Y")] public float NeedleMaximum; // Token: 0x04002FD2 RID: 12242 [Tooltip("The pressure the needle will read at its maximum")] public float PressureSetting = 5066.25f;

Edit method here, change PressureSetting and comment out wrong red string before compiling and then Save All
----
Not know about changing of contain gases for now.
Last edited by Kastuk; 23 Oct, 2019 @ 2:41pm
4ndr34 5 23 Oct, 2019 @ 4:12pm 
Originally posted by Kastuk:
Attributes only for that opened xml-rooted parameters from dll classes with ModData in name.

But you can try to mod that dll with dnSpy
Stationeers\rocketstation_Data\Managed\Assembly-CSharp.dll

class PipeGasMeter
[Tooltip("Minimum degrees rotation on local Y")] public float NeedleMinimum; // Token: 0x04002FD1 RID: 12241 [Tooltip("Maximum degrees rotation on local Y")] public float NeedleMaximum; // Token: 0x04002FD2 RID: 12242 [Tooltip("The pressure the needle will read at its maximum")] public float PressureSetting = 5066.25f;

Edit method here, change PressureSetting and comment out wrong red string before compiling and then Save All
----
Not know about changing of contain gases for now.
Thanks a lot for your reply, I have done everything you have suggested me, in the right order, I have put the PressureSetting to 30000f, but unfortunately it doesn't work.
I have checked it starting from scratch in creative mode.
https://steamuserimages-a.akamaihd.net/ugc/775109050490803892/9C52BE527C7975F23765228A8053BE977811AD24/
Last edited by 4ndr34; 23 Oct, 2019 @ 4:14pm
4ndr34 5 24 Oct, 2019 @ 1:28am 
Originally posted by 4ndr34:
Originally posted by Kastuk:
Attributes only for that opened xml-rooted parameters from dll classes with ModData in name.

But you can try to mod that dll with dnSpy
Stationeers\rocketstation_Data\Managed\Assembly-CSharp.dll

class PipeGasMeter
[Tooltip("Minimum degrees rotation on local Y")] public float NeedleMinimum; // Token: 0x04002FD1 RID: 12241 [Tooltip("Maximum degrees rotation on local Y")] public float NeedleMaximum; // Token: 0x04002FD2 RID: 12242 [Tooltip("The pressure the needle will read at its maximum")] public float PressureSetting = 5066.25f;

Edit method here, change PressureSetting and comment out wrong red string before compiling and then Save All
----
Not know about changing of contain gases for now.
Thanks a lot for your reply, I have done everything you have suggested me, in the right order, I have put the PressureSetting to 30000f, but unfortunately it doesn't work.
I have checked it starting from scratch in creative mode.
https://steamuserimages-a.akamaihd.net/ugc/775109050490803892/9C52BE527C7975F23765228A8053BE977811AD24/
I have found a way to make it working: the class is the right one, but I guess that PressureSetting is overwritten somewhere else, eventually not in the code. What I need to change is this method:
public override void OnThreadUpdate() { this._pressureRating = ((this.SmallCell.Pipe && this.SmallCell.Pipe.PipeNetwork.Atmosphere != null) ? (this.SmallCell.Pipe.PipeNetwork.Atmosphere.PressureGassesAndLiquids / this.PressureSetting) : 0f);
to this one

class PipeGasMeter
public override void OnThreadUpdate() { this._pressureRating = ((this.SmallCell.Pipe && this.SmallCell.Pipe.PipeNetwork.Atmosphere != null) ? (this.SmallCell.Pipe.PipeNetwork.Atmosphere.PressureGassesAndLiquids / <myValue>) : 0f);
I mean I have to replace the use of this.PressureSetting with the wanted hardcoded value.
And magic, it starts working:
https://steamuserimages-a.akamaihd.net/ugc/775109050492227789/091870516F4E769E81A4D04E59AA898BD872D30F/

But modding the game in this way I mean decompiling/modding the code hardcoding mods /(re)compiling the code back is:
  • Very prone to introduce unwanted and unexpected errors and crashes in the game.
  • Everytime the original or a new version of the DLL is redelivered by the Devs, all the work to mod that prefab needs to be done again, if it is possible, because eventually the code delivered by the Devs could change making it impossible or unknowable to mod again that prefab...
  • It's really hard to share the mod with other people, if it is compared with the workshop use.
  • Even if we can do in this way to mod the game, I really do NOT feel it is the correct or right, in legal terms, way to go. I guess that, even if I haven't already read that somewhere for this game, usually game licenses explicitely deny the user to decompile the code...

For these reasons, apart of a way of learning, or to satisfy curiosity, I find that decompiling/modding the game/ (re)compiling back, is not a viable way to go to mod a game...
Last edited by 4ndr34; 24 Oct, 2019 @ 1:32am
Kastuk 9 24 Oct, 2019 @ 2:09am 
Congrats, it's like I was removing the height limit for Jetpack before (can't make it work now).

Modding of opened code that way is okay. Community Developers doing this everytime to find bugs for devs.
Last edited by Kastuk; 24 Oct, 2019 @ 2:10am
Kastuk 9 23 Sep, 2020 @ 5:49am 
Also people do monomods injections with BepInEx
And one of such mods even come to official vanilla.
https://github.com/RoboPhred/stationeers-SplitInHand
- Changed stack splitting so it will now move the split amount to the stack in your other hand (if present). [Thanks RoboPhred]
in Beta update of 9th september 2020
----
I'm looking for such hardcore mods to become official
https://github.com/ilodev/StationeersPerishableItems
Last edited by Kastuk; 23 Sep, 2020 @ 5:55am
GD 29 Nov, 2020 @ 3:46am 
I would welcome if the Stationeers-Developer would consider:

1) Allowing DLL Mod Extensions

2) Providing the source code for the CoreDll (for gameplay-element only) in Source so we could adjust the Core and recompile without needing to use hacking methods to inject code. However I prefer option 3.

3) I would prefer a solution where you can adjust the instancing of classes in the game to modded classed from modded DLL so players can override a class/method and tell the game to use the class from the mod. The Core DLL can stay as it is, but the classes and most of the methods should be made virtual so modders can override them to their liking. Call this some kind of Core-Modding without replacing the hole core which would be bad because only one Core-Mod could be active at any given time.
Last edited by GD; 29 Nov, 2020 @ 3:48am
< >
Showing 1-7 of 7 comments
Per page: 1530 50