Jump to content

Photo

Inventory Search - How to add a BGSCodeObj function via F4SE?

fallout4 f4se plugin debugging mod

  • Please log in to reply
No replies to this topic

#1
psxvoid

psxvoid

    Stranger

  • Members
  • Pip
  • 4 posts
Hi,
 
I'm trying to find ways to search (or at least filter) items in an inventory. My intermediate goal is to write a mod that sorts junk inventory by components.
 
The main entrypoint I found so far may be in ContainerMenu.swf. I dig up to line 811 in ContainerMenu.as:
this.BGSCodeObj.sortItems(!isPlayerInv,uinewFilter,false);

This function accepts `uinewFilter` integer parameter (1 shifted to left 1-3 and 9-12 times). It means that if it is possible to write an F4SE plugin that adds a function for sorting by additional fields and using it here then additional sorting "tabs" can be added to a player's inventory. It seems like Vertibird Jump already added a function to BGSCodeObj. However, this plugin is modifying a memory pattern of the F4 via F4SE (source code). I have experience working with assembly and c++ but I do not know how to use the debugger for finding such memory modifications for F4SE. It seems like each pattern is an actual opcode.

 
Could someone give me a hint on finding needed features (which debugger to use, what to look at)?






Also tagged with one or more of these keywords: fallout4, f4se, plugin, debugging, mod

Page loaded in: 1.063 seconds