-
Notifications
You must be signed in to change notification settings - Fork 81
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
47 #400
47 #400
Changes from 32 commits
642955d
bce7e34
e5bdfdb
946fe92
3f5d0c9
d98d680
30235b6
f051d86
337a393
d5f952e
cf9aca8
6e98409
da8e9a7
884a6ad
d1d81d1
391b8a8
4301eca
6e841a5
c55994b
d1106db
b699e98
8f223a3
a3ab7f3
861ed52
b2df97d
e0cfb1f
d849c9b
0d3cb0f
b1f5473
bdc4978
c37f1bf
f16932f
dd109f1
41f763c
2bb7f37
56d2d60
89452ec
b994d2a
fa23ca6
37d9df8
ef219bf
e9b1108
6169998
546c0fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ | |
</code-helper> | ||
</int32_t> | ||
|
||
<enum base-type='int16_t' name='depth' type-name='layer_type'/> | ||
<enum base-type='int16_t' name='depth' type-name='layer_type' comment="Doesn't look correct. See -1, 0, 41, 172, 508, and 686 with critters visible in all caverns. Some dead, but the dorf on the surface isn't"/> | ||
</struct-type> | ||
|
||
<struct-type type-name='local_population'> | ||
|
@@ -661,7 +661,7 @@ | |
|
||
<struct-type type-name='world_object_data' | ||
instance-vector='$global.world.world_data.object_data' key-field='id'> | ||
<int32_t name="id"/> | ||
<int32_t name='id' comment="World MLT of the data according to: i + x * 16 + k * 16 * world_width + y * 256 * world_width, where (x, y) is the world tile and (i, k) the MLT within it"/> | ||
<stl-vector name="altered_items" type-name='int32_t' comment='world_data_subid'/> | ||
<stl-vector name="offloaded_items"> | ||
<pointer> | ||
|
@@ -703,18 +703,20 @@ | |
<int32_t name="year_tick"/> | ||
|
||
-- v0.40.14: | ||
<stl-vector name='unk_c0' type-name='int16_t' comment="6 bytes allocated seen. Cannot be pointer"/> | ||
<stl-vector name="unk_d0" type-name='int16_t' comment="6 bytes allocated seen. Cannot be pointer"/> | ||
<stl-vector name="unk_e0" type-name='int16_t' comment="6 bytes allocated seen. Cannot be pointer. Seen on the same element, so c0, d0, and e0 may be connected"/> | ||
<stl-vector name="unk_f0"/> | ||
<stl-vector name="unk_100"/> | ||
<stl-vector name="unk_110"/> | ||
<compound name='picked_growths' comment="also includes 'automatically picked' i.e. fallen fruit that becomes item_spatter"> | ||
<stl-vector name='x' type-name='int16_t' comment="within the MLT"/> | ||
<stl-vector name='y' type-name='int16_t' comment="within the MLT"/> | ||
<stl-vector name='z' type-name='int16_t' comment="uncertain coordinate system. 100 = surface on my flat embark, 101 in the air, while the normal coordinates don't go that high"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it match either of the coordinates on the right edge of the screen? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it didn't match any of those. Edit: Correction it does indeed seem to match the lower value, which looks like the Elevation of the tile (not sure why I did see a different value there previously). I don't know how to translate from Elevation to whatever format is used elsewhere, though, but regardless, the comment should be updated. |
||
<stl-vector name='subtype' type-name='int32_t' comment="subtype of the growth within the raws of the implicit plant"/> | ||
<stl-vector name='density' type-name='int32_t' comment="unknown why the raw density field is placed here, as there's nothing left"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps this allows for partial harvests of extremely dense growths, so you can pick the rest of it later. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Possibly, although I've seen only 1, possibly 2, and 1000 here. If your idea is correct we'd briefly see something in between 2 and 1000 for trees, but that would require a bit of luck (or care) with the timing. Edit: I've run a callback script that checks these fields every frame, and it hasn't registered a single case of a density value in the range 3 - 999, which ought to happen while dorfs are vigorously picking fruit (at least the durians and olives had a raw density value of 1000). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's possible that it only happens when gathering items in Adventurer mode - I'd try it myself, but I don't have a script handy for finding the correct object_data entry for my current location. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This snippet gets the object ids for an embark. It obviously would have to be adapted to adventurer mode, where I guess the region_details [0] part remains the same, but there'd have to be some other logic to find the current MLT. I'm rather unfamiliar with adventurer mode, though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Adventurer mode, region_details[4] is the one that contained >=48 biome values (possibly because it corresponded to the town I started in), but none of the calculated object_id values corresponded to existing world_object_data records. I tried a more brute-force approach and simply searched through all records to find ones with non-empty picked_growths lists, and it looks like Adventurer mode just doesn't use them at all - no matter how many finger limes I picked from a nearby tree, all of those lists remained empty. It's possible Toady added the ability to handle partial harvests but just never finished implementing it - perhaps in a later version, dwarves won't harvest the entire tile at once. Did you only monitor those values while dwarves were harvesting, or did you also check while growths were falling off and landing on the ground as spatters? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Brute force is what I've used mostly, until trying a callback every frame, where the frame rate dropped to 28 even when accessing only the appropriate entries. It's odd, however, that different structures would be used for the same purpose in Adventurer mode and Fortress mode, as I assume the trees actually were picked visually (and not possible to pick indefinitely). A fruit tree density of 1000 looks like some kind of max value rather than a sensible one, when shrubs tend to have a value of 1, so it might be that partial picking was waiting for the agriculture overhaul. Have you used tools to look at what code Adventurer mode picking uses? It might be something different that uses different data structures. |
||
<stl-vector name='year' type-name='int32_t' comment="4 bytes allocated seen. Cannot be pointer. Seen on the same element, so f0, 100, and 110 may be connected"/> | ||
quietust marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</compound> | ||
|
||
-- v0.43.01 | ||
<stl-vector name='unk_v43_1'/> | ||
<stl-vector name='unk_v43_2'/> | ||
<stl-vector name='unk_v43_3'/> | ||
<stl-vector name='unk_v43_4'/> | ||
<stl-vector name='unk_v43_1' type-name='int16_t' comment="2 bytes allocated seen. Cannot be pointer"/> | ||
<stl-vector name='unk_v43_2' type-name='int16_t' comment="2 bytes allocated seen. Cannot be pointer"/> | ||
<stl-vector name='unk_v43_3' type-name='int16_t' comment="2 bytes allocated seen. Cannot be pointer"/> | ||
<stl-vector name='unk_v43_4' type-name='int32_t' comment="4 bytes allocated seen. Cannot be pointer"/> | ||
</struct-type> | ||
|
||
<enum-type type-name='mountain_peak_flags'> | ||
|
@@ -1017,21 +1019,28 @@ | |
<stl-vector name='event_collections' type-name="int32_t" ref-target='history_event_collection'/> | ||
</struct-type> | ||
|
||
<struct-type type-name='region_weather' key-field='id' instance-vector='$global.world.world_data.region_weather'> | ||
<enum-type type-name='region_weather_type' base-type='int32_t'> | ||
<enum-item name='CreepingGas'/> | ||
<enum-item name='CreepingVapor' comment="doesn't seem to be generated by DF, but appears if hacked"/> | ||
<enum-item name='CreepingDust'/> | ||
<enum-item name='FallingMaterial' comment="a.k.a. rain, both blood and syndrome, but not regular"/> | ||
</enum-type> | ||
|
||
<struct-type type-name='region_weather' key-field='id' instance-vector='$global.world.world_data.region_weather' comment="only evil weather, not the regular kind"> | ||
<int32_t name='id'/> | ||
<int32_t name="unk_4"/> | ||
<enum name='type' type-name='region_weather_type' base-type='int32_t' comment="Creeping Gas/Vapor/Dust='cloud' below, FallingMaterial='rain'"/> | ||
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/> | ||
<int32_t name='mat_index'/> | ||
<int32_t name="unk_10"/> | ||
<int32_t name="region_x"/> | ||
<int32_t name="region_y"/> | ||
<int32_t name="unk_1c" init-value='-30000'/> | ||
<int32_t name="unk_20" init-value='-30000'/> | ||
<int32_t name="unk_24" init-value='-30000'/> | ||
<int32_t name="unk_28"/> | ||
<int32_t name="unk_2c"/> | ||
<int32_t name="unk_30"/> | ||
<int32_t name="unk_34" init-value='-1'/> | ||
<bool name='announcement' comment="Guess based on seeing it appear for an entry when hitting the embark, resulting in an announcement"/> | ||
<int32_t name='region_x' comment="world tile, used with evil rain. Probably uninitialized with cloud"/> | ||
<int32_t name='region_y' comment="world tile, used with evil rain. Probably uninitialized with cloud"/> | ||
<int32_t name='world_in_game_x' init-value='-30000' comment="used with evil clouds, indicating global in-game coordinates"/> | ||
<int32_t name='world_in_game_y' init-value='-30000' comment="used with evil clouds, indicating global in-game coordinates"/> | ||
<int32_t name='world_in_game_z' init-value='-30000' comment="probably never used, as weather appears on the surface"/> | ||
<int32_t name='cloud_x_movement' comment="-1/0/1, indicating the movement per 10 ticks in X direction. Uninitialized for rain"/> | ||
<int32_t name='cloud_y_movement' comment="-1/0/1, indicating the movement per 10 ticks in Y direction. Uninitialized for rain"/> | ||
<int32_t name='remaining_duration' comment="ticks down 1 every 10 ticks. Removed some time after reaching 0. Cloud duration seems to start with a fairly large, but somewhat random value"/> | ||
<int32_t name='region_id' ref-target='world_region' comment="Set for clouds, -1 for rain"/> | ||
</struct-type> | ||
</data-definition> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to move the version into a
since
attribute: