Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Terrain Encounter Areas
#1
Terrain Encounter Areas
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.


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:
.txt   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
Any Empty Arrays will then rely on the previos default

FAQ

None Thus Far

Compatibility

SDK Compliant & Compatable

Author's Notes

Enjoy!
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Common Event on Terrain Tag mudgolem 0 2,141 03-26-2006, 01:00 PM
Last Post: mudgolem
  Variable Encounter Rate Mystinar 0 1,967 10-03-2005, 01:00 PM
Last Post: Mystinar
  Encounter Bar makeamidget 0 2,176 05-27-2005, 01:00 PM
Last Post: makeamidget



Users browsing this thread: