v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Vault/script

From Dwarf Fortress Wiki
< Vault
Revision as of 01:13, 12 March 2025 by DPhKraken (talk | contribs) (Adding script files)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
entities.vault_guardian.default=function(idx,tok)
    -- first, we have to generate their weird items
    local item_token_prefix=random_object_parameters.token_prefix.."EI"..tostring(idx)
    local item_info=generate_from_list(angel_item_gens,item_token_prefix)
    raws.register_items(item_info.lines)
    local lines={}
    -- put the weird items into the entity
    for k,v in pairs(item_info.tokens) do
        for kk,vv in ipairs(v) do
            lines[#lines+1]="["..k..":"..vv..(rarityless_items[k] and "" or ":COMMON").."]"
        end
    end
    lines[#lines+1]="[DIVINE_MAT_WEAPONS]"
    lines[#lines+1]="[DIVINE_MAT_ARMOR]"
    lines[#lines+1]="[DIVINE_MAT_CRAFTS]"
    lines[#lines+1]="[DIVINE_MAT_CLOTHING]"
    lines[#lines+1]="[CLOTHING]"
    lines[#lines+1]="[TRANSLATION:GEN_DIVINE]"
    return {entity=lines,weight=1}
end
CancelHideAbout

Rating Vault/script