Page 1 of 1

Creating new spells

Posted: Wed Aug 16, 2006 3:10 pm
by Ez da Cheeze
I'm new here, so hello to everyone. I've searched the forums for quite a bit, but haven't been able to locate anything that would help me. Now, on to the question.

I'm trying to make a few new spells for my dungeon and I'm a bit stuck at creating a Wizard spell Magic Arrow. What I want is to have a Wizard cast the spell which creates a modified Slayer Arrow flying in the air and changing into a DesEw cloud upon breaking. I spent several hours trying to create such spell, and so far I managed the following:

1) Created a new object called Magic Arrow, assigned it 500% Attack, create DesEw cloud upon breaking, disappear if on ground
2) Created a new spell which conjures the object using CREATE_NEW_IN_AIR

Everything seemed to work fine. When testing it on myself, my party members were getting the right amount of damage, (around 7 on LO, more than 30 on MON) but then I've discovered a different problem.

This damage was derived from Ninja skill and stats, ie. a 'b Master' Ninja would cast the Magic Arrow with the damage described above, but a 0. level Ninja's Magic Arrow damage was only around 1-2 points, not to mention the arrow being able to fly for only about 2 squares, then falling on ground.
Problem is, I want it to be a Wizard spell, therefore it gives Wizard xp, instead of Ninja. What makes it interesting is the fact that the power runes still have an impact on the arrow's damage.

I've also tried cloning an already existing spell and modify it, but all I've achieved was just another fireball/poison blob with different graphics. Cloning DesEw spell and assigning it additional damage using DAMAGE_BYPARTYFRONT_MAGIC, I was able to create partially what I wanted, problem is cloned spells always keep stats of the original, so the Magic Arrow also did damage to ghostly creatures and refused to damage the party.

I think that the major problem is the CREATE_NEW_IN_AIR action, which uses Ninja skill and stats to define strength and flying range of the Magic Missile. I even tried to create a new Attack Method specifically designed for the Magic Arrow, but it was of no help.
What I need is to clone the CREATE_NEW_IN_AIR action and have it not rely on any stats or skills, or maybe create a completely new spell, which doesn't use Poison, Fire, Lightning or Desew damage, but instead uses Sharp, which is normally assigned to melee weapons.

Or maybe a blank spell, that just flies and hits target, without doing any damage/effect at all, so it can be used for cloning and creating new spells such as this, that would work best. I'd try using Zo spell, but I don't want my Magic Arrows opening doors. Unfortunately, same thing goes to the Push and Pull spell effects.

I just hope it's not impossible. Anyway, thanks in advance for any advice.

Posted: Wed Aug 16, 2006 7:01 pm
by Sophia
It seems like what you really want here is the ability to change damage types and other core mechanics of cloned spells.

I want this too. See my thread called "Deconstruction of Spell Mechanics." :D

Posted: Thu Aug 17, 2006 12:20 am
by Ez da Cheeze
Nah, all I need is to tell an object "When someone throws you, you'll give him Wizard experience, understood?", that would pretty much solve my problem with the Magic Missile spell, since the flying range and damage would be affected by Wizard skill/stats. A tiny little box labeled 'Spell damage' would be a nice bonus too. Ah well, this should probably go to suggestions thread, if it wasn't there already.

Posted: Thu Aug 17, 2006 5:21 am
by Daecon
Would it work if you cloned the THROW attack method and make it award Wizard XP instead of Ninja?

Then assign this new attack method to your Magic Missile, instead of the default THROW it would have had?

Posted: Thu Aug 17, 2006 5:25 am
by Sophia
Having specialized actions that give different sorts of XP when they are carried out would bloat the already significant actions list for little gain.

My way of being able to specify the damage type of a spell (in your case, sharp) would be much more generic and much more useful.
Ez da Cheeze wrote:Nah, all I need is to tell an object "When someone throws you, you'll give him Wizard experience, understood?", that would pretty much solve my problem with the Magic Missile spell, since the flying range and damage would be affected by Wizard skill/stats. A tiny little box labeled 'Spell damage' would be a nice bonus too.

Posted: Thu Aug 17, 2006 5:26 am
by Sophia
No, the issue isn't with the THROW attack method, it's with the CREATE_NEW_IN_AIR action, which is hardcoded to give ninja XP.
ZoKathRa wrote:Would it work if you cloned the THROW attack method and make it award Wizard XP instead of Ninja?

Then assign this new attack method to your Magic Missile, instead of the default THROW it would have had?

Posted: Thu Aug 17, 2006 5:59 am
by Daecon
So does that mean any new spells made by CREATE_NEW_IN_AIR would give both Wizard/Priest AND Ninja XP?

Posted: Thu Aug 17, 2006 7:01 am
by Sophia
CREATE_NEW_IN_AIR can't create spells, only objects. :)
There is a special action to create spells.
ZoKathRa wrote:So does that mean any new spells made by CREATE_NEW_IN_AIR would give both Wizard/Priest AND Ninja XP?

Posted: Sat Aug 26, 2006 7:12 pm
by George Gilbert
Sophia wrote:the CREATE_NEW_IN_AIR action, which is hardcoded to give ninja XP.
Absolutely not!

No action is in any way linked to the type of XP given. The type of XP is determined soley by the attack method or spell (both of which are configurable) used to trigger the action.

Posted: Sat Aug 26, 2006 8:14 pm
by Sophia
Oops, "use," not "give."

I think?

Posted: Sat Aug 26, 2006 8:53 pm
by George Gilbert
Ahh right - yes the code that "injects" standard items into the dungeon (whether created by a spell or thrown by hand / attack method etc) does have hardcoded into it that the ninja level (not XP, because it might be modified by items worn etc) effects the distance thrown / damage done.

Posted: Sat Sep 02, 2006 4:49 pm
by Tonari
Ninja XP is given.
Ninja XP is obtained when the arrow created by magic hits the monster, and it
damages it.
Ninja level goes up by the thing consequentially conjuring.

Re: Creating new spells

Posted: Sun Nov 28, 2010 6:30 am
by Gambit37
Spells is one area of RTC I haven't really looked at yet. Finally trying it out and I've hit a major stumbling block already:
cloned spells always keep stats of the original
How do I create a new projectile spell that only does what I want it to, without also doing fireball damage, or opening a door, or whatever?

Re: Creating new spells

Posted: Sun Nov 28, 2010 7:26 am
by beowuuf
Associate the runes with a wall_action?

Re: Creating new spells

Posted: Sun Nov 28, 2010 4:07 pm
by Gambit37
The problem is that you can't create a real projectile spell from anything but an existing projectile spell. So they inherit the properties of that spell.

You can do spells as thrown items using CREATE_NEW_IN_AIR -- but that's problematic as you get ninja experience and the item never travels far enough, it eventually falls to the ground. Real spells don't fall to the ground. <- That's my main problem -- I need proper spells that travel forever but that don't inherit properties of an existing spell.

Re: Creating new spells

Posted: Sun Nov 28, 2010 6:38 pm
by beowuuf
Real spells shouldn't travel forever, they should get smaller then die (unless fired from a shooter set up that way). I can't think of a trick for a projectile, I'm surprised the explosion/cloud isn't a customisable effect thouhg, so you can use a fireball or lightning bolt or des ew and then have a different effect generated.

Re: Creating new spells

Posted: Sun Nov 28, 2010 6:48 pm
by Gambit37
You can have any effect happen when the spell Breaks against a target, but it also does the original effect of the spell it was cloned from.

For example, I cloned Zo to make a new spell that would freeze any enemy in place. Works great, except if the enemy is in a doorway, then the Zo part of the spell still works and the door closes. :(

Re: Creating new spells

Posted: Sun Nov 28, 2010 7:29 pm
by beowuuf
You could use a low level poison bolt so it's mostly a force effect?

Re: Creating new spells

Posted: Sun Nov 28, 2010 7:40 pm
by Sophia
There is no concept of "level" because the spell's power is determined by the power level of the spell cast. Any projectile spell that cast at a high power level will be powerful, and if it is cloned from poison bolt, will do a lot of poison damage. These properties, like "fireballs do fire damage" and "zo spells open doors" are completely hardcoded and not exposed to the editor in any way.

Short answer:
Gambit37 wrote:How do I create a new projectile spell that only does what I want it to, without also doing fireball damage, or opening a door, or whatever?
In RTC, you can't.

Re: Creating new spells

Posted: Sun Nov 28, 2010 8:09 pm
by Gambit37
Bugger.

Can you control all this stuff in DSB?

Re: Creating new spells

Posted: Sun Nov 28, 2010 9:10 pm
by Sophia
Of course. ;)

Re: Creating new spells

Posted: Sun Nov 28, 2010 9:23 pm
by Gambit37
This may well be the straw that broke the camel's back. ;-)

Although, since I'm not using any normal 'button' doors in my adventure, I could get away with cloning Zo for all my spells in RTC ;-)

Re: Creating new spells

Posted: Sun Dec 12, 2010 4:00 am
by Gambit37
I forgot about this problem with spells. **** **** ****ity ****

Is there really no way of creating proper spells with spell behaviours that don't inherit properties of the source spell?

If not, is there some way of creating flying items that are frictionless and anti-gravity?

Re: Creating new spells

Posted: Sun Dec 12, 2010 9:59 am
by Gambit37
I sort of found a way of doing it, but it causes movement issues for the party:

You can make a spell that creates a new item in the air. This item is set to expire after 2-3 ticks, and on expire it creates another copy of itself using CREATE_IN_AIR. This ensures that no speed or height is lost and the item continues to fly until it hits something, which is what I wanted. However, this seems to mess up party movement -- it goes very jerky until the launched spell has "exploded" (broken).

I'll play around some more but I think this is the best I can come up with.

Re: Creating new spells

Posted: Sun Dec 12, 2010 1:59 pm
by Soaponarope
I have been working on my dungeon a VERY long time now(almost finished btw!) and believe I have pushed RTC to it's limit. New projectile spell effects is the number one thing I just flat out gave up on. If you want to do this, I would go with Sophia's tools as I have tried for far too long with no good results.

I tried the way of creating new items in air as well, though for what I wanted to do it caused more problems than success. If you just want a spell that basically throws stuff (like a "magic dagger" spell creating a dagger that disappears after it hits), than it will work fine. As for new damage types and things like that however, I don't think it's posssible.

Re: Creating new spells

Posted: Sun Dec 12, 2010 5:01 pm
by beowuuf
Well there must be a way to to do it, because DM did it in the fireball level and with many shooters, and RTC apes DM with the small fireball that shoots around level 8.

As to the spell inheriting properties, all I can suggest is that you clone a low level poison bolt to minimise the damage, and block all the higher powered ones. Or if you can make them all trigger a low powered spell, all the good.

Re: Creating new spells

Posted: Sun Dec 12, 2010 5:21 pm
by Gambit37
@Beo: Isn't there some flag for spellshooters in original DM engine that says "never lose velocity" or something like that? Dunno.

Anyway, I like the idea of cloning and using a very low power spell. I was going to use Zo, and thought I could get away with it as I won't be using button doors in my dungeon, but then I realised there are a few places I need to use button doors after all. Not sure which spell would be lowest power to use -- poison bolts are way overpowered in RTC, so I don't think that's the best choice.

@Soap: You've probably seen my posts about whether or not I should switch to DSB. I finally decided to stick to RTC but forgot this spell issue! I think you might be right .....!

Re: Creating new spells

Posted: Mon Dec 13, 2010 8:22 pm
by Gambit37
After a bit of playing around, I think creating non-spell objects in air is probbaly going to be OK. Although they don't travel very far and don't behave like real spells, I can live with that. I'd rather have new imperfect spells than no new spells at all. ;-)

Re: Creating new spells

Posted: Thu Mar 10, 2011 1:31 pm
by Lord_BoNes
Using the anti-magic and anti-fire stats of characters, and the fire/poison/lightning stats of monsters, to control just how effective any spell is.

EG:
If you set it up (using mechanics) so that a level 1 DES + VEN spell actually produces a strength 2 poison bolt (2%), then its actual range is 2 subsquares (it fizzes out very quickly)... then make level 2 DES + VEN produce a strength 3 poison bolt (3%), and level 3 being strength 4 (4%), etc...
Now just make any monster you want to be heavily effected by poison, have a poison blob damage percent set very high (300% -> 1000%).

To make it damage more (without producing extra specials effects, except lighting): just clone the normal poison bolt impact cloud and set all its images to NULL, now clone the poison bolt spell itself and NULL all its images... set the cloud for your invisible spell to the invisible cloud. Now you have a spell that ONLY applies damage (of the given type), no clouds or hazes.
RTC also seems to not have any issues with invisible spells/clouds (having too many clouds normally lags, no matter what)... unless you have a whole crapload producing a whole crapload of light (the lighting effect causes the engine to slow down).

I hope that I've been helpful to people... but as usual, I'll most likely put up an example in the next day or so... getting close to bed-time :cry: