cmorgan Posted October 30, 2007 Share Posted October 30, 2007 OK, thank you . I will try to get them up on the wikki, but it will take a few days - my cup runneth over. Link to comment
Gort Posted November 20, 2007 Author Share Posted November 20, 2007 could anyone make an update? or remove the old ones from wiki, at least? I'm feeling ashamed of them Link to comment
Miloch Posted November 20, 2007 Share Posted November 20, 2007 Why, what's wrong with them? Link to comment
Gort Posted November 21, 2007 Author Share Posted November 21, 2007 well, they aren't foolproof) Link to comment
Miloch Posted November 24, 2007 Share Posted November 24, 2007 So are you making a revision? I could use some of these macros, if they're not going to make it into WeiDU itself (which would be even better). Link to comment
Gort Posted November 25, 2007 Author Share Posted November 25, 2007 I did a revision, but I can't update the wiki Link to comment
Miloch Posted November 26, 2007 Share Posted November 26, 2007 Well, cmorgan seems to be a bit MIA, unless someone else with write access to the wiki sees this. Can you update the link in your original post at least? I get a "Sorry, the Server failed to retrieve the requested data." Link to comment
Gort Posted November 26, 2007 Author Share Posted November 26, 2007 i just deleted them, the new link was several posts lower. I updated the first post now Link to comment
cmorgan Posted November 27, 2007 Share Posted November 27, 2007 My ETA is a few weeks on this, I am afraid - but you could create a special Wikki account, and help yourself Link to comment
Miloch Posted June 3, 2008 Share Posted June 3, 2008 If you're OK with this, I can include them in WeiDU by default (shipping files and/or INCLUDEing them isn't needed, just LAUNCH_PATCH_MACRO is required).Was this ever done (or if not, any plans for it)? Link to comment
the bigg Posted June 3, 2008 Share Posted June 3, 2008 Not yet, but it's a matter of really nagging me. Link to comment
Miloch Posted June 3, 2008 Share Posted June 3, 2008 Not yet, but it's a matter of really nagging me.Consider yourself nagged, then . I use some of these features all the time, and it'd sure help to have them in WeiDU rather than dig for some pre-existing code in some other mod I don't even remember working with anymore, or some buried forum post. Plus, there are several different versions of these out there, so it'd help to have a standard (even if it's not actually incorporated with WeiDU, just delivered with it). Oh and while you're at it, can you add some file DIFF and AUTO_PATCH features, such as here? I know there are some within WeiDU already (--cmp-from/to etc.), but I've never had much luck with them, particularly when it comes to adding spell effects etc. - I think it only deals in WRITE_BYTEs. Link to comment
Mike1072 Posted June 4, 2008 Share Posted June 4, 2008 Not yet, but it's a matter of really nagging me.Consider yourself nagged, then . I use some of these features all the time, and it'd sure help to have them in WeiDU rather than dig for some pre-existing code in some other mod I don't even remember working with anymore, or some buried forum post. Plus, there are several different versions of these out there, so it'd help to have a standard (even if it's not actually incorporated with WeiDU, just delivered with it). WTB WeiDU pre-equipped with optimally coded macros for doing anything and everything I'll ever need to do with files. PST. Link to comment
Miloch Posted July 16, 2008 Share Posted July 16, 2008 There is at least one bug in one of these macros, probably two. I get the ever-so-helpful "Patching Failed (COPY) (Invalid_argument("String.sub"))" error when using the ADD_SPELL_EFFECT on spells with multiple effects and multiple headers, for example: DEFINE_PATCH_MACRO ~ADD_SPELL_EFFECT~ BEGIN PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN READ_LONG 0x64 ___#abil_off READ_SHORT 0x68 ___#abil_num READ_LONG 0x6a ___#fx_off FOR (___#index1 = 0; ___#index1 < ___#abil_num; ___#index1 = ___#index1 + 1) BEGIN PATCH_IF (___#index1 = (header - 1)) OR (header = 0) BEGIN //header=1 means ___#index1=0 READ_SHORT (___#abil_off + 0x1e + (0x28 * ___#index1)) ___#abil_fx_num READ_SHORT (___#abil_off + 0x20 + (0x28 * ___#index1)) ___#abil_fx_idx INSERT_BYTES (___#fx_off + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) 0x30 WRITE_SHORT (___#fx_off + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) opcode WRITE_BYTE (___#fx_off + 0x02 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) target WRITE_BYTE (___#fx_off + 0x03 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) power WRITE_LONG (___#fx_off + 0x04 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) parameter1 WRITE_LONG (___#fx_off + 0x08 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) parameter2 WRITE_BYTE (___#fx_off + 0x0c + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) timing WRITE_BYTE (___#fx_off + 0x0d + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) resist_dispel WRITE_LONG (___#fx_off + 0x0e + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) duration //was BYTE WRITE_BYTE (___#fx_off + 0x12 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) probability1 WRITE_BYTE (___#fx_off + 0x13 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) probability2 WRITE_EVALUATED_ASCII (___#fx_off + 0x14 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) ~%resource%~ #8 WRITE_LONG (___#fx_off + 0x1c + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) dicenumber WRITE_LONG (___#fx_off + 0x20 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) dicesize WRITE_LONG (___#fx_off + 0x24 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) savingthrow WRITE_LONG (___#fx_off + 0x28 + (0x30 * (___#abil_fx_num + ___#abil_fx_idx))) savebonus //correcting effects number SET ___#abil_fx_num = (___#abil_fx_num + 1) WRITE_SHORT (___#abil_off + 0x1e + (0x28 * ___#index1)) ___#abil_fx_num //correcting 1st effect indexes FOR (___#index2 = 0; ___#index2 < ___#abil_num; ___#index2 = ___#index2 + 1) BEGIN READ_SHORT (___#abil_off + ___#index2 * 0x28 + 0x20) ___#1effect_index PATCH_IF (___#1effect_index > ___#index1) BEGIN //if ability after current effect WRITE_SHORT (___#abil_off + ___#index2 * 0x28 + 0x20) (___#1effect_index + 1) //increase 1 effect ___#index1 by 1 END END //no offsets to correct END END //reset vars SET opcode = 0 SET target = 0 SET timing = 0 SET resist_dispel = 0 SET power = 0 SET header = 0 SET parameter1 = 0 SET parameter2 = 0 SET duration = 0 SPRINT resource ~%___#nil%~ SET dicenumber = 0 SET dicesize = 0 SET savingthrow = 0 SET savebonus = 0 END END BEGIN ~Add_Spell_Effect Test~ OUTER_PATCH ___#qwerty BEGIN WRITE_BYTE 0 0 READ_ASCII 0 ___#nil (1) END //for effect macro: OUTER_SET opcode = 0 OUTER_SET timing = 0 OUTER_SET power = 0 OUTER_SET parameter1 = 0 OUTER_SET parameter2 = 0 OUTER_SET target = 0 OUTER_SET resist_dispel = 0 OUTER_SET duration = 0 OUTER_SPRINT resource ~%___#nil%~ OUTER_SET dicenumber = 0 OUTER_SET dicesize = 0 OUTER_SET savingthrow = 0 OUTER_SET savebonus = 0 OUTER_SET probability1 = 100 OUTER_SET probability2 = 0 OUTER_SET header = 0 COPY_EXISTING ~spwi112.spl~ ~override~ PATCH_FOR_EACH opcode IN 2 4 BEGIN timing = 0 duration = 1 target = 2 resist_dispel = 3 LAUNCH_PATCH_MACRO ADD_SPELL_EFFECT END BUT_ONLY_IF_IT_CHANGES The first bug I fixed to write a LONG value (was BYTE). I can't figure this one out though. As far as I can tell, it bombs when trying to do the INSERT_BYTES but only on the second opcode on the last header. I've tried various versions of this code on various spells with multiple headers - same thing every time. I've put in debugging messages to see if it's writing the correct values and again, AFAICT it is. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.