Surviving Mars

Surviving Mars

Modify your Mars journey
Modify your Surviving Mars experience using mods created and shared by the Surviving Mars community.
Grifta 2 21 Jul, 2019 @ 2:24pm
Mod help - Building Layouts
I want to make a group of 3 buildings (Drone Hub, Universal Depot, Sensor Tower, cabling) like the "Self-Sustaining Dome" that comes with the base game.

This seems like it should be dead simple to do. Can anyone point me to a guide that would show me how to do this, or at least a starting point?
Last edited by Grifta; 25 Jul, 2019 @ 11:46am
< >
Showing 1-15 of 24 comments
ChoGGi 456 22 Jul, 2019 @ 12:45pm 
I did an example one here (with some comments): https://github.com/ChoGGi/SurvivingMars_CheatMods/tree/master/Mods%20ChoGGi/Example%20Layout%20Construction

(sorry don't use the mod editor, you'll have to use notepad or something)
Grifta 2 22 Jul, 2019 @ 2:46pm 
Perfect, thank you.

This will probably save me 20-30 mins per game once I've sorted it out, so I'll publish it when I'm done.
Grifta 2 22 Jul, 2019 @ 9:41pm 
Awesome. That example was exactly what I needed.

**edit** removed link to old version

In your example you said that you weren't sure what cur_pos1 & cur_pos2 did. They are the end points for cables, pipes, or (I assume) dome connectors. So this runs a cable along 3 points start (pos), middle (cur_pos1), and end (cur_pos2)

PlaceObj("LayoutConstructionEntry", { "template", "electricity_grid", "pos", point(-1, 0), "cur_pos1", point(2, -3), "cur_pos2", point(3, -3), }),

It looks like that's where this ends unfortunately (no cur_pos3), so I had to use 3 l segments, but they smooth out correctly as soon as you place the layout.
Last edited by Grifta; 23 Jul, 2019 @ 9:24am
ChoGGi 456 22 Jul, 2019 @ 9:45pm 
Yeah there's only the 2 defined in the cls obj.
Grifta 2 22 Jul, 2019 @ 10:52pm 
Hmm, posting it altered the metadata.lua which killed the mod ;/
ChoGGi 456 22 Jul, 2019 @ 11:38pm 
Yeah, like I said I don't use the mod editor (forgot about it deleting stuff).

It resaves the metadata.lua and checks items.lua for a ref to the script file and deletes it from metadata if it can't find it.

change items.lua to this
return { PlaceObj("ModItemCode", { "name", "StupidModEditorDeletingShit", "FileName", "Code/Script.lua", }), }

You also might want to mention the self-suff dome so people know what the mod does?
Last edited by ChoGGi; 22 Jul, 2019 @ 11:49pm
Grifta 2 23 Jul, 2019 @ 12:56am 
I had to call the code mod "script", and then re-add the script file that it then overwrote. Anyway. All done now. Thank you again for the help.
ChoGGi 456 23 Jul, 2019 @ 1:03am 
Why'd you delete the old one?
Just copy the "steam_id", "12345",
Last edited by ChoGGi; 23 Jul, 2019 @ 1:03am
Grifta 2 23 Jul, 2019 @ 9:36am 
I know that you don't like the mod editor, but it has a one-button publishing option that generated a unique number. I'm happy enough with that ease until I figure out the specifics of publishing to the workshop.

Also, I wanted to jump back into actually playing the game. I'll update with a better preview picture, and custom ui icon.

It's crazy that no one has made layouts yet, but maybe I'm just shocked because I just came from Factorio... I may have to make some of my standard designs.
ChoGGi 456 23 Jul, 2019 @ 2:05pm 
I don't like that it does stuff it shouldn't, I don't mind it otherwise.
"but it has a one-button publishing option that generated a unique number."
What I was trying to say is, if there's already a workshop id then it'll reuse it instead of making a new one.

Yeah the blueprints are a nice option
Grifta 2 24 Jul, 2019 @ 11:42am 
I think I see why no one has gotten into layouts yet. The implementation doesn't seem to fully in place yet. Some buildings will leave voids if you don't have the tech (Drone Hub), but some will build regardless (MDS Laser). There are also some interesting visual inconsistencies with pipes and cables.

It did what I wanted for the first layout, but I'll have to wait for next update before making any more.
Grifta 2 25 Jul, 2019 @ 12:54am 
This is the second annoying building. You only make 1 per game (if you even make one), but it's 50+ clicks to get the damn thing built.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1814592067
ChoGGi 456 25 Jul, 2019 @ 1:23am 
No panels under the pipe? and no second tribby so they can clean each other?
Some pre-made in-dome buildings would be nice (assuming they're doable).
Last edited by ChoGGi; 25 Jul, 2019 @ 1:25am
Grifta 2 25 Jul, 2019 @ 10:26am 
On the panels under pipes. Yea, I'm currently dedicate to this being purely a Rules as Written (RAW) set of mods. I'll consider non-RAW variants once I've got this whole situation locked down.

There are 2 scrubbers, and I they should have enough range to clean each other. I'll double check tonight and update.

This system doesn't allow 'variables' or 'for' loops, but I'll see if it can handle an 'if'. It it can, then it should solve all of the tech requirement issues. Also, a to-check tonight.
< >
Showing 1-15 of 24 comments
Per page: 1530 50