function sigh2()
for k,v in pairs(df.global.world.squads.all) do
if v.alias == 'DFHACK' then
print(df.global.world.squads.all[k].alias)
for ki,vi in pairs(df.global.world.squads.all[k].positions) do
if df.global.world.squads.all[k].positions[ki].occupant ~= -1 then
local occup=vi.occupant
--local occup=df.global.world.squads.all[k].positions[ki].occupant
--print(occup)
local nemoccup=df.global.world.history.figures[occup].nemesis_id
insertreport(nemoccup)
end
end
end
end
end
--end
function insertreport(nemoccup)
for de,oe in pairs(df.global.world.army_controllers.all) do
if oe.mission_report == nil then else
print ( de,oe.mission_report.title)
for e,o in pairs(df.global.world.armies.all) do
if oe.id == o.controller_id then
print (e)
--return e,o
local forv=df.global.world.armies.all[e].members[0]
df.global.world.armies.all[e].members:insert("#",{new=true,nemesis_id=nemoccup,
stored_fat = forv.stored_fat,
unk_2c= forv.unk_2c,
unk_28= forv.unk_28,
unk_1= forv.unk_1,
unk_30= forv.unk_30,
unk_34= forv.unk_34})
end
end
end
end
end
sigh2()
ok just remember I forgot to post this script for returning squad members here uhh I probably need to test this for R2 when I get around to installing r2
but uhh yeah here's a script for
a, you went around the world in adventure mode as a military commander and recruited folks to the military and want to recall them all back to the player fort.
b, you lost some squad members after unretiring and want them back
c, other... mostly you mess with the other military army scripts I work on and decided to add a kobold that tried to steal some socks to the military and want to return them back to the site.
had to do a safety test on this to see if it work on my copy of Dfhack r1 and I want to advise caution on using this script as I just had lost everyone to the void and the only means of them returning was when I added another person to the squad then sent them out after which I had the chance to insert the missing folks to the new army.