Skip to content

[Memhack] GameMap

DasKeifer edited this page Sep 30, 2026 · 7 revisions

Memhack GameMap

The Memhack GameMap struct represents the main Game object and provides access to various game systems.

It has the standard memhack base struct functions/fields.

Note: Access to Memhack GameMap Object is typically through Game:GetMemhackObj() or other game specific methods, not through direct memory address.

Table of Contents

Data

Field Type Offset Description
researchControl ResearchControl 0x5674 Research/storage control system
strategySelectedPawn int 0x56C0 Current selected pawn on the strategy menu or -1 if none is selected
reputation int 0x848C Current corporate reputation
unknownObj1 pointer (UnknownObj1) 0x90C8 Unknown object containing perfect island reward pilot
gridPower int 0xC040 Current grid power
victoryScreen pointer (VictoryScreen) 0xD650 Victory screen object containing pod reward pilot

Data Functions

These are functions that draw from the data in the struct or set the data in the struct

getResearchControl

  • ResearchControl GameMap:getResearchControl()

Returns the ResearchControl struct which provides access to pilot and skill storage.

Example:

local game = Game:GetMemhackObj()
local storage = game:getResearchControl():getStorage()
LOG("Storage has " .. storage:getSize() .. " items")

getStrategySelectedPawn

  • int GameMap:getStrategySelectedPawn()

Returns the current selected strategy menu pawn (in between missions)

Example:

local pawnId = gameMap:getStrategySelectedPawn()
-- Valid mech ids are 0..2; -1 means none selected
if pawnId >= 0 and pawnId <= 2 then
    LOG("Pawn " .. pawnId .. " is selected!")
end

getReputation

  • int GameMap:getReputation()

Returns the current corporate reputation value.

Example:

local rep = gameMap:getReputation()
LOG("Current reputation: " .. rep)

setReputation

  • void GameMap:setReputation(value)
Argument name Type Description
value int The new reputation value

Sets the corporate reputation value.

Example:

gameMap:setReputation(3)
LOG("Set reputation to 3")

getUnknownObj1

  • UnknownObj1 GameMap:getUnknownObj1()

Returns the UnknownObj1 struct which contains the perfect island reward pilot.

Example:

local obj = gameMap:getUnknownObj1()
if obj then
    local pilot = obj:getPerfectIslandRewardPilot()
    if pilot then
        LOG("Perfect island reward: " .. pilot:getName())
    end
end

getUnknownObj1Ptr

  • int GameMap:getUnknownObj1Ptr()

Returns the raw pointer to UnknownObj1. Returns 0 if not available.

Example:

local ptr = gameMap:getUnknownObj1Ptr()
if ptr ~= 0 then
    LOG(string.format("UnknownObj1 at: 0x%X", ptr))
end

getGridPower

  • int GameMap:getGridPower()

Returns the current grid power

Example:

local grid = gameMap:getGridPower()
LOG("Current grid: " .. grid)

setGridPower

  • void GameMap:setGridPower(value)
Argument name Type Description
value int The new grid power value

Sets the grid power without the animations or sound effects.

Example:

gameMap:setGridPower(3)
LOG("Set grid power to 3")

getVictoryScreen

  • VictoryScreen GameMap:getVictoryScreen()

Returns the VictoryScreen struct which contains the pod reward pilot.

Example:

local victoryScreen = gameMap:getVictoryScreen()
if victoryScreen then
    local pilot = victoryScreen:getPodRewardPilot()
    if pilot then
        LOG("Pod reward: " .. pilot:getName())
    end
end

getVictoryScreenPtr

  • int GameMap:getVictoryScreenPtr()

Returns the raw pointer to VictoryScreen. Returns 0 if not available.

Example:

local ptr = gameMap:getVictoryScreenPtr()
if ptr ~= 0 then
    LOG(string.format("VictoryScreen at: 0x%X", ptr))
end

Clone this wiki locally