Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Tips for not dying?  (Read 4968 times)

a smiling bearded cretin

  • Bay Watcher
  • [NOTHOUGHT][NO_SLEEP]
    • View Profile
Re: Tips for not dying?
« Reply #15 on: July 10, 2015, 11:08:39 am »

Yeah, I sat and checked the attack accuracy values multiple times in various situations and it's consistent that there is no penalty for attack+dodge, then the first attack takes a big hit for multiple attacks, and other attacks take a more random hit.

Oh and artifacts are indeed more accurate, like twice as accurate as a masterwork or thereabouts.

Ah! So pairing multiple attacks results in % penalty, but an attack + dodge or block does not. That's pretty huge.

Sadly though, since I don't play fortress mode, artifacts are just myths for me.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Tips for not dying?
« Reply #16 on: July 10, 2015, 08:36:27 pm »

*cough cough*

Code: (artifake.lua) [Select]
local utils = require 'utils'

validArgs = validArgs or utils.invert({
 'help',
 'mat',
 'item',
 'name',
 'r',
 'l'
})

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

if args.help then
 print(
[[artifake.lua
arguments:
    -help
        print this help message
    -mat matstring
        specify the material of the item to be created
        examples:
            INORGANIC:IRON
            CREATURE_MAT:DWARF:BRAIN
            PLANT_MAT:MUSHROOM_HELMET_PLUMP:DRINK
    -item itemstring
        specify the itemdef of the item to be created
        examples:
            WEAPON:ITEM_WEAPON_PICK
    -name namestring
    specify a first name if desired
    -r
for right handed gloves
    -l
for left handed gloves
]])
 return
end

if dfhack.gui.getSelectedUnit(true) then
 args.creator = dfhack.gui.getSelectedUnit()
 else args.creator = df.global.world.units.active[0]
end
if not args.item then
 error 'Invalid item.'
end
local itemType = dfhack.items.findType(args.item)
if itemType == -1 then
 error 'Invalid item.'
end
local itemSubtype = dfhack.items.findSubtype(args.item)

args.mat = dfhack.matinfo.find(args.mat)
if not args.mat then
 error 'Invalid material.'
end


local item = dfhack.items.createItem(itemType, itemSubtype, args.mat['type'], args.mat.index, args.creator)

 local base=df.item.find(df.global.item_next_id-1)
 df.global.world.artifacts.all:new()
 df.global.world.artifacts.all:insert('#',{new=df.artifact_record})
local facts = df.global.world.artifacts.all
 for _,k in ipairs(facts) do
  if k.id==0 then
   local fake=k
   fake.id=df.global.artifact_next_id
   fake.item = {new=base}
fake.item.flags.artifact = true
fake.item.flags.artifact_mood = true
fake.item.id = base.id
fake.item.general_refs:insert('#',{new =  df.general_ref_is_artifactst})
fake.item.general_refs[0].artifact_id = fake.id
fake.item.spec_heat = base.spec_heat
fake.item.ignite_point = base.ignite_point
fake.item.heatdam_point = base.heatdam_point
fake.item.colddam_point = base.colddam_point
fake.item.boiling_point = base.boiling_point
fake.item.fixed_temp = base.fixed_temp
fake.item.weight = base.weight
fake.item.weight_fraction = base.weight_fraction
fake.item.improvements:insert('#',{new = df.itemimprovement_spikesst,mat_type=25,mat_index=474,quality=0,skill_rating=15})
fake.item.improvements:insert('#',{new = df.itemimprovement_spikesst,mat_type=25,mat_index=493,quality=0,skill_rating=15})
fake.item.improvements:insert('#',{new = df.itemimprovement_art_imagest,mat_type=22,mat_index=474,quality=5,skill_rating=15})
fake.item.improvements:insert('#',{new = df.itemimprovement_art_imagest,mat_type=42,mat_index=480,quality=5,skill_rating=15})
fake.item.improvements:insert('#',{new = df.itemimprovement_art_imagest,mat_type=22,mat_index=497,quality=5,skill_rating=15})
   fake.anon_1 = -1000000
   fake.anon_2 = -1000000
   fake.anon_3 = -1000000
     base.flags.artifact = true
     base.flags.artifact_mood = true
     base.general_refs = fake.item.general_refs
     base.improvements = fake.item.improvements
     fake.item:setQuality(5)
     base:setQuality(5)
     if fake.item == 'WEAPON' then item:setSharpness(1,0) end
     if base == 'WEAPON' then item:setSharpness(1,0) end
     df.global.artifact_next_id=df.global.artifact_next_id+1
 df.global.world.history.events:new()
 df.global.world.history.events:insert('#',{new=df.history_event_artifact_createdst,
year = df.global.cur_year,
seconds = df.global.cur_year_tick_advmode,
id = df.global.hist_event_next_id,
artifact_id = fake.id,
unit_id = args.creator.id,
hfid = args.creator.hist_figure_id,
}
)
   df.global.hist_event_next_id = df.global.hist_event_next_id+1
if args.r then
base.handedness[0] = true
fake.item.handedness[0] = true
end
if args.l then
base.handedness[1] = true
fake.item.handedness[1] = true
end
 if args.name then do
  fake.name.first_name = args.name
  fake.name.language = 0
  fake.name.has_name = true
         end
      end
   end
end
Logged

a smiling bearded cretin

  • Bay Watcher
  • [NOTHOUGHT][NO_SLEEP]
    • View Profile
Re: Tips for not dying?
« Reply #17 on: July 11, 2015, 06:53:22 pm »

Ah!
Logged
Pages: 1 [2]