Modding Plants

From UnReal World Wiki
Revision as of 00:34, 28 November 2018 by Petike (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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. It appears to default to "grass" if no other type is chosen. This type affects the names and kinds of products produced as well as some changes to the behavior of plants.

  • Berries are gathered directly by picking up in the square with the berry plant. This produces a fistful of berries per plant, and no harvesting or threshing is possible. The berry plant remains in place to be harvested next year.
  • Mushrooms act similarly to berries, except that the mushroom is removed entirely from the square on gathering.
  • Roots and pods are gatherable directly, producing just the roots or pods of the plant. They can also be harvested with [Agriculture] and threshed, which can produce additional items.
  • Grains and grasses must be harvested and threshed to produce the grain/seed. Flowers and leaves of these plants may also be gathered directly.

These types affect how parts of these plants can be used in other crafting recipes. The following keywords can be used to denote specific kinds of plant parts:

  • [Mushrooms] refers to the product of any mushroom-type plant.
  • [Berries] refers to the product of any berry-type plant.
  • [Vegetables] refers to roots or pods gathered from root or pod-type plant or harvested from any kind of root or pod-producing plant.
  • [Pods] refers to pods gathered or harvested from a pod-type plant.
  • [Grains] refers to grains harvested and threshed from a grain-type plant.
  • [Grasses] refers to the harvested but not yet threshed raw plant from a grass-type plant.
  • [Seasoning] refers to the seeds, leaves or flowers gathered or harvested from any kind of plant.
  • [Herbs] refers to the leaves or flowers gathered or harvested from any kind of plant.
  • [Seeds] refers to the seeds harvested from a grass or root-type plant.
  • [Flowers] refers to the flowers gathered or harvested from any kind of plant.

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. For berries, for example, the plant will be "berry bush" while the name will be "berries".

[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]

Affects the weight of berries/harvestable items produced. Defaults to 'M'. Exact weight depends on the type of plant:

For berries:

  • S: 0.05 lb per fistful of berries
  • M: 0.10 lb per fistful of berries
  • L: 0.20 lb per fistful of berries

For mushrooms:

  • S: 0.1 lb per mushroom
  • M: 0.2 lb per mushroom
  • L: 0.4 lb per mushroom

For pods:

  • S: 0.038631 lb per fistful of pods or raw pod plant
  • M: 0.077263 lb per fistful of pods or raw pod plant
  • L: 0.154525 lb per fistful of pods or raw pod plant

For roots:

  • S: 0.165563 lb per root or raw root plant
  • M: 0.331126 lb per root or raw root plant
  • L: 0.662252 lb per root or raw root plant

For grains and grasses:

  • S: 0.25 lb per raw plant
  • M: 0.50 lb per raw plant
  • L: 1.00 lb per raw plant
[QUANTITY: value]

Modifies the average numbers of items produced per plant, with substantial variation. Defaults to 1. Only effective for some types of plants. Appears to be impacted by Agriculture or other character skill.

Affects berries and pods.

Does not affect mushrooms, roots, grasses, or grains.

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 fistful]

The descriptor for a unit of seeds. Modifies the total weight of seeds produced by the plant. Defaults to fistful.

[SEED_SIZE: S M L]

The size (weight) of seeds produced by the plant. Defaults to M. The weight of seeds produced is:

  • pinch, S: 0.007358 lbs
  • fistful, S: 0.022075 lbs
  • pinch, M: 0.036792 lbs
  • pinch, L: 0.044150 lbs
  • fistful, M: 0.110375 lbs
  • fistful, L: 0.132450 lbs

Does not appear to affect the weight of grains produced, which is always 0.110375 lbs (whether as a fistful or as a pinch).

[SEED_QUANTITY: value]

The number of units of seeds produced by the plant. Defaults to 1.

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

Properties that control where and how the plant spawns.

[REGION: eastern western northern southern]

Broad regions of the world where the plant may spawn in the wild.

[CULTIVATED: eastern western northern southern]

Regions of the world where the plant may be found cultivated in settlements. May also be "all" or any of the three-letter tribe abbreviations.

[TERRAIN: value1 value2]

Terrain types in which the plant can grow. See the reference section for possible terrain types.

[SYMBIOSIS: value]

If present, the plant must grow next to this type of tile. See the reference section for an (incomplete) list of possible symbiosis.

[POPULATION: value]

The average number of plants found in a cluster.

[FREQUENCY: value]

The maximum number of plants found in a single zoomed-in tile.

[COMMONNESS: value]

Number. The likelihood of a single zoomed-in tile of the appropriate kind containing this plant, as a percentage.

Culinary

These properties affect the nutrition of the parts of the plant.

[CARB: value]
[FAT: value]
[PROTEIN: value]
[WATER: value]

The percent by weight of carbohydrates, fat, protein, and water for the plant. Defines the nutrition for both the raw harvested plant as well as all gatherable or harvestable parts of the plant.

[NOSEED_NUTRITION: value]

A number that modifies the nutritional values of any non-seed products of the plant (flowers, leaves, and roots). Results are integers, rounded up. For example, for a plant with CARB: 40 and NOSEED_NUTRITION: 0.2, the seeds of the plant will have the defined carbohydrate content, but the leaves and flowers will be less nutritious, with only 8% carbohydrate.

Knowledge

[HERB_KNOWN: value1 value2]
[HERB_COMMON: value1 value2]

Values here can be the general eastern/northern/western/southern, "all", or any of the three-letter tribal abbreviations. Appears to impact which tribes are familiar with which plants. Exact differences between these properties have not yet been determined.

Herbal Properties

Properties that add various effects when eating the plant. See Herbs for a list of possible effects.

[EFFECT_RAW: value1 value2]
[EFFECT_BOILED: value1 value2]
[REMOVE_BOILED: value1 value2]

EFFECT_RAW determines effects when raw. When boiled, either of the two other properties can be used. REMOVE_BOILED simply keeps all raw effects except those listed, while EFFECT_BOILED defines a new set of effects that are used when boiled, without reference to the raw effects.

Reference

TERRAIN

TBD

SYMBIOSIS

TBD