-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magiclysm: Multiple spell effects #31983
Conversation
I was thinking another approach: to wrap up most of current spell data to a 'spell effect' structure (range, damage, aoe, targets) and change json accordingly. Then we could add additional structure 'spell context', which can store/change some data between every effect invocation. This structure should be passed to every effect function. For example, the first effect writes all the targets affected to the list But generally, it allows us to describe a composition of fx/sfx/text effects in a better way. For example, a single fireball could consist of the following effects:
Or some bloody necromancer spell could be described as:
Let's return back to current PR. The problem with infinite loops now can be solved by introducing this |
i don't follow why we need to change everything around in order to do... exactly what everything already can do plus this pr. There's no need for any scripting, since changes are all in C++ for effects, and once this PR is wrapped up modders will have even more freedom to have spells do whatever they want. |
Right now you can not change spell numbers (damage, area, ...) from another spell/effect without adding a new spell effect in C++, with combined logic. For example, there was an ancient spell Since you've done it this way, that's OK. Spell context can be introduced to current approach of spell chains. And it can deal with infinite loop problem as well. |
no, you don't need to do a new c++ effect to do new spells with different values, you just need to write up more json for them. |
I don't want to sound nitpicky, but I would call this spell chaining as that's what it really is, one after another, though with zero casting times on the following spells, which I would probaby do, they could more or less be simultaneous depending on what you were trying to accomplish. I also don't really see how there's a problem with infinite loops, you'd have to create your own custom spells for that, I'm not going to make any that do, and if the player wants to be stupid and lock up their game with a spell loop, or at least until they run out of mana, that's kinda their choice isn't it? |
sure, you can call it what you like as far as infinite loops, if i can try to nip it in the bud i'd rather do that if i can. i think i've tracked down a relatively easy way to do it, too. |
I would suggest increasing the number of chained spells though, 3 is a bit arbitrary. A hard limit of... say spellcraft rank or spellcraft/2, or maybe just max it out at 10. |
i never said anything about hard limits. i didn't put in any hard limits. |
LOL, you're right, I just read too much into the 3 castings of the lightning thing, my bad. so it's unlimited? |
the reason i haven't called it chained spells is that
|
|
the monsters don't die until the end of the spell chain |
Wouldn't that depend on the casting time of the chained spells? I checked and your lightning blasts each have casting times, so is time passing between them? |
no, the casting time for lightning blast is just for that spell. spells chained onto another spell ignore casting time, casting cost, and range. |
Ahhh, okay. That makes sense, but.. I feel like if it's possible you should have it able to go both ways. |
e14a600
to
a3f0828
Compare
315b3e7
to
fa3c360
Compare
8d7e1da
to
54b5e0b
Compare
adb1eaa
to
85efd10
Compare
97a1940
to
898e4a7
Compare
Summary
SUMMARY: Mods "Magiclysm: Multiple Spell Effects"
Purpose of change
I have had several requests to make it possible to add multiple effects to spells.
Describe the solution
I have added a new member to spell_type which is a vector of
fake_spell
, which has a spell_id, max level, and a bool. This will allow a huge amount of versatility, since what this does is actually cast the new spell, rather than just apply affects. I have added a pair of new spells for stormshaper that illustrate the usage: Lightning Storm basically casts Lightning Blast an additional 3 times after it does its own spell effect.