Skip to content

Commit

Permalink
Add more cheats for Fallout 2
Browse files Browse the repository at this point in the history
  • Loading branch information
visuve committed Mar 19, 2024
1 parent 49943fc commit ac12217
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Fallout2/Fallout2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ int IWillNotUseHackLibForEvil(const std::vector<std::string>& givenArguments)
const CommandLine args(givenArguments,
{
{ "charpoints", typeid(int), "Set character points" },
{ "skillpoints", typeid(int), "Set skill points" }
{ "actionpoints", typeid(int), "Set action points" },
{ "skillpoints", typeid(int), "Set skill points" },
{ "money", typeid(int), "Set money" },
});

DWORD pid = System::WaitForExe(L"fallout2HR.exe");
Expand All @@ -28,12 +30,29 @@ int IWillNotUseHackLibForEvil(const std::vector<std::string>& givenArguments)
process.Write<int32_t>(0x118538, charpoints);
}

if (args.Contains("actionpoints"))
{
int actionpoints = args.Value<int>("actionpoints");
process.Write<int32_t>(0x11C3B4, actionpoints);
}

if (args.Contains("skillpoints"))
{
// The individual skills are at 0x11C4AC-0x11C4F0
int skillpoints = args.Value<int>("skillpoints");
process.Write<int32_t>(0x2681AC, skillpoints);
}

if (args.Contains("money"))
{
Pointer moneyPtr = process.ResolvePointer(0x119058, 0x34, 0x1C);

int before = process.Read<int32_t>(moneyPtr);
int after = args.Value<int>("money");
process.Write(moneyPtr, after);

LogInfo << "Money:" << before << "->" << after;
}

return 0;
}

0 comments on commit ac12217

Please sign in to comment.