05-19-2006, 01:00 PM
Terrain Encounter Areas
by SephirothSpawn
Version: 1
Mar 19 2006
by SephirothSpawn
Version: 1
Mar 19 2006
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given.
No support is given.
Introduction
Lets you define encounter groups based off the terrain tags
Features
- Set Terrain Tags to have defaults
- Different Terrain Tags for each map id (Optional)
Script:
Terrain_Encounters.txt (Size: 3.19 KB / Downloads: 1)
Instructions
Place the script below the SDK, and above Main
Setting Default Encounter Groups (Global)
Find the line DEFAULT_TERRAIN_TAG_GROUPS = {
Below that, define a terrain tag, and a encounter group of all the troop id's allowed in this area.
Code:
Basic Syntax: terrain_value = [troop_id, ... ]
Example:
DEFAULT_TERRAIN_TAG_GROUPS = {
0 => [1, 2],
1 => [3, 4],
2 => [5, 6],
3 => [7, 8],
4 => [9, 10],
5 => [11, 12],
6 => [13, 14],
7 => [15, 16]
}
Any undefined terrain tags, will result in the Random Encounters Setup under Map Properties
Setting Map Dependent Terrain Groups
Find this line MAP_DEFINED_TAG_GROUPS = {
Below that, deine a mpa id, then terrain tag and encounter group
Code:
Basic Syntax: map_id = > {terrain_tag => [troop_id, ...] }
Example:
MAP_DEFINED_TAG_GROUPS = {
1 => {
0 => [],
1 => [4, 7],
6 => [1, 6]
},
2 => {
1 => [2, 5]
},
}
Any Undefined Terrain Tags in this, will rely on the defaults.
How it works
- Gets Random Encounter from Map Properties
- Checks for default terrain tag for player (Changes Encounter Group if Terrain Defined)
- Checks for Map ID defined
(If It Is)
- Checks for terrain tag for player (Changes Encounter Group if Terrain Defined)
- Pics new troop
FAQ
None Thus Far
Compatibility
SDK Compliant & Compatable
Author's Notes
Enjoy!