Modding:Encounters and Population: Difference between revisions

Jump to navigation Jump to search
m
code formatting; add cleanup template; minor editing
m (clarifying +XML)
m (code formatting; add cleanup template; minor editing)
Line 1: Line 1:
{{stub}}[[Category:Modding]]{{Modding Info}}
{{stub}}[[Category:Modding]]{{Modding Info}}
There are two primary population systems in Caves of Qud, the legacy EncounterTables.xml system, and the ZoneTemplates.xml+PopulationTables.xml system. EncounterTables is older and we prefer to use zone templates + population tables these days, but much of the game is still populated via EncounterTables.xml.
There are two primary population systems in Caves of Qud, the legacy <code>EncounterTables.xml</code> system, and the <code>ZoneTemplates.xml</code>+<code>PopulationTables.xml</code> system. Encounter tables are an older system and we prefer to use zone templates + population tables these days, but much of the game is still populated via <code>EncounterTables.xml</code>.


Like ObjectTables, EncounterTables.xml supports Load="Merge" in the object root tag. This will append entries to that particular table instead of overwriting.
Like ObjectTables, <code>EncounterTables.xml</code> supports <code>Load="Merge"</code> in the object root tag. This will append entries to that particular table instead of overwriting.


PopulationTables currently do not support XML modding, but many zone template encounters draw objects from dynamically created population tables. Check out the following tags in ObjectBlueprints.xml to see them in use: DynamicObjectsTable, ExcludeFromDynamicEncounters. Some dynamic population tables are created based on the base type of the object, so new objects will begin appearing immediately in areas generated with dynamic population tables unless they are tagged with ExcludeFromDynamicEncounters.
Population tables currently do not support XML modding, but many zone template encounters draw objects from dynamically created population tables. Check out the following tags in <code>ObjectBlueprints.xml</code> to see them in use: <code>DynamicObjectsTable</code>, <code>ExcludeFromDynamicEncounters</code>. Some dynamic population tables are created based on the base type of the object, so new objects will begin appearing immediately in areas generated with dynamic population tables unless they are tagged with <code>ExcludeFromDynamicEncounters</code>.


The unaffiliated cave systems are the only areas currently heavily populated with the template+population system.
The unaffiliated cave systems are the only areas currently heavily populated with the template+population system.


== Extending Encounter Tables ==
== Extending Encounter Tables ==
You may add new entries to existing encounter tables by including encountertables.xml in your mod, using an existing table name and setting the Load="Merge" property on the encountertable tag.
You may add new entries to existing encounter tables by including <code>EncounterTables.xml</code> in your mod, using an existing table name and setting the <code>Load="Merge"</code> property on the encountertable tag.


'''Adding "My New Ammo" to the "Ammo 1" built-in encounter table'''
'''Adding "My New Ammo" to the "Ammo 1" built-in encounter table'''
Line 23: Line 23:


== Additional Info ==
== Additional Info ==
Here's a thread on Steam where I discuss using encounter and population tables: http://steamcommunity.com/app/333640/discussions/3/358415738194955181/
{{Cleanup |The information from the Steam thread needs to be integrated into this article.}}
Here's a thread on Steam where Brian discusses using encounter and population tables: http://steamcommunity.com/app/333640/discussions/3/358415738194955181/


==Modifying Existing Populations==
==Modifying Existing Populations==

Navigation menu