Giter Club home page Giter Club logo

plantpack's Introduction

PlantPack

A collection of trees and dynamic plants. In combination with ChangingBlocks they grow over time or change in other ways.

Plants

The plants are divided into 2 types:

  1. Crops
  2. Trees

Crops are able to grow (change texture) over time and they can have several stages of growth. Crops are similar to a normal block. Trees, however, do not have the capability to slowly grow over time that crops have. They are usually a structure, composed of many blocks.

Creating a New Crop

For examples of existing crops, check out assets/blocks/crop & assets/prefabs/crop

Prefab File

To start making a new crop you need to decide how many stages of growth you want to have, then create a prefab file to indicate those stages.

Here is an example of a crop with 7 stages:

{
  "ChangingBlocks": {
      "blockFamilyStages": [
          { "key": "PlantPack:Corn1", "value": 30000 },
          { "key": "PlantPack:Corn2", "value": 30000 },
          { "key": "PlantPack:Corn3", "value": 30000 },
          { "key": "PlantPack:Corn4", "value": 30000 },
          { "key": "PlantPack:Corn5", "value": 30000 },
          { "key": "PlantPack:Corn6", "value": 30000 },
          { "key": "PlantPack:Corn7", "value": 30000 }
      ],
      "loops": false
    }
}

Each line in blockFamilyStages indicates a growth stage for the crop, and the number next to it represents the growth time it requires. The loops property indicates whether or not the plant should loop the growth stages after the initial growth finishes.

After you finish making the stages, you MUST remember the name of those stages so that you can create the .block file for each stage.

Block File

After you finished the prefab file, you need to create a .block file for each growth stage. All .block files are located in assets/blocks/crop.

Here is an example of a .block file for a crop:

{
    "author": "metouto",
    "basedOn": "CoreAssets:plant",
    "entity": {
        "prefab": "PlantPack:Corn",
        "keepActive": true
    }
}

Make sure you type-in the prefab in the .block file in accordance to the name of the prefab that you made.

Texture Files

After creating the prefab and block files, you also need to create the texture for each of the crop growth stages. All texture files (.png) for crops are located at assets/blockTiles/crop/. Make sure you name these texture files in accordance to the growth stages that you want to assign them to.

Developing With PlantPack

PlantPack assets can bring a good addition to world generation modules, you can utilize the plants that this module have to spice up the world that your module generates.

A good example would be, AnotherWorld module that works together with AnotherWorldPlant that utilizes PlantPack assets.

plantpack's People

Contributors

cervator avatar esapetri avatar jdrueckert avatar josharias avatar marcinsc avatar qwertygiy avatar rzats avatar shartte avatar skaldarnar avatar smsunarto avatar xrtariq2594 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plantpack's Issues

Rename items.png to fruits.png

This one depends a bit on the further usage of PlantPack and whether Farming will be seperated. If we keep just one icon atlas items is fine, but with several icon atlas files it would make sense to have proper labels.

Icon Assets

I thought about this for some days now, and finally I want to come up with a discussion how to handle this topic.

Currently, only assets that are very general for plants are stored in this module (i.e. only icons for fruits are in here, but not for flour, ...). Any further processed items are defined by other modules, e.g. WaS defines cookedCorn and so on.
As much as I like this separation of the actual items as objects, thinking from the art point of view a lot of the used icons can be re-used by other modules.

Therefore, I would like to have sets/groups of icons in this module:

  • Corn, corn flour
  • wheat, straw, white flour
  • ...

Please let me hear what you think about this, @MarcinSc, @esapetri, @Cervator.

Tree trunks use always default trunk texture

code atm makes all tree trunks look same not depending on which species it is, when growth from sapling. Also when growth from sapling tree trunk height is 1 and after it is only leafs.

Remove empty DropGrammars

There are a couple of (block) prefabs which are basically empty, except for an empty DropGrammar. I'm wondering what it is used for, and whether it can be removed (without changing the current behavior/semantics).

One example can be found in NapierBase.prefab.

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.