• Civilization 7 has been announced. For more info please check the forum here .

[NFP] Newb question about learning the parameters of a function that is added to an event


Nov 1, 2019
I have seen this function "OnCombatVisBegin" in a lua file and the parameter "combatMembers" is used like an array. What is "combatMembers"? A table?

function OnCombatVisBegin(combatMembers)


    example: uses combatMembers[x] in the body of the function


Events.CombatVisBegin.Add( OnCombatVisBegin );

If I wanted to know how to write a OnUnitMoved function correctly, how do I learn what the parameters are?

OnUnitMoved(what parameters?)


      what parameters are available and how do I know their type? Are they all tables or can they be any type?




Any help is appreciated or if anyone knows where to find a resource that lists the full declarations of these functions, that would be great! I think that if I can get these declarations, I can pretty much write any kind of mod I want.

Well, I found some of the answers just moments after asking this question

If anyone knows of another resource, that would also be great!
Last edited:
Top Bottom