For those of you who want to use
Time Of Day and can't wait -- copy the below and click on some blank spot in
my table (why my table? because it will use an exposed pointer chain that exists just in this table):
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>257035</ID>
<Description>"Game World : Time Of Day"</Description>
<LastState Activated="1"/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript Async="1">{$STRICT}
{$lua}
if syntaxcheck then return end
[ENABLE]
synchronize( function()
local memRecIds = {}
local addressList = getAddressList()
local memRec = addressList.getMemoryRecordByID( "257035" ) -- gets "Game World : Time Of Day" memory record
if memRec.Count ~= 0x0 then
for i = 0, memRec.Count - 1 do
table.insert( memRecIds, memoryrecord_getID( memRec.Child[i] ) )
end
for _, v in pairs( memRecIds ) do
local mr = addresslist_getMemoryRecordByID( addressList, v )
if mr ~= nil then memoryrecord_delete( mr ) end
end
end
local GameModule = readPointer( getAddressSafe( "g_GameModule" ) )
if GameModule == 0x0 then end
local GameWorldTimeState = readPointer( GameModule + 0x58 )
if GameWorldTimeState == 0x0 then end
local TimeOfDay = GameWorldTimeState + 0x20
local EnableDayNightCycle = GameWorldTimeState + 0x2C
tr = addressList.createMemoryRecord()
tr.appendToEntry( memRec )
tr.setAddress( TimeOfDay )
tr.Type = vtSingle
tr.ShowAsHex = false
tr.DontSave = true
tr.setDescription( 'Time Of Day' )
tr = addressList.createMemoryRecord()
tr.appendToEntry( memRec )
tr.setAddress( EnableDayNightCycle )
tr.Type = vtByte
tr.ShowAsHex = false
tr.DontSave = true
tr.setDescription( 'Enable Day-Night Cycle' )
processMessages()
end )
[DISABLE]
synchronize( function()
local memRecIds = {}
local addressList = getAddressList()
local memRec = addressList.getMemoryRecordByID( "257035" ) -- gets "Game World : Time Of Day" memory record
if memRec.Count ~= 0x0 then
for i = 0, memRec.Count - 1 do
table.insert( memRecIds, memoryrecord_getID( memRec.Child[i] ) )
end
for _, v in pairs( memRecIds ) do
local mr = addresslist_getMemoryRecordByID( addressList, v )
if mr ~= nil then memoryrecord_delete( mr ) end
end
end
end )
</AssemblerScript>
<CheatEntries/>
</CheatEntry>
</CheatEntries>
</CheatTable>
The script will create two entries under itself the moment you activate it.
As Tuuuup! mentioned,
Time Of Day is 24h based, so change the float to any value within this range.
Enable Day-Night Cycle set to 0 will disable day/night cycle and lock the time to what you've set it to. It will freeze the time of day.
NOTE: The script is reading data. It doesn't constantly refresh the pointer, so if something is off and you can't see the proper values or ??, then disable and re-enable it. It means you might've exited the game world or transitioned and GameWorldState was reinitialized.
BR,
Sun