This file contains 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
--show a list of 'spells' | |
local dlg=require("gui.dialogs") | |
function doNothing() | |
print("doing nothing real good but here have a site") | |
require("plugins.dfusion.adv_tools").addSite(nil,nil,nil,nil,nil,nil,df.global.world.units.active[0].civ_id) | |
end | |
function SummonSelf() | |
for k,v in pairs(df.global.world.nemesis.all) do |
This file contains 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
--warmlor Anga Big Old Book of Dfhackery Spells for the adventurer/fort manager on the go. | |
local gui = require 'gui' | |
local dlg = require 'gui.dialogs' | |
local args={...} | |
local is_cheat=(#args>0 and args[1]=="-c") | |
local cursor=xyz2pos(df.global.cursor.x,df.global.cursor.y,df.global.cursor.z) | |
local permited_equips={} | |
permited_equips[df.item_backpackst]="UPPERBODY" | |
permited_equips[df.item_quiverst]="UPPERBODY" |
This file contains 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 _ENV = mkmodule('plugins.dfusion.Rum-tools') | |
local dfu=require("plugins.dfusion") | |
local ms=require "memscan" | |
menu=dfu.SimpleMenu() | |
RaceNames={} | |
function setrace(name) | |
RaceTable=BuildNameTable() | |
print("Your current race is:"..GetRaceToken(df.global.ui.race_id)) | |
local id | |
if name == nil then |
This file contains 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 getCaste(race_id,caste_id) | |
local cr=df.creature_raw.find(race_id) | |
return cr.caste[caste_id] | |
end | |
function CreateUnit(race_id,caste_id) | |
local race=df.creature_raw.find(race_id) | |
if race==nil then error("Invalid race_id") end | |
local caste=getCaste(race_id,caste_id) | |
local unit=df.unit:new() | |
unit.race=race_id |
This file contains 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
-- allows to do jobs in adv. mode. | |
keybinds={ | |
nextJob={key="CUSTOM_B",desc="Next job in the list"}, | |
prevJob={key="CUSTOM_V",desc="Previous job in the list"}, | |
continue={key="A_WAIT",desc="Continue job if available"}, | |
down_alt1={key="CUSTOM_CTRL_D",desc="Use job down"}, | |
down_alt2={key="CURSOR_DOWN_Z_AUX",desc="Use job down"}, | |
up_alt1={key="CUSTOM_CTRL_E",desc="Use job up"}, | |
up_alt2={key="CURSOR_UP_Z_AUX",desc="Use job up"}, | |
use_same={key="A_MOVE_SAME_SQUARE",desc="Use job at the tile you are standing"}, |
This file contains 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 gui = require 'gui' | |
local dlg = require 'gui.dialogs' | |
local args={...} | |
local is_cheat=(#args>0 and args[1]=="-c") | |
local cursor=xyz2pos(df.global.cursor.x,df.global.cursor.y,df.global.cursor.z) | |
local permited_equips={} | |
permited_equips[df.item_backpackst]="UPPERBODY" | |
permited_equips[df.item_quiverst]="UPPERBODY" | |
permited_equips[df.item_flaskst]="UPPERBODY" |
This file contains 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 dlg = require("gui.dialogs") | |
function CompN1() | |
local adv=df.global.world.units.active[2] | |
--for k,v in pairs(df.global.world.units.active) do | |
--if adv.relations.group_leader_id==adv.id then | |
local sx,sy,sz | |
sx=adv.pos.x | |
sy=adv.pos.y |
This file contains 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 Mount (rider,horse) | |
--for k,horse in pairs(unit_list) do | |
--if unit_rider.pos.x==horse.pos.x and unit_rider.pos.y==horse.pos.y | |
--and unit_rider.pos.z==horse.pos.z then --check if they are on the same tile | |
horse.general_refs:insert("#",{new=df.general_ref_unit_riderst,unit_id=rider.id}) | |
rider.relations.rider_mount_id=horse.id | |
rider.flags1.rider=true | |
horse.flags1.ridden=true | |
require("utils").insert_sorted(df.global.world.units.other.ANY_RIDER,rider,"id") | |
return |
This file contains 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 addaciv() | |
local testciv=df.global.world.entities.all | |
--df.viewscreen_choose_start_sitest.available_civs:insert("#",{new=df.global.world.entities.all,112}) | |
--require("utils").insert_sorted(df..available_civs,df.global.world.entities.all[1],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().parent.available_civs,df.global.world.entities.all[112],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().parent.available_civs,df.global.world.entities.all[302],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().parent.available_civs,df.global.world.entities.all[234],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().parent.available_civs,df.global.world.entities.all[134],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().parent.available_civs,df.global.world.entities.all[32],"id") | |
require("utils").insert_sorted(dfhack.gui.getCurViewscreen().parent.available_civs,df.global.world.entities.all[274],"id") |
This file contains 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
//killstreak plugin by Lorgan (original idea by Vindicator) | |
object_event_add(Character,ev_create,0," | |
killStreak = 0; | |
currentStreak = global.paramPlayer.stats[KILLS]; | |
"); | |
object_event_add(Character,ev_step,ev_step_normal," | |
if (!global.isHost) exit; |
OlderNewer