Staredit Network > Forums > SC1 Map Production > Topic: Spell Generator
Spell Generator
Jul 9 2009, 5:18 am
By: Pyro682  

Jul 9 2009, 5:18 am Pyro682 Post #1

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.

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:
-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
-Memory Projectile


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:
-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
-Confuse (Like Necromancer's Confuse in Diablo II)
-and Many more.

Thus, each effect category has a number of sub-categories.

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.

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.


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.



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.

-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)


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.


Jul 9 2009, 5:53 am Toothfariy Post #2

This sounds awesome, i cant wait til it comes out


Jul 9 2009, 5:54 am Pyro682 Post #3

Thanks. Sorry about the horrible posting. I'm working on fixing it all, it'll take me a few minutes. Any questions about it?


Jul 9 2009, 6:14 am Neki Post #4

The font kinda hurts the eyes. Can you change it to something a little more readable?


Jul 9 2009, 6:23 am Jack Post #5

>be faceless void >mfw I have no face

I agree. Anyway I don't think you explained how you did it but I'm guessing you have a number generated by (in this case) units being placed in the area, and that makes a number, say 153057 (I don't know how long your ones are, probably longer). Then you use triggers to detect what the numbers are. You split it into a bunch of groups, say 1 53 05 7. The first digit, 1, is used to determine what you will target. It can only be 1-8 in your case. the next two digits, 53, are used to determine something else, such asthe effects interface. The next two digits, 05, are used for the subcategory of the second group, 53. The 7 could be a unique indicator, such as how much damage or health the spell will cause. I could be totally wrong, but thats how I'm doing a system in my rpg.

Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Jul 9 2009, 6:23 am Toothfariy Post #6

Actually i do have a question

will this map display or somehow show how a certain spell was created? is there somthing in place that will tell you hwo to make it?


Jul 9 2009, 6:24 am Jack Post #7

>be faceless void >mfw I have no face

You can read the triggers and copy them for your map if that's what you mean. If you mean will the actual map say something like Targeting Allies | Healing | Hallucination Effect | 100hp | I don't know, you'll have to wait and see. :bleh:

Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Jul 9 2009, 6:26 am Toothfariy Post #8

yeah well there will be a lot of them in the map so finding the specifc way to make it might be difficult. I think there should be some kind of display for it tho


Jul 9 2009, 6:33 am Pyro682 Post #9

Quote from Toothfariy
Actually i do have a question

will this map display or somehow show how a certain spell was created? is there somthing in place that will tell you hwo to make it?

Like.. Are you asking if it will tell you what triggers to put in place to re-create the spell you generated?


Jul 9 2009, 6:35 am Toothfariy Post #10

yeah, or which factors were involved in making it, so its all there


Jul 9 2009, 6:56 am Pyro682 Post #11

I don't know.. I actually made this as a concept map, not as a generator for Mappers, but I don't know. We'll see where it goes. ^^


Jul 9 2009, 6:57 am Pyro682 Post #12

Quote from name:Ultimo
The font kinda hurts the eyes. Can you change it to something a little more readable?
What do you want to be changed, and what would you prefer it to be changed to?


Jul 9 2009, 7:00 am Neki Post #13

Everything under the mana cost header is perfectly fine to read.

Edit: Hm, the stuff you posted sounds interesting. To be honest though, I'm kinda confused what it is still. It's some sort of template for creating spells in maps easier?

Post has been edited 1 time(s), last time on Jul 9 2009, 7:14 am by Ultimo.


Jul 9 2009, 7:02 am Pyro682 Post #14

Ok... so What DOES hurt your eyes?

Ah, I see. Fixed.

Post has been edited 2 time(s), last time on Jul 9 2009, 7:07 am by Pyro682. Reason: Update.


Jul 9 2009, 2:29 pm Ashamed Post #15

Hear me Raor!!

Sounds nice, Hopefully all goes well for you, I know alot can go wrong with these systems ><! Can't wait to see it completed! I always like to see new spell systems because they are always the coolest!


Jul 9 2009, 7:12 pm payne Post #16


This test map should help you to expand on your thing ;)
I made it a while back for my D2 project, but I never bothered about polishing it. There's many errors.
Move DS to change of spell mode. Move zlings at top to raise/decrease damage dealt. And it's based off a mix of Waypoint Casting System and Direct Damage.
Try it out ;D

If you need more explanations on what I had in my head for the spell mode names, just ask me :D

D2 test 3.scx
Hits: 12 Size: 45.33kb


Jul 9 2009, 9:17 pm samsizzle Post #17

is there going to be a way of saving spells that you made and like?


Jul 10 2009, 2:39 am Pyro682 Post #18

Quote from samsizzle
is there going to be a way of saving spells that you made and like?
Probably not.
As I'm thinking about how to do it right now, it would be too much trigger work. You can easily just save the game using StarCraft's save function.


Jul 10 2009, 2:42 am Pyro682 Post #19

Quote from name:Ultimo
Everything under the mana cost header is perfectly fine to read.

Edit: Hm, the stuff you posted sounds interesting. To be honest though, I'm kinda confused what it is still. It's some sort of template for creating spells in maps easier?

No. What I originally planned for this to become was to be a system to allow a player in an RPG to create a spell to his or her liking, and then unleash it upon his or her enemies in the quests.
However, ToothFairy came up with a very nice use for this: Mappers designing spells for their maps.
I may or may not add in text functions describing what triggers one must make in order to re-create the spells generated with this system.


Jul 10 2009, 2:51 am Toothfariy Post #20

Oh, thats what i thought this map was lol.

Did you orginally plan this to be able to be implemented into an rpg map? Using the system, one could have custom spells, which could make for a really good harry potter rpg :D


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:08 pm]
Sylph-Of-Space -- woah! nice! thank you!
[04:05 am]
O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
[04:04 am]
O)FaRTy1billion[MM] -- instead change "Microtile Overlay" to "Impassable"
[04:04 am]
O)FaRTy1billion[MM] -- er, wait, idk why i was looking for height
[04:03 am]
O)FaRTy1billion[MM] -- below the minimap should be a thing that says "Overlay Settings" with a little + button in the corner, press the + to expand it, uncheck Use Defaults, then change "Tile Overlay" to "Height"
[03:57 am]
Sylph-Of-Space -- Unless I'm dum (possible)
[03:57 am]
Sylph-Of-Space -- It would be so so so nice if SCMDraft had some kind of dedicated "walkability" view for the tilesets.
[03:53 am]
Sylph-Of-Space -- :'( dont cry for me cat-gentina
[09:18 pm]
Ultraviolet -- 🔪🐈
[2024-5-19. : 12:34 pm]
NudeRaider -- curiosity kills the cat!
Please log in to shout.

Members Online: Beitelrdfvf, Roy