Finding function definitions

sacamano

Chieftain
Joined
Oct 28, 2016
Messages
4
Hi all, software dev here new to Civ modding!

I'm trying to figure out how to find what function arguments mean.

For example:
JavaScript:
TerrainBuilder.modelRivers(5, 15, globals.g_NavigableRiverTerrain);

But I can't find where TerrainBuilder itself lives, nor where TerrainBuilder.modelRivers is defined.

Things I've tried:

Looking at all TerrainBuilder references hoping to find a function def or import:
Bash:
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VII\Base\modules> findstr /s /i /m \<TerrainBuilder\> *.*
This gives me usages of TerrainBuilder of course, but not where its functions are defined.

Looking at all modelRivers references:
Bash:
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VII\Base\modules> findstr /s /i /m \<modelRivers\> *.*
Similarly, I can't find where modelRivers is defined.

Looking for modelRivers function export:
Bash:
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization VII\Base> findstr /s /i /m /c:"export function modelRivers" *.*
This gives no results, so as far as I can tell TerrainBuilder functions aren't defined the same way other JS functions are.


Any pointers on how to find where this function is defined?

More generally, what's the best way to find out what function parameters mean?

Thanks in advance!
 
The Scripting Runtime Information thread in tutorials might give you some idea how to move forward.
 
Yep Zoomer looks like those are game files :/
Thanks Wizer -- I'll take a look!
 
Back
Top Bottom