Jump to content

Expanding function size in UPK


wghost81

Recommended Posts

Hmmm, I don't see that as a significant flaw, but I suppose that's really a matter of preference. I prefer the extra error checking that comes from having the BEFORE matching check prior to application. As to making small changes all I have to do is click a button to revert the changes to the original code and then make my changes to the AFTER section and re-apply.

 

In general I found that trying to make changes on top of other changes to be a quick way to a corrupted upk, which is why I avoid it as much as possible now. I suppose I'm just not savvy enough to make that style work for me :blush:

 

The only time I make changes on top of changes is for spot debugging, where I'm basically just inserting a return statement or breaking conditional branches in order to test which portion of a larger piece of code is causing the failure.

 

In that case I actually still make a small before/after hex change file, but now the BEFORE is a copy of my modded file and the AFTER has the debug "breakpoints", and I quickly revert these debugging changes once I find the error. I then revert the primary change and make alterations to the modded hex.

 

I'm not suggesting at all that this is the "best" way, but its the way that I've found works for me. If I try and make changes and more changes I tend to break everything.

 

Many of the mods I make require essentially complete rewrites of fairly large functions. Here's a recent one in for the Long War alien leaders code :

 

  Reveal hidden contents

 

 

It wasn't a total rewrite, but the jump offsets shifted enough that it was simpler for me to just treat it as a total function rewrite. The function body consists of 1375 file bytes.

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Amineri, I agree about preferences. That's why I kept before-after option in my tools. :smile:

 

As for total function rewrite, I prefer file-based changes in this kind of situations. FUNCTION_FILE keyword in PatchUPK modfile handles it well for me. :smile: In fact, hex base for offsets and links to binary files were two things I always wanted in ToolBoks. :smile: Back then I used UE Explorer to export function buffer to binary file, HxD to make small fixes and changes (like "debugging" code/jumps) and UE Explorer to import changes back into upk. It worked fine, but required to many mouse-clicks and I'm more like a keyboard person. :smile:

Edited by wghost81
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...