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
Identify fields related to adventurer creation #190
Conversation
df.viewscreen.xml
Outdated
| <enum base-type='int16_t' name='status'> | ||
| <enum-item name='Peasant'/> | ||
| <enum-item name='Hero'/> | ||
| <enum-item name='Demigod'/> | ||
| </enum> | ||
|
|
||
| <int32_t name='unk_v40_1a' init-value='-1' since='v0.40.01'/> | ||
| <enum name='background_type' base-type='int32_t' since='v0.40.01'> | ||
| <enum-item name='Peasant' value='-1'/> |
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.
Does this compile? There's a Peasant in the status enum above too.
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.
I don’t know if it compiles: I haven’t got everything set up for compiling on Windows so I make these pull requests blind. It’s worked so far. I would not expect the duplication to be a problem: the two enums in question have different types (viewscreen_setupadventurest.T_adventurer.T_status and viewscreen_setupadventurest.T_adventurer.T_background_type) and different enums may have values with the same name.
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.
It doesn't work because they're in the same class and C++ is annoying when it comes to this (I vaguely remember running into this myself in viewscreen_titlest).
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.
Does PeasantBackground sound okay for this one, or do you have a better suggestion?
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.
I would rather keep the current name to match the other field called background_type on line 1837. Would it work to define this enum as an enum-type outside this class-type 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.
That would be fine, although it's annoying that they don't have the same values for Peasant, so the enum can't be reused.
Also, where are you seeing this one changing? On the "create your character" screen (page==7, or Background), and the next screen, it's always -1 for me.
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.
I see it when page == 7. Pressing + or - swaps between 0 and -1, except for human outsiders, which always get -1.
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.
And two seconds after I posted that last comment, I found a case where it swaps between 8 and -1. I’ll have to look into this more.
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.
Huh, I'm only seeing it change for humans (dwarves always give -1, and elves are missing that menu entirely). Perhaps it's something world-specific?
Edit: I wasn't seeing your last comment somehow, sorry.
|
Nice! Glad to know the viewscreen fields were mostly the right types. |
In the "Create Your Character" screen of adventurer creation, you can choose "Locally Important" or "Peasant". "Locally Important" means the chosen site has a captain of the guard position (or equivalent). `commander_id` is the index of the position assignment of the captain of the guard for the site's group. If position is vacant, the "Locally Important" option is available, but the adventurer is still a peasant and `commander_id` is -1.
|
I discovered the true meaning of |
|
Makes sense. Thanks! |
| <pointer name='unk_15_b'/> | ||
| <int16_t name='color_gene_count'/> | ||
|
|
||
| <stl-vector name='color_modifiers' type-name='int32_t' index-refers-to='(find-creature $$._parent.race).caste[$$._parent.caste].color_modifiers[$]/> |
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.
There's a missing quote at the end of this line, by the way. It looks like I forgot to mention it earlier, but I had to fix it to test this, so no need to change it here.
attributes changed in DFHack/df-structures#190
No description provided.