Code Monkey home page Code Monkey logo

pilespilespiles's Introduction

Goose_Piles

A library mod for adding in Json extensibility for adding Coal-style Piles to Vintage Story. This can be achieved entirely with a regular content mod for vintage story, comprising only of Json files.

This library adds the following relevant classes: BlockPile, BlockEntityPile, & BehaviorPileItem.

The process of implementing a new pile is as follows:

  1. Create a blocktype json with the class: BlockPile and the entityClass: BlockEntityPile

  2. (optional) Add attributes to define the pile rules, if not specified default values for all will be used instead.

  • These values are as follows:

    "attributes":
    {
       "addItemLabel" : "String" or "LangKey",
       "removeItemLabel": "String" or "LangKey",
       "defaultAddQuantity": Integer (default: 2),
       "defaultTakeQuantity": Integer (default: 2),
       "bulkTakeQuantity": Integer (default: 4),
       "maxStackSize": Integer (default: 16),
       "interactSoundPath" : "domain:pathToSound",
       "allowUnstablePlacement": true/false (default: false)
    }
    
  1. Create a patch to add BehaviorPileITem to the behaviors array (or create one if not present) of desired pileable item
  • Specifcy behaivor property "pileBlockCode":"domain:NEWPILEBLOCK" where NEWPILEBLOCK is the code of the blocktype created above.

This is the entire process of creating a new pile.

Some notes about variant piles and texture, this library will support items to create piles by wildcard by changing the NEWPILEBLOCK code to the corresponding variant. An example of this would be grain piles including a variant {type}, a grainPile block can be created as "domain:grainPile-{type}" in the property. The grainPile blocktype should have a corresponding set of variants.

Piles also support normal simple block-texutre assignment, including specifying a texture perface/direction and altering the texture path by variant group.

Examples can be found with the default Rot, Salt, and Grain Piles added.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.