Introducing...The Spell Generator
By Pyro682
Notice: This is a test map, but it's an important one (In my mind)
Notice #2: Keep in mind that I do not intend for this generator to compensate for EVERY possibility; just most of them.

Well, after much questioning from tons of different people, I decided to hit it off at SEN, and answer the questions people have been asking me. Do bear in mind, that many of my test maps have been adding up to this map, to make sure to see it would satisfy my goals, and vision for this system. Well then, lets get started, shall we?
-"What does this thing do?"
This is a Spell Generator. Soon to be equipped with a randomize function, it does not merely pick spells from a list, as you would see in Custom Hero Wars, or Footmen Frenzy. This Generator literally writes the spells out.
-"Okay, How the hell do you plan on making this thing 'write out spells'??? You can't write triggers in-game."
That's a bit of a trickier question. Let me go through this by going over the build of the system.
I originally designed this system to have 3 Interfaces: (I brought everything about any spell into 3 categories)
-Targets (Who/Where/When/What the spell fires/hits)
-Effects (What happens in the spell; aka- Damage, Healing, Transformation, Spawn, whatever.)
-Visuals (What the spell looks like.)
Lets start off with Targets.
Targets
_
For targeting, I imaginged up Every possible way I could think of anyone wanting to target SOMETHING in a spell, and Here's what I thought of:
-Yourself
-Enemies
-Allies
-Scatter Target (Much Like Volt's L1 Spell in TS)
-Fixed Target (Relative to the hero, choosing a spot on the ground- Yay mobile grids!)
-There may be more, as this is a map in production. For now, this is what I've got.
"Wait a second, what If I want more than 1 target, and different targeting methods?"
Well, you will have a maximum of 8 (For reasons that will be explained later) different targets, and you will be able to decide where and when these targets are fired.
Now, each of these have their own way of targeting what they need to target.
Keep in mind, that since a larger target area affects more area/targets, an increase in mana cost is taken into account.
Also part of the targeting system is how they are targeted. Do you want a projectile (Like a fireball), or do you want it to be targeted instantly? If it is a projectile, would you want this projectile to be flying from yourself, or from another area? What if you want the projectile to fly to you, and then activate whatever spell from there? Projectiles (Unlike instant) will have a decrease in mana cost, since it would be less beneficial (In most cases) to have in the spell.
These "How" Methods are described in my spell generator with the following terms:
-Instant Targeting
-Projectile
-Memory Projectile
_____________________________________________________________
Effects
_
One of the most difficult parts of the generator to design is the Effects Interface (EI)
In the ei, I have categorized most of the spells I beleive anyone (usually) would ask for. Of course, I am bound by StarCraft's limits, but I'm going to Push Map Making to that Limit whenever possible. (I better get Kudos from IP for fitting in the SEN motto like that.)
Some of the Categories I have devised are:
-Transformation
-Spawn
-Healing
-Damage
-Neurological Effects
Now, within each of these categories are a series of Sub-categories that need to be accounted for.
For example, there is not just "Damage". There's
-Explosive Damage (Like a Siege Tank(Tank Mode))
-Splash Explosive Damage(Siege Tank(Siege Mode))
-Normal Damage(Marine)
-Normal Splash Damage(Lurker)
-Concussive Damage(Terran Ghost)
-and Concussive Splash Damage(Firebat).
With all of these to take into account, "Damage" does not suffice. Same thing with Neurological Effects:
Some of the Neurological effects are:
-Mind Control
-Hallucinations
-Confuse (Like Necromancer's Confuse in Diablo II)
-and Many more.
Thus, each effect category has a number of sub-categories.
__________________________________________________________
Visuals
This is a system in which the User can "pretty - up" his/her spell. I don't have much information right now, mainly because this part of the system isn't working. Lol, I will get back on it soon.
________________________________________________________
Collapsable Box

This is what I call "TRACKER!!!". It is a location that holds all of the information about the spells. Every decision that is made makes a unit that is created here. It will be used later on when you cast a spell.
Collapsable Box

This is a screenie of me designing and testing out a way to generate visuals. I didn't like it. I've only got 14 more ideas to test out.
Collapsable Box

This is the Numerals editor. This is a system where I take a DC of a numeral of both Duration and Magnitude of the spell. Goliaths are 100, Tanks are 10, and Vultures are 1.
COMPONENTS AND PLAYER ORDERS:
Backbone of the system
This system abuses the fact that there are 8 players availible in the game, and the fact that triggers run in order from player 1 to 8.
Each decision is recorded to let the system know what is supposed to take place. Targets re-assign locations, and effects make effects at those locations.
Mana Cost
Now, I realized that if I allow players to design their own spells, there will be that one idiot who will say "MAKE LIEK, 999999 DMG ON ENEMIES!!! I'MA PWNZOR THESE NUBZORZ!!!". To remove this exploitation, I've designed a small formula to provide a reprocussion of casting a spell with the generator: Mana.
But before we get to the Formula, I need to explain Components. Components are groups of Targets and Effects that happen together. (Each player would be a component, because each player owns the information to 1 target and 1 effect.)
Now, the best way to demonstrate this is to use a common spell so that everyone who reads this may understand the concept of Components.
In this case, I will use a Fireball. In this fireball, It will Explode on Impact, causing AoE damage, and will Burn the enemy for quite some time. However, this is a hot flaming ball, and will burn anyone it goes near. Therefore, I would want to have this ball of fire do damage while it's on its way to its target.
In this, we have two (2) components. We have the Projectile (The Damage on the Way to its target), and the Explosion (The Blowing up when it hits its target)
Now, Here is a simplified version of the Mana cost formula I have written.
Total Spell Cost = ( [M] [D] [A] ) + ( [M] [D] [A] )
M is = to Magnitude. In this case, the Magnitude would be the damage.
D is = to Duration. In this case, The Duration would be the burning.
A is = to Area. It would be how big the Area in the AoE damage is.
So, if the first component were to be the trail, and the second component were to be the explosion, we would require some stats. Here is a few assume stats to show you the formula and it's workings.
The trail damage is 1/ms, with a duration of 5 seconds (Range of the fireball before it explodes) with a radius of 3 terrain squares.
The explosion dmg 200 dmg, with a duration of 1 second, with a radius of 4 terrain squares.
The mana formula would now be this:
Total Spell Cost = ( (1)(5)(3) ) + ( (200)(1)(4) )
In this case, the mana cost to cast this spell would be 815 mana.
_________________________________________________________________________________
:::::::UPDATE::::::
You will now be able to look at the bottom of the map, and Look at what involves in making the exact same type of spell. Even though it won't give you the triggers themselves, it will tell you what to do in the actions portion of the trigger.
Check back for more updates.
_________________________________________________________________________________
:::::::UPDATE::::::
Here is another screenie of me casting a spell using AoE dmg. So far, I'm not liking the visuals. I will be removing them soon.

==========UPDATE====================
-I've now totally reformatted the Mana Calculator and Formula!!!!! (Basically, Big thing was done, and it was a key piece in the generator)
-I can now cast full fledged spells of :
Damage - Concussive, Explosive, Normal, All of their Splash counter parts. (TiKels has brought "Bounce" Damage to my attention, and I'm debating of adding it in. ["Bounce" damage is like Mutalisk attack])
Transformation - Both Negatives and Positives Have been done.
Mobility - Teleportation, Ordering, Stunning, Negating, Speed Movement, and Slow Movement.
Neurological Effects - Mind Control, Hallucinations, Confusion (All magnitudes), Alliance.
(And all Sub-categories of those spells are now FULLY castable)
THE MAGNITUDES OF ALL OF THESE SPELLS ARE COMPLETE!!!!!
-I've begun Re-work on The TARGETING INTERFACE!!!!! TWO NEW TARGETS WILL BE AVAILABLE!
Now, it no longer crashes after twenty minutes!!!!
This post will continue to be edited and reformed as necessary. Point out flaws and errors, and ask questions at will.
Post has been edited 26 time(s), last time on Aug 11 2009, 6:50 am by Pyro682.
None.