Surviving Mars

Surviving Mars

Not enough ratings
Surviving Mods - Attachments
By eddy.dyer
Surviving Mars - Mods - Guide for ModEditor Attachment

The Mod editor allows the developer a wide range of features, building templates, command profiles and unique user made constructs and Modifications. To make mods you first need to play the game, have an understanding of the mechanics and recognize the pieces on the board. We can change the way that they look and function with the Mod Editor UI (user interface) by filling in a few simple check boxes, pull down lists and a bit of text for titles and description..

This Steam guide has several sections

- concept (use your imagination to solve in game challenges )
- create mod ( tools make reliable changes and generate .lua code )
- add template (tweak your creation, add stuff, change color )
- layer on adjustments ( copy paste, steal from other mods you made or twist recycled material to new uses)
- OXYZ Visual Editing Tool ( Two monitors - "split monitor into two windows?" Alt- Tab )
- save - test - repeat ( make sure it works as planned and often improve by review and use )
- scrub code ( check logs, play test)
- document ( gather images and text summary for steam)
- publish ( Share with fellow Modders and other Surviving Mars players)

The companion mod for this Attachments Guide is Baron_SAM by eddy.dyer

The thought here is that, these pods become like the Baron's of old, responsible for a sector or business interest. It brings life to the rock piles, makes it important to remember as it was in the first days of Surviving Mars, to place charging stations. Baron_PeaPod from the Bot Bay mod and now Baron_SAM (think Surface to Air or SAMPLE, whatever works for you) and Baron_Skyshied (wanna be MDS Laser) invite the Surviving Mars Modding community to join us and make a Baron_ of your own.

What does it do? That's up to you.

-- Peace

   
Award
Favorite
Favorited
Unfavorite
Mod Editor
Mod Editor vs Mod Enable

--- Did you know that new developers can open and read the work of other Modders. The User Interface (UI) is a simple way to see what others have done and helps orient the new developer to the data structures and fields. (keep in the back of your mind as we work that many things in the menu can be right clicked on) Mod editor / Bot Bay / Load



The alternative to the mod manager tool - attachments is to load images.lua for example or metadata.lua into your editing tool (notepad ++) works for me and create .lua code.

Once we understand a little bit more about the way things work we can dig into code but for now we will stick mostly to the ModEditor. Geeks like to look at code. The UI entries match the items.lua it is not magic it's modding. Now we can work with the tool.



There is no harm in looking at the code. Think of it as a pattern matching exercise. It should be fun though sometimes frustrating so give it time. Do one of your chores, take a break, make some play time and come back to the Mod, review, guide or whatever you are working on later. The creative process sometimes takes time.

The user interface UI is basically a menu to drive code generation. Some of the fill in the blank fields will become familier. Enter into the UI and read code behind it and we begin to see what is going on. You don't have to be able to write correct code syntax to read it.

PARADOX MOD MANAGER -

Remember to enable your mods. If you subscribe to a new mod it has to be enabled. When creating Mods they are enabled but can be turned on and off for testing. Once the mod does what we want and it has been reviewed we can publish for others to use.

MOD EDITOR -

The Mod Editor is a tool in our kit. Along with:
When you load the Surviving Mars : Mods Editor there are a number of windows that come with:
Browser help/document index -


Mods Editor User Interface -


Mod editor window (this is a parent window the mods are children and can be opened on their own. Here is where we make a new mod, open and read work by other modders, you can see if a mod is loaded, work on your own creation, delete and post your work to steam and paradox servers for distribution.

-- Developer Note -- check out #ChoGGI on Discord there is a support group for Surviving Mars modders. :) It is not difficult to ask for help if we get stuck. We also can report if there are suspected defects or unexpected issues. I try to read what else other people are working on.

Sandbox


The sandbox is interesting. We are actually playing the game. A developer could save every time they get out and load when testing again to build a colony up from scratch while developing. This breaks down with some mods and when we need to reset to the beginning for testing, game play, load balancing, broken, crashed ...

-- Developer Note -- It takes time to save, to load, to sync with Steam. The engines are working very hard to keep all the work we do organized and updated. If you are not sure a test is working, back out, save, close windows, reset and get back into the mods editor.

Where were we going? So you want to make a new mod and attach something to it.

Concept
It would be really helpful to have an idea about what you would like to modify in Surviving Mars. It is like looking at a map for a journey, it tells us how far we expect to go so we know if there is enough gas in the tank, or stations along the way, to get there. Making mods is like Alice going down the rabbit hole, no fear, lets jump right in. It can be a lot of fun and rewarding but remember "technology is great! When it works." Be patient, start small and build on your success. Mods don't always turn out just right the first time.


This mod was made for May 5, cinco de Mayo, the margarita base is the tribo scrubber, additions include, a dome flipped and shrunk, several mini ice cliff's, crystals for salt, a hologram bartender at the base, and a machine parts factory rotated, colorized lime and lofted to the rim. Oh, ya later I found a base that made a better rim and added it. The tribo scrubber started working so what was once a kiddy ride became a working duster. Use your imagination flip, shrinky dink or expand parts, colorize and make a style all your own. The Kerbal creations in my KSP mods, make the domes look more like amusement parks or a busy bar top than active space port. Have fun.

So what do you want to do? What do we need? What do we want? Funny thing is the customers at the end, on steam all ask me "What does it do?" they want stats and service for their trouble of installing and using a mod. For me these are more than that. There are stories here. Try to tie it into the game in a reasonable way.

So what happened here is that the Kerbals were flying to mars to join our team and do contract research. The rocket had an extensive drink selection and open bar so our team of Kerbals were exposed to the pictures and descriptions of drinks. Our guy or gal, starts to see these creations born of recycled parts, rearranged, attached and painted appear in our colony. Though they look unusual they perform exceptionally well.

On Mars we try to get the most out of small spaces. Do the buildings need to be so big? Part of the Kerbal solution is to put them on stands and in bubbles. Vac tubes lift patrons to the new heights - The space diner advertises.


The MaRS (Martion automated Robot Syndicate) see 512x512 square logo. (upper right of KSP picture above) MaRS contracted with the Kerbals for the Star Seed, Genesis Torpedo (Star Trek), modified clone vat people printer ... Then went on to make KSP ice - S pice (Dune navigators), SS Single space services, Franken Factories Dr. Who, and more - like Gilligan's Island Holo- Part - plays music. As you can see one thing leads to another.

I am wondering. Can we shrink a machine parts or electronic parts factory into to three hexes? Or make a mobile turret. How about a set of hubs that look like the three little pigs houses. Try to keep your work in balance with the game. If you get too crazy, stuff happens. Too much or too little may be a bad thing. Test test test.

Try to brand your work. Stick with a theme. Spell check, be professional, scrub your code and you may be able to reuse what you did in your next creation. The concepts and journey through the process encourage your imagination to make new combinations and find ways to personalize your Surviving Mars experience. I put all this off to 3d printing and AI programming. We may be looking at the way of the future.

How do you eat an elephant?
One bite at a time.

Also consider, what we have to work with in game. I think that there are a lot of shuttle pods and we can work with them. Peapods are hubs without chargers. The Robot Barron's have taken a liking to them so lets see what we can do with an old discarded supply pod hull. Check it out.


This PeaPod is a supply shell, 200 x pink x siirling generator. The Barons show up near rock piles, they always have lamp, usually a universal depot or at least type specific depot. They often forget but have to add the charging stations. See, this one has helping hands. I was trying to get them to help solve the mystery but they are not so good at counting. What one Barron Bot gets the others want. You see the search towers, batteries (got blown up once so they mostly put them behind the rock pile now) more rocks more prestige they are a funny group. Went crazy with the new landscaping. As incentive for Barron Bots to set up in my colony they are offered one free shuttle delivery. You know what they ask for? RC Commander they want a car parked out front of their place. They take over territories and run small businesses. All from some recycled parts.

So lets see if we can set you, us up as a Barron. I imagine that some pods are fitted with suit environment controls and function off grid for human use. I would not be surprised to learn that there are tunnels and underground facilities. Like, Mr. Prepper comes to MaRS.
Create Mod
To be honest I was really mistaken and confused about what Surviving Mars modding was all about. It is so easy yet robust that once you start to see what people have done, what we can do, how fabulous it really is you will be amazed, astonished & amused. This is pretty cool stuff.

What do you need to get started? An idea, sometimes the most interesting mods are very unusual an unexpected. For example,I had no idea Kerbal Ice would be so useful. Who knew?


It might be worthwhile to summarize the features of the Surviving Mars Mods Editor UI

I did not know that I could click on or right click on the empty field to bring up a selection box. As we use the tool more boxes and blanks will be opened and available for our use. The class of buildings we are working with determines what we can do, the layout, attachment point and behavior of our creation. Lets say - building. "My house ,,, in the middle of the street ..."

Once you know how to click on an existing mod to edit or view and how to make a new mod things get interesting. We want to see how some some of the mods others made are done and want to make our own. We also want to play. While developing and maintaining your own mod we will do these things and more. Skills learned here port very nicely to the real world.

Part of my confusion, when using the Surviving Mars Mods Edito,r is that there are many ways to do our work. Take for example the buttons. Oh, those are clickable? Ahh ha. The light dawns.

<File> in the upper left = Same selections as icons -=same as right click in the left half of ME screen.


  • New Mod
  • Load
  • Edit
  • Delete Mod
  • help

Select the paper with the + or file new:

Take just a moment to come up with a good name. This will be the package that is posted on Steam and you will use to getback into, update, change, modify, improve and maintain your mod. I made a mistake with my Kerbal Kisosk and spelled it Keosk when I started. It is trouble to start over so try to do a good job here. Prefix is nice KSP_pod MaRS_pod Pea_pod whatever ...

We will call this one SAM

When we select LOAD the system picks up the work or configuration we created when asking for NEW MOD. The tool put a new folder by this name on you machine. In my case the windows file explorer finds the file here: C:\Users\Ed\AppData\Roaming\Surviving Mars\Mods\SAM empty except for the items.lua and metadata.lua files.

items.lua - is the program that will hold our PlaceObj() attachments, command profiles, buildings ...

metadata.lua - is all about our mod version control. It is quite a job to get these packaged and delivered to users all over the planet. Standards, file compression, version tracking and other components help Steam and the Paradox developers keep everything running and in sync.

When I started I was very confused a this point. It takes time to keep all the records in order. Time to load the sandbox, time to pull files, enable the mods, etc. Getting out the tools have to save and sometimes handshake with steam. It takes time. I use to crash out or reboot the machine. Now there are messages [loading map] or Syncing % that help make the wait bearable.


-- Developer Note -- This video was made early on in the process to this guide, at the time it seemed Mission Impossible. Now with a few lessons, a little understanding and a few mods under my belt it is not so daunting. I wanted to have an icon for my test button so learned how to make the button images. Hopefully this guide will help you. There are other videos, maybe better ones for button creation.

At any rate, it turns out that there is a TEST button. I did not know what it did. Lets see if we can find out. But before we can test we have to have some content, a mission objective, a ship load out, building modification or some attachments to work with. Just think ahead we will need a picture for Steam, a description or write up and cool looking button. Hacking objects in game is just the beginning. Soon we will be running after robots and drones to lift up the skirts to see what is underneath.

The pull down menu will let us put our work up on Steam or the Paradox servers. I think Paradox leans toward the console X-box type developers but please don't quote me on that. I know that the Steam versions run on my PC.

Where were we? Oh yes right click, New Mod, SAM (not a good name) Sam the Enforcer sounds better.

Oh no, What happened?
read the messages (these are like clues to a mystery - maybe why things don't work)

Edit means we want to get in and look at the contents, change things, save maybe yes maybe no but this should let us get started.

So SAM is loaded but there is nothing in it. Not to worry we will see about adding to the file. To get into the User Interface lets try the EDIT selection. Look we could use Ctrl-e and drive from the keyboard. For now, clicky buttons are fine.


-- Developer Note -- you can also double click on your mod to open it.

Wow, just like that. File new or click new click edit ... I like these clicky buttons. There is more to come. check boxes, fill in the blank and pull down lists drive the mod tool - The data structures drive which windows are up (available for edit) for different objects. Just read down the list and see if you can fill it in. Keep in mind that computers will be using the entries in different ways. Numbers, display text, pick from list, etc. Looking at other modder's work helps in this regard. Don' t be shy about opening a mod you use and like and reading the UI and or .lua code. Some of these developers do fantastic work, great coding, excellent description, complete, correct, tested, professional. Our work should come up to the standard.

-- Developer Note -- If some part of your application is not working put it in the notes. Known defects. Who know's someone may look at your code and have an answer. It does not have to be perfect.

Looks like a mod to me


Press this button and it will be loaded to Steam: Lets save that for after we complete our work, test and document for the other users. But this is where we are heading.

Add Building Template & Populate
Sketch in your idea. It does not have to be perfect. yet. Take an inventory. What do we have to work with? I like the pod so lets check it out.

We do not have a preview image because the item is not created yet but remember to come back here and put in a preview image for the steam release. The important thing to note here is he elipses ... three dots. Selecting these will let us put the path and file name into this box. It also verifies that it exists versus copy past the full path, which we can do but I do not recommend. Let the tool do the work for us.


Put in your mod name: I seem to recall that the developers wanted a prefix or something to make your mods unique. So we don't clobber or confuse our work. MaRS_xxx - or KSP_xxx or idk Baron_SAM.

The description shows in game so try to work in the proper verbage. There is a lot we can do with this space, story line, info panel, control room control panel. There is room for a paragraph. Try to engage the reader.

-- Developer Note -- Save frequently, save often.


Some of the fields on the right side of the editor are pre-filled for us. Mostly accounting information, version control and keys to help Steam keep track of and distribute our work.

There are a bunch of slots for screen shots. Sometimes this helps other users understand and get and idea of your mods style and purpose. These take space in our package and when distributed so keep them small and useful. A pic of your baby is expected. Show off your work.

Next are the tags that Steam uses to organize and present our mod. Mark all that apply. if you include a commander profile here - check the box. This list is pretty clear. We are working on adding an attachment of some kind to a building. So we mark Buildings. Maybe Cosmetics we'll see.
- Save -
We have our metadata.lua
and items.lua

Kind of thin. Eh?

Lets add a building template. Half the fun is finding the name of the thing you are looking for. I remember seeing a pod in the game. Humm shuttle? Lets see

Click on new mod and add a building template.


The thing to do is fill in the blanks, click the check boxes and do the best we can with the descriptions and such. Id is important it will show in game. Baron_SAM when you make a mod try Baron_yourname so that we do not intersect and us barons will cluster together.

Baron - More information about the title.[www.google.com]

Class is: What does our building do. It seems this defines the base to attach to. Kind of have to pick one that makes s good footprint. 1 hex, 3 hex, dome size etc.


First we have to add a building template. There are lots of kinds of buildings that we can start with. Try to find one that is close to what you have in mind for the job. Make a grocery feed more or add shifts to the factory. Lots of tweaks are possible. As you go through the list keep an eye out for the ones you recognize. Try ones you don't . I did not find a wiki with all the pics but there are some hints. We want supply pod, this will add an object in the items.lua file. We are just going to go down the menu and fill in what we can. Sometimes I miss important things, like services but it is okay - the object runs just doesn't do much. It is okay to have buildings that don't do anything, dungeon dressing.


The build menu category matches the menu in game.

-- Developer Note -- The next mod is easier and quicker.


Display Name is what we see in game. There is a length limit but make it understandable.

Description - This one is good. Make it interesting and informative.

Build menu icon is addressed in another video. Click the ... to map the icon you make to this mod or find one you like and put it in your folder and map to it. I want to have a button to test my thingy.

The files are .tga format. The left half is what we see in the menu, and right half is the "on click"
It is interesting I swiped my bitcoin button and the list came up both .tga and .png but can't say if the latter can be used. For now stick with what we know works.


The menu buttons are really cool. The developers have made a transparent layer around their hex shaped button. These can be round or other shapes. MaRS made a Purple Gear and so the logo for the syndicate was born. Your logo is another of the things you can craft here.

-- Developer Note -- The creators have done us a favor. I walked through and filled out the fields I thought necessary and interesting. We can come back to adjust resource cost and such after it moves.

There is a whole bunch of functionality that most people don't need in the beginning. Remember the tool is built to support all kinds of entities and do a lot of work for us, menu location, upgrades etc. Some we need now some upgrades for example can wait. So I saved and get back in. If we click on the blue bar we can collapse the right window to show only what we need.

When in doubt leave the default. Set something so you can see and test. In this case the build requires one concrete - it really should require an empty supply pod but lets pretend for a moment that those have been recycled or came from the one free supply offered for setting up shop here on Mars with the syndicate.


When I got out, or quit the SAM edit session I lost a bit of the work. Can you see what is missing. This can be a problem when testing - we don't know what we don't know and it is very hard to see what is missing if we don't know the tool. Sometimes the code will give a clue. It does not hurt to bring up the notepad++ and look at code. But usually we don't have to.

Remember to SAVE - Then we get to use the TEST button. This is going to apply the work we have done to the test bed or sandbox that was loaded when we started the Surviving Mars Mod Editor. All of our mods are active so you can make mods that help make more mods. ChoGGI's ECM for example.

You can close the Baron_SAM editor or leave it open.

Rats - I lost my work and had to recreate it - yea fat fingers. Missed part of the puzzle anyway.
Do over - Take a mulligan - Get use to it.


Where did I go wrong here.
Class is what it is going to do for us DefenceTower - has to be something on the list.
Entity entry is what does it look like.
Attachments are only for looks and do not function. You can't stack all the buildings into one deck. Well - lets come back to that.

The pod is floating. We are going to fix that with an attachment.




Attachments
Now that we have a Mod SAM and building template. Looks like a supply pod acts like a defence tower. I can 't wait for the next meteor storm. ha ha - robots laughing ...

Right click in the left pane white field or new mod menu select.

Attachment

Before:
About time: we get a form to fill in. I will show the empty and what I think might be a good start. The offset, rotate, scale and color are interesting.


The Baron_Sam comes up in our list because we made the building template in the last section. Now you can make lots of mods using this as a starting place. I am curious to see what you come up with.


We should talk about the attachment points, offset and rotation. Maybe in another chapter. These sliders let us adjust the attachment then apply puts the numbers into the code. Reset sets back to original.

Attachment points = I like Origin because all objects seem to have one. The Top is good if you can't see your gizmo. There is a way to see these but we will have to come back to this.

-- Developer Note -- Explain about attachmement points.

Offset vs Rotation. I think of it his way. Put your hand out palm and fingers flat. Move your arm forward, backward, left, right, up and down. No worries x, y,z axis. We all remember our math. Spacial orientation is easier for some people than others. Reset is your friend.

Now the rotation takes us to the KSP Kerbal Space Program. Same hand now think of it as s rocket or jet. Pitch is middle finder up or down. Gain or lose altitude. Roll is what a plane does when it waggles the wings. French hand sign com si com sa - something like that. English phrase that goes is "so so". Now yaw is weird. Rutter control turns the left or right put your hand flat on the table turning left right or behind you got to yaw because the table top keeps you from pitch or roll.

I think this would be handy when trying to make a porcupine.


I should not have lifted the attachment his feet are not on the ground and the pod is floating. Maybe okay for a rover that looks like a pod, we can do that some other time. Try the tool, save, test, delete old and build again.


alt tab tab tab to get into my mod window - reset the offeset back to 0,0,0
Leave the scale at 200 and color blue. Oh no I fell into the visual type editor, the only way to escape is to save the mod editor, it lets us out of the OXYZ screen. I think this is for condole but works sort of, for PC. When I close the SAM session it lets go. W

-- Developer Note -- This is a tool to help us - figure out how it works and add to guide. Please.


-- Developer Note -- It is is difficult to test if you don't check the can destroy button.

After:


File save, file test, look in you sandbox for the button and build the structure. If you are working on something you may have to take away the old one and build a new object to see the changes. This testing loop can be a chore with advanced mods.

Now the fun begins: Make it rain ...
If all is as it should be we can actually start a game. The developer should play test and needs to document, take pictures and such before posting to Steam. It is better if we have the .png and an idea of how to present our work.

What does it do? idk
Save - Test - Repeat
We test several times. The unit test is as we develop the individual attachment. We test the construct with multiple attachments and in a package with other mods. Often buildings, command profile or logo belong in a package together. It sort of depends on the big words "use case."

We test in the sand box.
We test in game.
We test in an old game.
We have a friend test.

This is where my first mod attempt idea came from. TLP Three Little Pigs. Wee wee wee all the way home. I think you can still pull that mod the buttons are so sad. One day I will go back and improve. Mod making is very much an iterative process.

Hence the lather rinse and repeat joke.

Humm, interesting puzzle. Now that I am looking for a meteor shower, none come. I guess i will start a game in a nasty spot. Save it to test the Baron_SAM mod. And we get to play. Yeah! the crowd cheers.

Get out of the sandbox. Make sure mod SAM is enabled. Start a game in a rough neighborhood.
I like this enforcer lets put him to work.

First I want to take a pic for our cover art. I want it to be at a pretty location and good light. it is funny waiting for days to take a good picture sometimes. Game days that is.
--
Testing was interesting. I started an editor session and created Baron_SAM. I ended up making several to span the area of my base. How to get a meteor when you want one? Humm. Ran last night but could not tell if it worked.
oday I loaded ChoGGI's ECM mod and found the Cheats / Disaster menu choice.

I still can not tell if it worked. Looked to me like every thing in the area took a beating. I don't know what the defence tower does so maybe it is working fine. I am going back in to change the Class to MDS laser. These we can see in operation.

If we want to keep the Baron_SAM we can copy paste the building template and attachment, change the class and color of legs - simple - in theory. What shall we call this one? Baron_Von_Skyshield Our original Baron_SAM failed to protect us from the meteors. I wonder what it does - tower? This is why we need to play Surviving Mars and recognize the pieces on the board.


When the class is switched the MDS Laser options become available. Interesting we can hack the laser. Not today.

As we add the building tamplate id it becomes available in the objects to attach to list. Since we are working on Baron_MDS we map our copied attachment to this object and and change color to light blue.

A couple of cut paste and rename. We have another Baron. Skywatch no Skywalker no wrong movie Skyshield -- thats it I moved the icon over one i would like to see both at the end of the menu. Later maybe.

Now back to testing. Lets see if Baron_Skyshield can do the job. Wonder what is up with th other one defence tower - may be not the turret I wanted. humm File Save & Test, get back into sandbox.

Testing ... testing ... testing

There is a weird screen to manipulate our attachments that comes up - not sure why it has to do with adding attachments and may require another chapter in the guide. It ties in with the adjustmenst left right up down, pitch, roll and yaw --- apply. More on this later.

-- Developer Note -- To get out of the screen save and exit your child screen Baron_yourmod. When we exit the Mod Editor returns to the sandbox.



OXYZ Visual Editing Tool
This is the odd screen that comes up when we are manipulating attachments. I suspect that I touch some active area like reset or apply that I don't realize is bringing me to the visual attachment editor.

The fly says "Help Me."


-- Developer Note -- There is a useful tool here that we need to learn how to use.
The escape or exit is not obvious. To get out we have to exit the window for the individual (child) mod we are working on. Not the Outside ModEditor, just the particular mod.

The controls work to anchor the object and attachment - it is a visual for the sliders to control left right up down. This screen seems to be for the offset.


Sometimes it is good to set it down and come back to whatever the issue is, later. Our subconscious works in the background. I got to thinking that the <VIEW> button has something to do with bringing up this tool. I still do not know how to close. Esc? F something humm (quit or exit attachment? I clicked on a building template in Baron_SAM's mod and it let me out of the visual oxyz editor. ( This may sound simple but is for me, good news. Part of the attachment mystery solved)

Thank you. Going through the process and documenting it for a guide helps me talk it through. Thinking about step by step refinement. Sometimes, inch by inch. What I have been doing with this guide is to take screen shots, snippets and alt-prnt screen, edit them (sometimes add boxes or text) save and bring into the Steam Guide Editor. I get a series of images then try to explain what is going on and if possible why. This may be overkill and certainly is once we repeat these steps several times.

There is a lot more going on here than simple attachment - paste an antenna or google eyes on a shuttle pod. Open your imagination to new game pieces. Like on a chess board or characters in a D&D adventure. We can change size, color, orientation, position, etc. Can we make a Mech?

Okay enough editorializing, lets get back to work.
-----

Look at the Item Properties for the Baron_SAM mod. This is the attachment for our Enforcer building template, the other attachment is for Baron_Skyshield another piece in the game. We can have several game pieces in a single mod and the token(for lack of a better word) we are building may have many attachments. When we get this working and testable, we can add other bits.


--------------

Name: Baron_legs
Comment: Sometimes we want to remember something about a part

Parent entity: The control button for Parent shows the abundance of parts in the inventory. We are looking for our Baron_


Child Entity: This is the new attachment (part) we are going to add to the Baronn_SAM building template. These parts do not add their ability to the construct. I stacked three hydroponic gardens on a sensor tower hoping for a 3 x garden output. Only the parent has those controls. At least that is my understanding.


Anchor: Anchor points are cool. We see these in the painting and modeling software Blender. The entity has a number of pre defined anchor points for the programmers and other objects to interact with. Origin is is required so not a bad point of beginning. Top is good if you just want to put eyes on an attachment.

Once you start to see these anchors, drone positions, paths, resource piles. You begin to look at the buildings in the game in a new way. Oh, I know where those potted plants come from or the peeps walking or working in the building start to make some sense.

-- Developer Note -- I think there is a way to view these in Blender and perhaps in the ECM tool. If we can't view them I bet that there is a list of the anchors for each entity. Maybe we think of
PlaceObj() as this package of information about our 3D object,



Offset: The offest was cool. We talked about it a little in another section. This is clear: The units of measurement are not. The sliders work for - and + on either side of the center line. Remember to Apply. If you have trouble reset apply will get us back to 0.0.0

Hint: The designer can sink things into the ground (as if buried) or fly them in the air. Kerbals like to shishkabob things so that they have a smaller footprint.


Rotate: I don't know about you but rotate makes my head spin. Which way I am pointing to begin with, how the building was dropped on to the planet and our viewing angle really mess with my spacial orientation. The output does not look like what I imagined, do over. The oxyz editor may help.

Hint: Rotate can make two domes into a bubble. Resize to fit. Placement can be tedious. I have been known to walk an object into position. Set one parameter, adjust and then move a little this way or that, one direction at a time. Animation is possible.


Scale: The generator at 200 % didn't quite fill the dimple/hatch on the pod. Make it a little bigger 205 and it looks good to me. As we see in this example, once you have one part figured out it can be copied and pasted and attached to other things. Hint: Change the color so you can see it, track the particular part during installation.

Color: Here we go, nice segway. Color, tint and opacity are another really artsy thing to play with. Some finishes glow in the setting sun. I try to make the construct look like what it may be used for. Green growing, Golden glowing energy, idk dark building for shady purposes. These colors are a little funny. Slide the vernier to make it a darker deeper richer hue of blue.


When to Anchor: I tried this. I was hoping to do something with a party at night or maybe a Baron gets a big hulking antenna that only comes out during the day. It would give our doo dads a little life. It didn't work for my PeaPod so the missile is always out. Maybe this is why the Baron's insist on a lamp post. Their night time security is broken.


------

I tried the <VIEW> button and sure enough it is a visual editor for the attachment. I scratched my head, trying to figure out what I was looking at. I slid the child over and realized we had been taking pictures of the sliders and <EDIT> <APPLY> <RESET> ... neat we are looking at the translation of and attachment to Baron _SAM. So I select Offset reset, apply Rotate reset apply.

Baron_SAM


-- Developer Note - What do we do now? I can move, forward back left right up down pitch yaw and roll. zoom, scroll, camera, etc. ( How about a save or exit button ! )


Once you make your attachment and get it adjusted that is pretty much it. The Baron's went nuts and wanted more attachments but they are going to have to wait for your help.

Do you get the basic idea? Can you make me a Baron? Copy this one if you have to, rename it and go to town. You can work in your own sandbox on your own mod without ever sharing it with the Steam community. Don't be shy. If you come up with one that works lets see it. If it it lumpy then share that too.

Have fun.
Baron_SAM and Baron_Skyshield testing-- EPIC FAIL --
After using ECM the mod from ChoGGi and Cheat/Disaster/Meteors a bunch of times. It sure looks to me like the Barons are broken. Used the ECM to enable all buildings. I added an MDS laser to my test bed and a turret (which I do not see in the game often, truck attachment?) I toggled on and off the shields. MDS will flash - I can see that. The turret failed to stop the meteors, the Baron's failed to stop the meteors. Too bad, so sad.

-- Epic Fail --
Started with this:

We wanted to disguise, shield, customize and paint the shells (a skin?) but ended up with pods popping up that do not seem to contribute or do anything useful. That we can see. Kind of sounds like what a Baron does. Useless - mod, guide, idea "I cry"


Give it a rest and revisit it later. Put the mod up, as is with a disclaimer. Who knows? Maybe it is something simple. It usually is. When things don't work and I don't know why. I try not to get frustrated and just blame it on "sun spots."

Where could this have gone wrong? Scope creep - Attachment went fine - it is the extra Class and Entity relationship - What does the object do? (data structure, function ...) a common question when I post a mod. Since it does not do what I designed it for (Hard to see in action and buildings next to it were damaged in testing)

When asked "What does a Baron do?" How do I answer? idk
Attachments - Visual Editor Tool - Solution - Duh!
Form Follows Function: Visual Editor for Attachments (windowed)

Perhaps the journey was not in vein. Our constructs do work. I adjusted a beam or duration or distance / range that's it and could see the flash. Ha Mr Prepper. What do you do when you see the flash? Duck, Dummy.

What do you see? Two screens, makes all the difference on Mars.


Mode editor : Baron_SAM MOD and the attachment item is selected. This Visual Editing Tool for attahcments shows in the right window.

Switch to a different attachment and we can view its orientation. With multiple attachments active we have to: save , select the building (not an attachment) the VET will close. Then select TEST to see your work being applied to the sandbox.

We may still have to destroy the previous version of our test building with attachments, and rebuild it to see the changes we made to this version.


Here we have the results of our work. Baron_SAM and Baron_Skyshield with a new bubble. We can put a controller (robot or human) in the bubble with an attachment. Antinna, logo? Arms?

Baron's were picked up in communications over the net. Part of the message was garbled. They had been discussing attachments and asked each other what they would like to have when icon_Funding becomes available.

static we must hisss most urgent radio station stepping on conversation (Gilligans Island Holo-Park theme, obnoxious) oh here they are.

"Two Arms" but the spies (robots spying on other robots) hear a call "to arms."

I don't know about you, one human turns to the other when hearing the news of impending unrest and renegades in the dome.

It seems to me that what we need to succeed in Surviving Mods is: TWO MONITORS

Baron of MaRS - Attachments continued
The Baron's of Mars group is a test bed for making a standardized template your own by flipping a few switches, adding text to fill in the blank and tweaking your creation until it is satisfactory.


The idea is to take a supply pod. There are lots - though in exchange for 5 metal the recycle scavengers are always scarfing them up. There should be ample and in good condition for us to craft many ways to decorate, paint, and modify. In the early days of the colony these shuttle pods are much prized.

For some yet to be determined reason the Barons are 1) afraid of the dark 2) want the added protection of the shell. They collect rocks, demand a outside night light - but do not pay much attention to where it is pointed. Oh, don't forget charging stations & helping hands.

aka - The peanut gallery to the right in the picture. Ha ha - Rogue's Gallery.

Surviving Mars : Mods : Attachments - Baron's of MaRS
  • Pink - Baron Peapod : hub
  • Aqua - Baron Skyshield : MDS laser
  • Blue - Baron SAM - Surface to air missle or SAMPLE : Defence Turret
  • Black - Baron Mr. Prepper : Living Quarters of some sort Would like to combine storage and living quarters ... work in progress


Here the oval dome is used to make a capsule around the shuttle living area. Mr. Prepper's idea is to have a get away for 5. But it is not working just yet. It turned out to be named Rogue 1 because of the flag. Kind of interesting what happens when viewed from behind.

I had to adjust the size. This sample (developed and tested right to left) Size adjusted 12, 14, 10 and left it at 12. I could see a larger dome area but this one does not drag. Mr. Prepper would like his design to be potentially mobile.

There is a gap inbetween the two domes. The next three tests were to see how much the oval domes had to off set to close the gap. .25 and -.25 worked at this scale, anyway. I think it looks good.


The challenge is: What does it do?


We say challenge because we don't have any problems. New puzzles, failed tests, opportunities to learn. All kinds of synonyms just, "no problem". Ask a robot, or a Kerbal for that matter do do something (even extra ordinary) and they respond "ass firmitive." It is funny when the bots pressure sensors start to go. They sssss and at odd times. The interview on the radio that went all the way back to Earth. snap snap What did that robot sssss ay that was so (amusing) out of the mouths of babe's and bots. Eh?


Menu icons can be changed with a picture of the new Baron. But for now they are changing so fast it may be easier to leave as is. B for Baron Money (bitcoin)

-- Developer Note -- Look into charging the colony funding to hire the Barons. Think Knights Templar. That is a good mystery - What is in the bottom of the hole on Oak Island?


The Baron's of MaRS share the same entrypoint or submenu. It is kind of a clanish group trying to figure out how to use the funding options to hire on for your colony. Some Bots would provide funding and some I expect would require, salary. icon_Funding is missing. Yea I know, nag nag nag.


I really wanted TWO ARMS. The robot packs seem to have multiple robot arms. Kind of busy for what I want. Humm

Scrub Code (check logs)
For this example we did not do much with the .lua code. If we add print statements or have error messages going to the logs we need to clean those up. The UI or mod editor tool is pretty good about making tight code.

Ya know, if we do a good job on mods I bet we can survive harsher places on Mars. I picked a spot for testing I would never build a colony.


Document (images and text summary for Steam)
When we post - or upload our Baron_SAM mod to Steam the system permits us to add some description of the mod and an image to display to our prospective clients.

Baron_SAM.png


Description: Baron_SAM is a prototype for Surviving Mars : Mods showing how to make attachments. In this example the shuttle pod was used as a point of beginning. Legs are added by attaching a stirling generator, making it 205% larger, anchored to the origin, and colored blue.

---

The Class: (scope creep) DefenceTower Entity: Shuttle Pod Attachment: stirling generator

Class is what it is going to do for us DefenceTower - has to be something on the list.
Entity entry is what does it look like.
Attachments are only for looks and do not function.

The SAM mod is a companion Mod to the Guide: Surviving Mars : Mods : Attachments
Baron_SAM mod is the result of following this guide.


-- Developer Note -- Scope creep is when features are added and new topics introduced not in the scope of the original purpose for the application. Adding unnecessary features is referred to as "Gold Plating) Try to keep the focus on the original purpose. If there are additional features then make note of them for posterity.
Publication & Maintenance
Publish - Click the button to put your mod up on steam.


Then will have to get into Steam, add the picture and a brief summary of the mod. Everyone wants to know what does it do? Maybe a picture of the control panel with resources showing. If it is simply a decoration or test mod then say so in the description.


Maintenance - You can work on your mod and post it back to steam as new versions are developed, tested and ready for release. Sometimes things belong together, a pack of landscaping mods or cluster of buildings that have a like purpose, design, story line. It is okay to include a commander profile and logo if it adds value to this mod.

Do not be offended if some people make comments about your work. Accept constructive comments and let the salty ones go. They don't know how hard you worked on your mod. If they like it they will use it and may never say thank you but if for some reason it doesn't do what they expect, volume too loud, or did not read the description. Play nice. Offer to show them how to read your mod and invite them to fix it.

If a person took the time to subscribe to your mod then review what they have to say and give them a reply. Yes, no, thank you! I did not know that. I don't know how to fix that? Oh, yes I did spell that incorrectly or the Encyclopedia entry is missing. It is okay. Say thank you, it costs nothing to be polite. Independent testers can be your friend. They are at least interested enough to send you a note so try to work with it.

In closing I want to mention that this is a process. We learn by doing. Surviving Mars : Modding is foreign and confusing at first, Mods are dynamic. The tools are very well designed so it is up to you to craft, imagine, build, share and maintain your creations.

-- Peace
Lessons Learned - Developer Notes
Lessons Learned:



  • Wow, two screens for the Attachment Visual Editor Tool makes so much sense. I think the rotation parts are missing. Still way better than entering numbers, guessing. Load reload the item into the sandbox. This is much better.

  • We did not address the way the sliders and edit/apply/reset work. It is pretty intuitive.

  • Attachment points discussion was weak. Blender and HG tools?

  • When to make another Mod and when to add more content, "think cable management"

  • There are some mistakes and confusing slides in the Attachments Guide. I think we learn when things go wrong. Forget to save, missing or empty entries, hit the close button on the mod before I saved, etc. Should the guide be pristine, without error, edited eternally? or as it is representitive of what a developer can expect when Surviving Mods?
-------------------------

-- Developer Notes --

As we perform our work some things crop up that are worth mention. Developer notes remind me to do things, show where perhaps issues or a lack of understanding exists. Notes remind us what was happening during the development of the mod.

-- is the comment in lua Unfortunately we did not look at code. I think geeks like to look at code. The Metadata.lua and items. lua have grown, matured, improved, been generated by the data entry and testing we performed while making the mod.

For your review or viewing pleasure a copy of the code as it was at time the guide is being published - version 2 or 3. It may become out of date over time but hey - no harm done.

it is my hope people will copy the mod and make a Baron of their own. If it follows the pattern we see here or in the Kerbal Franken Factory - PeaPod. I would enjoy seeing what you have some up with.

LUA CODE

Metadata.lua

return PlaceObj('ModDef', {
'title', "Baron_SAM",
'description', "This is a recycled shuttle pod. Captured by one of the Robot Baron's to make an additon to thieir compound. The collect rocks but frown on them raining down on them from the heavens. To this end they have collected parts from the bone yard and are going to cobble together a Surface to Air Missle system.",
'image', "50.png",
'last_changes', "Note: testing Baron_Skyshield and Baron_Sam -- lame butts -- are non functional.\n\nAs we release changes make note here:\nOrignal release for: Steam : Surviving Mars : \nAttachment Guide - Author: eddy.dyer Date: 6/4/2019",
'id', "rGkDpUz",
'steam_id', "1761833701",
'pops_desktop_uuid', "1021277d-d51d-4eb8-b644-ec0c47fb1ddb",
'pops_any_uuid', "77815afb-8186-43e7-9e54-c114784f439f",
'author', "eddy.dyer",
'version', 62,
'lua_revision', 233360,
'saved_with_revision', 245618,
'saved', 1559862062,
'screenshot1', "45.PNG",
'TagBuildings', true,
})

items.lua

return {
PlaceObj('ModItemBuildingTemplate', {
'comment', "Enforcer",
'Group', "Infrastructure",
'Id', "Baron_Sam",
'template_class', "DefenceTower",
'construction_cost_Concrete', 1000,
'display_name', T(109939909097, --[[ModItemBuildingTemplate Baron_Sam display_name]] "Baron_SAM"),
'display_name_pl', T(549140207797, --[[ModItemBuildingTemplate Baron_Sam display_name_pl]] "Barons"),
'description', T(308201998658, --[[ModItemBuildingTemplate Baron_Sam description]] "Recycled shuttles pods are all the rage with the Baron's of MaRS."),
'build_category', "Infrastructure",
'display_icon', "bitcoin_tab.tga",
'build_pos', 15,
'entity', "SupplyPod",
'encyclopedia_id', "Baron_SAM",
'encyclopedia_text', T(104988484168, --[[ModItemBuildingTemplate Baron_Sam encyclopedia_text]] "Recycled shuttles pods are all the rage with the Baron's of MaRS.\n Baron_SAM - DefenceTower\n Baron_Skyshield - MDS Laser"),
'encyclopedia_image', "Baron_SAM.png",
}),
PlaceObj('ModItemAttachment', {
'name', "BaronLegs_SAM",
'comment', "I like generators",
'Parent', "Baron_Sam",
'Child', "StirlingGenerator",
'AttachSpot', "Origin",
'AttachScale', 204,
'AttachColor', RGBA(1, 16, 102, 255),
}),
PlaceObj('ModItemBuildingTemplate', {
'comment', "Skyshield",
'Group', "Infrastructure",
'Id', "Baron_Skyshield",
'template_class', "MDSLaser",
'construction_cost_Concrete', 1000,
'display_name', T(663407240403, --[[ModItemBuildingTemplate Baron_Skyshield display_name]] "Baron_Skyshield"),
'display_name_pl', T(286669662669, --[[ModItemBuildingTemplate Baron_Skyshield display_name_pl]] "Barons"),
'description', T(438347329308, --[[ModItemBuildingTemplate Baron_Skyshield description]] "Recycled shuttles pods are all the rage with the Baron's of MaRS. MDS Lasers are hiding under this one."),
'build_category', "Infrastructure",
'display_icon', "bitcoin_tab.tga",
'build_pos', 16,
'entity', "SupplyPod",
'encyclopedia_id', "Baron_SAM",
'encyclopedia_text', T(333899260176, --[[ModItemBuildingTemplate Baron_Skyshield encyclopedia_text]] "Recycled shuttles pods are all the rage with the Baron's of MaRS.\n Baron_SAM - DefenceTower\n Baron_Skyshield - MDS Laser"),
'encyclopedia_image', "Baron_SAM.png",
'shoot_range', 50000,
}),
PlaceObj('ModItemAttachment', {
'name', "BaronLegs_MDS",
'comment', "I like generators",
'Parent', "Baron_Skyshield",
'Child', "StirlingGenerator",
'AttachSpot', "Origin",
'AttachScale', 204,
'AttachColor', RGBA(3, 148, 170, 255),
}),
PlaceObj('ModItemAttachment', {
'name', "addon1",
'comment', "for fun",
'Parent', "Baron_Skyshield",
'Child', "DomeBasic_Glass",
'AttachSpot', "Top",
'AttachOffset', point(0, 0, -500),
'AttachScale', 9,
}),
PlaceObj('ModItemAttachment', {
'name', "addon2",
'comment', "for fun",
'Parent', "Baron_Skyshield",
'Child', "DomeBasic_Glass",
'AttachSpot', "Top",
'AttachOffset', point(0, 0, -467),
'AttachRotate', point(-10800, 0, 0),
'AttachScale', 9,
}),
}

-- Peace
3 Comments
eddy.dyer  [author] Aug 20, 2020 @ 12:17pm 
I like the guide tool it helps keep things organized, my weakness.
You were right talking to my self here, keepiing a log or notes not easy at first, still some stuff I could not get to go but all in all a fantastic idea/system on lots of levels.

You and I are the only ones who read this. Thanks Red.
Retrolicious Mar 4, 2020 @ 9:25am 
Developer Note: Thank you eddy.dyer made me chuckle. It sounded like the steam guide writer ( eddy.dyer) thanked himself for writing such a long confusing guide for himself.
Sry just misunderstood it had a missing full stop .

Anyway on a serious note: Awesome guide. I hope more people get into surviving mars modding.
I'm a noob at modding myself, but still on the fence. I wonder if SM modding is possible only inside steam or also is crossplatform? Is it easy to import / export lua files into for example gog or other platform SM versions? How about do those mods also work on xbox and ps4 platforms?

sry i got no clue of multiplatform titles modding. keep up the good work!
eddy.dyer  [author] Jun 9, 2019 @ 9:08am 
Subscribe to the companion Surviving Mars: Mod SAM -- Baron_SAM. Copy and paste, add an attachment. MaRS robots orders on the net, "Two Arms"