Jump to content

modding wild magic


seraglio

Recommended Posts

What are all the component that make up wild magic? I've found the WILDMAG.2DA, and the associated SPWM* spells. Several slots in the 2da have an *, which seems to indicate the spell casts normally, but sometimes with an effect...like having a 60' area effect range (wild surge 90). Where does the extra effect come from? Please oh please let it not be hardcoded....been working on this for hours

Link to comment

We don't care about those numbers in this case, since you put in a filename. If you wanted let's say DUMMY in spell.ids, it would either have to be renamed or copied, since the number dereferencing depends on the prefix (SPWI etc). But none of those few use any alien opcodes, so there's no hidden magic there.

Or did you mean something else?

Link to comment

I think Lynx answered my question with my fear. Where you see asterisks on the wildmag.table, its referencing a HARDCODED constant, not available to modders as an opcode, script action, or anything else. Really dissapointing...I thought by using opcode 280 to force wild surges and 281 to set the wild surge to always be the area effect one...I could change spells on the fly to be AoE, like a Spellsinger bard class...have single target spells affect your group. Stoneskins for everybody...no.

 

Turns out that doesn't work.....I actually don't think wildmag.2da is directly linked to your wild surge roll per se. I think Chaos shield and other opcode 281 affects that increase wild surge results simply increase the CHANCES of a positive result...it doesn't actually increase your roll on that table per se. There is some other logic hardcoded taking place. That makes sense if you think about it, in some cases an area effect surge MIGHT be good, other times no. I think there is some additional logic that looks at target before determining roll.

 

After spending a whole day playing with those two opcodes, I could never force a specific surge. I did however always get GOOD surges, defined as "my intended spell cast". A quick look through the table only shows maybe 20 instances where a surge still casts your intended spell, but with opcode 281 set or incremented in the 70's or 80's, I ALWAYS got my spell casted, 20+ times in a row, with no side effects, good or bad.

 

Wildmag.2da is just a reference, its not a verbatim "you roll x, you get x result". There is another layer of logic unattainable to us at work.

Link to comment

if the total is over 100, it's always a normal cast. So if you have a high base rate, that's to be expected often.

 

281 is more of a boolean - force a surge or not? That's how it's used in the dweomer.

Link to comment

Thanks a ton for clearing that up. But Im still a little confused.

 

To my meager understanding its 280 thats boolean. 281 is an integer that can be set to whatever

 

#280 (0x280) Spell Effect: Wild Magic [280]
Parameter #1: Irrelevant
Parameter #2: Type
Description:

Applies the wild magic effect to the targeted creature(s).
This effect causes other spells to be subject to wild magic throws.
Known values for 'Type' are:
1 Affect next spell cast
2 Affect all spells cast for effect duration

 

#281 (0x281) Stat: Wild Magic [281]
Parameter #1: Statistic Modifier
Parameter #2: Type
Description:

This effect will alter the wild-surge roll, making the resultant effect either more or less beneficial.
Applies the modifier value specified by the 'Statistic Modifier' field in the style specified by the 'Type' field.
Known values for 'Type' are:
0 Cumulative Modifier -> Chance = Chance + 'Statistic Modifier' value
1 Flat Value Modifier -> Chance = 'Statistic Modifier' value
2 Percentage Modifier -> Chance = (Chance * 'Statistic Modifier' value) / 100

 

 

My problem is 281, set to 90, does NOT produce the area effect surge every time like you would expect. If you SET rather than INCREMENT, I would assume this negates the wild surge ROLL all together...no roll...just 90 every time. Thats not whats happening, so I cant create a PC that shares his spells with his companions, my end goal.

I created an item that forces every spell to wild surge (280), then SETS not increments that wild surge to 90(281). Placed on a non-wild mage with no other bonuses that would push their wild surge to 100 (normal cast)...thats what I get anyway...a normal cast with the string "Wild Surge" and a randon animation, but no side effect. Sos setting 281 does not seem to work, its no different than incrementing...it still rolls d100.

GenRB looks fascinating. I'll look into it more. How would GemRB allow me to more easily access this hardcoded function?

Link to comment

oh, yeah, I mixed them up. There's always a roll, the same way there's always a chance of a critical in combat. Consider that stat a bonus, a modifier in itself. On top of that, there could be hardcoded checks for wild mages.

 

re gemrb and how: besides them taking parameters and being explicit, I could just extract the interesting part into its own effect opcode. But to do your everything-is-aoe thing, you'd just replace the whole table with one entry. And top it off by using a negative surge bonus to make sure nobody can get to 100 or more.

 

btw, some spells are immune ("not magic", hlas, most clabs).

Link to comment

You can imitate wild magic effects with a Caster-targeted Apply Effects List pointing to the wild mage kit. Then put a Nahal's Reckless Dweomer cast at level 1 in the linked SPL (see my thread on caster-specific effects).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...