Open Ekey opened 3 years ago
Thanks very much for releasing this list to the community!
Thanks for this @Ekey however I do believe there are many functions in here missing, and most do not even work! I wish there was also parameters listed. I'm talking about HUD stuff and spawning entities too.
I'm still looking for a way to get the arguments for each function :)
My attempt to decompile lua scripts => here.
Unfortunately, it turned out to decompile only some. HKS_OPCODE_CHECKTYPE - In different decompilers, this opcode is ignored and there are no handlers for it, so I think it is not critical.
Decompiler bases on this project with a little bit modification
If anyone wants to help improve (finish) it please let me know.
@Ekey I decompiled most of them partially but they're not that useful. (sds_retail/tables/scripts.sds). Are there more lua scripts?
They seem to be using viscript (C_ViScriptSystem) for most of stuff and we have 0 knowledge how this works probably some custom stuff made by Hangar13. Almost every function there accepts "nodeId" which is "viscript" concept.
e.g.
f0_local0.unregisterEventOnLockPick = function (nodeID, inEntity)
viscript_helper.UnregisterEventFromSingleNode(nodeID, inEntity, "event_lock_pick")
nodeID:ActivateOutputPort(2)
return
end
Also it doesn't seem to be possible to get all entities/entity list with the current Lua functions we only have GetEntityByGUID, GetEntityByName.
ReferenceTable global contains GUIDs but only in form of strings and those methods I mentioned above expect a userdata C_EntityGUID
I have parameter names for functions only used in scripts.sds, but for many other functions it's not recoverable because they are defined in C++ and don't seem to be used anywhere else.
This needs more research
@bugproof
I decompiled most of them partially but they're not that useful. (sds_retail/tables/scripts.sds)
Interestings. Can you share your decompiler or decompiled scripts?
Are there more lua scripts?
Unfortunately not, only in scripts.sds has lua files.
@bugproof @Ekey Any news?
I try to document everything I can find on scripting but I get stuck on entities...
This is a not issue! Just info about lua classes and api's for wiki. Maybe someone will find this useful for coding lua mods :)
ATS
Audio
Battle
CameraManager
Capture
Database
DataStore
Delayed
Detector
Director
EntityWrapper
Game
Garage
GFX
HUD
Navigation
Outfits
Perchars
Physics
PipCamera
Police
RaceManager
Radio
SafeHouse
SaveSystem
SDS
ServiceValidation
Shotmgr
SkipScriptScene
Squealer
Streaming
StreamMap
Tail
Traffic
VideoCapture