Search the Community
Showing results for tags 'Patching'.
Found 1 result
While working on a recent mod attempt I’ve come to some impasses due to my rather poor skills at using weidu; in fact, that would be a rather kind appraisal, as I find myself near illiterate when it comes to weidu, doing most of my work by repurposing others’ code for what I need to accomplish, otherwise the actual coding process is rather opaque to me. Let me get to what I’m stuck upon: firstly, I’m trying to create a code that will patch all quarterstaves to remove the backstab feature by toggling the “EE/Ex: Toggle critical hits (25)” feature in the itm files. So far based on previous reference, I’ve managed to bang out this code: COPY_EXISTING_REGEXP "^.+\.itm" override PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN READ_SHORT 0x31 weaprof PATCH_IF (weaprof = 102) BEGIN WRITE_[bor or Byte?] 0x1b (THIS [bor or Byte?] 0b[?]) END END BUT_ONLY_IF_IT_CHANGES But in reading the Bor/Byte tutorial I’ve found myself over my head. I can’t seem to figure out whether the [bracketed] parts should be a Bor or Byte (I think it’s Bor), and I know I need a binary to accomplish the task, but I can’t seem to grasp how I translate what I want into the proper 1s and 0s. Could anyone help me with the missing pieces? The second problem is a bit more vague. What I need to accomplish is to create a weidu code that patches the WEAPPROF file so that all 3’s within the “2Weapon” row are turned into 2’s. This is what, with some help, I’ve put together: COPY_EXISTING ~WEAPPROF.2DA~ override COUNT_2DA_COLS cols FOR (col = 3; col < cols; ++col) BEGIN READ_2DA_ENTRY 34 cols col val PATCH_IF %val% = 3 BEGIN SET_2DA_ENTRY 34 cols col 2 END END For obvious reasons (though not to me) this code does not work, and, being a poor hand at weidu, I imagine I’ve made a bunch of syntactical errors in this code that prevent it from working. Could correct the code or tell me what I did wrong? I’m immensely thankful for any help I can receive, in advance, and I hope you can be patience with me, given I lack a great deal of the Programmer’s savvy.