|
Post by Fafnir on Aug 11, 2005 19:46:10 GMT -6
Hello, I've been doing a lot of LOMSE modding recently, and have made good progress on my own gs modification, but i've run into a bit of a snag. I'm trying to give creatures charges of certain spells, (in the same way that staff of drowning grants "charges" of drowning to a mage) but have only come up with partial success.
Through manipulating the CAN_CAST_BREATH order, I have managed to grant certain units attack spells. I gave the earth worm the ability to cast tremor once a day with this method. However, there are several limitations to doing this.
Firstly, it seems that only granting attack spells will work. I attempted to allow dryads to cast ressurection, but upon using the ability, I found that it would not let me target dead units, or even my own units. No matter what spell is set to be cast, you can only target the enemy, which of course means that spells like heal or ressurect won't work.
Secondly, it only works in short range. When the earth worm in my mod uses his version of the breath (which i set to a modified version of tremor that stuns units in a small radius), he always moves into short range first before casting. This behaviour is similar to what fafnir does when he casts breath, and leads me to believe that the targeting information for CAN_CAST_BREATH is hard coded into the game.
Thirdly, you only get one charge per day. I have not found a way to increase the total amount of charges per day of The Breath, which of course makes this method of granting units single spell casting abilities of limited use.
This leads to my question: Boaster (or anyone else), do you know of any way of granting units daily charges of certain spells? So far, my approach has been to try and find a way to create an invisible artifact on creatures either when they are trained, or at the start of every battle which could impart them this ability, but i havent been able to figure it out how to do this yet. Any help you could offer would be much appreciated.
Oh, and if anyone would like to know how I altered the Breath ability, I would be happy to explain.
|
|
|
Post by Boaster on Aug 11, 2005 20:30:35 GMT -6
As far as I'm concerned, you're treading into new and uncharted territory. I have tried creating my own Innate Spell commands like that of Can cast breath. For instance, I tried giving Paladins a Lay Hands ability. I could never get anything to work though.
As far as creating an invisible artifact, that would've been best best suggestion. But I have not figured out where or how to create the artifact for spawned creatures. I wanted to give Trolls the ability to regenerate 1 HP every 20 seconds in combat. I did some looking around, and found nothing I could apply this to or with anything.
With your custom can_cast_breaths, does it have the same icon as the regular Breaths, or did you find a way to customize them?
|
|
|
Post by Fafnir on Aug 11, 2005 20:39:03 GMT -6
Same Icon
|
|
|
Post by Boaster on Aug 11, 2005 20:40:33 GMT -6
If you could, tell me how you came about creating these breath commands that casted other sorts of spells.
|
|
|
Post by Fafnir on Aug 11, 2005 20:40:37 GMT -6
If you are interested in pursuing this, we should work together on this and try to figure out how to make it work. I have a few ideas that I could discuss more in depth with you if you'd like.
|
|
|
Post by Fafnir on Aug 11, 2005 20:41:23 GMT -6
Ok, just give me two seconds, i'll copy / paste some code for you.
|
|
|
Post by Fafnir on Aug 11, 2005 20:44:40 GMT -6
It's actually really simple. The first step is to give the Earth worm CAN_CAST_BREATH in his unit file.
This is the next step, taken from generic.gs
what GENERIC_PROC_CAST_BREATH_GET_SPELL_ID eq
{/u exch def /a exch def a 0 UNIT_TYPE getunitdata unittypedict begin ficr5 end eq{spelldict begin fire_breath end}
{a 0 UNIT_TYPE getunitdata unittypedict begin aicr5 end eq{spelldict begin frost_breath end}
{a 0 UNIT_TYPE getunitdata unittypedict begin eacr5 end eq{spelldict begin tremor2 end}{spelldict begin frost_breath end}ifelse}ifelse}ifelse}if
what GENERIC_PROC_SPIT_WEB_GET_SPELL_ID eq {/u exch def /a exch def spelldict begin spider_web end}if
***NOTE: You can easily do this with spit CAN_SPIT_WEB too, but the results aren't much different.
|
|
|
Post by Boaster on Aug 11, 2005 20:54:45 GMT -6
Okay. I see how to do it. I've seen the code before, I just really couldn't remember the file to look at.
I've tried experimenting in gs/actionb.gs, creating a completely new order with a different graphic and trying to get it to work that way.
I'm not really in the mood for doing lots of testing, I done that yesterday and fried the brain a little... well not really.
gs/actionb.gs gs/textdict.gs gs/generic.gs
If you wanted to try, you could try forumulating a whole new command order. Just look at each of those files and do a search for "web". Then you'd have to add that order to a unit you want to test with.
Rather than doing spells with commands, you could probably do some on attack. Look to gs/combat.gs, I'd advise to look at the combat.gs in my GS5 mod. I've settled with that, rather than breaking my neck and fingers trying to add new commands.
|
|
|
Post by Boaster on Aug 11, 2005 20:57:07 GMT -6
Also, if you'd like we could play my GS5 mod together through Kali. If you'd like to, give a time and date.
|
|
|
Post by Fafnir on Aug 11, 2005 21:01:01 GMT -6
Thanks for your input. I've already added a few spells on attack. You showed me how to do it about a month ago in a very helpful email. Shamblers in my mod cast area of effect entangle on attack, and Fire elemtals do fire damage and stun attackers on defend in melee. [By the way], i think i've figured out how to cast spells on ranged attack too, but i'm not finished experimenting with it yet.
I also have tried to add whole new commands in actionb.gs, but usually I just end up breaking the game. I have a new idea that i'm pursuing, if you'd like to hear about it.
|
|
|
Post by Boaster on Aug 11, 2005 21:17:39 GMT -6
I was looking more into doing casting spells on ranged attack. I was looking further into combat.gs where it started with the missile stuff, such as the Thief's 2% chance to double their ranged attack value in combat.
I also figured out that the Luck mod actually helps in combat, and not just procing artifact spells on attack/defend.
So whats your new idea?
|
|
|
Post by Fafnir on Aug 11, 2005 21:50:59 GMT -6
I've just downloaded icq and i'll add you to it. I'll be online sometime tomorrow in the morning/afternoon. My ideas are a bit too in depth to discuss via the forums, but if you'd like to talk about them, go online tomorrow and we'll talk.
|
|
|
Post by Boaster on Aug 11, 2005 22:10:12 GMT -6
I actually don't use ICQ anymore, and haven't for the past 2 years. You're better off trying AIM, MSN, or Yahoo messengers.
|
|
|
Post by Fafnir on Aug 11, 2005 22:27:34 GMT -6
could you possibly make an exception? I'd rather not download those other programs
|
|
|
Post by Boaster on Aug 11, 2005 22:43:12 GMT -6
I've got 3 out of the 4 most used messengers. You only have 1.
|
|
|
Post by Fafnir on Aug 12, 2005 0:09:35 GMT -6
Alright, I'll see about getting MSN messenger. Talk to you tomorrow.
|
|
|
Post by Fafnir on Aug 12, 2005 10:54:31 GMT -6
Is culexmaxa@hotmail the right email for your msn account?
|
|
|
Post by Boaster on Aug 12, 2005 11:59:42 GMT -6
Yes it is.
|
|
|
Post by Fafnir on Aug 18, 2005 22:13:24 GMT -6
Well, I did it. As of right now in my mod, gargoyles can cast leadership once a day (this is just a placeholder spell, i'll change it to a better spell once I think of something better) and unicorns cast bless at the start of every battle.
The way I got it to work is very cumbersome, and complicated. It wound up being even harder than I originally anticipated. Also there are a few downfalls.
#1: It creates a few minor graphical glitches. Gargoyles' mini portraits now show up as footmen in combat. This is a small bug, and I believe I can fix this, but we shall see.
#2: As of this time, this does not affect units created in the lord editor. I'm sure I can figure something out though.
#3: I have no idea how to make this work for overland spells. Using the method I used it would be completely impossible to do so. I think in combat spells might have to suffice for now.
Anyways, I'll post an in depth explanation of how I did it tomorrow, or the next day. Right now, I'm going to bed.
|
|
|
Post by Boaster on Aug 19, 2005 10:14:09 GMT -6
Sounds cool. Glad you pulled it off. But instead of using the Breath commands, why not use the Spit Web commands? The breath commands tend to be close range, whereas web looks like it can be long or short range.
|
|