Does anyone of you know what .cpp/.h/.py file contains these functions?

AstrokauzazITS994

Chieftain
Joined
Jan 15, 2023
Messages
25
Does anyone of you know what .cpp/.h/.py file contains these functions?

chat, multiplayer, interface, flag, animation of leader
 
It's hard to answer that question because it's fairly vague questions compared to the complexity of the source code. Also the code could do with better organization, which means for the questions asked here, the functionality isn't in just one place.

Chat
I think most of that code is in the game exe (not modable), through it's plausible you can find a command to send chat.

Multiplayer
CvMessageControl and CvMessageData contains the code to network transmission of data. However that's not the whole story because it's a network "engine", which does nothing gameplay by itself. It's like CvUnit sends a message and then all receives that message and it will route that data back to CvUnit. In other words it's sort of traffic control/routing while the real data handling is spread across all the various classes.
Network is generally C++, but some of the functions are python exposed so pretty much they can be everywhere.
The diplomacy screen is in the exe and data handling is in python (named something with diplomacy)

Note: network traffic is one of the few places in the code where Colonization differs (network control/message is inside the exe).

Interface
This is spread across a number of python files. For obvious reason the graphic engine is inside the exe so not everything can be modded. Also for some reason some python screens are hidden inside the exe itself.

Flag
The exe handles this, but it does ask the DLL (cpp) which flag file to use so technically you can control which one to display. I forgot where it is, but it's likely in CvPlayer.cpp or perhaps more likely CvSelectionGroup.cpp.

Animation of leader
This is handled by the exe, but there is a way to call the exe to tell which attitude the leader should show. Never used it so I can't remember offhand where it is, but I do believe I saw it in the API somewhere ages ago.
 
Top Bottom