

PhysicsLib - Solid boats and entities
This mod implements a long awaited feature - solid entities!

Description
<p>After many moons of coding to determine how on earth player motion is controlled by vintage story, i present to you PhysicsLib - Solid Entities.</p> <p> </p> <p>On its own, solid entities only makes the vanilla sailboat walkable, but it opens the door for any modder to patch existing entities or implement their own with solid collisions!</p> <p> </p> <p><strong>Mods Currently leveraging PhysicsLib:</strong></p> <p> </p> <div class="spoiler"> <div class="spoiler-toggle">Spoiler!</div> <div class="spoiler-text"> <p>VS Airships</p> <p>Shipwrights</p> </div> </div> <p> </p> <p> </p> <p><strong>How does it work?</strong></p> <p> </p> <p>Physics lib is simple, it implements 1 entity behaviour which can be patched onto existing entities, or leveraged directly within mods - behaviour code: "dynamic-physics".</p> <p>With this one entity behaviour attached, every cube in the shape file of the model will be used to build up a dynamic collision box for the shape of the entity, and then caches it to be reused for every instance of that model.</p> <p> </p> <p>In order to prevent EVERY cube being used, wildcard selection can be used against the cubes of the model.<br><br><br></p> <p><strong>(For Modders/Asset creators) How to set it up for your own entities, or patch existing ones:</strong></p> <p> </p> <ol> <li>Remove the ellipsoidalrepulseagents from the entity(if present, <strong>otherwise your fancy new solid entities will be pushed away from your own hitbox</strong>)</li> <li>Add the physicslib behaviour with code "dynamic-physics" to both the client and server behaviours of the entity.</li> <li>Optionally, supply a "selectors": [] object with a list of selectors for the list of cubes in the model youd like included in collision.</li> </ol> <p> </p> <p><strong>Example Patch for the vanilla sailboat, the first 2 sections remove ellipsoidrepulseagents behaviour, the next 2 add the behaviour to client and server:</strong></p> <pre> </pre> <div class="spoiler"> <div class="spoiler-toggle">Spoiler!</div> <div class="spoiler-text"> <pre>[ { "file": "game:entities/nonliving/boat-sailed", "op": "remove", "path": "/server/behaviors/0" }, { "file": "game:entities/nonliving/boat-sailed", "op": "remove", "path": "/client/behaviors/0" }, { "file": "game:entities/nonliving/boat-sailed", "op": "addmerge", "path": "/server/behaviors", "value": [ { "code": "dynamic-physics", "selectors": [ "ORIGIN/ORIGIN-Section1/*", "ORIGIN/ORIGIN-Section2/*", "ORIGIN/ORIGIN-Prow/*", "ORIGIN/ORIGIN-Prow2/GunwhaleS4/*", "ORIGIN/ORIGIN-Prow2/GunwhaleN4/*", "ORIGIN/ORIGIN-Prow2/ProwFloorS6/*", "ORIGIN/ORIGIN-Prow2/ProwFloorN5/*" ] } ] }, { "file": "game:entities/nonliving/boat-sailed", "op": "addmerge", "path": "/client/behaviors", "value": [ { "code": "dynamic-physics", "selectors": [ "ORIGIN/ORIGIN-Section1/*", "ORIGIN/ORIGIN-Section2/*", "ORIGIN/ORIGIN-Prow/*", "ORIGIN/ORIGIN-Prow2/GunwhaleS4/*", "ORIGIN/ORIGIN-Prow2/GunwhaleN4/*", "ORIGIN/ORIGIN-Prow2/ProwFloorS6/*", "ORIGIN/ORIGIN-Prow2/ProwFloorN5/*" ] } ] } ]</pre></div></div>
Download
No download link is available for this entry right now.
Ratings & reviews
Sign in to leave a rating or comment.

