Skip to content

fix for modtools/create-unit - #1530

Open
dvantwisk wants to merge 5 commits into
DFHack:masterfrom
dvantwisk:create-unit-fix
Open

fix for modtools/create-unit#1530
dvantwisk wants to merge 5 commits into
DFHack:masterfrom
dvantwisk:create-unit-fix

Conversation

@dvantwisk

@dvantwisk dvantwisk commented Jan 3, 2026

Copy link
Copy Markdown

This fix changes the "arena spawn" paradigm that no longer works with the new version of DF to use dfhack.units.create(). It guts most arena-specific code, changes the method in which skills and equipment are applied, updates unit block info, and teleports the unit to the specified location. There's likely more to do, but for now this seems to revive the script's functionality as it was before the steam version of DF.

@ab9rf ab9rf added this to 53.09-r2 Jan 8, 2026
@github-project-automation github-project-automation Bot moved this to Todo in 53.09-r2 Jan 8, 2026
@ab9rf ab9rf moved this from Todo to Review In Progress in 53.09-r2 Jan 8, 2026
@ab9rf ab9rf removed this from 53.09-r2 Jan 12, 2026
@ab9rf ab9rf added this to 53.10-r2 Jan 12, 2026
@github-project-automation github-project-automation Bot moved this to Todo in 53.10-r2 Jan 12, 2026
@ab9rf ab9rf moved this from Todo to Review In Progress in 53.10-r2 Jan 12, 2026

@ab9rf ab9rf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but needs a changelog entry

@ab9rf ab9rf moved this from Review In Progress to Being worked on in 53.10-r2 Feb 9, 2026
@ab9rf ab9rf moved this from Being worked on to Needs revision in 53.10-r2 Feb 16, 2026
@ab9rf ab9rf added this to AFTER NEXT Feb 27, 2026
@github-project-automation github-project-automation Bot moved this from Needs review to Needs revision in AFTER NEXT Feb 27, 2026
@github-project-automation github-project-automation Bot moved this to Needs review in AFTER NEXT Feb 27, 2026
@ab9rf ab9rf removed this from 53.10-r2 Feb 27, 2026

@chdoc chdoc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the long delay. There simply wasn't anyone around to do proper reviews for a long time.

I gave it a look, and I didn't find anything that really stood out, except for two (outside of the modified part) where the way that things are done now have changed a bit.

Is there still interest in getting this merged?

Comment thread modtools/create-unit.lua
'customProfession',
})

if moduleMode then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs to be updated:

Suggested change
if dfhack_flags.module then

Comment thread modtools/create-unit.lua
return
end

local args = utils.processArgs({...}, validArgs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be updated to use the argparse module.

Suggested change
local argparse = require('argparse')
local args = argparse.processArgs({...}, validArgs)

@chdoc chdoc added in good shape abandoned Author has not responded to requests for changes for multiple months. labels Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

abandoned Author has not responded to requests for changes for multiple months. in good shape

Projects

Status: Needs revision

Development

Successfully merging this pull request may close these issues.

3 participants