• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Simple Dummy Data System v1.0 [GUI]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
- Ever thought about making a spell that has "Wait" properties and you want it to be MUI ?
- Do you want to spawn unit at targeted location but you don't want it to be instant, but delay of 5 seconds ?
- Having troubles saving data and use them MUI-ly ?
- Fear no more, Dummy Data is here !
- This system will save data for you for future usage
- Also, you can have a delay action (or simply "Wait" in GUI) so now you can spawn Dragons 5 seconds after you cast a spell... or something like that

This system saves data to a dummy unit which will expire in time and load all the saved data from the dummy unit and use it



External Instructions
- Go to Object Editor and copy the unit Dummy (Dummy Data)
- Open World Editor -> File - Preferences... -> General Tab -> Tick the Automatically create unknown variables while pasting trigger data
- Copy the Simple Data Dummy System folder.
- Copy this code into your map header;
JASS:
function GetValue takes nothing returns nothing
    set udg_CC_DummyUnit = GetTriggerUnit()
    set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
    set udg_CC_Value = LoadReal(udg_CC_Hashtable, udg_CC_Key, 0)
endfunction

function GetCaster takes nothing returns nothing
    set udg_CC_DummyUnit = GetTriggerUnit()
    set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
    set udg_CC_Caster = LoadUnitHandle(udg_CC_Hashtable, udg_CC_Key, 1)
endfunction

function GetTarget takes nothing returns nothing
    set udg_CC_DummyUnit = GetTriggerUnit()
    set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
    set udg_CC_Target = LoadUnitHandle(udg_CC_Hashtable, udg_CC_Key, 2)
endfunction

function GetValue2 takes nothing returns nothing
    set udg_CC_DummyUnit = GetTriggerUnit()
    set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
    set udg_CC_Value2 = LoadReal(udg_CC_Hashtable, udg_CC_Key, 3)
endfunction

function GetLocation takes nothing returns nothing
    set udg_CC_DummyUnit = GetTriggerUnit()
    set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
    set udg_CC_Location = LoadLocationHandle(udg_CC_Hashtable, udg_CC_Key, 4)
endfunction

function GetAbilityID takes nothing returns nothing
    set udg_CC_Key = GetSpellAbilityId()
    set udg_CC_TriggerInteger = LoadInteger(udg_CC_Hashtable, udg_CC_Key, 5)
endfunction

function GetString takes nothing returns nothing
    set udg_CC_DummyUnit = GetTriggerUnit()
    set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
    set udg_CC_String = LoadStr(udg_CC_Hashtable, udg_CC_Key, 6)
endfunction

Internal Instructions
- Everything pretty much explained in the INSTRUCTIONS PAGE 1 & 2

If you still don't understand how to use it, you can ask here or PM/VM me about it.


  • DD Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set udg_CC_Hashtable = InitHashtable()
      • -------- CC_DummyType sets the unit-type of Dummy --------
      • -------- CC_Trigger[array] will set the Trigger Event you have per ability --------
      • -------- CC_MaxTriggerEvent sets the maximum Trigger Event you have (currently I use 3 Trigger Event) --------
      • -------- CC_Ability sets the ability for a particular Trigger Event --------
      • -------- -------------------------------------------------------------------------------------------------------------------- --------
      • -------- Before you touch anything on this Setup Trigger, you should create 2 new triggers for new ability --------
      • -------- 1st trigger should be named XXX Cast --------
      • -------- 2nd trigger should be named XXX Event --------
      • -------- If you don't know what to put inside those 2 triggers, you can always look at the Example folder --------
      • -------- Remember, 2 triggers for 1 spell --------
      • -------- XXX Event should be filled for the variable CC_Trigger[array] --------
      • -------- Currently I have 3 spells, so if you want to use this system for the 4th spell, you must set the CC_Trigger[4] to the new spell XXX Event trigger --------
      • -------- The next would be CC_Trigger[5] -> CC_Trigger[6] and so on --------
      • -------- -------------------------------------------------------------------------------------------------------------------- --------
      • -------- Let's say I want to create new spell and its name is Dagger Slash, I just set the CC_Ability to the new spell and Run DD Save AbilityID for saving data --------
      • -------- The next CC_Ability you're gonna set will belong to CC_Trigger[4] which is actually CC_Trigger[CC_TriggerInteger] --------
      • -------- See "EXAMPLE" comment for more detail --------
      • -------- CONFIGURABLES --------
      • Set CC_DummyType = Dummy (Dummy Data)
      • -------- ABILITY #1 --------
      • Set CC_Ability = Target Unit
      • Set CC_Trigger[CC_TriggerInteger] = Target Unit Event <gen>
      • Trigger - Run DD Save AbilityID <gen> (ignoring conditions)
      • -------- ABILITY #2 --------
      • Set CC_Ability = Target Point
      • Set CC_Trigger[CC_TriggerInteger] = Target Point Event <gen>
      • Trigger - Run DD Save AbilityID <gen> (ignoring conditions)
      • -------- ABILITY #3 --------
      • Set CC_Ability = Target Instant
      • Set CC_Trigger[CC_TriggerInteger] = Target Instant Event <gen>
      • Trigger - Run DD Save AbilityID <gen> (ignoring conditions)
      • -------- END OF CONFIGURABLES --------
      • Set CC_MaxTriggerEvent = (CC_TriggerInteger - 1)
      • -------- EXAMPLE --------
      • -------- ABILITY #4 --------
      • -------- Set CC_Ability = Dagger Slash --------
      • -------- Set CC_Trigger[CC_TriggerInteger] = Dagger Slash Event <gen> --------
      • -------- Trigger - Run DD Save AbilityID <gen> (ignoring conditions) --------
      • -------- EXAMPLE --------
  • DD General Save
    • Events
    • Conditions
    • Actions
      • Set CC_Caster = (Triggering unit)
      • Set TempLoc = (Position of CC_Caster)
      • Unit - Create 1 CC_DummyType for (Triggering player) at TempLoc facing Default building facing degrees
      • Set CC_DummyUnit = (Last created unit)
      • Unit - Add a CC_WaitDuration second Generic expiration timer to CC_DummyUnit
      • Unit Group - Add CC_DummyUnit to CC_Group
      • Custom script: set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
      • Hashtable - Save Handle OfCC_Caster as 1 of CC_Key in CC_Hashtable
      • Custom script: call RemoveLocation(udg_TempLoc)
      • Trigger - Turn on DD Clear Event <gen>
  • DD Save Value
    • Events
    • Conditions
    • Actions
      • Hashtable - Save CC_Value as 0 of CC_Key in CC_Hashtable
  • DD Save Value2
    • Events
    • Conditions
    • Actions
      • Hashtable - Save CC_Value2 as 3 of CC_Key in CC_Hashtable
  • DD Save Target
    • Events
    • Conditions
    • Actions
      • Set CC_Target = (Target unit of ability being cast)
      • Hashtable - Save Handle OfCC_Target as 2 of CC_Key in CC_Hashtable
  • DD Save Location
    • Events
    • Conditions
    • Actions
      • Hashtable - Save Handle OfCC_Location as 4 of CC_Key in CC_Hashtable
  • DD Save Integer
    • Events
    • Conditions
    • Actions
      • Custom script: call GetAbilityID()
      • Custom script: set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
      • Hashtable - Save CC_TriggerInteger as 5 of CC_Key in CC_Hashtable
  • DD Save String
    • Events
    • Conditions
    • Actions
      • Hashtable - Save CC_String as 6 of CC_Key in CC_Hashtable
  • DD Clear Event
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to CC_DummyType
    • Actions
      • Set CC_DummyUnit = (Triggering unit)
      • Custom script: set udg_CC_Key = GetHandleId(udg_CC_DummyUnit)
      • Set CC_TriggerInteger = (Load 5 of CC_Key from CC_Hashtable)
      • For each (Integer LoopingInteger) from 1 to CC_MaxTriggerEvent, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CC_TriggerInteger Equal to LoopingInteger
            • Then - Actions
              • Trigger - Run CC_Trigger[LoopingInteger] (ignoring conditions)
            • Else - Actions
      • Hashtable - Clear all child hashtables of child CC_Key in CC_Hashtable
      • Unit Group - Remove CC_DummyUnit from CC_Group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CC_Group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
-


v1.0
- Initial release
- Small update on setup


I know this system a bit complicated, but once you understand, it's easy to use.
Give Credits if used , Give Rate if tested .

Keywords:
simple, dummy, data, system, defskull, target, unit, point, instant, wait, triggersleepaction, delay.
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 07:27, 26th Jul 2012 Magtheridon96: This system can take advantage of timers instead of units. Units are too interactive and relatively heavy on CPU and RAM when compared to a timer. The...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

07:27, 26th Jul 2012
Magtheridon96: This system can take advantage of timers instead of units.
Units are too interactive and relatively heavy on CPU and RAM when compared to a timer.

The unit dies event will execute a ton of times causing the triggers to evaluate a lot :/

I have one idea that will be incredibly fast and user-friendly.
You would use the variable event and each spell would have one number corresponding to it ;)

You would use one timer that runs every 0.03125 seconds and iterates over a list of instances decreasing their duration by 0.03125, and when an instance's duration is 0 or less, set your system's variable to 0, then to the spell's special integer and load data based on the instances' index from a hashtable of some sort.

But seriously now, there needs to be a reason for this to be easier than using a very simple stack :/ (dynamic indexing)
 
While pretty neat, the system /is/ completely unneeded and more complex than the simple alternative, which (As I've said in many many places) creating an atificial wait using two variables. Really if somebody felt a need to be using this, they probably won't be making too great a spell anyway, and probably wouldn't be too good at wrapping their heads around using this one to help them do it either.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Really if somebody felt a need to be using this, they probably won't be making too great a spell anyway, and probably wouldn't be too good at wrapping their heads around using this one to help them do it either.
This system aims for those who have a basic in triggering or to people that never trigger before (Modeler, Map-maker, Terrainer), they can use this system to ease their work by lessen their burden.
I have seen map-maker that knows how to terrain and make maps, but sadly he don't know how to create spells at all, or bugged spell, well this spell is for people like them.
Well, I could say that, One man's trash is another man's treasure

DefSkull, I did a test on their functions, but not yet have an opinion.
Perhaps this system does not give you what you want, or you simply can't understand the workings of the system.

Yes, I know this system is a bit complicated, but once you get used to it, you can do many things such as spawn units, create dummy unit, create SFX and all of these will become MUI.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I never used a timer before, does it have to do with indexing ?
I used dummy unit as to cope with Hashtable, if I save the data to either Caster or Target, the data would get overwritten, if I save data to each dummy per cast, the data won't get overwritten, that's why.

I know indexing allows data-stacking but I'm using Hashtable, don't know if Timer + Hashtable could have work though.

HASHTABLE 4 LAIF ;p
 
Top