Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Common Attachment Standard (WIP)
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
190.635 KB
18 Jun, 2022 @ 10:14am
18 Jun, 2022 @ 11:31am
7 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
Common Attachment Standard (WIP)

Description
This vehicle contains 2 Different types of microcontrollers:
- The green one is supposed to be a host of some sort.
- The yellow ones are for the attachments

Its supposed to be a Demo for a standard for attachments.
The standard is still in very work-in-progress, but the main ideas are:

1. Attachments have a maximum width of 3 (other dimensions are not yet part of the Standard)
2. Attachments send a composite-signal that is constructed as follows:

On/Off Ch. 1: “Composite-activated” = True; “Launch-activated” = False
(If your attachment uses the normal “Launch”-input of the hardpoint connector it is “Launch-activated”, otherwise u have to launch or activate it with the composite-signal.)

On/Off Ch. 2-5: No. of channel for activation as 4-bit Number ( Ch. 2 is least significant bit)

On/Off Ch. 6 -32: Not yet Used

(Not yet implemented in this Demo)

Number Ch. 1 - X: Used for name-transmission to host the (the exact number of channels depends on the name of your attachment*)
(X may not be Larger then 16)

Number Ch. X – 32: Not yet Used

(This Part is actually implemented)

*1 number channel holds 2 characters and 1 additional channel is used for a End-Of-Name/Text symbol. This means the number of used Number Channels is equal to: Math.Ceil(LengthOfName/2) +1. With a maximum number of 16 channels that is a max of 30 characters (4 shy of fitting “Supercalifragilisticexpialidocious). The microcontrollers determine the first “data-channel” automatically.

3. The Host sends composite-signal that is constructed as follows:

On/Off Ch. 1: “isConnected” (always True)
(this is used so that the attachment knows if its connected or not)

On/Off Ch. 2: activate attachment

On/Off Ch. 3-32: Not yet Used




If you want to see how the name transmission works, check out the Lua-block in the yellow microcontrollers for the encoding (here you can also set the Name of the attachment), and the green microcontroller for the decoding.

In my demo, the “cannon” sends its ammo count to the host, whereas the “rocketpod” receives an additional On/Off for the NV-mode of its Camera.


What is the goal of this “Standard”?

Basically I would like to have some sort of commonality between a Number of attachments and Vehicles making it easier to mix and match.

If you have any further ideas for this please let me know in the comments, but remember in this standard there should only be things that are the same between a large number of possible attachments (i.e.: all attachments have a name, most attachment can be activated, etc.)javascript:ValidateForm()

U can use my Lua-scripts as a starting point for your own scripts. Or u can just use the attachment microcontrollers to build an attachment around them. If you choose the second option you only have to send in a composite-signal into the Lua-scripts with your data (this goes for numbers as the On/Off stuff is not added yet) the script should automatically move the data into the correct channels and “pull it back out” on the host side.

P.S. please excuse my bad writing, English is not my first language, and I did this because I couldn’t sleep tonight… :D
3 Comments
CaptainTryHard  [author] 18 Jun, 2022 @ 3:01pm 
Otherwise if you mean the hardpoint connector: This is not supposed to replace anything, its just supposed to be a set of rules an attachments should follow, for example: if you wanna build an attachment which consist of 3 GPS guided bombs, u don't want to fire that with just the "launch" input of the hardpoint since that would release the attachment.

Instead the attachment should tell the host-controller that it wont use the launch input and that the trigger-key should be sent to On/Off channel 2.

Also atm all the Vehicles with hardpoints on them come with missiles and such per-installed and if you want to fit your own missile or one from the workshop, you have to configure everything yourself (not always but sometimes).
So think of this like the USB standards for Computers: you have one connector and no matter what you plug in your computer handles the rest.
CaptainTryHard  [author] 18 Jun, 2022 @ 3:01pm 
@Borderline Autistic i don't quite know what you mean "benefit of this over hardpoint", does something like this already exist, if yes then i wasn't aware of that, sry xD.
Borderline Autistic 18 Jun, 2022 @ 1:24pm 
I'm sorry if I'm missing something, but what is the benefit of this over hardpoint?