Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placing buildings #23

Open
patel-nikhil opened this issue Mar 18, 2020 · 2 comments
Open

Placing buildings #23

patel-nikhil opened this issue Mar 18, 2020 · 2 comments

Comments

@patel-nikhil
Copy link

Hi,

I am not sure whether this applies to stronghold, but it may interest you to know that in Stronghold Crusader Extreme buildings are stored in an array with buildings offset from each other by a span of 0x32C. Some things that I do know are stored for buildings within their block are owner, workers, etc.:
{ "Buildings": { "address": "0x00F9C6CA", "type": "integer", "category": "building", "owneroffset": "0x4", "workersneededoffset": "0xC6", "workersworkingoffset": "0xC8", "workersmissingoffset": "0xCA", "snoozedoffset": "0x1C4", "offset": "0x32C" } }

@J-T-de
Copy link

J-T-de commented Mar 18, 2020

(I got kinda excited and posted it together with my building and unit ids on the Sourcehold discord)

@gynt
Copy link
Contributor

gynt commented Mar 20, 2020

Great! As it looks now, these arrays are simply dumped to a .map file for saving (and some compression). I am looking forward to your updates. Maybe we can, at some point, crosscheck whether the .map file is indeed the same as the in memory buildings array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants