Space Engineers

Space Engineers

Not enough ratings
Offline Production Bonus (BB)
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Production
File Size
Posted
Updated
1.177 MB
10 Aug, 2022 @ 11:09am
1 Jan @ 10:13am
86 Change Notes ( view )

Subscribe to download
Offline Production Bonus (BB)

In 1 collection by BookBurner
Maintained/Created by BookBurner
21 items
Description
What is this?

Server Only, does't do anything for local games

What this mod does is track player's offline/online state and assign points to each offline player. These points add up to three days worth. Points are counted globally per player, not per production block.

Players can then toggle the function in whitelisted blocks (see Config.xml) to add 20x speed bonus while consuming 20 points per second. Players can therefore produce stuff faster and there is no incentive to AFK around their base when it should be frozen/concealed, thus reducing their performance impact. It also balances out production for players that can't be present as often as others.

If a block can't perform it's action, either production queue is done or refinery is empty, the bonus will be autoamticaly turned off.

Why does it exist?

We wanted to improve performance for active players. So we whipped up this to reduce/remove an incentive for inactive players to camp around their bases, activating refineries. Those blocks are then concealed/frozen and performance is better for everyone else.


Admin commands

/ob add steamid amount - adds X offline points from specific player
/ob remove steamid amount - removes X offline points from specific player

Configuration

Config.xml contains three sections

<Blocks>
which contains allowed block subtypes, the mod can only handle assembler/refinery types. Gas generators can be added as well, but keep in mind that vanilla large H2/O2 generator should be configured as "OxygenGeneratorLarge".

<string>LargeRefinery</string>


<Upgrades>
list of possible speed modules with the amount of speed increase they do. Also block subtypes. If you use any custom speed modules, list them here and set proper value.

this means, vanilla speed module, 100% speed increase
<string>LargeProductivityModule;1</string>

Other Configuration
<MaximumPoints>518400</MaximumPoints> - how much offline points can be stored for players
<PointsPerSecond>2</PointsPerSecond> - how much is assigned per second offline

Points

Players points are stored server side in the OfflinePoints.xml file, this file is updated on every save and loaded on start. The structure is thus:

<PlayerPoints>
<PointItem>
<PlayerId>144115188075855930</PlayerId>
<Points>2072</Points>
</PointItem>
</PlayerPoints>

and can be edited while the server is shut down. I might add some commands in the future. But we don't need them on our server :).


Disclaimer

- Use this mod in any way you like, you can reverse engineer it, rewrite it w-e. I don't care :D. I myself looked at bunch of other code from various mods to find out the way of writing this.

- The config contains some blocks and speed upgrades I could remember and that we use ourselves. You can add your own once the config is generated on the first start with the mod included. Those changes will take effect on the next restart.

- If you want to report any bugs, just create a new discussion topic, and add dedicated server + keen logs. (at least the errors)

If you have further questions, you can visit my discord: https://discord.gg/6Gd6W8TcJb
Popular Discussions View All (1)
0
22 Aug, 2022 @ 2:23am
PINNED: Bugs
BookBurner
4 Comments
BookBurner  [author] 19 Sep, 2023 @ 4:40am 
Yeah, I set the defaults to "what we use" :D I am lazy
DRAKCORE 18 Sep, 2023 @ 8:32am 
Nice, can see the tiered items are already added to the string list.
BookBurner  [author] 18 Apr, 2023 @ 7:15am 
The script is limited to dedicated servers, it should not run it's server side properly in local game, even in multiplayer one.
TurbogamerXD3 18 Apr, 2023 @ 5:54am 
As it doesn't work on local games, what is with local multiplayer games?
Would it work for a player who joins my local session?