Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
the includ ed dynamic link library (Core.dll). It has all the features you can find in my own trainer. All you need to do is to code your own GUI (graphics user interface) and then lo ad the functions from Core.dll. To be able to use the functions inside Core.dll you are going to need to know a little bit about the functions: ================================================================================ ====== Core.dll: ================================================================================ ====== Will work for: Civilization 1.0.1.217 DirectX9 - DirectX11 (Will not work for earlier versions) Amount of functions inside: 25 List of functions: The first is the ordinal number of the functions. The second is the name of the functions. You can import functions based on name or ordinal. I prefer ordinals as they are fastest and makes the executable smaller. Choose whatever you like. The third column if the amount of parameters each function takes. The fourth and fifth column is the actual parameters used in the function. If the column is empty, then it takes no parameters. FUNCTION PARAMETERS2 ORDINALS @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 FUNCTION NAMES GameExist GameOpen WriteResource ReadResource WriteFreeResourceSlots CheckFreeResourceSlots WriteGold ReadGold WriteCulture ReadCulture WriteGoldenProgress FUNCTION PARAMETERCOUNT 0 0 1 0 0 0 1 0 1 0 1 PARAMETERS1
Value:DWORD
@12 @13 @14 @15 @16 @17 Value:DWORD @18 @19 Value:DWORD @20 @21 Value:DWORD @22 @23 Value:DWORD @24 @25
ReadGoldenProgress WriteGoldenTurn ReadGoldenTurn WriteGreatGeneral ReadGreatGeneral SetMovement GetMovementState SetExperience GetExperienceState SetHealing GetHealingState SetCityModifier GetCityModifierState PrintBaseAddr
0 1 0 1 0 2 0 2 0 2 0 2 0 0
======================= A word about parameters ======================= All parameters that has a name of "State" can be set to either 1 or 0. 1 means it will activate and 0 means it will be deactivated. All parameters that has a name of "Value" is the value you want to set on the current variable. For example, if you run the function "WriteGold" you would set Value to 10000 for example to write 10k gold. ================================= Full Explanation of each function ================================= -------------------------------------------------------------------------------@1 GameExist Use this function to check if Civilization is running/started. Parameters: None Return value: 0 = The game is not running NonZero = The game exist in memory and is running -------------------------------------------------------------------------------@2 GameOpen Use this function to open the civilization game process. This function is essential to have the trainer work in the first place. This is the one and only function that must be run before you can use any function in the dll. This applies to all functions except "GameExist" function. This function will not launch and execute civilization, it will only open the process memory. The user have to run civilization on his own.
Parameters: None Return value: 0 = The process could not be opened. NonZero = Process was successfully opened -------------------------------------------------------------------------------@3 WriteResource Use this function to set all strategic and luxury resources to a specific value. Parameters: 1 Param #1 = Value to set Return value: None -------------------------------------------------------------------------------@4 ReadResource Use this function to read from memory how many Iron resources you have. If you initially set resources by using the function "WriteResource", then all resource s should be the same, so reading the Iron resource should be enough to gather info rmation about all resources. Parameters: None Return value: The return value is the amount of Iron resources in the game. -------------------------------------------------------------------------------@5 WriteFreeResourceSlots This function will zero out all spent/used resource slots in the game. Parameters: None Return value: None -------------------------------------------------------------------------------@6 CheckFreeResourceSlots This function will check if you have any spent/used resource slots from any of the 6 strategic resources in the game. Parameters: None Return value: 0 = No slots were in use NonZero = One, several or all slots were in use
-------------------------------------------------------------------------------@7 WriteGold Use this function to set the amount of gold in game. Parameters: 1 Param #1 = Gold to set Return value: None -------------------------------------------------------------------------------@8 ReadGold This function reads the amount of gold you have in game. Parameters: None Return value: The return value is the amount of gold. -------------------------------------------------------------------------------@9 WriteCulture Use this function to set the amount of culture in game. Parameters: 1 Param #1 = Culture to set Return value: None -------------------------------------------------------------------------------@10 ReadCulture This function reads the amount of culture you have in game. Parameters: None Return value: The return value is the amount of culture. -------------------------------------------------------------------------------@11 WriteGoldenProgress Use this function to set the amount of golden progress in game. Parameters: 1 Param #1 = Golden Progress to set.
Return value: None -------------------------------------------------------------------------------@12 ReadGoldenProgress This function reads the amount of Golden Progress you have in game. Parameters: None Return value: The return value is the amount of Golden Progress. -------------------------------------------------------------------------------@13 WriteGoldenTurn Use this function to set the amount of Golden Turns you have in game. Parameters: 1 Param #1 = Golden Turns to set. Return value: None -------------------------------------------------------------------------------@14 ReadGoldenTurn This function reads the amount of Golden Turns you have in game. Parameters: 0 Return value: The return value is the amount of Golden Turns. -------------------------------------------------------------------------------@15 WriteGreatGeneral Use this function to set the amount of Great General points in game. Parameters: 1 Param #1 = Great General Points to set. Return value: None -------------------------------------------------------------------------------@16 ReadGreatGeneral This function reads the amount of Great General Points you have in game.
Parameters: None Return value: The return value is the amount of Great General Points. -------------------------------------------------------------------------------@17 SetMovement This function will inject code into civilization to make it possible to have unlimited movement points for all units. When you click a unit it will give that unit x movement points (Depends what you set in parameter 2) and then it will make it have unlimited movement points. The reason you want to set movement point in parameter 2 is because if it is initially set to just 1 movement point, the unit will cancel if you try to move it any longer than 1 hexagon, then you would have to reclick it again and move it once more. Setting a good initial point before making unlimited move is essential. Due to the code injection nature of this function, if you close your trainer program, the code injected will still be inside game memory. So when you restart your trainer again you can use the next function to check if AntiMovement is still in game memory. Parameters: 2 Param #1 = State - Set to 1 to activate or set to 0 to deactivate Param #2 = Value - Initial Movement Points to set Return value: None -------------------------------------------------------------------------------@18 GetMovementState This function will check if anti movement code is still present in game memory. Parameters: None Return value: The return value will be 1 if Anti Movement is active and 0 if not activ e. -------------------------------------------------------------------------------@19 SetExperience Use this function to set unit experience in game. This function will inject code into the memory of civilization and stay there, even if you close your trainer. Use the next function to check if it still is active in memory. Parameters: 2 Param #1 = State - Set to 1 to activate or set to 0 to deactivate Param #2 = Value - Set the experience value to use
Return value: None -------------------------------------------------------------------------------@20 GetExperienceState This function will check if experience code is still present in game memory. Parameters: None Return value: The return value will be 1 if active and 0 if not active. -------------------------------------------------------------------------------@21 SetHealing Use this function to set unit healing in game. This function will inject code into the memory of civilization and stay there, even if you close your trainer. Use the next function to check if it still is active in memory. Parameters: 2 Param #1 = State - Set to 1 to activate or set to 0 to deactivate Param #2 = Value - Health value in the range of 0-10 (0=no health, 10=full health) Return value: None -------------------------------------------------------------------------------@22 GetHealingState This function will check if Unit healing code is still present in game memory. Parameters: None Return value: The return value will be 1 if active and 0 if not active. -------------------------------------------------------------------------------@23 SetCityModifier Use this function to set the city modifier of Production, Science and Gold in cities. This function will inject code into the memory of civilization and stay there, even if you close your trainer. Use the next function to check if it stil l is active in memory. The city production modifier will update when you buy a building that improves production. It will also update if you sell a building that improves production.
The same goes for science and gold modifiers as well, you need to buy or sell a building that specifically improves these areas for it to update. Parameters: 2 Param #1 = State - Set to 1 to activate or set to 0 to deactivate Param #2 = Value - City Modifier percentage value Return value: None -------------------------------------------------------------------------------@24 GetCityModifierState This function will check if city modifier code is still present and active in ga me memory. Parameters: None Return value: The return value will be 1 if active and 0 if not active. -------------------------------------------------------------------------------@25 PrintBaseAddr This function is not a cheat function, it is meant to be used for programmers under debugging sessions. It will output a message box with the base address of civilization 5 - CvGameCoreDLLFinal Release.dll The value will be printed using decimal numbers. Use a calculator to convert it to hex if needed. I found it to be essential when debugging but I cant see a reason you would need it yourself, but i've included it just in case anyone ever needs it. NB: The game must have been opened beforehand. You must use the function "GameOpen" before using this or else it will output zero (0). Parameters: None Return value: None -------------------------------------------------------------------------------============== Final thoughts ============== All you need to do is code a graphics user interface and then include Core.dll with your program to make the trainer work. I will most likely make future versions of this dll with more functions and more cheats, support for future versions of civilization.
But I can't promise I will. I hope it will be useful for you. Thanks to Sid Meier for this great game.