Difference between revisions of "Modding Flora"

From UnReal World Wiki
Jump to: navigation, search
(Flowers)
(Roots)
Line 158: Line 158:
  
 
=== Roots ===
 
=== Roots ===
 +
 +
Properties pertaining to roots of a plant.
 +
 +
[ROOT_SIZE: XS S M L]
 +
 +
The size (weight) of harvestable roots.
 +
 +
[ROOT_QUANTITY: value]
 +
 +
The number of roots produced by a single plant.
 +
 +
[ROOT_USE: cooked flour]
 +
 +
If "cooked" is present, the root must be boiled before eating.  If "flour" is present, the root may be ground to produce flour.
  
 
=== Spawning ===
 
=== Spawning ===

Revision as of 07:36, 4 September 2017

Flora (plant) files can be modified as well, either to change the properties of existing wild and cultivated plants, or to add completely new ones to the game.


File structure

There are five pre-existing files of flora in the vanilla game:

flora_berries.txt               - Vanilla berries
flora_cultivated.txt            - Vanilla crops
flora_herbs.txt                 - Vanilla herbs
flora_mushroom.txt              - Vanilla mushrooms
flora_newherbs.txt              - More vanilla herbs

As with crafting recipes, new plants can be added to the game by adding a new text file with the flora_ prefix to the game directory. This will make the plant available to the game but not necessarily spawn it within pre-existing game worlds.

Each new flora_*.txt file can have any number of flora definitions to be added to the game. Each definition consists of a header line followed by a number of property lines, separated by an empty line between different flora definitions. After the final definition, there must be a single line containing only

-end 

Headline

The first line of the flora definition contains basic information about the type of plant: the name of the plant, the type of plant, the maximum number of plants per tile, and a few other things.

Name

The name of the plant comes first, flanked by a pair of periods, just like for crafting recipes. This is how the plant will show up when seen growing on the map.

Max Count

In parentheses after the name is the maximum number of plants per tile. For plantable and cultivatable flora, the actual number of plants per tile depends both on this and on your Agriculture skill.

Type

The type of plant can be one of:

grain
grass
root
pod
mushroom
berry

A single type must be chosen and placed in the header line flanked by square braces.

Full details of how these types work has not yet been determined, but type affects the names and kinds of products produced as well as some changes to the behavior of plants. For example, [berry] plants cannot be harvested, merely gathered, leaving the bare plant behind.

More research is needed on these types:

  • Do the types affect use in other crafting recipes? (e.g., mushroom, berry, root, etc.)
  • Are custom types possible? (likely for use in other recipes)
  • Exactly how do types affect names and types of products produced when gathering or threshing?
  • Are multiple types possible? (only a single type is used in all vanilla definitions)

Other

There are several other possible entries in the header line.

First, deprecated graphics definitions can be found in many vanilla files as, e.g., :148:. These are not necessary and use of the TILEGFX property is preferred.

Second, some vanilla recipes for crops have %100% in the header file. It is not clear what this means --- perhaps by analogy to general crafting recipes, it is a skill modifier for Agriculture.

Third, in vanilla, hemp has [thresh] in addition to its standard type as a grass. Again, it's not clear how this impacts the behavior or properties of the plant.

Properties

All other properties of the plant are modified by lines following the header line, one line per property. Known properties that can be set are shown here. Every property is set as

[PROPERTY: value]

Or for properties which can have multiple values:

[PROPERTY: value1 value2]

Basic Properties

[NAME: value]

The name of the harvested item. In most cases will be the same as the name of the plant, but can be different.

[TILEGFX: value]

The name of the graphic image to be used for the plant. See the readme.txt in the truetile folder for information on how to create this image file.

[SIZE: S M L]

Not yet determined in detail; appears to affect the weight of berries/harvestable item produced.

[QUANTITY: value]

Number, the mean number of berries/harvestable items produced per plant. Some variability is possible.

Growth

These properties determine when the plant goes through its various stages of growth. For months, use the numerical value of the month. There will be some randomness, within a few weeks of when set.

[SPROUT: value]

The month the plant can be planted or will sprout.

[MATURE: value]

The number of days the plant takes to mature.

[WITHER: value]

The month in which the plant will wither.

[FLOWERING_PERIOD: value]

The month in which the plant will flower.

Seeds

These properties can be set for flora which you would like to bear seeds (and thus be plantable using Agriculture). Extractable from the plant through harvesting and then threshing.

[SEED_VOLUME: pinch bunch fistful]

The descriptor for a unit of seeds. Appears to merely be cosmetic.

[SEED_SIZE: S M L]

The size (weight) of seeds produced by the plant.

[SEED_QUANTITY: value]

The number of seeds produced by the plant.

Leaves

These properties can be set for plants which you would like to have gatherable or harvestable leaves. Young leaves can be collected from immature plants, or mature plants can be harvested and threshed.

[LEAF_VOLUME: pinch bunch fistful]

The descriptor for a batch of leaves gathered from a plant. Cosmetic.

[LEAF_SIZE: S M L]

The size (weight) of a batch of leaves.

[LEAF_QUANTITY: value]

The number of batches of leaves gathered from a single plant.

Flowers

These properties can be set for plants which you would like to have gatherable or harvestable flowers.

[FLOWER_VOLUME: pinch bunch fistful]

The descriptor for a batch of flowers gathered from a plant. Cosmetic.

[FLOWER_SIZE: S M L]

The size (weight) of a batch of flowers.

[FLOWER_QUANTITY: value]

The number of batches of flowers gathered from a single plant.

Roots

Properties pertaining to roots of a plant.

[ROOT_SIZE: XS S M L]

The size (weight) of harvestable roots.

[ROOT_QUANTITY: value]

The number of roots produced by a single plant.

[ROOT_USE: cooked flour]

If "cooked" is present, the root must be boiled before eating. If "flour" is present, the root may be ground to produce flour.

Spawning

Culinary

Knowledge

Herbal Properties

Reference