Space Engineers

Space Engineers

Not enough ratings
Custom Entity Spawner
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Block, Production, Other
File Size
Posted
Updated
1.120 MB
3 Jul, 2024 @ 2:43pm
16 Nov, 2024 @ 2:59pm
53 Change Notes ( view )

Subscribe to download
Custom Entity Spawner

In 2 collections by PepperJack
iSurvival
12 items
iSurvival - Nutrition Foods
10 items
Description
MAJOR FIX UPDATE 16 NOV 2024
Non-Ore items are now rounded up to the next whole number when using or spawning. This ensures partial amounts are accounted for properly while avoiding resource waste. No more fractions of consumable items!!
Prevented removal of required items if the inventory is full and spawning cannot proceed.
Each instants of the block now has its own timer. The timer now starts when spawning conditions are met!!

Make your own spawners by simply putting a CES.ini file inside your Data folder! It will show up in this mods storage folder!
can use my iSurvival - Nutrition - Farms for example.


The Custom Entity Spawner mod for Space Engineers automates the spawning of entities and items around specific block types,


NOTE: commands not working on servers yet.. Working on it!
In-game admin commands
"/pepco help - Displays this help message.",
"/pepco CES reload - Reloads the Custom Entity Spawner settings.",
"/pepco CES list - Lists all blocks and their spawn settings.",
"/pepco kill <EntityName|all> [Radius] - Kills entities by name or all entities within a radius.",
"/pepco cleanup dead - Cleans up dead entities.",
"/pepco show all - Shows all entities.",
"/pepco spawn <BotID> - Spawns a bot with the specified ID.",
"/pepco listBots - Lists all valid bot IDs.",
"/pepco logging - Enable debug logging",
"/pepco pause - pause script"


Create spawners using the storage/CustomEntitySpawner.ini

; ======================
; HOW TO USE GlobalConfig.ini
; =====================
Global Config Settings
BaseUpdateInterval: This defines the interval for the main update cycle in ticks. The value 60 means the update cycle runs every 60 ticks (which is roughly equivalent to 1 second in-game time). Adjust this value to control how often the mod checks and processes spawning logic.
EnableLogging: When set to true, this enables logging of the mod's activities. Logs are saved to a file and some messages may also be displayed in-game. This is useful for debugging and understanding the mod's behavior.
CleanupInterval: Interval for cleaning up dead entities in ticks. (0 disables cleanup)
GlobalMaxEntities: Maximum number of entities allowed in the world. Required items will be lost if set higher than the server's max entities setting.


; =======================
; HOW TO USE CustomEntitySpawner.ini
; ========================
Block Settings
BlockId: Specifies the unique identifier for the block.
BlockType: Specifies the type of block for which this configuration applies.
Enabled: Specifies whether this configuration is active. (true or false)
PlayerDistanceCheck: Maximum distance from a player for spawning entities.

Entity Spawning Settings
EnableEntitySpawning: Specifies whether entities should be spawned.
EntityID: Specifies the ID of the entities to spawn.
MinEntityAmount: Minimum number of entities to spawn when conditions are met.
MaxEntityAmount: Maximum number of entities to spawn when conditions are met.
MaxEntitiesInArea: Maximum number of entities allowed in the area for spawning.
MaxEntitiesRadius: Radius within which the MaxEntitiesInArea limit is checked.

Item Spawning Settings
EnableItemSpawning: Specifies whether items should be spawned.
ItemTypes: Specifies the types of items to spawn.
ItemIds: Specifies the IDs of the items to spawn.
MinItemAmount: Minimum number of items to spawn when conditions are met.
MaxItemAmount: Maximum number of items to spawn when conditions are met.
UseWeightedDrops: Determines if the number of items spawned should use weighted probabilities.
StackItems: Specifies whether items should be stacked when spawned.
SpawnInsideInventory: Specifies whether items should be spawned inside the inventory of the block.
SpawnItemsWithEntities: Specifies whether items should be spawned only when an entity is spawned.

Environmental Conditions
DamageAmount: Amount of damage to apply to the block each time entities are spawned.
MinHealthPercentage: Minimum health percentage the block must have to allow spawning.
MaxHealthPercentage: Maximum health percentage the block can have to allow spawning.
MinHeight: Minimum height offset for spawning entities.
MaxHeight: Maximum height offset for spawning entities.
MinRadius: Minimum radius for spawning entities around the block.
MaxRadius: Maximum radius for spawning entities around the block.
SpawnTriggerInterval: Interval in update ticks for triggering entity spawn.
EnableAirtightAndOxygen: Determines if airtight and oxygen levels are considered for spawning.

Required Items for Spawning (to be removed)
RequiredItemTypes: Specifies the types of items required in the inventory for spawning (to be removed).
RequiredItemIds: Specifies the IDs of the required items (to be removed).
RequiredItemAmounts: Specifies the amounts of the required items (to be removed).

Permanent Required Items for Spawning (not removed)
PermanentRequiredItemTypes: Specifies the types of items required in the inventory for spawning (not removed).
PermanentRequiredItemIds: Specifies the IDs of the permanent required items (not removed).
PermanentRequiredItemAmounts: Specifies the amounts of the permanent required items (not removed).

Required Entities in the Vicinity for Spawning
RequiredEntity: Specifies the entity type required in the vicinity for spawning.
RequiredEntityRadius: Radius within which the required entity must be present.
RequiredEntityNumber: Number of required entities needed for spawning.
RequireEntityNumberForTotalEntities: Determines if the required entity number is for the total entities.
MaxEntitiesInArea: Maximum number of entities allowed in the area for spawning.
Water settings
EnableWaterAPI: <true|false>
MinWaterDepth: negative numbers for above water
MaxWaterDepth: negative numbers for above water




  • Add entity death check in vicinity of block to spawn items.
  • Add voxel detection checks
  • Add Item spawning to this mod.
  • Add entity radius checking for spawning. So you can set limits and requirements.
  • Add CleanupInterval to globalconfig.ini current hard coded to 3 seconds…
  • Code cleanup
  • detect max number of entities around block
  • Check out the iSurvival Collection for other addons.
  • Have an idea? let us know via Discord!




Discord[discord.gg]



This workshop item cannot be redistributed without explicit permission.
This item is not authorized for posting on Steam, except under the Steam accounts named PepperJack & Uzar.

Thank you Space Engineers community for being awesome. Special thanks to Math, enenra, Chipstix213, Malware, Digi, whiplash141, archan79, Krynoc, humanoid.mp4 and all the others who make modding fun.
19 Comments
PepperJack  [author] 18 Feb @ 7:31pm 
Galax, yes, can add as many as you want
Galax 16 Feb @ 9:44pm 
Great, can I define more spawning options in one CES.ini file? I want to create a mod which creates space zombies and skeletons next to all beds and / or lockers...
PepperJack  [author] 15 Feb @ 5:53am 
Awesome! I can’t wait to try it out
Galax 14 Feb @ 10:52pm 
I have made a few more too, but this is my first real mod with CES.
https://sp.zhabite.com/sharedfiles/filedetails/?id=3427615853
Galax 1 Feb @ 12:24am 
okay, I have found the problem and made the first succesful tests! Great mod!!!
by the way, at BlockType no Definition at the end...
PepperJack  [author] 30 Jan @ 5:49am 
Also see if it’s being loaded by using /pepco CES list
PepperJack  [author] 30 Jan @ 5:47am 
If you are not making a mod to be uploaded you need to modify the CustomEntitySpawner.ini file with your block. It’s in the storage folder of the save/server folder
Galax 30 Jan @ 4:35am 
okay, I have made a CES.ini it looks better, the mod sees it, but there is no spawn... I have made a

[LargeBlockBatteryBlockWolfSpawn]
BlockId=LargeBlockBatteryBlock
BlockType=MyObjectBuilder_BatteryBlockDefinition
Enabled=true

; PlayerDistanceCheck is the maximum distance from a player for spawning entities.
PlayerDistanceCheck=20

; Entity spawning settings
EnableEntitySpawning=true
EntityID=Wolf
MinEntityAmount=1
MaxEntityAmount=4

entry, everything else is set to false but nothing happens if I near a Large Battery...
PepperJack  [author] 26 Jan @ 12:50pm 
It should work on servers. Just not all the commands.
Galax 25 Jan @ 10:57pm 
Hi, you wrote; chat commands does not work on servers... but the mod does? I would like to use it on my dedicated server? is there a problem?