1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  5. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  8. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Stealth System

Submitted by streetpunk
This bundle is marked as approved. It works and satisfies the submission rules.
Stealth System designed to make player units able to see and detect only what is front of them

GUI Stealth system, useful for many styles of maps.

Requirements:
° Unit Indexer (already included on the map);
° UNITDATA Hashtable with all melee player races' unit's sight range stored (You need to add the data of neutral and your custom units to the hashtable)

How to add unit data to the hashtable:
  • Events
  • Conditions
  • Actions
    • -------- PEASANT --------
    • Set UNITDATA_UnitType = Peasant
    • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
    • Hashtable - Save 800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
    • Hashtable - Save 500 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
    • -------- This will save 800 as the Peasant's Sight Radius (day) and 500 as the Peasant's Sight Radius (night) on our hashtable. --------


Pros:
° New combat perspective for both melee and custom game playability;

Cons:
° Using the action
  • Melee Game - Use melee time of day (for all players)
will cause the system to stop working.
° Normal vision on cliffs

Credits:
°Bribe (Unit Indexer)

Changelog:
° Version 1.00
*Launched

°Version 1.01
* Changed UNITDATA to configuration and removed attack range values;
* Destroyed the temp group and removed the leaks;
* Version number attached;
* Vision Adjust trigger is now configurable in the STESYS Pre Config trigger;
* Removed "GUI Faction System" which was mistankenly placed because I used the same description template as I did on my "Faction System";
* The system works well with both trigger/player set time of day and also works with moonstone;

° Version 1.02:
* Sight Ability is now set to a variable, as sugested by @KILLCIDE;
* StealthVision trigger was also set to a variable;
* Added spy demo

  • Read me
    • Events
    • Conditions
    • Actions
      • -------- Hello this is my stealth system --------
      • -------- First you need to know that using the action: --------
      • Melee Game - Use melee time of day (for all players)
      • -------- Will cause the system to stop working --------
      • -------- ---------------------------------------- --------
      • -------- It is necessary that you use the following functions to add the unit's sight range value into the UNITDATA Hashtable --------
      • -------- Example: --------
      • -------- PEASANT --------
      • Set UNITDATA_UnitType = Peasant
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 500 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- This will save 800 as the Peasant's Sight Radius (day) and 500 as the Peasant's Sight Radius (night) on our hashtable. --------


Code
UNIDATA Hash
  • UNITDATA Hashtable Values
    • Events
    • Conditions
    • Actions
      • -------- ----------------------------------------------------------------------------- --------
      • -------- -----------------------------------------------------------------------------HUMAN --------
      • -------- ----------------------------------------------------------------------------- --------
      • -------- UNITS --------
      • -------- PEASANT --------
      • Set UNITDATA_UnitType = Peasant
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 500 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- - --------
      • -------- FOOTMAN --------
      • Set UNITDATA_UnitType = Footman
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- KNIGHT --------
      • Set UNITDATA_UnitType = Knight
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- RIFLEMAN --------
      • Set UNITDATA_UnitType = Rifleman
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- MORTAR TEAM --------
      • Set UNITDATA_UnitType = Mortar Team
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 1200 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- FLYING MACHINE --------
      • Set UNITDATA_UnitType = Flying Machine
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 1100 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- GRYPHON RIDER --------
      • Set UNITDATA_UnitType = Gryphon Rider
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 900 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- PRIEST --------
      • Set UNITDATA_UnitType = Priest
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- SORCERER --------
      • Set UNITDATA_UnitType = Sorceress
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- SIEGE ENGINE --------
      • Set UNITDATA_UnitType = Siege Engine
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- SPELL BREAKER --------
      • Set UNITDATA_UnitType = Spell Breaker
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- DRAGONHAWK RIDER --------
      • Set UNITDATA_UnitType = Dragonhawk Rider
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 900 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- HEROES --------
      • -------- PALADIN --------
      • Set UNITDATA_UnitType = Paladin
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- ARCHMAGE --------
      • Set UNITDATA_UnitType = Archmage
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- MONTAIN KING --------
      • Set UNITDATA_UnitType = Mountain King
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- BLOOD MAGE --------
      • Set UNITDATA_UnitType = Blood Mage
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- SPECIAL (HUMAN) --------
      • -------- SIEGE ENGINE (BARRAGE) --------
      • Set UNITDATA_UnitType = Siege Engine (Barrage)
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- MILITIA --------
      • Set UNITDATA_UnitType = Militia
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- WATER ELEMENTAL 1 --------
      • Set UNITDATA_UnitType = Water Elemental (Level 1)
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1200 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- WATER ELEMENTAL 2 --------
      • Set UNITDATA_UnitType = Water Elemental (Level 2)
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- WATER ELEMENTAL 3 --------
      • Set UNITDATA_UnitType = Water Elemental (Level 3)
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- PHOENIX --------
      • Set UNITDATA_UnitType = Phoenix
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 900 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- ---- --------
      • -------- PHOENIX EGG --------
      • Set UNITDATA_UnitType = Phoenix Egg
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 600 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- ----------------------------------------------------------------------------- --------
      • -------- -----------------------------------------------------------------------------ORC --------
      • -------- ----------------------------------------------------------------------------- --------
      • -------- UNITS --------
      • -------- PEON --------
      • Set UNITDATA_UnitType = Peon
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 600 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- GRUNT --------
      • Set UNITDATA_UnitType = Grunt
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- RAIDER --------
      • Set UNITDATA_UnitType = Raider
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- TAUREN --------
      • Set UNITDATA_UnitType = Tauren
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- HEADHUNTER --------
      • Set UNITDATA_UnitType = Troll Headhunter
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- DEMOLISHER --------
      • Set UNITDATA_UnitType = Demolisher
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 1200 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- KODO BEAST --------
      • Set UNITDATA_UnitType = Kodo Beast
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- WIND RIDER --------
      • Set UNITDATA_UnitType = Wind Rider
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- TROLL BATRIDER --------
      • Set UNITDATA_UnitType = Troll Batrider
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 1400 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- TROLL WITCH DOCTOR --------
      • Set UNITDATA_UnitType = Troll Witch Doctor
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- SHAMAN --------
      • Set UNITDATA_UnitType = Shaman
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- SPIRIT WALKER --------
      • Set UNITDATA_UnitType = Spirit Walker
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- HEROES --------
      • -------- BLADEMASTER --------
      • Set UNITDATA_UnitType = Blademaster
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- FAR SEER --------
      • Set UNITDATA_UnitType = Far Seer
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- TAUREN CHIEFTAIN --------
      • Set UNITDATA_UnitType = Tauren Chieftain
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- SHADOWHUNTER --------
      • Set UNITDATA_UnitType = Shadow Hunter
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- ----------------------------------------------------------------------------- --------
      • -------- -----------------------------------------------------------------------------UNDEAD --------
      • -------- ----------------------------------------------------------------------------- --------
      • -------- ACOLYTE --------
      • Set UNITDATA_UnitType = Acolyte
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 600 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- SHADE --------
      • Set UNITDATA_UnitType = Shade
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1900 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- GHOUL --------
      • Set UNITDATA_UnitType = Ghoul
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- ABOMINATION --------
      • Set UNITDATA_UnitType = Abomination
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- MEAT WAGON --------
      • Set UNITDATA_UnitType = Meat Wagon
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 1200 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- CRYPT FIEND --------
      • Set UNITDATA_UnitType = Crypt Fiend
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- GARGOYLE --------
      • Set UNITDATA_UnitType = Gargoyle
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- BANSHEE --------
      • Set UNITDATA_UnitType = Banshee
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- NECROMANCER --------
      • Set UNITDATA_UnitType = Necromancer
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- OBSIDIAN STATUE --------
      • Set UNITDATA_UnitType = Obsidian Statue
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1200 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- FROST WYRM --------
      • Set UNITDATA_UnitType = Frost Wyrm
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- HEROES --------
      • -------- DEATH KNIGHT --------
      • Set UNITDATA_UnitType = Death Knight
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- LICH --------
      • Set UNITDATA_UnitType = Lich
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- DREADLORD --------
      • Set UNITDATA_UnitType = Dreadlord
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- CRYPT LORD --------
      • Set UNITDATA_UnitType = Crypt Lord
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- ----------------------------------------------------------------------------- --------
      • -------- -----------------------------------------------------------------------------NIGHT ELF --------
      • -------- ----------------------------------------------------------------------------- --------
      • -------- WISP --------
      • Set UNITDATA_UnitType = Wisp
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1000 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 750 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- ARCHER --------
      • Set UNITDATA_UnitType = Archer
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- HUNTRESS --------
      • Set UNITDATA_UnitType = Huntress
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- DRYAD --------
      • Set UNITDATA_UnitType = Dryad
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- GLAIVE THROWER --------
      • Set UNITDATA_UnitType = Glaive Thrower
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 1200 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- HIPPOGRYPH --------
      • Set UNITDATA_UnitType = Hippogryph
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- HIPPOGRYPH RIDER --------
      • Set UNITDATA_UnitType = Hippogryph Rider
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- CHIMERA --------
      • Set UNITDATA_UnitType = Chimaera
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- DRUID OF THE TALON --------
      • Set UNITDATA_UnitType = Druid of the Talon (Night Elf Form)
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- DRUID OF THE CLAW --------
      • Set UNITDATA_UnitType = Druid of the Claw (Night Elf Form)
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1400 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- MONTAIN GIANT --------
      • Set UNITDATA_UnitType = Mountain Giant
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1200 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- FAERIE DRAGON --------
      • Set UNITDATA_UnitType = Faerie Dragon
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- HEROES --------
      • -------- KEEPER OF THE GROVE --------
      • Set UNITDATA_UnitType = Keeper of the Grove
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 900 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- PRIESTESS OF THE MOON --------
      • Set UNITDATA_UnitType = Priestess of the Moon
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- DEMON HUNTER --------
      • Set UNITDATA_UnitType = Demon Hunter
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------
      • -------- WARDEN --------
      • Set UNITDATA_UnitType = Warden
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • Hashtable - Save 1800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • Hashtable - Save 800 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
      • -------- ---- --------

  • STESYS Pre Config
    • Events
      • Game - UnitIndexEvent becomes Equal to 3.00
    • Conditions
    • Actions
      • Set UNITDATA_SIGHTDAY = 1
      • Set UNITDATA_SIGHTNIGHT = 2
      • Set STESYS_DefaultVision = 128
      • Set STESYS_PERIODIC_TIMEOUT = 0.33
      • Set STESYS_TimeDay = 6.00
      • Set STESYS_TimeNight = 18.00
      • Set STESYS_Trigger[1] = UNITDATA Hashtable Values <gen>
      • Set STESYS_Trigger[2] = STESYS Periodic <gen>
      • Set STESYS_Trigger[3] = STESYS Day and Night <gen>
      • Set STESYS_Trigger[4] = STESYS Vision Adjust <gen>
      • Set STESYS_SightAbility = STESYS_SightAbility
      • Hashtable - Create a hashtable
      • Set UNITDATA_Hash = (Last created hashtable)
      • Trigger - Run STESYS_Trigger[1] (ignoring conditions)
      • Trigger - Add to STESYS_Trigger[2] the event (Time - Every STESYS_PERIODIC_TIMEOUT seconds of game time)
      • Trigger - Add to STESYS_Trigger[3] the event (Game - The in-game time of day becomes Greater than STESYS_TimeDay)
      • Trigger - Add to STESYS_Trigger[3] the event (Game - The in-game time of day becomes Greater than STESYS_TimeNight)

  • STESYS Initialize
    • Events
      • Game - UnitIndexEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • -------- Here we add the unit to the group on which we will pick units to adjust it's vision --------
      • Set STESYS_Unit[1] = UDexUnits[UDex]
      • Unit Group - Add STESYS_Unit[1] to STESYS_CheckGroup
      • Trigger - Run STESYS Vision Adjust <gen> (ignoring conditions)
      • -------- -------------------------------------------- --------

  • STESYS Initialize 2
    • Events
      • Game - UnitIndexEvent becomes Equal to 3.00
    • Conditions
    • Actions
      • -------- Here we pick pre-placed units and adjust their vision --------
      • Set STESYS_TempGroup[1] = (Units in (Playable map area))
      • Unit Group - Pick every unit in STESYS_TempGroup[1] and do (Actions)
        • Loop - Actions
          • Set STESYS_Unit[1] = (Picked unit)
          • Trigger - Run STESYS_Trigger[4] (ignoring conditions)
      • Custom script: call DestroyGroup(udg_STESYS_TempGroup[1])
      • -------- -------------------------------------------- --------

  • STESYS Periodic
    • Events
    • Conditions
    • Actions
      • -------- We pick the units on the Assigned group --------
      • Unit Group - Pick every unit in STESYS_CheckGroup and do (Actions)
        • Loop - Actions
          • Set STESYS_Unit[1] = (Picked unit)
          • Set STESYS_TempInteger[1] = (Custom value of STESYS_Unit[1])
          • Set STESYS_TempBool[1] = (STESYS_Unit[1] is alive)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • STESYS_TempBool[1] Equal to True
            • Then - Actions
              • Set STESYS_TempPlayer = (Owner of STESYS_Unit[1])
              • -------- On the next functions we get the unit's value of SIGHT RADIUS from our UNITDATA Hashtable --------
              • -------- --------------------------------------------- --------
              • -------- UNITDATA Hashtable Functions --------
              • -------- --------------------------------------------- --------
              • Set UNITDATA_UnitType = (Unit-type of STESYS_Unit[1])
              • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
              • -------- --------------------------------------------- --------
              • -------- If it's day we pick the SIGHTDAY value, if it's night we use SIGHTNIGHT --------
              • Set STESYS_TempReal[0] = (In-game time of day)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • STESYS_TempReal[0] Greater than 6.00
                  • STESYS_TempReal[0] Less than 18.00
                • Then - Actions
                  • Set STESYS_TempReal[1] = (Real((Load UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger from UNITDATA_Hash)))
                • Else - Actions
                  • Set STESYS_TempReal[1] = (Real((Load UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger from UNITDATA_Hash)))
              • -------- Defining radius and locations for the visibility modifier --------
              • Set STESYS_TempReal[2] = (STESYS_TempReal[1] / 2.00)
              • Set STESYS_TempReal[3] = (Facing of STESYS_Unit[1])
              • Set STESYS_TempLoc[1] = (Position of STESYS_Unit[1])
              • Set STESYS_TempLoc[2] = (STESYS_TempLoc[1] offset by STESYS_TempReal[2] towards STESYS_TempReal[3] degrees)
              • Set STESYS_TempVis[STESYS_TempInteger[1]] = STESYS_TempVis1[STESYS_TempInteger[1]]
              • -------- Create a new visibility modifier in front of the unit --------
              • Visibility - Create an initially Enabled visibility modifier for STESYS_TempPlayer emitting Visibility from STESYS_TempLoc[2] to a radius of STESYS_TempReal[2]
              • Set STESYS_TempVis1[STESYS_TempInteger[1]] = (Last created visibility modifier)
              • -------- --------------------------------------------- --------
              • -------- Destroy the last one --------
              • Visibility - Destroy STESYS_TempVis[STESYS_TempInteger[1]]
              • Set STESYS_TempVis2[STESYS_TempInteger[1]] = STESYS_TempVis1[STESYS_TempInteger[1]]
              • -------- --------------------------------------------- --------
              • -------- --------------------------------------------- --------
              • -------- --------------------------------------------- --------
              • -------- --------------------------------------------- --------
              • -------- Create a new visibility modifier arround the unit --------
              • Set STESYS_TempVis3[STESYS_TempInteger[1]] = STESYS_TempVis4[STESYS_TempInteger[1]]
              • Visibility - Create an initially Enabled visibility modifier for STESYS_TempPlayer emitting Visibility from STESYS_TempLoc[1] to a radius of (Real(STESYS_DefaultVision))
              • Set STESYS_TempVis4[STESYS_TempInteger[1]] = (Last created visibility modifier)
              • -------- --------------------------------------------- --------
              • -------- Destroy the last one --------
              • Visibility - Destroy STESYS_TempVis3[STESYS_TempInteger[1]]
              • Set STESYS_TempVis5[STESYS_TempInteger[1]] = STESYS_TempVis4[STESYS_TempInteger[1]]
              • -------- --------------------------------------------- --------
              • -------- --------------------------------------------- --------
              • -------- Removing location leak --------
              • Custom script: call RemoveLocation(udg_STESYS_TempLoc[1])
              • -------- --------------------------------------------- --------
            • Else - Actions
              • -------- If the unit is dead it is then removed from our group and it's visibility modifier is destroyed --------
              • Unit Group - Remove STESYS_Unit[1] from STESYS_CheckGroup
              • Visibility - Destroy STESYS_TempVis1[STESYS_TempInteger[1]]
              • -------- --------------------------------------------- --------
  • STESYS Day and Night
    • Events
    • Conditions
    • Actions
      • -------- Here we adjust ALL unit's sight radius throught day/night cycle --------
      • Unit Group - Pick every unit in STESYS_CheckGroup and do (Actions)
        • Loop - Actions
          • Set STESYS_Unit[1] = (Picked unit)
          • Trigger - Run STESYS_Trigger[4] (ignoring conditions)
      • -------- ------------------------- --------

  • STESYS Vision Adjust
    • Events
    • Conditions
    • Actions
      • -------- --------------------------------------------- --------
      • -------- On this trigger we use the cumulative ability method to adjust the unit's vision using our custom ability based on goblin night scope --------
      • -------- --------------------------------------------- --------
      • -------- UNITDATA Hashtable Functions --------
      • -------- --------------------------------------------- --------
      • Set UNITDATA_UnitType = (Unit-type of STESYS_Unit[1])
      • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
      • -------- --------------------------------------------- --------
      • Set STESYS_TempReal[0] = (In-game time of day)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • STESYS_TempReal[0] Greater than STESYS_TimeDay
          • STESYS_TempReal[0] Less than STESYS_TimeNight
        • Then - Actions
          • Set STESYS_VisionInteger = (STESYS_DefaultVision - (Load UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger from UNITDATA_Hash))
        • Else - Actions
          • Set STESYS_VisionInteger = (STESYS_DefaultVision - (Load UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger from UNITDATA_Hash))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • STESYS_VisionInteger Greater than 0
        • Then - Actions
          • Set STESYS_Loop_Integer = ((STESYS_VisionInteger - (STESYS_VisionInteger mod 100)) / 100)
          • For each (Integer A) from 1 to STESYS_Loop_Integer, do (Actions)
            • Loop - Actions
              • Unit - Add STESYS_SightAbility to STESYS_Unit[1]
              • Unit - Set level of STESYS_SightAbility for STESYS_Unit[1] to 4
              • Unit - Remove STESYS_SightAbility from STESYS_Unit[1]
          • Set STESYS_VisionInteger = (STESYS_VisionInteger mod 100)
          • Set STESYS_Loop_Integer = ((STESYS_VisionInteger - (STESYS_VisionInteger mod 10)) / 10)
          • For each (Integer A) from 1 to STESYS_Loop_Integer, do (Actions)
            • Loop - Actions
              • Unit - Add STESYS_SightAbility to STESYS_Unit[1]
              • Unit - Set level of STESYS_SightAbility for STESYS_Unit[1] to 3
              • Unit - Remove STESYS_SightAbility from STESYS_Unit[1]
          • Set STESYS_VisionInteger = (STESYS_VisionInteger mod 10)
          • For each (Integer A) from 1 to STESYS_VisionInteger, do (Actions)
            • Loop - Actions
              • Unit - Add STESYS_SightAbility to STESYS_Unit[1]
              • Unit - Set level of STESYS_SightAbility for STESYS_Unit[1] to 2
              • Unit - Remove STESYS_SightAbility from STESYS_Unit[1]
        • Else - Actions
          • Set STESYS_VisionInteger = (0 - STESYS_VisionInteger)
          • Set STESYS_Loop_Integer = ((STESYS_VisionInteger - (STESYS_VisionInteger mod 100)) / 100)
          • For each (Integer A) from 1 to STESYS_Loop_Integer, do (Actions)
            • Loop - Actions
              • Unit - Add STESYS_SightAbility to STESYS_Unit[1]
              • Unit - Set level of STESYS_SightAbility for STESYS_Unit[1] to 7
              • Unit - Remove STESYS_SightAbility from STESYS_Unit[1]
          • Set STESYS_VisionInteger = (STESYS_VisionInteger mod 100)
          • Set STESYS_Loop_Integer = ((STESYS_VisionInteger - (STESYS_VisionInteger mod 10)) / 10)
          • For each (Integer A) from 1 to STESYS_Loop_Integer, do (Actions)
            • Loop - Actions
              • Unit - Add STESYS_SightAbility to STESYS_Unit[1]
              • Unit - Set level of STESYS_SightAbility for STESYS_Unit[1] to 6
              • Unit - Remove STESYS_SightAbility from STESYS_Unit[1]
          • Set STESYS_VisionInteger = (STESYS_VisionInteger mod 10)
          • For each (Integer A) from 1 to STESYS_VisionInteger, do (Actions)
            • Loop - Actions
              • Unit - Add STESYS_SightAbility to STESYS_Unit[1]
              • Unit - Set level of STESYS_SightAbility for STESYS_Unit[1] to 5
              • Unit - Remove STESYS_SightAbility from STESYS_Unit[1]
Previews
Contents

Stealth System v1.02 (Map)

Reviews
KILLCIDE
Neat system, but as Tank-Commander suggested, calling it Stealth System is extremely misleading. Something like "Vision System" or w/e would have been way better. Having to manually register ever unit's day and night vision will be tedious, but it can...
  1. ZiBitheWand3r3r

    ZiBitheWand3r3r

    Joined:
    Nov 21, 2012
    Messages:
    897
    Resources:
    15
    Maps:
    7
    Spells:
    8
    Resources:
    15
    I like this idea.
    However cliffs may be a problem:
    1.jpg

    and please consider use Unit Event which replaced UnitIndexer
    GUI Unit Event v2.3.0.0
     
    Last edited: Jun 28, 2017
  2. streetpunk

    streetpunk

    Joined:
    Oct 9, 2015
    Messages:
    721
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Should vision on cliffs be fog masked too ? Maybe I can come with something for a option to enable/disable this function.
     
  3. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,543
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Thanks for the submission to the spell section, this is a pretty neat system but there's a few things I wanted to point out:

    V1.0:
    - I'm not sure how appropriate the name "stealth system" is for this, given that nothing pertaining to stealth is involved, at most it's just a potential application for the system to be used in a stealth based map
    - The "UNITDATA Hashtable Values" is not as much a requirement of the system as the configuration of the system especially since it's a must for new units to have their data added to it, also why do unit attack ranges need to be stored in it?
    - You've forgotten to destroy your temp group in your last trigger so that's leaking
    - Please attach a version number to your system so we can keep track of changes made and make it easier to know which version we're reviewing
    - I presume the vision adjust trigger can be averted entirely if all units have their default day/night vision as 150? (this isn't an issue, just something I wanted to check, since all units need their vision added to the system manually it wouldn't be considered unreasonable to do that)
    - Your description has "GUI Faction System" in it, I assume this was left there by mistake
    - How does this interact with changing the time of day manually? such as use of a moonstone
    - Really units shouldn't be able to look up cliffs, but even if you leave this limitation in, it should be listed as such
    - You have a location leak in Temploc[1]
    • Set STESYS_TempLoc[1] = (Position of STESYS_Unit[1])
    • Set STESYS_TempLoc[1] = (STESYS_TempLoc[1] offset by STESYS_TempReal[2] towards STESYS_TempReal[3] degrees)

    Leaks, you will have to use a different location for the second - setting it to something else without destroying the first location causes a leak
     
  4. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,030
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Unless a script needs the specific extra features in Unit Event, it's unnecessary to change it in a demo map. I still use Unit Indexer a la carte in my demo maps because there's no need for the extras.
     
  5. streetpunk

    streetpunk

    Joined:
    Oct 9, 2015
    Messages:
    721
    Resources:
    2
    Spells:
    2
    Resources:
    2
    ° I decided to call it "Stealth System" because it adds a new strategy to the game, where you can take a enemy army by surprise if you come behind it;
    ° Changed UNITDATA to configuration and removed attack range values;
    ° Destroyed the temp group and removed the leaks;
    ° Version number attached;
    ° Vision Adjust trigger is now configurable in the STESYS Pre Config trigger;
    ° Removed "GUI Faction System" which was mistankenly placed because I used the same description template as I did on my "Faction System";
    ° The system works well with both player set time of day and moonstone;
    ° I'm working on something for the cliffs but I guess it's beyong my capabilities (I think I would need a pathability checker or something for that) also the cliff issue is listed on "cons" list;
    ° Fixed Location leak.


    Thanks for pointing that out! I like the "Unit Indexer" because it's a single trigger (easy to CnP) and because of it's simplicity.
     
    Last edited: Jul 4, 2017
  6. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,030
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Yeah me too. I hate copying abilities when importing systems. I wish World Editor would automatically copy the abilities from the source map when referenced by a trigger.
     
  7. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,497
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Neat system, but as Tank-Commander suggested, calling it Stealth System is extremely misleading. Something like "Vision System" or w/e would have been way better. Having to manually register ever unit's day and night vision will be tedious, but it can be useful.

    Needs Fixed

    • Nothing

    Suggestions

    • Documentation would have been nice. You have a lot of magic numbers (especially in Vision Adjust) that don't really make sense to me
    • I would use a custom integer variable instead of Integer A just to avoid possible collisions
    • Please add STESYS_SightAbility as a configurable variable. Having to change that reference in Vision Adjust 18 times sounds like hell compared to the one time you would have to do it if it were just a configurable variable.

    Status



    Approved
     
  8. streetpunk

    streetpunk

    Joined:
    Oct 9, 2015
    Messages:
    721
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Version 1.02 is out! Check the changelog for info on what's new!
     
  9. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,660
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    does this account moonstone?
     
  10. streetpunk

    streetpunk

    Joined:
    Oct 9, 2015
    Messages:
    721
    Resources:
    2
    Spells:
    2
    Resources:
    2
    * The system works well with both trigger/player set time of day and also works with moonstone; Also there was already a hero in the map to test moonstone usage.
     
  11. Hazop

    Hazop

    Joined:
    Jul 2, 2015
    Messages:
    765
    Resources:
    2
    Maps:
    2
    Resources:
    2
    its not working ._.
     
  12. streetpunk

    streetpunk

    Joined:
    Oct 9, 2015
    Messages:
    721
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Can you please specify what's not working ?
     
  13. Hazop

    Hazop

    Joined:
    Jul 2, 2015
    Messages:
    765
    Resources:
    2
    Maps:
    2
    Resources:
    2
    I am not sure, the trigger is fine, and nothing is disabled.
     
  14. streetpunk

    streetpunk

    Joined:
    Oct 9, 2015
    Messages:
    721
    Resources:
    2
    Spells:
    2
    Resources:
    2
    I'll test it, be right back!

    EDIT:
    All right, so here's what going on:
    #1: You are using the function
    • Melee Game - Use melee time of day (for all players)
    Which will cause the system to not work.
    #2: On the trigger "STESYS Pre Config" you need to set the right ability (STESYS_SightAbility) into the function
    • Set STESYS_SightAbility = "Random Ability"
    like this
    • Set STESYS_SightAbility = STESYS_SightAbility

    #3 All custom units sight range values must be introduced into the "UNITDATA Hashtable Values" trigger, as descbribed in the instructions, like this:
    • UNITDATA Hashtable Values
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- -----------------------------------------------------------------------------CUSTOM UNITS --------
        • -------- My Custom Unit --------
        • Set UNITDATA_UnitType = My Custom Unit (this is the unit type)
        • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
        • Hashtable - Save 1600 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
        • Hashtable - Save 500 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
        • -------- ----------------------------------------------------------------------------- --------
        • -------- -----------------------------------------------------------------------------HUMAN --------
        • -------- ----------------------------------------------------------------------------- --------
        • -------- UNITS --------
        • -------- PEASANT --------
        • Set UNITDATA_UnitType = Peasant
        • Custom script: set udg_UNITDATA_UnitTypeInteger = udg_UNITDATA_UnitType
        • Hashtable - Save 800 as UNITDATA_SIGHTDAY of UNITDATA_UnitTypeInteger in UNITDATA_Hash
        • Hashtable - Save 500 as UNITDATA_SIGHTNIGHT of UNITDATA_UnitTypeInteger in UNITDATA_Hash
        • -------- - --------
     
    Last edited: Feb 13, 2018
  15. Diegoit

    Diegoit

    Joined:
    Apr 8, 2017
    Messages:
    1,196
    Resources:
    1
    Models:
    1
    Resources:
    1
    upload_2018-7-25_6-39-34.png


    It can see through trees n vision obstacles :/
     
  16. streetpunk

    streetpunk

    Joined:
    Oct 9, 2015
    Messages:
    721
    Resources:
    2
    Spells:
    2
    Resources:
    2
    This is not an error, units are allowed to see what's in front of them. However, in a near future, I plan on having the blocked vision on destructibles and cliff added as an optional feature.