Where can I find the source code of units?

Withdrawnbean

Chieftain
Joined
Jul 1, 2020
Messages
4
I'm new to Civ 5 modding, and I wanted to see how certain actions, such as the Xcom Squads, teleport work. However, I can't seem to find any source code files that show the code for this, which I'm pretty sure is lua correct?
 
The Xcom "teleport" is just an extended range para-drop. The unit gets it via the PROMOTION_EXTENDED_PARADROP promotion (which is defined in the CIV5UnitPromotions_Expansion2.xml file).

Lua is mainly used (by Firaxis) for the UI and scenario specific changes. Almost all the standard game code is written in C++ and is in the DLL source code. The para-drop code is in CvPromotionClasses.cpp (for the promotion) and CvUnit.cpp (for the unit's use of that promotion)

Edit: PS: If you're searching for threads relating to AssignStartingPlots.lua, it's worth searching for ASP and ASP.lua as these are common short-hands for it
 
Last edited:
Top Bottom