In events, scripts can be referenced in events via a numeric script ID
In scripts, external scripts can be referenced via CallCommonScript with a numeric script ID
Init scripts can also reference a ScriptID via InitScriptGoToIfEqual
In C code, scripts can be referenced by calling ScriptManager_Change() with a numeric script ID
These script IDs get converted into a numeric ScriptEntry offset via ScriptContext_LoadAndOffsetID()
Both the script IDs and the ScriptEntry offsets are magic numbers that are not very readable. Translating them into the label of the script that is being called is inconvenient, finding all references is annoying. The manual process of doing this is potentially and unnecessarily error-prone for the user.
A json entry of "script": 2027 is not very readable, nor is a script line of CallCommonScript 0x7FC.
This issue has been run into and initially discussed in #688 and #690. An initial solution was discussed, and it was decided that instead of slotting in a solution that worked for that one case, a more comprehensive solution was preferred. Ideally, there should be some consistent way of linking the scriptID, the ScriptEntry offset, and the name of the label, in some sort of unified value that is consistent, readable, and easily searchable.
So far, the only proposal for this was put forwards by @metallicity here.
In events, scripts can be referenced in events via a numeric script ID
In scripts, external scripts can be referenced via
CallCommonScriptwith a numeric script IDInit scripts can also reference a ScriptID via
InitScriptGoToIfEqualIn C code, scripts can be referenced by calling
ScriptManager_Change()with a numeric script IDThese script IDs get converted into a numeric ScriptEntry offset via
ScriptContext_LoadAndOffsetID()Both the script IDs and the ScriptEntry offsets are magic numbers that are not very readable. Translating them into the label of the script that is being called is inconvenient, finding all references is annoying. The manual process of doing this is potentially and unnecessarily error-prone for the user.
A json entry of
"script": 2027is not very readable, nor is a script line ofCallCommonScript 0x7FC.This issue has been run into and initially discussed in #688 and #690. An initial solution was discussed, and it was decided that instead of slotting in a solution that worked for that one case, a more comprehensive solution was preferred. Ideally, there should be some consistent way of linking the scriptID, the ScriptEntry offset, and the name of the label, in some sort of unified value that is consistent, readable, and easily searchable.
So far, the only proposal for this was put forwards by @metallicity here.