DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.88k stars 478 forks source link

vague research into unk_v40_1a&1b #599

Closed scamtank closed 9 years ago

scamtank commented 9 years ago

Both vectors are a full list of the professions in the game, each list item having none to several numbers attached.

1a assigns most professions a single value. The number jives somewhat with the order of the professions in the labor menu, but doesn't match up with the official skill/labor token lists. One example is the bowyer coming in at number 49, right past siege engineers (47) and operators (48). Umbrella professions like metalsmith and woodworker don't have their own number, but instead contain all the identifiers of their sub-professions. For instance, woodworkers have 2 (carpenter), 1 (woodcutter) and 49 (bowyer) in that order. My first guess was that they are arranged in the order they got added into the game (mining and woodcutting being first at 0 and 1, distinct clerical jobs coming in late and pottery, waxworking & gelding being dead last at 114-117), but that's just speculating.

1b is weirder. The list format is the same, but most civilian professions are blank. The only values are located in the following list items, with all the values listed in order:

The only list the numbers seem to match is skill tokens. http://dwarffortresswiki.org/index.php/DF2014:Skill_token Hunters have CROSSBOW and DODGING, medical professions all get WOUND_DRESSING and nothing more (notable since the distinct wound dresser profession isn't listed at all!), melee fighters aside from pikemen get DODGING, SHIELD, ARMOR, DISCIPLINE, CLIMBING and SITUATIONAL_AWARENESS, archers and pikemen have all the above except for SHIELD and wrestlers lose ARMOR as well.

The list might detail all the skills that generated characters/immigrants gain along with their single specific primary skill, but I don't have enough information to say for sure.

scamtank commented 9 years ago

Christ, how did I not put the pieces together immediately? The 1a pile is also all skill tokens.

Wrestlers get 101-104 (Striker, Kicker, Biter and Wrestler skills), thieves have 40, 116 and 57 (Knife User, Climber, Ambusher). STANDARD creatures (peasants?), recruits, hunting/war animals, children, babies, drunks, monster slayers, beast hunters, scouts, mercenaries and snatchers get nothing.

If my guess is right, mangling these vectors might be a way to make immigrants ready for war with ready weapon skills, prevent people from arriving with disused/deprecated skills, make games with all-peasant immigration and more. I need to test this.

scamtank commented 9 years ago

I finally got around to generating some worlds and they don't seem to do anything in practice for Fort mode or historical figures. If there's something actually looking the list up, I don't know what it is.