Jump to content
Sign in to follow this  

Help using NomadMemory.au3 To Read Total Units In Civ 4

Recommended Posts

I have got some code off these forums forgot who posted it but thanks, all i want to do is read the total unit count which in Cheat Engine looks like this:

CvGameCoreDLL.dll+33A3FC + 98 = Total Units for Player 1

All i get is 0 and i read somewhere on these forums about Dll's cause problems when your reading memory.

#include <NomadMemory.au3>

$ID = ProcessExists("Civilization4.exe")

Global $Offset[2] = [0, 0x98] ; your multilevel offsets -- enter hex here

$StaticOffset = 0x0202A3FC ;your static offset or green address

$openmem = _MemoryOpen($ID)

$baseADDR = _MemoryGetBaseAddress($openmem, 1)

$finalADDR = "0x" & Hex($baseADDR + $StaticOffset) ;this gives you "app.exe+941318"

$r = _MemoryPointerRead($finalADDR, $openmem, $Offset) ;this gives you the final address to read from


;Test if value is correct

MsgBox(0, "Info", $r[1]) ;or try the other one w/o [1]

MsgBox(0, "Info", $r) ;check w/c one gives you the correct value

The weird thing is i can read the above address and offset using Nomad's old memory script (2006 i think). Any help on how to read it using NomadMemory.au3.

Edited by apocalypticx

Share this post

Link to post
Share on other sites


I take it you missed this before posting.

You will get plenty of help here if you post permissible questions, but not for ones like this. :x


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...