DFHack / dfhack

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

create-unit error: Cannot read field world.arena_spawn: not found #2856

Open Elon8868 opened 1 year ago

Elon8868 commented 1 year ago

Calling create-unit in console like this: modtools/create-unit -race DWARF -caste FEMALE -name MOUNTAIN -age 30 -civId \\LOCAL -groupId \\LOCAL -location [ 131 97 163 ]

Then the following error is generated:

/hack/scripts/modtools/create-unit.lua:164: Cannot read field world.arena_spawn: not found.
stack traceback:
        [C]: in metamethod '__index'
        ...arf Fortress 5.05//hack/scripts/modtools/create-unit.lua:164: in function <...arf Fortress 5.05//hack/scripts/modtools/create-unit.lua:155>
        [C]: in function 'xpcall'
        E:\DF\Dwarf Fortress 5.05\hack\lua\dfhack.lua:60: in function 'dfhack.pcall'
        ...arf Fortress 5.05//hack/scripts/modtools/create-unit.lua:140: in function <...arf Fortress 5.05//hack/scripts/modtools/create-unit.lua:131>
        (...tail calls...)
        ...arf Fortress 5.05//hack/scripts/modtools/create-unit.lua:1120: in local 'script_code'
        E:\DF\Dwarf Fortress 5.05\hack\lua\dfhack.lua:808: in function 'dfhack.run_script_with_env'
        (...tail calls...)

Is there anything that could be done to fix this?

Would you mind helping me with this issue?

Thank you for your patience and hope you are having a great day!

ElsaTheHobo commented 1 year ago

create-unit piggybacks off of Arena Mode's create unit tool, this tool doesnt exist in 50.05 (or noone's found the function for it) so a fix would require either a total rewrite, or finding the new code for arena in 50.07