SEED - Usage: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Tels (talk | contribs)
m formatting
Tels (talk | contribs)
m add links
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==


{{infobox|Note: '''It is recommended that you read the pages about [[LOD]] and [[SEED]] first.'''}}
{{infobox|Note: '''It is recommended that you read the pages about [[LOD]] and [[SEED]] first!'''}}


The SEED System (available in TDM from v1.04 on) enables you to overcome the built-in entity limit, as well as randomly generate entities. But since the system is new and it might still be unclear on how and when to use it, this page provides a few real-map scenarios with examples:
The SEED System (available in TDM from v1.04 on) enables you to overcome the built-in entity limit, as well as randomly generate entities. But since the system is new and it might still be unclear on how and when to use it, this page provides a few real-map scenarios with examples:
Line 35: Line 35:


<pre>
<pre>
"remove"         "1"          // remove the SEED entity after spawning the entities
"remove"           "1"          // remove the SEED entity after spawning the entities
"max_entities"   "4"
"max_entities"     "4"
"spawn_class"   "atdm:moveable_food_apple"
"template"         "atdm:moveable_food_apple"
"spawn_count"    "3"
"template_count"    "3"
"spawn_skin"    "tdm_fruit_brownish"
"template_skin"    "tdm_fruit_brownish"
"spawn_class_1" "atdm:moveable_food_pear"
"template_1"       "atdm:moveable_food_pear"
"spawn_count_1"  "2"
"template_1_count"  "2"
</pre>
</pre>


This would spawn at most 3 apples and at most 2 pears, but overall not more than 4 entities. Remember to make the SEED space big enough so that all to-be spawned entities will fit!
This would spawn at most 3 apples and at most 2 pears, but overall not more than 4 entities. Remember to make the SEED space big enough so that all to-be spawned entities will fit!


See [[SEED - Spawnargs#spawn_class.2Fspawn_count.2Fspawn_skin|here]] for more details.
See [[SEED - Templates via Spawnargs]] for more details.


{{infobox|Do not confuse spawn_class with spawnclass, this will make the SEED stop working!}}
{{infobox|Do not confuse spawn_class with spawnclass, this will make the SEED stop working!}}
Line 56: Line 56:
In this scenario you can use the SEED system as an entity manager. Just tell it to not take it's targets as entity templates to create new entities, but instead as the class of already existing entities it should watch. All the entities inside the SEED area of the given class will then be added under control of the SEED, so they just keep their positions, rotation and skin, but they get potentially hidden and removed/respawned when nec. Best of both worlds.
In this scenario you can use the SEED system as an entity manager. Just tell it to not take it's targets as entity templates to create new entities, but instead as the class of already existing entities it should watch. All the entities inside the SEED area of the given class will then be added under control of the SEED, so they just keep their positions, rotation and skin, but they get potentially hidden and removed/respawned when nec. Best of both worlds.


Create a copy of one of your existing entities, target it from your SEED and put the following spawnarg this entity:
Just target one of your existing entities from your SEED by selecting first the SEED, then selecting the target, then pressing {{CTRL}}+{{key|K}}) and put the following spawnarg this entity:


<pre>
<pre>
  "seed_watch_brethren" "1"
  "seed_watch_brethren" "1"
</pre>
</pre>
See [[SEED - Watching entities|this article]] for a longer explanation with images and reasons why to use this.


=== Generate Huge Scenes ===
=== Generate Huge Scenes ===


{{red|Section not done yet}}
{{red|Section not done yet}}
=== Add Detail depending on the Level of Detail ===
Examples:
* http://forums.thedarkmod.com/topic/12107-announcement-seed-system/page__view__findpost__p__286786
* http://forums.thedarkmod.com/topic/12107-announcement-seed-system/page__view__findpost__p__286825


=== TODO ===
=== TODO ===
Line 72: Line 81:
* more clear instructions
* more clear instructions


== See also ==
{{seed}}
 
* [[LOD]] - Level of Detail System
* [[SEED]] - System for Environmental Entity Distribution
 
{{editing}}

Latest revision as of 11:13, 9 November 2014

Introduction

Note: It is recommended that you read the pages about LOD and SEED first!

The SEED System (available in TDM from v1.04 on) enables you to overcome the built-in entity limit, as well as randomly generate entities. But since the system is new and it might still be unclear on how and when to use it, this page provides a few real-map scenarios with examples:

Usage cases

Random Loot Generator

Place a small SEED entity (atdm:SEED) in your map, plus three loot entities. Target these from the SEED and set the following spawnargs (enter them in DR without the quotes!) on the SEED:

 "max_entities" "1"
 "remove"       "1"

This means all the loot entities will be of the same probability, but only one of them will ever be generated. Also, the "remove 1" means the SEED will remove itself after spawning the other entity.

Note: Players expect that the loot in a map is stable, e.g. when they play it again, they get the same amount of loot from the same places. While you can break this expectation f.i. by randomly spawning a loot piece in different places, having different loot pieces in the 'same' place might confuse people. To avoid this, make the loot amount on all the entities targeted by this SEED the same, but choose different entities (like a bottle of wine, a statue and a plate).

Random Decorator

Just like in the loot case, place your SEED entity, target the entities, and set their seed_score spawnargs to the wanted distribution, then either set density or max_entities on the SEED. Useful for:

  • putting in random crates, barrels and junk into basements
  • decorating a field with flowers
  • putting in glasses and bottles on a shelf

etc.

You'll find some pre-made entities for spawning random food, junk or other things under Darkmod/Randoms inside the DarkRadiant menu "Create entity" accessible with Click the right mouse button.

Note: When building such things by yourself, it it more efficient to use the following spawnargs on the SEED to avoid having to place entities first:

"remove"            "1"           // remove the SEED entity after spawning the entities
"max_entities"      "4"
"template"          "atdm:moveable_food_apple"
"template_count"    "3"
"template_skin"     "tdm_fruit_brownish"
"template_1"        "atdm:moveable_food_pear"
"template_1_count"  "2"

This would spawn at most 3 apples and at most 2 pears, but overall not more than 4 entities. Remember to make the SEED space big enough so that all to-be spawned entities will fit!

See SEED - Templates via Spawnargs for more details.

Do not confuse spawn_class with spawnclass, this will make the SEED stop working!

Overcome the entity limit

Suppose you have already placed manually a few hundred or even thousand entities in your map, and start to run into the entity limit. Or, if you have hundreds of entities under the LOD system, their thinking uses up time.

In this scenario you can use the SEED system as an entity manager. Just tell it to not take it's targets as entity templates to create new entities, but instead as the class of already existing entities it should watch. All the entities inside the SEED area of the given class will then be added under control of the SEED, so they just keep their positions, rotation and skin, but they get potentially hidden and removed/respawned when nec. Best of both worlds.

Just target one of your existing entities from your SEED by selecting first the SEED, then selecting the target, then pressing CTRL+K) and put the following spawnarg this entity:

 "seed_watch_brethren" "1"

See this article for a longer explanation with images and reasons why to use this.

Generate Huge Scenes

Section not done yet

Add Detail depending on the Level of Detail

Examples:

TODO

  • Screenshots
  • example maps
  • more clear instructions