Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Magic Raw Thread  (Read 1064 times)

varkarrus

  • Bay Watcher
  • Insanity and a knife go well together.
    • View Profile
Magic Raw Thread
« on: February 08, 2010, 03:28:20 pm »

If you've seen my previous magic thread (about page 2 by now), then you'll know I took account the other possibilities of magic.

This thread is only for if Magic is used as raws.

Ideas would include:

[AREA:TYPE:x], where x could be, say, a cone, a beam, a target in range, area of effect around the caster, area of effect around the target, or self.
[HITS:x], says whether or not it can hit allies, enemies, or what. You would use this tag multiple times
[COST_STAT:x:y], includes level of profession, happiness, hunger, exhaustion, etc..., can be positive.
[COST_ITEM:x], like a reagent for a reaction.
[RECEIVE_ITEM:x], like a product for a reaction.
[TARGET_STAT:x], like Cost Stat, but for the target. So you can make the target lose happiness.
[COLOR:x:y:z:a], where a is weather this if for the inner section of the area, or the outer section.
[RANGE:x] in tiles.
[USAGE:x], includes DAMAGE_ENEMIES, HEAL_ALLIES, CREATE ITEM, HEAL_SELF, etc...
[TEMPERATURE:x]
[TILE:x:a], a is used like color.
[DESTRUCTIVE], sorcerers will not use this near allies or owned items, unless desperate.
[SPHERE:x], spells will be added to a spellbook following the sphere
[HOLY], spell is granted by gods, and used by priests.
[NOT_A_SPELL], so that this spell can be given as a spell-like ability to creatures, e.g. dragon breath, spitting acid, self regeneration, shedding skin, etc...
Logged
Dip Stick! The newest candy! Just dip it, then lick it!
Or try FUBAR! The best chocolate bar ever!
And you can't eat them, either, sadly. Even though it'd make sieges so much more fun; dwarves lining the walls, drooling and carrying sharp knives and forks, ready for the upcoming meals.

Magick

  • Bay Watcher
  • [HATES_LEARN] [MAGICAL]
    • View Profile
Re: Magic Raw Thread
« Reply #1 on: February 08, 2010, 03:39:30 pm »

Good suggestions. I have a few of my own, too:

[SCATTER:X:Y] Basically tells the if the spell scatters and how much. X being amount of shots and Y being spread.
[USAGE:POLYMORPH:X:Y] would be nice. X being the creature, Y being target(one other, X others, self)
[BLOODLINE] Spells passed down through the bloodlines of a creature.
Logged
"Alright, I'll trade you these mugs, and you'll give me those -Oh. Here. Just take this. WAIT. I DID NOT MEAN TO GIVE YOU THOSE."
http://img696.imageshack.us/img696/9079/1278257725299.jpg

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: Magic Raw Thread
« Reply #2 on: February 08, 2010, 06:25:55 pm »

For the record, dragon breath and spitting acid are already in the game.

But yeah, if someone wants to play with RAW-ified magic this would be the way to handle it.
Logged

Randall Octagonapus

  • Bay Watcher
  • We gota get some medicine for the computer machine
    • View Profile
Re: Magic Raw Thread
« Reply #3 on: February 08, 2010, 06:31:25 pm »

Possibly a percent chance for the spell failing.
[FAILURE:(number out of 100)]
Logged
would you like a slice of one humped camel cheese or two humped camel cheese on that elf burger?

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: Magic Raw Thread
« Reply #4 on: February 08, 2010, 06:48:02 pm »

Don't forget moon phases and such.   Star light.
Logged

Aquillion

  • Bay Watcher
    • View Profile
Re: Magic Raw Thread
« Reply #5 on: February 08, 2010, 10:51:35 pm »

Not enough has really been decided about how magic will work to really discuss this usefully, but...

I suspect that the game itself will generate spells / rituals / etc to an extent.  Of course, the problem with this is that it's unlikely to be able to generate "cool" things entirely on its own (you'll get, say, a 'turn appendix to stone mug' spell.  Which is cool but an entire world filled with spells like that is going to get old fast.)

So what the raws could do is contain sort of 'seeds' for magical procedures and effects -- general linkings of some sort that describe effects that are cool, thematic, and potentially useful.  Random generation would then draw on these seeds, put them together, maybe twist them in various ways to produce a wider variety of effects.

This would let players provide mystical associations for things in the game -- saying, for instance, "using a collar as part of a magical effect that mind-controls someone is cool", since in general that is cooler than, say, using a sock for the same effect (whereas socks would be more suitable for effects based on movement.)

Of course, these associations might go for body-locations instead (anything on your feet is good for movement; anything on your head is good for influencing your mind; etc.)  There could occasionally be magical effects that violate such rules, but this would give the game good guidelines for producing generally meaningful magic through random generation, rather than just spitting out "teleport spleen twelve feet left".
« Last Edit: February 08, 2010, 10:56:22 pm by Aquillion »
Logged
We don't want another cheap fantasy universe, we want a cheap fantasy universe generator. --Toady One

varkarrus

  • Bay Watcher
  • Insanity and a knife go well together.
    • View Profile
Re: Magic Raw Thread
« Reply #6 on: February 09, 2010, 03:38:51 pm »

I talked about that sort of thing in the other magic thread. This is for discussion of raws. What raws the game will use if it ends up using them for magic. And yes, firebreath would need to be considered a spell, probably regardless.
Logged
Dip Stick! The newest candy! Just dip it, then lick it!
Or try FUBAR! The best chocolate bar ever!
And you can't eat them, either, sadly. Even though it'd make sieges so much more fun; dwarves lining the walls, drooling and carrying sharp knives and forks, ready for the upcoming meals.

ed boy

  • Bay Watcher
    • View Profile
Re: Magic Raw Thread
« Reply #7 on: February 09, 2010, 04:59:13 pm »

I would like to suggest that spells have nesting abilities. Allow me to use an example, of trying to throw a fireball. My notation may be a little unusual, but I'll try to explain it. Basically, every spell has three components: Properties, inputs, and outputs.
Code: [Select]
[SPELLID:fireball1]                    \\Unique ID of the spell
[PROPERTIES]                    \\Begins the Properties section of the file
          [SPHERE:fire]                    \\This spell is associated with the fire sphere
          [RESEARCHABLE:100]                    \\This gives the difficulty of researching it. A higher difficults will make it take longer and more dwarves to research. No researchable tag makes it unresearchable.
          [SCRIPT:fireball1]                    \\More on this later.
          [USE:War]                    \\Specifies that this is a war spell. Can have multiple uses.
[INPUTS]                    \\Begins the inputs section of the spell file
          [TARGET:Any]                    \\Specifies that the spell needs an input called target to function. It can be anything.
          [INTENSITY:Number]                    \\Specifies that the spell needs an input called intensity to function. Must be a number.
[OUTPUTS]                    \\Begins the outputs section of the file
          [0.7:TEMPINCREASE:TARGET:INTENSITY]                    \\Specifies that at TARGET, the temperature will increase by INTENSITY. The 0.7 is the probability of this outcome.
          [0.1:TEMPINCREASE:SOURCE:INTENSITY]                    \\A 10% chance that the wizard will go up in flames!
          [1:TIRE:CASTER:200]                    \\The caster will tire by 200 points.

Of course, you may have noticed that the target and the intensity need to be inputted form somewhere. It is therefore that I must also incorporate a suggestion for scripts, to determine how creatures use the spell. This would involve a new raw file (or several if you want to split them up). This would be an example of a raw file:

Code: [Select]
[CREATURE:DWARF]                    \\This tells us how dwarves cast the spell
          [TARGET]                    \\This starts the target selection process. The target must satisfy all of the following
                    [RANGE:0:50]                    \\The range must be between 0 and 50
                    OR                    \\The target must satisfy any of the following
                              [ALLEGIANCE:HOSTILE]                    \\the target must be hostile to the caster
                              [INSANE:CASTER]                    \\The caster must be insane
                              [INSANE:TARGET]                    \\The target must be insane
          [INTENSITY]                    \\This determines how intensity is calulated. Since it is a number, it can be done mathematically. Let us imagine that we want the intensity to follow 2MM+3T(1000-C)M, where M is the magical skill of the caster, C is the tiredness of the caster and T is the tiredness of the target. It would follow as such:
                    [SUM]
                              [MULTIPLY]
                                        [2]
                                        [SKILL:CASTER:MAGIC]
                                        [SKILL:CASTER:MAGIC]
                              [MULTIPLY]
                                        [3]
                                        [TIREDNESS:TARGET]
                                        [SUM]
                                                  [1000]
                                                  [NEG:TIREDNESS:CASTER]
          [CASTTIME]                    \\How many steps it takes to cast
                    [60]
          [RECHARGE]                    \\How many septs it takes to recharge
                    [200]

You may be thinking that this is a very long and complicated way of doing things, and that's because it is. Its complexity lets it be a very powerful tool, however. Lots of it can be copied and pasted, however. For example, Goblins and elves would have a very similar script for casting, so it could be copied and pasted. The seperate script would allow for multiple spells with similar concepts to use the same targeting. For example, a spell call Ice ball could decrease the temperature at the target (handy for fire immune dragons) and it could use the same targetting. Similarly, a spell called "Break legs" coudl use the same targetting, where intensity would be used for the force applied to the target's legs.

A dragon would have very different values to a dwarf or elf. If a culture spends a lot of time with a dragon, for example, then it could learn the fireball spell from the dragon, but with different intensities.

It would also allow for the nesting of spells. For example, let us suppose that one is casting a crafting spell, and it can go wrong. The output for such a such a spell would be as such:

Code: [Select]
[OUTPUTS]                    \\Begins the outputs section of the file
          [0.9:CREATEITEM]
                    [MATERIAL:ROCK:BAUXITE]
                    [ITEMTYPE:Mechanism]
                    [QUALITY:0:5]
          [1:TIRE:CASTER:800]
          [0.1:APPLYSPELL]
                    [ID:Fireball1]
                    [TARGET:Caster]
                    [CASTTIME:0]
The apply spell effect tells the game to apply another spell. The ID tells what spell to cast. Since the target and the casttime are specified, these values will be used. Intensity, however, is not specified, so it will resort to the script to find such a target.
Logged

varkarrus

  • Bay Watcher
  • Insanity and a knife go well together.
    • View Profile
Re: Magic Raw Thread
« Reply #8 on: February 10, 2010, 07:25:58 am »

Nice! Except I don't see why the caster needs to be insane... All dwarves are inherently insane.
Logged
Dip Stick! The newest candy! Just dip it, then lick it!
Or try FUBAR! The best chocolate bar ever!
And you can't eat them, either, sadly. Even though it'd make sieges so much more fun; dwarves lining the walls, drooling and carrying sharp knives and forks, ready for the upcoming meals.