Forts
Not enough ratings
(asca) steps to power
   
Award
Favorite
Favorited
Unfavorite
Mods: Mod, Misc
Vanilla
File Size
Posted
Updated
347.295 KB
5 Jan, 2023 @ 1:53am
5 Jan, 2023 @ 5:20am
10 Change Notes ( view )

Subscribe to download
(asca) steps to power

Description
NOTE: Mod NOT finished yet! Update is on the way and it will be shown on stream in the near future at
https://www.twitch.tv/dergoldjungelive/

The idea is:
A player has to use it's phone as a step counter. The number of steps is send into the game and converted into energy production. The default energy production for this player is disabled (but not for the others in the lobby). So he has to constantly do a little bit sport when he wants energy ;-)
E.g. for using a tread mill or stepper.



There is a python script you have to execute. This will start a local webserver. Then you use your smartphone and open this website in the mobile browser. In this website is a step counter base on the gyroscope web api. So when you walk e.g. on a treadmill or step machine it will send every noticed step back to the webserver. The webserver updates every second how many step events are registered and puts this value in a set.lua file.
The mod is reading every 25 frames (each second) this lua file. "reading" = it uses "AddStrings" and checks which value between 0-50 is set (content of the set.lua is: steps2power = { steps<0-50> = L"dummy" }). And every check all Strings are cleared before.
This way the step count between 0-50 is shared from the web app into the forts mod.

This value is then send to all client for the specific teamId, so it will calculate every frame based on the registered steps in the last second how many energy the player will get.
And of cause, normal energy production is disabled for this specific player - every frame it calculates based on the build devices (core, turbine, …) and their efficiency how many energy has to be subtracted. So without any step, the energy production is an equal 0.
5 Comments
MilΩMeg4 10 Jan, 2023 @ 9:32am 
my worst nightmare
Latrei 10 Jan, 2023 @ 4:57am 
Thanks! :D
That's a very cool mod, it's gonna make for some fun content :)
Enjoy!
ⓐⓢⓒⓐ™  ⸻⸻⸻  ☃  [author] 9 Jan, 2023 @ 7:25pm 
I've updated the mod description
Scier 6 Jan, 2023 @ 8:54am 
Dark_slayer3000 nobody will know :/
Latrei 6 Jan, 2023 @ 2:14am 
What does it do?