hey what does set udg_DC_AddedAbil = 'AUcs' mean? I tried copying it and I got errors
It sets the integer variable DC_AddedAbil equal to some ability ID, in this case that of default Carrion Swarm. Internally an "ability code" variable (
different from an ability variable) is really just an integer variable because a rawcode like like 'AUcs' is actually a base-62 number (A-Z, a-z, 0-9); specifically 'AUcs' is 2501010 in decimal (base-10) notation.
You can see every ability's rawcode in the editor by pressing ctrl+D to toggle between 'raw data' view mode. So while
you can know an integer and ability code variable are the same type,
GUI really limits you and will not let you treat an integer like an ability code, and vice-versa as well. GUI will literally not let you assign the integer that corresponds to Holy Light to an integer variable because GUI 'thinks' that abilities and integers are not interchangeable like they are.
Even though you can't set it with GUI, you
can set it with a custom script line, which is what you see. The rawcode must be within two apostrophes like 'xxxx' so the computer knows it's base-62. The udg_ prefix in the variable name is there because that gets added to every single variable made with the variable editor, to avoid any possible naming conflicts (udg =
user
defined
global). You must include this prefix before every variable when referencing them with custom script lines.
What is the purpose of the variable
DC_AddedAbil? It's the ability that will be added to the dummy unit before it is ordered to cast it. This is something you should be setting with a trigger as part of your usage of the system. Why are you getting an error?
Probably because the variable literally doesn't exist in your map (yet). There is a WE setting called "create unknown variables when pasting trigger data" which does exactly what it sounds like it does. However, it can't look for variables in use in Custom Script lines, and as far as I can tell that variable is only ever referenced in custom script lines. Therefore it was not automatically created when you pasted this system's triggers into your map.
So the line is referencing a variable that doesn't exist so the compiler can't proceed and throws an error. How do you fix it? Well, create the variable. Make an integer variable named
DC_AddedAbil and you should be able to save. But IMO that's not the best solution. Instead you should simply change it to be an ability code variable rather than an integer. This won't change how anything interacts with the variable in the custom script lines, but it
will allow you to set the variable normally as a GUI
Set Variable... action rather than having to use the custom script line and type in the rawcode manually.
All of that being said,
I really would recommend that you not use this resource at all, and instead learn how to use and manipulate dummy units for casting yourself. It's
very easy. This system was fine in 2012 and it was probably fine up through its last update in 2016, but it's really not up to modern standards. It's a little annoying to work with, has little flexibility, and requires you to manually interact with in a bunch of ways that basically mean you do as much setup as managing the dummies manually would be! IMO a much better use of your time is understanding how to use dummy units simply and properly without a system like this to do the (small) steps for you.