So let's start with buildings.
First thing first: if you have ### before something, it won't execute.
Buildings have a select ID to them. IDs are what this building is defined as, and what you need to build other buildings.
Group should be pretty simple. There are Shelter, Building, production, Misc and vehicle building groups.
So what is Req?
Req is referenced from the Various Items Setup Information files
(Referred as the extension inf)
The first item is what the game is referencing to need. So let's use Shelter as an example.
### Shelter
id=2
group=building
objectid=165
req=24,20
req=15,30
script=start
unlockbuilding 3;
unlockbuilding 5;
script=end
Referencing from our trusty Items.inf, It requires 24 is branch from items_materials and 15 is leaf as well from items_materials. So what's that second number there? The second number is the amount you need to make this building.
Going to script=start and script=end
This is what executes the unlockbuilding command
Buildings are unlocked by other buildings using unlockbuilding So if you built this shelter, you would unlock fire, and fence. (No bad grammar intended.)
So, what allows you to only place buildings only on other objects? So let's take the treehouse. Right after Req, you'll notice these.
buildspace=at object
atobject=13
atobject=16
atobject=17
Buildspace is what defines it to be.
atobject is what object it absolutely needs to be at, or it won't build.
So, you'll need yet another reference. Objects.inf
13, 16 are defined as the same name: Tree. However, the Liana tree, which is defined as 17, can be used on that as well.
buildings, Storage, production, and misc have a Objectid as well as a regular ID. This redirects to yet another inf file: objects_buildings.inf. This direct defines it's actual use in the game, as well as what it looks like, it's material, it's scale and it's script itself. I'm only going to go as far as Infs, and not s2s, as i don't know much about s2s files.
So what about vehicles? Instead, this will take on a unitID, which uses ANOTHER inf, which is units.inf. if it has a unit ID, it can move.
Finally, there's the buildspace command. Buildspace can be done at object, or on water.
So finally, I'll show how i compiled the entire script for The Survivalist and Hopefully within the next few defines you might understand it.
Things to remember though.
Do not make an item ID/Unit ID/Building ID the same as an already existing ID. Doing so will screw the game up.
Do not use an existing world for this.
Do not change the ids of existing things. I don't want flying rafts killing you.
Make sure your script is properly tabbed and formalized Failiure to do so will cause script to not execute, and depending on what messed up, may cause havoc.
So, this is how i made this script. So, coming back from a long time ago when i made this.
### The Stick (Branch + Fused Silica)
combi=start
id=Thestick
req=24,1
req=4998, 2
gen=3552
process "Making The Stick -Credits to BassDrop",2000;
speech "positive";
script=end
combi=end
Combi is Stranded II's way of abbreviating Combination.
24 is branch, and 4998 is fused silica.
Gen causes the game to make it.
Process "Whatever is in parenthesis, shows on the screen" ;(time);
speech is what causes the "GREAT!" or "As if." thing to happen, depending on positive or negative.
script always has to end first before combi.
A mistake I however did was i didn't tab process and speech, so they didn't work at first.
So that's it for today. Might do another one tomorrow, but i don't know.