Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plantlife_modpack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
plantlife_modpack
Commits
13534d16
Commit
13534d16
authored
12 years ago
by
Vanessa Ezekowitz
Browse files
Options
Downloads
Patches
Plain Diff
Explained a few of the spawn abm's defaults
parent
0f25c621
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
API.txt
+14
-4
14 additions, 4 deletions
API.txt
with
14 additions
and
4 deletions
API.txt
+
14
−
4
View file @
13534d16
...
...
@@ -19,6 +19,9 @@ of variables:
spawn_on_surfaces = function(sdelay, splant, sradius, schance, ssurface,
savoid, seed_diff, lightmin, lightmax, nneighbors, ocount)
The first several of these are all required, and are from the last version of
the flowers mod, so this part of the API should be the same as before.
sdelay: The value passed to the ABM's interval parameter, usually in the
1000-3000 range.
splant: The node name of the item to spawn (e.g. "flowers:flower_rose").
...
...
@@ -38,21 +41,28 @@ ssurface: Table with the names of the nodes on which to spawn the plant in
when to execute the ABM.
savoid: Table with a list of groups and/or node names to avoid when
spawning the plant, such as {"group:flowers","default:tree"}.
From here down are several optional parameters. You can use as many as you
need, but you must specify them in order (so if you want lightmax, you need
lightmin and seed_diff also, but not the rest).
seed_diff: The perlin seed difference value passed to the
minetest.env:get_perlin() function. Used along with the global
perlin controls below to create the "biome" in which the plants
will spawn. Usually a value of somewhere in the 10 to 100 range
is good.
is good.
Defaults to 0 if not provided
lightmin: Minimum amount of light necessary to make a plant spawn. Defaults
to
zero
.
to
0
.
lightmax: Maximum amount of light present to allow a plant to spawn.
Defaults to the engine's MAX_LIGHT value of 14.
nneighbors: Table with a list of neighboring nodes, passed to the ABM as the
"neighbors" parameter, indicating what needs to be next to the
node the plant is about to spawn on, such as
{"default:stone","default:water_source"}.
{"default:stone","default:water_source"}. Defaults to the value
of ssurface if not provided.
ocount: There must be at least this many of the above neighbors around the
node the plant is about to spawn on for it to happen.
node the plant is about to spawn on for it to happen. Defaults to
0.
-----
The second function, grow_plants() is defined like so:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment