Miloch Posted March 6, 2007 Share Posted March 6, 2007 This is probably fairly easy, but I haven't done it yet. How would I go about patching something in an existing spell's extended effects, like changing its projectile animation? I also want to add a lighting effect maybe. I could just copy over a modded spell but that's kind of sloppy. Also, any idea what the "Unknown" (according to IESDP) values in the headers represent, like at 0x48 and 0x5C? Link to comment
Miloch Posted March 7, 2007 Author Share Posted March 7, 2007 Well, that's the least of my concerns, but uh, thanks for the info. Why do all the spells have different values at these bytes (e.g. 262180, 262214)? I'm asking because I want to change one unused spell to be more like a different one, and they have different values there, so I'm wondering if I should change those too. Link to comment
Nythrun Posted March 7, 2007 Share Posted March 7, 2007 Do what you like to these fields, the engine doesn't ever read them though, so spend little time on them There's an awful lot of spell patching code in the fixpack to use a template; but basically you're going to be nesting two loops (I use FOR, but WHILE is fine, I do the arithmetic inside the loop definition, Cam does the arithmetic during the operations). COPY_EXISTING ~aspell.spl~ ~override~ PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN READ_LONG 0x64 "extended_header_offset" READ_SHORT 0x68 "extended_header_count" READ_LONG 0x6a "effects_offset" FOR ("index1" = 0x0; "index1" < ("extended_header_count" * 0x28); "index1" += 0x28) BEGIN READ_SHORT ("extended_header_offset" + "index1" + 0x1e) "number_of_effects_this_header" READ_SHORT ("extended_header_offset" + "index1" + 0x20) "index_to_effects_this_header" READ_SHORT ("extended_header_offset" + "index1" + 0x26) "this_is_the_projectile_field" FOR ("index2" = ("index_to_effects_this_header" * 0x30); "index2" < (("index_to_effects_this_header" + "number_of_effects_this_header") * 0x30); "index2" += 0x30) BEGIN READ_SHORT ("effects_offset" + "index2" + 0x00) "opcode_for_this_effect" END END END BUT_ONLY Link to comment
Miloch Posted March 7, 2007 Author Share Posted March 7, 2007 Ah, the good old Linear A again. I should've thought of pinching from the Fixpack. Thanks. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.