Carrying Crate SENTs

If you liked this item, please rate it up on Steam Workshop page.

Authors: Octo, Geemar

Last revision: 26 Feb, 2023 at 02:16 UTC

File size: 10.25 MB

On Steam Workshop

Description:

This addon adds several scripted entities that act as storage for props and other entities. Pressing the use key on a crate will secure all contents within it, and pressing the use key on it again will release it. Some crates can lose their loads when tipped too far. This addon has wiremod support, with an input that acts like using the entity, and one as output for checking if it is currently holding something. Crates will not attempt to pick up anything constrained to them nor things parented to them/anything they are parented to. And yes, crates can hold other crates with stable behavior. Picking up complex contraptions, like acf vehicles, is perfectly stable, though there can be unwanted physics engine side effects when they are released again. I am currently investigating this, but it never causes server slowdowns nor crashes.

There is a customizable crate entitiy as well, though it is currently in development. It is stable, but just lacks some quality of life features. Right now their size limits are 512 units, but soon I will add a console variable to allow users to change that limit, as well as add indication as to how large the area is with a wireframe box outline.

If you are looking to add your own crates, feel free to decompile the .gma, and inside the lua folder is a template.lua file with everything you need to make your own crates, as well as the ones in this addon as examples in case you get lost.

Truck beds, dumpster, and shipping container models by Geemar. Everything else by me, Octo.

List of serverside console variables:

Variable
Default Value
Minimum Value
Maximum Value
Description

carrying_crate_max_connected_ents
6
1
65535
The number of entities connected to a secured prop that will also be parented to the crate. Good for controlling performance, as large contraptions will cause lag spikes when parented all at once. Some contraptions are not physically stable when being unloaded.

carrying_crate_force_mass_accumulation
0
0
2
0 = Entity’s choice. 1 = Force mass acumulation for all crates. 2 = Disable mass accumulation for all crates. This determines if the crate’s physical weight is changed to equal its contents, since parenting removes physics.

carrying_crate_force_content_validation
0
0
2
Content validation checks to see if the prop trying to be carried has its center of mass within the crate boundaries. If it is not then it will not be carried. 0 = Entity’s choice. 1 = Force content validation for all crates. 2 = Disable content validation for all crates.

If you liked my addon, be sure to rate it up so more people notice it and consequently help me improve it further!