Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Random Event Picker
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Creative
Tags: v0.10.6
File Size
Posted
Updated
98.088 KB
19 Jan, 2019 @ 2:24pm
19 Feb, 2020 @ 1:03am
2 Change Notes ( view )

Subscribe to download
Random Event Picker

Description
The Random Event Picker randomly picks one of 32 events with set probabilities, randomly within a set time interval, and fires an on/off pulse on the chosen event's composite channel output.

Feel free to use this microcontroller in your creations, as long as you credit me for it.

Setup of basic example:
  1. Connect the "On/Off" Input to a constant on-signal or to a button with which you want to activate the R.E.P.
  2. Hook up the "Time Top Clamp"- and "Time Bottom Clamp"-inputs to either two constant numbers or to two keypads with which the player may define the time interval.
  3. Use the select tool to adjust the probabilities of events. Leave the probability of an event at 0 in order to exclude it. Probabilities must add up to 100.
  4. You may connect the "Error"-output to an indicator light, it will warn you if the probabilities do not add up to 100 or the "Time Bottom Clamp"-value is lower than the "Time Top Clamp"-value. In addition, the microcontroller will show you the current sum of probabilities as a tooltip if they don't add up to 100.
  5. Connect the composite output to however many composite readers (e.g. simple microcontroller to read a certain channel and output a single on/off value) you may require.
  6. In game, the player can now set the time interval and de-/activate the R.E.P, if you gave them the option to.

Known Issues:
  • An event is picked upon the picker being activated.

Ideas:
  • Random Malfunction System: The R.E.P together with simple composite read microcontrollers or my Random Malfunction Microcontroller is used to randomly disable systems which then have to be repaired. Either for entertainment purposes or to add "realism".
  • Minigames in leisure areas: E.g.: a Whack-a-Mole type game where the R.E.P is used to randomly light up buttons which have to be pressed within a short amount of time to award points.
  • Randomized Missions: The R.E.P may press one of a series of hidden buttons which may be used to trigger different events or objective chains via vehicle-buttons and triggers. (E.g.: Fishing boat fire, different models of boat may be spawned every time without having to make a unique mission for every model.)
  • Randomized Security Codes: If one chooses not to use completely random codes and wants to have a pre-defined list of possible codes, the R.E.P may pick a new code from the list at e.g. hourly intervals.
  • Randomized, Decorative Lighting: The R.E.P may be used to randomly activate lights/paintable indicators in e.g. a disco or in a server room.

Examples:
Large Bulk Carrier with Random Malfunction System
747-8I with Random Malfunction System by SchissiHD
Random Malfunction System Example/Template Setup

This could probably be done a lot easier with Lua, but there was no Lua integration when I made the R.E.P (and I don't know Lua).

I didn't devise the random number generator function myself, I found it somewhere but forgot where.
11 Comments
DerAtomherbst 7 Nov, 2023 @ 1:49pm 
Is the probability in percentage?
Tmccanna 27 Jan, 2020 @ 1:54pm 
how do you turn a composite signal to a on/off one
CTH2004 27 Feb, 2019 @ 5:07pm 
Also, an hints as to what the larger project is?
CTH2004 26 Feb, 2019 @ 6:47pm 
Cool!

Can't Wait!
Käsekuchen  [author] 26 Feb, 2019 @ 4:44pm 
I do plan to make one or two more ships with an RMS, but I do have another, even bigger, project first.
Peekofwar 26 Feb, 2019 @ 1:59pm 
I hope you make more ships with these malfunctions. I also understand that that will likely increase the time it takes to make said ships because of the added content.
CTH2004 25 Feb, 2019 @ 5:28am 
Ok

And, the random securyity system is just for complexity. After all, if they break in, don’t want the same result twice, or they might find a way around it!

And, they are different enough, and they don’t know what to excpect, they can’t plan, since they might be curshed, drowned... hard to plan for all of those!
Käsekuchen  [author] 25 Feb, 2019 @ 12:02am 
I don't get why a security system needs to be random. I thought I'd use it again to do random light blips in a server room. But you can still use it however you want.
The generator function feeds back into itself, i.e. the value that was calculated in the previous tick is now this tick's x. In the first tick after being spawned, x=0 since there was no previous value entered.
CTH2004 24 Feb, 2019 @ 10:56pm 
And, how does it come up with “x”?
CTH2004 24 Feb, 2019 @ 10:56pm 
Well, what do you think of that interesting desing used?