Skip to content

A stathack for Wesnoth 1.14.9 that displays the second player's gold whenever the Terrain Description box is shown.

License

Notifications You must be signed in to change notification settings

GameHackingAcademy/Wesnoth_Stathack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Wesnoth Stathack

Referenced in https://gamehacking.academy/lesson/4/1.

A stathack for Wesnoth 1.14.9 that displays the second player's gold whenever the Terrain Description box is shown.

This is done through the use of a code cave. When injected, the DLL modifies the function that displays the terrain description and changes the code to jump to the code cave function defined in the DLL. The code cave function then saves the registers, gets the second player's gold, and writes the value into the buffer used by the game to display the Terrain Description text. It then jumps back to the Terrain Description method and displays the original description with the gold prepended to it.

This must be injected into the Wesnoth process to work. One way to do this is to use a DLL injector. Another way is to enable AppInit_DLLs in the registry.

About

A stathack for Wesnoth 1.14.9 that displays the second player's gold whenever the Terrain Description box is shown.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages