Jump to content

Recommended Posts

Posted

Due to the upcoming Next-Gen update, I took a deeper look at Papyrus, the compiler and the VM.. I'm currently making some Papyrus functions to help with diagnosing any possible script related changes.. I'll likely add these to Garden of Eden SE v17.4:

  Reveal hidden contents

They're still in beta, signitures and log structures may change.. but they may be able to help with identifying Forms with attached scripts (LogScriptObjects logs >70k lines) if you're still interested.

Posted

It isn't clear to me what the last 2 calls are returning - or more accurately - what context they are reporting on... A single Script, object, save, or the entire game.

Anyway, I am sure that will become clear. I hope you won't have too much work adapting GOESE when that update drops...

Posted (edited)
  On 4/20/2024 at 5:37 AM, PJMail said:

It isn't clear to me what the last 2 calls are returning - or more accurately - what context they are reporting on... A single Script, object, save, or the entire game.

Expand  

In their current states:

   GetScriptObjectTypes return all form typed ScriptObjects the engine knows in a String[]. These are scripts objects designed to be attached to game objects, e.g. "F4SE" is not in the list but "Form", "RefCollectionAlias" and "ActiveMagicEffect" are.

   LogScriptObjects logs all Papyrus script objects (the instances) existing in the memory and tries to locate the BoundGameObjects they're attached to. Native VM functions sometimes (seem intentionally?) don't locate the game object though ("unattached Script instances"?) that's why the many "IsValid" checks.

   LogScriptsData iterates the map of compiled scripts, then loops through the scripts' functions and events one by one to output some data. Instruction opcodes are not in the output.

All functions query the VM to for script data that was loaded in the memory by the vanilla code. They, especially LogScriptsData, were actually made to help me identify possible changes to vanilla Papyrus scripts. If BGS decides to edit some then recompile all, it might prove difficult to determine which ones were actually edited, and how. Comparing the scripts pre-post update may reveal these.. Beyond that, having access to script instances and objects can help with identifying or maybe even debugging bad script data ("Set" and "Remove" functions we be a bit too ambitious though..).

  On 4/20/2024 at 5:37 AM, PJMail said:

Anyway, I am sure that will become clear. I hope you won't have too much work adapting GOESE when that update drops...

Expand  

GOESE functions are located by the code through the Address Library, including the event dispatchers. The Address Library will (supposedly) greatly speed up things. I don't know if BGS changed class structures.

Edited by LarannKiar
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...