- gods in df -> moved to word doc
- figure out book interactions, give some fun stuff to random books (e.g. paralysis)
-
finish unit creation script- mostly done, needs some minor fixesdo it in c++ - site creation done, could use some more love.
- finish the lua-scripted reactions (including the god worshiping mini-mod, altars (with statue req) and mini altars with figurines?) done- eventful
- genetic engineering by adding generated creature raws
- jobs in adv mode (esp. build/dig) - almost done advfort
- anti-quantum stockpile mod
- Df achievements and stats(longest toss, most hurt unit, cheapest artifact). Per world and could be added to fortmode/advmode/legends menu
- maybe it's possible to add rust (new material that sometimes adds wear to item and a layer of rust/patina, maybe it inhibits later additions)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b=require "plugins.reactionhooks" | |
b.onReactionComplete.foo=function (unit,in_items,out_items,call_native) | |
print("OKAY!") | |
printall(unit) | |
printall(in_items) | |
printall(out_items) | |
printall(call_native) | |
call_native=false | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local d = require('gui.dialogs') | |
function assignSyndrome(target,syn_id) | |
if target==nil then | |
qerror("Not a valid target") | |
end | |
local ns=df.unit_syndrome:new() | |
local trg_syn=df.syndrome.find(syn_id) | |
ns.type=trg_syn.id | |
--ns.year= | |
--ns.year_time= |
- Items:
- incrementRotTimer
- addImprovementFromJob
- moveToGround
- categorize
- addWear/incWearTimer/setWear
- addContaminant/removeContaminant/removeContaminantByIdx
- contaminateWound
- coverWithContaminant
- becomePaste/becomePressed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addSiteAtPos(x,y,rgn_x,rgn_y) | |
rgn_x=rgn_x or math.random(1,15) | |
rgn_y=rgn_y or math.random(1,15) | |
--[=[ | |
<angavrilov> global = pos*16 + rgn | |
<angavrilov> BUT | |
<angavrilov> for cities global is usually 17x17, i.e. max size | |
<angavrilov> while rgn designates a small bit in the middle | |
<angavrilov> for stuff like forts that formula holds exactly | |
]=]-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getLastJobLink() | |
local st=df.global.world.job_list | |
while st.next~=nil do | |
st=st.next | |
end | |
return st | |
end | |
function AddNewJob(job) | |
local nn=getLastJobLink() | |
local nl=df.job_list_link:new() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--passes turns constantly | |
gui=require ("gui") | |
realtime=defclass(realtime,gui.Screen) | |
function realtime:onRenderBody(dc) | |
self:sendInputToParent("A_WAIT") | |
self:renderParent() | |
end | |
function realtime:onIdle() | |
self._native.parent:logic() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- changes from advmode to fort safely (hopefully) | |
if df.global.gamemode==df.game_mode.ADVENTURE then | |
local adv=df.global.world.units.active[0] | |
local ui=df.global.ui | |
function advGlobalPos() | |
local wd=df.global.world.world_data | |
return wd.adv_region_x*16+wd.adv_emb_x,wd.adv_region_y*16+wd.adv_emb_y | |
end | |
function inSite() | |
local tx,ty=advGlobalPos() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--create unit at pointer. Usage e.g. "spawnunit DWARF 0 Dwarfy" | |
args={...} | |
function getCaste(race_id,caste_id) | |
local cr=df.creature_raw.find(race_id) | |
return cr.caste[caste_id] | |
end | |
function genBodyModifier(body_app_mod) | |
local a=math.random(0,#body_app_mod.ranges-2) | |
return math.random(body_app_mod.ranges[a],body_app_mod.ranges[a+1]) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{name="corpse explosion",f=function (unit_list,pos) | |
local items={} | |
for _,checked_item in pairs(df.global.world.items.other.ANY_CORPSE) do --actually you could iterate over only corpse pieces... But i'm too lazy | |
if checked_item.flags.on_ground then --add/remove more checks before then if you want to explode not ALL the corpses | |
table.insert(items,checked_item) --add to the list of target items | |
end | |
end | |
if #items==0 then | |
print"no corpses" |