Space Engineers

Space Engineers

Not enough ratings
[Dawese] Roleplay Lockpicking
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Block, Script
File Size
Posted
Updated
1.956 MB
21 Mar @ 5:37am
13 Jul @ 8:24am
4 Change Notes ( view )

Subscribe to download
[Dawese] Roleplay Lockpicking

Description
!!! BETA-VERSION (STABLE) !!!

!!! CONTAINS API FOR INTEGRATION IN OWN MODS !!!

Description
This mod allows you to place or find special freight containers, which can be locked or unlocked by lockpicking them!

The lockpicking is done by solving a little role-playing minigame.

Tired of going to space for platin and uranium? Find it in little chunks in loot boxes anywhere (if you embed it into your mod)!

Loot can contain: Platin, gold, silver, uranium, space credits.

Primarily made for my roleplay mission mod: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3458555164

Features
  • A new block "Lockpickable Freight" which can be placed by the player on large grids or can be spawned by the API in your own mod.
  • Custom terminal actions embedded into the original system of SE.
  • Random generated loot if the block is created by the API and not by the player.
  • Help dialog containing a guide how to lockpick the lock.

How to use
  1. Open the terminal of any "Lockpickable Freight" block.
  2. Access the terminal of the block to lock or unlock its inventory.
  3. Close and reopen the terminal/inventory after lockpicking the freight to get access to the inventory.

Known bugs
  • -

Future features
  • No more reopening the terminal for accessing the loot.

API class for integrating the spawning in your mod

using System.Collections.Generic; using Sandbox.ModAPI; using VRageMath; namespace Dawese_Roleplay_Lockpicking { public class DaweseRoleplayLockpickingModApi { /// <summary> /// Spawns a lockpickable freight containing generated loot.<br/><br/> /// Example with loot table content string "pgssuc":<br/><br/> /// The used characters in the loot table string describe the possible items of the loot. <br/> /// 'p'= 1 Platinum ingot<br/> /// 'g'= 1 Gold ingot<br/> /// 's'= 2 Silver ingot<br/> /// 'u'= 1 Uranium ingot<br/> /// 'c'= 5000-7000 Space credits<br/> /// <br/> /// The amount of the used characters describe the chance that the item is generated.<br/> /// Examples: "pgsuc" puts everything equally into a bucket - 20% chance for each item. "pppuu" puts 60% platinum and 40% gold into a bucket.<br/><br/> /// /// The variables minLootStacks and maxLootStacks determine how often the system is grabbing into the bucket for getting loot items.<br/><br/> /// </summary> /// <param name="spawnPosition">Describes the spawn position.</param> /// <param name="minLootStacks">Minimum amount of generated stacks for loot.</param> /// <param name="maxLootStacks">Maximum amount of generated stacks for loot.</param> /// <param name="lootTable">Describes the loot table as string.</param> /// <param name="appendedToBattery">Appends the block to a battery block so it doesn't get removed by the games trash removal.</param> /// <param name="factionOwnerTagKey">The tag of the owner faction.</param> public static void spawnLockpickableFreight( Vector3D spawnPosition, int minLootStacks, int maxLootStacks, string lootTable, bool appendedToBattery = false, string factionOwnerTag = null) { Dictionary<string, object> payload = new Dictionary<string, object> { { spawnPositionKey, spawnPosition }, { minLootStacksKey, minLootStacks }, { maxLootStacksKey, maxLootStacks }, { lootTableKey, lootTable }, { appendedToBatteryBlockKey, appendedToBattery }, { factionOwnerTagKey, factionOwnerTag } }; MyAPIGateway.Utilities.SendModMessage(modIdForMessageApi, payload); } public static void spawnLockpickableFreight(Vector3D spawnPosition) { spawnLockpickableFreight(spawnPosition, 3, 6, "ppggssuucccc", false, null); } public static void spawnLockpickableFreightWithBattery(Vector3D spawnPosition, string factionOwnerTag) { spawnLockpickableFreight(spawnPosition, 3, 6, "ppggssuucccc", true, factionOwnerTag); } //=========================================== // Don't touch. ;) //=========================================== public const long modIdForMessageApi = 3448904606; public const string spawnPositionKey = "spawnPositionKey"; public const string minLootStacksKey = "minLootStacksKey"; public const string maxLootStacksKey = "maxLootStacksKey"; public const string lootTableKey = "lootTableKey"; public const string appendedToBatteryBlockKey = "appendedToBatteryBlockKey"; public const string factionOwnerTagKey = "factionOwnerTagKey"; } }


Mod License

License Terms

1. Usage Rights
- The use of this mod is permitted under the conditions of this license.

2. Restrictions
- **No Reupload**: It is not allowed to reupload this mod, neither in its original nor in a modified form.
- **No False Authorship**: This mod may not be claimed as your own work.
- **Integration into Other Mods**: If this mod is integrated into or used as part of another mod, the original creator must be clearly credited and linked.
- **Intellectual Property**: The entire content of this mod is and remains the intellectual property of the original creator.
- **No Commercial Use**: It is not allowed to make money in any way using this mod.
- **Content Utilization**: Any utilization of the contents of this mod is only permitted if explicitly acknowledged. The original creator remains the intellectual property owner of this API as well.

3. Disclaimer
- This mod is provided without any warranties. The creator is not liable for any damages that may arise from its use.

---
© [2025] [Dawese / not4you403 / clickbait_virus]
3 Comments
not4you403  [author] 19 Jul @ 2:36am 
@S Boogy:
Thank you, glad to hear that!
Good idea to implement it as small grid.
The battery is necessary because the original game thinks, "oh that block has no logic and is to far away, it must be trash so I'm gonna delete it".
It's a separate grid so it can spawn on top or in a prefab at a random point.

I'm going to think about that. Small grid version is very good, because it's harder to find then! The drop pod idea is great too.

Kind regards!
S Boogy 18 Jul @ 6:57pm 
Thanks for tweaking this, glad these are spawning with your mission mod.

an observation/feedback: when the lootboxes spawn its literally just a non-static large grid battery and a crate(unless another mod i'm using is interfereing, haven't tested that yet). It works but it can look silly sometimes. have you thought about small grid implementation?

You could probably re-skin lockable crates to use barrels or other small grid containers then the mod could implement drop pods that deploy once the mission is completed with the mission rewards and a little bonus? just a thought if that fits in to the vision of your mod, could be more immersive vs spawning rewards in inventory. Otherwise, great work on the mod and glad it works with the missions :)
not4you403  [author] 13 Jul @ 9:02am 
New release out there. The API changed a little bit.