Lua Hook Checker

Civitar

Adventurer
Joined
Mar 23, 2014
Messages
1,507
Location
Switzerland
This is just a little Python script you can use to check if a Lua hook you seem to recall hearing about (or just want to exist) actually exists in Civ5, and what expansions it works for.
Spoiler What it should look like :


Instructions:
  • Download and extract the .zip file to wherever you normally put your modding files. Make sure to always keep the .csv and .py files together.
  • Double-click on checker.py to run the script. If a Python window doesn't open then download Python and then try again.
  • When prompted, type in the hook you're looking for. If your entry doesn't exactly match an existing hook, you will get a list of hooks containing your entry (meaning you can use this to search for hooks as well).

To make this I took whoward69's post from the latest patch and made it into a little .csv file which the script reads from. He did all the real work here.:D
This currently won't give you the arguments you can get from the hook. Also it only works for GameEvent hooks, and not LuaEvents or whatever the other kind of hook was (if there was another kind and I'm not thinking of a different game). Hope this is useful!

DOWNLOAD HERE
 
Also it only works for GameEvent hooks, and not LuaEvents or whatever the other kind of hook was (if there was another kind and I'm not thinking of a different game).

Events - typically UI related (but there are some processing related ones), generated by parts of the game we don't have the source code for

GameEvents - game play related, generated by the game core DLL we do have the C++ source for

LuaEvents - game play and UI related, generated by the game core Lua files so we have the source code
 
So I could get ahold of LuaEvents, but not Events?

LuaEvents are here, there is a list of Events around somewhere, but it's been compiled from SDK docs and searching the .exe for strings so should be treated with caution
 
Top Bottom