Skye Posted December 30, 2013 Share Posted December 30, 2013 I know it's possible to force wild magic effects with opcode #280, but is there any way to only do so only X% of the time? Kinda in the way wild mages get slapped with surges 5% of the time. A dirty way of doing that is by altering the wild magic bonus via opcode #281 to hit blanks, but that of course skewers the results when a wild surge occurs. I can't really think of any way to make a "rider" effect that would be applied after each casting aside from using a script, but that also has its drawbacks. There aren't really any "safe" AI script slots to temporarily place the script in. I also don't know of any way to detect if any spell has been cast by the creature, since the SpellCast() trigger seems to require a spell id, and I don't remember there being any categorical entries. Link to comment
lynx Posted December 30, 2013 Share Posted December 30, 2013 does using the effect probability fields not work for this? Link to comment
Skye Posted December 30, 2013 Author Share Posted December 30, 2013 Not really. If I set the probability to something like 20%, there's gonna be a 20% that a wild surge happens on every spell for the duration of the effect, and an 80% chance that it doesn't happen at all. The effect would need to be reapplied every time a spell is cast for the probability fields to have the desired effect (i.e. a "rider" effect). The only other way I can think of to approximate this behaviour is to have a bunch of delayed temporary effects with set probability chances. That's not really neat though. Link to comment
lynx Posted December 30, 2013 Share Posted December 30, 2013 What's this rider effect, stacking? Link to comment
Skye Posted December 30, 2013 Author Share Posted December 30, 2013 Rider effects are effects that ride along with some other effect (like a spell being cast). There's no real way to make these in Infinity, it's just the behaviour I'm looking for. That is, I want there to be a random chance of a wild surge occurring each time a spell is cast, in the same manner that wild mages have a fixed random chance (5% I think) of that happening. It's probably a hardcoded thing for wild mages, but I'm looking for ways to emulate this that are more elegant from what I already have (table shifting via #281). Link to comment
Mike1072 Posted December 31, 2013 Share Posted December 31, 2013 For the duration of the spell, you could have delayed effects that cast another spell each round. That other spell could have an effect to apply #280 for one round with a % chance. Link to comment
Skye Posted December 31, 2013 Author Share Posted December 31, 2013 For the duration of the spell, you could have delayed effects that cast another spell each round. That other spell could have an effect to apply #280 for one round with a % chance. The only other way I can think of to approximate this behaviour is to have a bunch of delayed temporary effects with set probability chances. That's not really neat though. Yeah, that's the obvious solution. It's the first thing I thought of when I considered the percentages. But it's not really a good solution for what I need. It's messy and only works if there's a set duration. Plus it falls through if the caster has improved alacrity, breaking the 1 spell/round limit. Link to comment
Mike1072 Posted December 31, 2013 Share Posted December 31, 2013 Well, it's not too messy of a solution in comparison to the way some other spells work. You haven't stated how the effect is going to be granted and if it's supposed to be permanent, limited duration, or while equipped. Limited duration would mean lots of effects but it's easily automated. Permanent would be the cleanest because you could make the secondary spell reapply itself. While equipped would be the messiest because it's hard to register when something is unequipped. The only way I can see Improved Alacrity being handled "correctly" is if each spell is given a % chance of applying permanent wild magic proc for the next spell cast (presumably it removes itself after triggering?). But then you would have to figure out how to target that only on the casters who should be affected. Link to comment
Skye Posted December 31, 2013 Author Share Posted December 31, 2013 You've pretty much summarized the problem. Unless I can figure out a neater way of doing it, I'll stick to the table shifting solution. It's not ideal, but it's the least messy. Link to comment
Jarno Mikkola Posted December 31, 2013 Share Posted December 31, 2013 Well, it's not too messy of a solution in comparison to the way some other spells work. I am wondering did you mean the non- or with- the improved alacrity -version, as the way it sound, one would have to edit every spell in the game to make it happen, I (well, igi first, then with help of Wisp made it perfect) have done so in the Spell Refresh mod, but that effect was made to effect every spell casted, for everyone(so the justification is rule based)... now if we add this particular to only effect one NPC or a kit ... it's definitely not going to look so neat. Effecting lag and so forth... yeah the code is there free to copy and adapt... @Skye: This question is very important: You haven't stated how the effect is going to be granted and if it's supposed to be permanent, limited duration, or while equipped. Link to comment
Skye Posted December 31, 2013 Author Share Posted December 31, 2013 It's a hypothetical question more than anything. In my particular case it's a long-lasting spell, but I also considered how to implement this as a class feature (i.e. permanent) or on an item (while equipped), which prompted the creation of this thread. Link to comment
wolpak Posted September 14, 2015 Share Posted September 14, 2015 This is a necro, and I am not sure if this has been solved, but I have a solid work around. Have a permanent ability or an item use opcode Apply Effect on Condition: Target Self, Set to type 3 Freq 1 (I was having an issue with Type 0) And have the effect resource be whatever you want to name it (I did Wild.eff) Have that Effect Cast Spell at Target, Duration 1, Type 1, Spell Name: I called it Wild Have that Spell target Pre-Target, opcode 280:Wild Magic, Duration 1, Type 2, with your probability in there. Basically, it just casts a spell at yourself every second, applies an effect that casts a spell at you with a duration of 1 that sets Wild Surge. So, if you happen to cast at the probability you set for the surge, then it surges, otherwise it casts normally. I'll be using this a bit in my mod and in my armored arcana. Link to comment
Skye Posted September 16, 2015 Author Share Posted September 16, 2015 Re-applying the same spell over and over works, but I can't say I found it to be a very nice solution. Ultimately, I scrapped the spell. YMMV Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.