[Request] Millennia

Ask about cheats/tables for single player games here
Kessem
Expert Cheater
Expert Cheater
Posts: 61
Joined: Sat Dec 07, 2019 4:43 am
Reputation: 23

Re: [Request] Millennia

Post by Kessem »

kguiglgfkilogol wrote:
Fri Mar 29, 2024 1:09 pm
I would like to know how to search Wealth value. I haven't found it yet.
Wealth if a Float value, and it can have fractions, so I do a search in between. So if $$ is 356.87 I'll search for a value between 356.8 and 356.9 (to account for rounding).

DasJabbu
What is cheating?
What is cheating?
Posts: 4
Joined: Wed Jul 27, 2022 8:56 pm
Reputation: 0

Re: [Request] Millennia

Post by DasJabbu »

i found nothing :<

Kessem
Expert Cheater
Expert Cheater
Posts: 61
Joined: Sat Dec 07, 2019 4:43 am
Reputation: 23

Re: [Request] Millennia

Post by Kessem »

DasJabbu wrote:
Fri Mar 29, 2024 8:33 pm
i found nothing :<
Make sure the age didn't change, and there was no save/load during the search process, and try again. The game seems to also randomly change the address, so sometimes you need to try it several times before it works (At least in my experience).

emdasdas
Cheater
Cheater
Posts: 41
Joined: Mon Aug 01, 2022 5:50 pm
Reputation: 4

Re: [Request] Millennia

Post by emdasdas »

gracias a todos

SlipperyEel
Expert Cheater
Expert Cheater
Posts: 73
Joined: Wed Aug 30, 2017 3:42 am
Reputation: 37

Re: [Request] Millennia

Post by SlipperyEel »

Coga wrote:
Fri Mar 29, 2024 7:04 pm
I seem to have some issues copypasting this into Cheat Engine; I keep getting line error messages. Is there something I'm missing?
Just paste it into a text file and rename it to .CT instead of .TXT, then you can open it in CE like any other table.

matt1713
Cheater
Cheater
Posts: 45
Joined: Tue Sep 29, 2020 1:32 pm
Reputation: 5

Re: [Request] Millennia

Post by matt1713 »

Does anyone understand what the game pointers from BabyGroot's table does? The development one is pretty self explanatory, but what does the "hot seat" one do? The all imports pointer doesn't appear to do anything either.

matt1713
Cheater
Cheater
Posts: 45
Joined: Tue Sep 29, 2020 1:32 pm
Reputation: 5

Re: [Request] Millennia

Post by matt1713 »

BabyGroot wrote:
Thu Mar 28, 2024 7:11 pm
First - Open tab research > after that press shift and click research [ farming, scouting or worker (just anything) ].
Second - Active Script, Waiting For AoB Read.
Script Research Always Done

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>105332</ID>
      <Description>"Research Done"</Description>
      <LastState/>
      <Color>008080</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Millennia.exe
  Version: 
  Date   : 2024-03-29
  Author : BabyGroot

  This script does blah blah blah
}

[ENABLE]

aobscan(pData_Dev_EnableTech,0F B6 00 85 C0 74 33) // should be unique
alloc(newmem,$1000,pData_Dev_EnableTech)

label(code)
label(return)

newmem:

code:
  mov byte ptr [rax],1
  db 0F B6 00
  test eax,eax
  jmp return

pData_Dev_EnableTech:
  jmp newmem
return:
registersymbol(pData_Dev_EnableTech)

[DISABLE]

pData_Dev_EnableTech:
  db 0F B6 00 85 C0

unregistersymbol(pData_Dev_EnableTech)
dealloc(newmem)


</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
</CheatTable>
Script Game Data

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>105306</ID>
      <Description>"Game Data"</Description>
      <LastState Activated="1"/>
      <Color>FF0000</Color>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : Millennia.exe
  Version: 
  Date   : 2024-03-29
  Author : BabyGroot

  This script does blah blah blah
}

[ENABLE]

aobscan(pData_Game,48 8B 86 80 02 00 00 48 83) // should be unique
alloc(newmem,$1000,pData_Game)

alloc(pBase_Game,8)
registersymbol(pBase_Game)

label(code)
label(return)

pBase_Game:
dd

newmem:

code:
  mov [pBase_Game],rsi
  db 48 8B 86 80 02 00 00
  jmp return

pData_Game:
  jmp newmem
  nop 2
return:
registersymbol(pData_Game pBase_Game)

[DISABLE]

pData_Game:
  db 48 8B 86 80 02 00 00

unregistersymbol(*)
dealloc(*)

</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>105307</ID>
      <Description>"Game Data"</Description>
      <Options moHideChildren="1" moManualExpandCollapse="1"/>
      <LastState Value="" RealAddress="00000000"/>
      <Color>FF8000</Color>
      <GroupHeader>1</GroupHeader>
      <CheatEntries>
        <CheatEntry>
          <ID>105308</ID>
          <Description>"pBase - [ Color Silver Don't Chance ]"</Description>
          <LastState Value="6D2E6450" RealAddress="189FB699960"/>
          <ShowAsHex>1</ShowAsHex>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>C0C0C0</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>[pBase_Game]</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>105339</ID>
          <Description>"Player Name"</Description>
          <LastState RealAddress="18A9AA6B594"/>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>4080FF</Color>
          <VariableType>String</VariableType>
          <Length>128</Length>
          <Unicode>1</Unicode>
          <CodePage>0</CodePage>
          <ZeroTerminate>1</ZeroTerminate>
          <Address>[pBase_Game]+58</Address>
          <Offsets>
            <Offset>14</Offset>
            <Offset>18</Offset>
            <Offset>40</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>105340</ID>
          <Description>"Nation Name"</Description>
          <LastState RealAddress="189DA436FD4"/>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>4080FF</Color>
          <VariableType>String</VariableType>
          <Length>128</Length>
          <Unicode>1</Unicode>
          <CodePage>0</CodePage>
          <ZeroTerminate>1</ZeroTerminate>
          <Address>[pBase_Game]+58</Address>
          <Offsets>
            <Offset>14</Offset>
            <Offset>28</Offset>
            <Offset>40</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>105303</ID>
          <Description>"Game ID"</Description>
          <LastState RealAddress="18A9B9AD284"/>
          <ShowAsSigned>0</ShowAsSigned>
          <Color>4080FF</Color>
          <VariableType>String</VariableType>
          <Length>128</Length>
          <Unicode>1</Unicode>
          <CodePage>0</CodePage>
          <ZeroTerminate>1</ZeroTerminate>
          <Address>[pBase_Game]+20</Address>
          <Offsets>
            <Offset>14</Offset>
          </Offsets>
        </CheatEntry>
        <CheatEntry>
          <ID>105309</ID>
          <Description>"Turn Count"</Description>
          <LastState Value="1" RealAddress="189FB699BAC"/>
          <Color>0000FF</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>[pBase_Game]+24C</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>105310</ID>
          <Description>"Turn Count Limit"</Description>
          <LastState Value="500" RealAddress="189FB699BB0"/>
          <Color>0000FF</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>[pBase_Game]+250</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>105311</ID>
          <Description>"Turn Count Warning"</Description>
          <LastState Value="475" RealAddress="189FB699BB4"/>
          <Color>0000FF</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>[pBase_Game]+254</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>105312</ID>
          <Description>"Current Phase"</Description>
          <LastState Value="1" RealAddress="189FB699BB8"/>
          <Color>0000FF</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>[pBase_Game]+258</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>105313</ID>
          <Description>"Current Phase Begin Time"</Description>
          <LastState Value="0" RealAddress="189FB699BD0"/>
          <Color>0000FF</Color>
          <VariableType>Float</VariableType>
          <Address>[pBase_Game]+270</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>105325</ID>
          <Description>"Base Year"</Description>
          <LastState Value="2000" RealAddress="189FB699C20"/>
          <Color>0000FF</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>[pBase_Game]+2C0</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>105326</ID>
          <Description>"Years Per Turn"</Description>
          <LastState Value="50" RealAddress="189FB699C24"/>
          <Color>0000FF</Color>
          <VariableType>4 Bytes</VariableType>
          <Address>[pBase_Game]+2C4</Address>
        </CheatEntry>
        <CheatEntry>
          <ID>105327</ID>
          <Description>"~~  Type Byte = Set Value 1 For ENABLED | Set Value 0 For DISABLED  ~~"</Description>
          <Options moHideChildren="1" moManualExpandCollapse="1"/>
          <LastState Value="" Activated="1" RealAddress="00000000"/>
          <Color>008080</Color>
          <GroupHeader>1</GroupHeader>
          <CheatEntries>
            <CheatEntry>
              <ID>105315</ID>
              <Description>"Online Game?"</Description>
              <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">0:No
1:Yes
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BEB"/>
              <Color>C0C0C0</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+28B</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105314</ID>
              <Description>"Allow Victory?"</Description>
              <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="1" RealAddress="189FB699BEA"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+28A</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105318</ID>
              <Description>"Auto Skip Human Turns?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BEE"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+28E</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105316</ID>
              <Description>"Debug Quick Build?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BEC"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+28C</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105317</ID>
              <Description>"Debug View AI Players?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BED"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+28D</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105319</ID>
              <Description>"Debug Quick Launch?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BEF"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+28F</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105320</ID>
              <Description>"Debug Hotseat?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BF0"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+290</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105322</ID>
              <Description>"Debug Combat Sim Tooltip?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BF8"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+298</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105323</ID>
              <Description>"Debug Combat Auto Reset Mode?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BF9"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+299</Address>
            </CheatEntry>
            <CheatEntry>
              <ID>105324</ID>
              <Description>"Debug Import All Goods?"</Description>
              <DropDownList DescriptionOnly="1" DisplayValueAsItem="1">0:No/Off/Disabled
1:Yes/On/Enabled
</DropDownList>
              <LastState Value="0" RealAddress="189FB699BFB"/>
              <Color>808000</Color>
              <VariableType>Byte</VariableType>
              <Address>[pBase_Game]+29B</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
</CheatTable>
Way to move code to cheat engine
1. Copy code ( Select All Code And CTRL + C )
2. Open cheat engine
4. Paste Code in Cheat Engine
5. Done
Video Tutorial
I'm receiving an error that seems to disable keyboard interactions with the game. When I try activating the Game Data script, I receive an error message, "This script uses nearby allocation but it is impossible to allocate nearby 17EBFE55FFB. Please rewrite the script to function without nearby allocation. Try executing the script anyhow and allocate on the region outside reach of 2GB? (The target will crash if the script was not designed with this failure in mind)".

SlipperyEel
Expert Cheater
Expert Cheater
Posts: 73
Joined: Wed Aug 30, 2017 3:42 am
Reputation: 37

Re: [Request] Millennia

Post by SlipperyEel »

So despite a lot of hair pulling, I came up empty on finding pointers for the resources. However, it seems that the values for them are stored in a fixed sized array, so using an AOB scan to find the offset of the first resource (wealth) lets you easily populate all the other values:

Image

I still need to test it some more to ensure it is consistent, and possibly see if I can trim the size of the AOB a little (since it grew pretty huge - 96 bytes - in order to make it unique). I've also only played up to the fourth age, so I know there are still additional resource types that I have yet to encounter in future ages which will need to be added.

Edit: So with further experimentation, it seems like it is more inconsistent than I first thought. It looks like there are two arrays of resource values. I originally thought that the first was for the UI display and the second was for the actual values. But after additional testing it seems like the true values can occur in either array, and sometimes one resource will have its actual value in the first array while another will have its actual value in the second array. It also seems like the offset from the starting value are not consistent, at least for the UI values when the actual value is in the other array. Not sure how practical nailing that down consistently is going to be.

Edit 2: So after further experimentation, I think the relative offsets of certain values might shift around between ages, which would put the kibosh on this approach. Although it does seem like Culture and Wealth might still be doable at least.

Speaking of Culture, that seems to work differently from the rest. The others clearly have a separate actual value and a UI display value. While Culture also has two values, the first one seems to determine both the display and actual values, and the second value updates to reflect a change in-game. But changing the second value in CE doesn't appear to do anything.

SmileyfaceSmile
What is cheating?
What is cheating?
Posts: 3
Joined: Wed Mar 27, 2024 3:06 pm
Reputation: 0

Re: [Request] Millennia

Post by SmileyfaceSmile »

SlipperyEel wrote:
Sun Mar 31, 2024 6:58 am
So despite a lot of hair pulling, I came up empty on finding pointers for the resources. However, it seems that the values for them are stored in a fixed sized array, so using an AOB scan to find the offset of the first resource (wealth) lets you easily populate all the other values:

Image

I still need to test it some more to ensure it is consistent, and possibly see if I can trim the size of the AOB a little (since it grew pretty huge - 96 bytes - in order to make it unique). I've also only played up to the fourth age, so I know there are still additional resource types that I have yet to encounter in future ages which will need to be added.

Edit: So with further experimentation, it seems like it is more inconsistent than I first thought. It looks like there are two arrays of resource values. I originally thought that the first was for the UI display and the second was for the actual values. But after additional testing it seems like the true values can occur in either array, and sometimes one resource will have its actual value in the first array while another will have its actual value in the second array. It also seems like the offset from the starting value are not consistent, at least for the UI values when the actual value is in the other array. Not sure how practical nailing that down consistently is going to be.

Edit 2: So after further experimentation, I think the relative offsets of certain values might shift around between ages, which would put the kibosh on this approach. Although it does seem like Culture and Wealth might still be doable at least.

Speaking of Culture, that seems to work differently from the rest. The others clearly have a separate actual value and a UI display value. While Culture also has two values, the first one seems to determine both the display and actual values, and the second value updates to reflect a change in-game. But changing the second value in CE doesn't appear to do anything.
From what I have tested the values usually changes with a new government

User avatar
Darkedone02
Expert Cheater
Expert Cheater
Posts: 947
Joined: Thu Mar 02, 2017 11:42 pm
Reputation: 109

Re: [Request] Millennia

Post by Darkedone02 »

This sound like one extremely long codebreaker code just for resources and xp.

This is just to edit the value itself, i think the code itself would be more or less easier if you could change the gain multiplier, and if possible, control the losses to a negligible loss.

emdasdas
Cheater
Cheater
Posts: 41
Joined: Mon Aug 01, 2022 5:50 pm
Reputation: 4

Re: [Request] Millennia

Post by emdasdas »

It happens to someone that the load and save buttons don't work, I already reinstalled and it gives me the same error

SlipperyEel
Expert Cheater
Expert Cheater
Posts: 73
Joined: Wed Aug 30, 2017 3:42 am
Reputation: 37

Re: [Request] Millennia

Post by SlipperyEel »

So with additional playing around, it seems like there are indeed two arrays of resource values. While it seems the offsets between each value within a given array are fixed, the offset from one array to the other appears to change without any consistent pattern. There also doesn't seem to be any consistency as to which array the real or UI value appears in, which is frustrating. However, if you can track down the two Culture addresses yourself via a manual scan then you can have the attached table automatically find the other addresses for you, due to the fixed offsets:

Image

Instructions: You'll have to manually scan for your Culture value. This is a float and will have two addresses. Once you find those, copy each address and enter them into the table sub-headers as pictured above. The other values will then automatically populate. When editing a given resource, for example Warfare, edit the value in both entries. N.B.: You can select both values using CTRL and then change them simultaneously.

There are presumably still other values in later ages that I haven't encountered yet. I'll add those as I come across them. I also have no idea if this will reliably work across the entire game, as I have given it limited testing with my existing pool of saves.

If someone wants to find pointers to the Culture addresses or figure out a working AOB scan and automate the whole thing, go right ahead. There might also be a better way to handle two sets of addresses for a given value, maybe with an Lua script.

Edit: OK I have managed to find a ridiculously large AOB that seems to be unique and has - so far in my limited local testing - proved to work consistently. I have created a table with a Lua script that will do the scan and populate the values if it correctly finds two addresses (otherwise it pops up an error). CE will freeze momentarily when activating the scan, and the values will take a few seconds to populate afterwards. I suspect that this AOB will probably need further adjustment once more people test it, so consider this a beta. If you do manage to break it, I'd appreciate it if you could do a manual scan to find your Culture address and then open the memory viewer and copy the 256 bytes starting from that address. Paste it in a text file and attach it here so I can compare it.
Attachments
Millennia_Resource_Addresses_AOB_Scan.CT
(8.31 KiB) Downloaded 561 times
Millennia_Resource_Addresses.CT
(6.91 KiB) Downloaded 737 times
Last edited by SlipperyEel on Tue Apr 02, 2024 8:44 am, edited 1 time in total.

emdasdas
Cheater
Cheater
Posts: 41
Joined: Mon Aug 01, 2022 5:50 pm
Reputation: 4

Re: [Request] Millennia

Post by emdasdas »

SlipperyEel wrote:
Mon Apr 01, 2024 9:27 am
So with additional playing around, it seems like there are indeed two arrays of resource values. While it seems the offsets between each value within a given array are fixed, the offset from one array to the other appears to change without any consistent pattern. There also doesn't seem to be any consistency as to which array the real or UI value appears in, which is frustrating. However, if you can track down the two Culture addresses yourself via a manual scan then you can have the attached table automatically find the other addresses for you, due to the fixed offsets:

Image

Instructions: You'll have to manually scan for your Culture value. This is a float and will have two addresses. Once you find those, copy each address and enter them into the table sub-headers as pictured above. The other values will then automatically populate. When editing a given resource, for example Warfare, edit the value in both entries. N.B.: You can select both values using CTRL and then change them simultaneously.

There are presumably still other values in later ages that I haven't encountered yet. I'll add those as I come across them. I also have no idea if this will reliably work across the entire game, as I have given it limited testing with my existing pool of saves.

If someone wants to find pointers to the Culture addresses or figure out a working AOB scan and automate the whole thing, go right ahead. There might also be a better way to handle two sets of addresses for a given value, maybe with an Lua script.

I can't get it to work, what needs to be done to enable the boxes?

matt1713
Cheater
Cheater
Posts: 45
Joined: Tue Sep 29, 2020 1:32 pm
Reputation: 5

Re: [Request] Millennia

Post by matt1713 »

emdasdas wrote:
Mon Apr 01, 2024 8:08 pm
Spoiler
SlipperyEel wrote:
Mon Apr 01, 2024 9:27 am
So with additional playing around, it seems like there are indeed two arrays of resource values. While it seems the offsets between each value within a given array are fixed, the offset from one array to the other appears to change without any consistent pattern. There also doesn't seem to be any consistency as to which array the real or UI value appears in, which is frustrating. However, if you can track down the two Culture addresses yourself via a manual scan then you can have the attached table automatically find the other addresses for you, due to the fixed offsets:

Image

Instructions: You'll have to manually scan for your Culture value. This is a float and will have two addresses. Once you find those, copy each address and enter them into the table sub-headers as pictured above. The other values will then automatically populate. When editing a given resource, for example Warfare, edit the value in both entries. N.B.: You can select both values using CTRL and then change them simultaneously.

There are presumably still other values in later ages that I haven't encountered yet. I'll add those as I come across them. I also have no idea if this will reliably work across the entire game, as I have given it limited testing with my existing pool of saves.

If someone wants to find pointers to the Culture addresses or figure out a working AOB scan and automate the whole thing, go right ahead. There might also be a better way to handle two sets of addresses for a given value, maybe with an Lua script.
I can't get it to work, what needs to be done to enable the boxes?
1) Make sure you selected Millennia.exe as the process to attach the table to.
2) Open both tables (I.E. Millennia --> Player Resources 1 & Player Resources 2).
3) Do a search for your culture stat starting on turn 2 (don't bother searching for 0 on turn 1, will take a long time finishing the search). Make sure you're using FLOAT value types instead of the default 4 Bytes. You should see your current culture stat when you hover over the culture section in the top left table (Ex. "1.6/8 to next culture Power" --> the 1.6 is what you search/update scan for.)
4) After 1-3 turns, updating the value/search for your culture stat each turn, you should have narrowed it down to 2 values (should be the exact same float value).
5) What you want are the addresses - not the actual float values-. Now, for the first address (Right-click-->Copy Selected Addresses); copy it and insert/override the placeholder "00000000" next to the "Player Resources 1 - Enter Culture's 1st address ->".
6) Now do the same for the second address and put it in the same placeholder in the Player Resources 2 section. If done correctly, the tables should have auto-populated.

Ara
Noobzor
Noobzor
Posts: 9
Joined: Fri Mar 03, 2017 4:26 pm
Reputation: 0

Re: [Request] Millennia

Post by Ara »

SlipperyEel wrote:
Mon Apr 01, 2024 9:27 am
So with additional playing around, it seems like there are indeed two arrays of resource values. While it seems the offsets between each value within a given array are fixed, the offset from one array to the other appears to change without any consistent pattern. There also doesn't seem to be any consistency as to which array the real or UI value appears in, which is frustrating. However, if you can track down the two Culture addresses yourself via a manual scan then you can have the attached table automatically find the other addresses for you, due to the fixed offsets:

Image

Instructions: You'll have to manually scan for your Culture value. This is a float and will have two addresses. Once you find those, copy each address and enter them into the table sub-headers as pictured above. The other values will then automatically populate. When editing a given resource, for example Warfare, edit the value in both entries. N.B.: You can select both values using CTRL and then change them simultaneously.

There are presumably still other values in later ages that I haven't encountered yet. I'll add those as I come across them. I also have no idea if this will reliably work across the entire game, as I have given it limited testing with my existing pool of saves.

If someone wants to find pointers to the Culture addresses or figure out a working AOB scan and automate the whole thing, go right ahead. There might also be a better way to handle two sets of addresses for a given value, maybe with an Lua script.

Edit: OK I have managed to find a ridiculously large AOB that seems to be unique and has - so far in my limited local testing - proved to work consistently. I have created a table with a Lua script that will do the scan and populate the values if it correctly finds two addresses (otherwise it pops up an error). CE will freeze momentarily when activating the scan, and the values will take a few seconds to populate afterwards. I suspect that this AOB will probably need further adjustment once more people test it, so consider this a beta. If you do manage to break it, I'd appreciate it if you could do a manual scan to find your Culture address and then open the memory viewer and copy the 256 bytes starting from that address. Paste it in a text file and attach it here so I can compare it.
So the second script doesn't work, but the first one works perfectly after populating the 1st and 2nd addresses. Thank you very much.

Post Reply

Who is online

Users browsing this forum: findrashti, LIOBOSS, Tom andy