SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Back to NxLabs

NxLabs / Vintage Story

Attribute Rendering Library

DBy DanaCraluminum

Implements highly optimized attribute-based variant system for rendering things

Description

<div style="font-family: verdana, geneva, sans-serif; color: #333333; text-align: left;"><div style="background: linear-gradient(to bottom, #a0c4ff 50%, #ffffba 50%); padding: 20px; border-radius: 10px; border: 1px solid #dcdcdc; margin-bottom: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.1);"><p style="margin-top: 0; font-weight: bold; font-size: 1.2em; color: #333;">I live in Ukraine and there is a war going on right now.</p> <p style="margin-bottom: 0; color: #333;">If you are enjoying my mods, you can support me on Patreon. Any help is appreciated!</p> </div> <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 25px;"><a style="display: flex; align-items: center; text-decoration: none; color: #333; background-color: #e6efff; border: 1px solid #b0d4de; padding: 12px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: background-color 0.2s;" href="https://www.patreon.com/craluminum2413"> <img style="width: 40px; height: 40px; margin-right: 15px;" src="https://i.imgur.com/NQ9BHHF.png" alt="Patreon"> <span style="font-size: 16pt; font-weight: bold;">Patreon</span> </a> <a style="display: flex; align-items: center; text-decoration: none; color: #333; background-color: #e6efff; border: 1px solid #b0d4de; padding: 12px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: background-color 0.2s;" href="https://discord.com/invite/FeZN4gqjek"> <img style="width: 40px; height: 40px; margin-right: 15px;" src="https://i.imgur.com/hbs3hRb.png" alt="Discord"> <span style="font-size: 16pt; font-weight: bold;">Discord</span> </a> <a style="display: flex; align-items: center; text-decoration: none; color: #333; background-color: #e6efff; border: 1px solid #b0d4de; padding: 12px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: background-color 0.2s;" href="https://www.nuget.org/packages/CraluminumMods.VintageStory.AttributeRenderingLibrary"> <img style="width: 40px; height: 40px; margin-right: 15px; border-radius: 4px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/NuGet_project_logo.svg/960px-NuGet_project_logo.svg.png?20200213201929" alt="NuGet"> <span style="font-size: 16pt; font-weight: bold;">NuGet</span> </a> <a style="display: flex; align-items: center; text-decoration: none; color: #333; background-color: #e6efff; border: 1px solid #b0d4de; padding: 12px; border-radius: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); transition: background-color 0.2s;" href="https://github.com/Craluminum-Mods/AttributeRenderingLibrary/wiki"> <img style="width: 40px; height: 40px; margin-right: 15px; border-radius: 4px;" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c2/GitHub_Invertocat_Logo.svg/1280px-GitHub_Invertocat_Logo.svg.png" alt="GitHub"> <span style="font-size: 16pt; font-weight: bold;">Documentation</span> </a></div> <h2 style="color: #333; border-bottom: 2px solid #b0d4de; padding-bottom: 10px;">Frequently Asked Questions</h2> <div style="background-color: #e6efff; padding: 20px; border-radius: 10px; border: 1px solid #b0d4de; margin-bottom: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.05);"> <div style="background-color: #ffffff; padding: 15px; border-radius: 8px; border: 1px solid #c0c0c0; margin-bottom: 15px;"> <p style="margin: 0; font-weight: bold;">Q: What does it do?</p> <p style="margin: 5px 0 0 0;">A: The library implements highly optimized attribute-based variant system for rendering things. It is very efficient way to add thousands of variants for any item or block.</p> <p style="margin: 10px 0px 0px; padding-left: 40px;">In the base game, when block/item adds insane variant combinations by using VariantGroups, it creates thousands of item IDs (1 item ID per variant).</p> <p style="margin: 10px 0px 0px; padding-left: 40px;">Each block/item ID creates new instance which affects RAM a lot and with thousands of item IDs it can take up to 20-30 minutes to just load into a world.</p> <p style="margin: 10px 0px 0px; padding-left: 40px;">By using this library, you can cut thousands of item IDs down into just 1-4 IDs per item!</p> </div> <div style="background-color: #ffffff; padding: 15px; border-radius: 8px; border: 1px solid #c0c0c0; margin-bottom: 15px;"> <p style="margin: 0; font-weight: bold;">Q: How will it help me?</p> <p style="margin: 5px 0 0 0;">A: Your mod would no longer take 20 minutes to load. You will be able to add infinitely more types than without it.</p> </div> <div style="background-color: #ffffff; padding: 15px; border-radius: 8px; border: 1px solid #c0c0c0; margin-bottom: 0;"> <p style="margin: 0; font-weight: bold;">Q: Does it change any code in the api/vanilla?</p> <p style="margin: 5px 0 0 0;">A: It has a few Harmony patches to make some features work.</p> </div> </div> <div style="background-color: #e6efff; padding: 20px; border-radius: 10px; border: 1px solid #b0d4de; margin-bottom: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.05);"><details style="cursor: pointer;"> <summary style="font-weight: bold; color: #333; outline: none; margin: 0; padding: 0;">Click to see (bad) example JSON code</summary> <div style="background-color: #ffffff; padding: 15px; border-radius: 8px; border: 1px solid #c0c0c0; cursor: default; margin-top: 10px;"> <p style="margin: 0 0 10px 0; color: #333;">If your modded block/item looks like that, then you need to use this library in your mod as soon as possible!</p> <pre style="background-color: #fffde7; color: #333; padding: 10px; border-radius: 5px; overflow-x: auto; font-family: 'Courier New', monospace; font-size: 0.9em; border: 1px solid #ddd; margin: 0;"><code>"variantgroups": [ { "code": "wood", "states": ["pine", "acacia", "birch", "baldcypress", "ebony", "kapok", "larch", "maple", "oak", "purpleheart", "redwood", "rottenebony", "walnut" ] }, { "code": "metal", "states": ["copper", "iron", "steel", "tinbronze" ... ] }, { "code": "glass", "states": ["red", "green", "yellow", "white", "b

Ratings & reviews

No ratings yet

Sign in to leave a rating or comment.