Skip to content

Instantly share code, notes, and snippets.

//combined RTD and Killstreak+BUFFS by Rumrusher/ZaSpai
//designed with partial Upgradeable Sentries (BassMakesPaste) compatibility
//original killstreak plugin by Lorgan (original idea by Vindicator)
//original rtd plugin by Lorgan
//edits the following: Sentry creation, begin and end steps, Sentry and N+B HUDs, numerous Character events, StabMask collision with Sentry and Character. Adds alarm[8] to Sentry and Character
//uses global.SerializeBuffer to sync new data. WILL CAUSE A HANG AND CRASH if you forget to take this plugin out when you join another server as client!!!
//known issues: incorrect new sentry build HP with respect to sentryBuffStats (IDK how to reference the Character object of the owner player of sentry). Haven't checked the sentry gibs issue thing (I may need to sync its bolt gain value)
//RTD mostly untouched apart from Rummy's inclusion of the Stomp attack for effect 16
//Now with Vindicators weapon mod thrown into the mix may god have mercy on our souls if this work.
//kinda wigs out i
//combined RTD and Killstreak+BUFFS by Rumrusher/ZaSpai
//designed with partial Upgradeable Sentries (BassMakesPaste) compatibility
//original killstreak plugin by Lorgan (original idea by Vindicator)
//original rtd plugin by Lorgan
//edits the following: Sentry creation, begin and end steps, Sentry and N+B HUDs, numerous Character events, StabMask collision with Sentry and Character. Adds alarm[8] to Sentry and Character
//uses global.SerializeBuffer to sync new data. WILL CAUSE A HANG AND CRASH if you forget to take this plugin out when you join another server as client!!!
//known issues: incorrect new sentry build HP with respect to sentryBuffStats (IDK how to reference the Character object of the owner player of sentry). Haven't checked the sentry gibs issue thing (I may need to sync its bolt gain value)
//RTD mostly untouched apart from Rummy's inclusion of the Stomp attack for effect 16
object_event_add(Character,ev_create,0,"
@Rumrusher
Rumrusher / Solder_test.npc
Created March 2, 2014 15:41
a modified version of a rocketman dodge map script
instance_create(41*6,16*6,NPC01);
with(NPC01) {
createAllyQuote();
txt = "QQQQ-Hello.#This is a QQQQ-test map. QQQQ-";
intelTxt = "You got the QQQQ-intel!#QQQQ-Hello. What am I QQQQ-#doing here?";
object_event_add(NPC01, ev_other, NPC_EVENT_MEET, '
if(global.myself.object.intel) {
addDialog(intelTxt, face, subFace);
} else {
@Rumrusher
Rumrusher / Arenafriendly.lua
Created February 24, 2014 09:08
this script will set all your civ to be on the same side so that if you ever venture out to Arena mode you don't have to worry about too much chaos. PS someone could make this slightly more fort mode friendly but hey.
function Arenafriendly(unit,trgunit)
local adv=df.global.world.units.active[0].civ_id
for k,v in pairs(df.global.world.units.active) do
if v.civ_id==adv then
if v== nil then
error("Invalid creature")
end
trgunit=df.global.world.units.active[0]
//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(PlayerControl,ev_create,0,"
alarm[0] = 300;
");
@Rumrusher
Rumrusher / RandomKillstreak.gml
Last active August 29, 2015 13:55
modified from 2 lorgens codes ps I have a github account who knew.
//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;
@Rumrusher
Rumrusher / additionalciv.lua
Created October 25, 2013 12:10
for fort mode though I couldn't find a good way to add military with this so you have to wing it
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")
@Rumrusher
Rumrusher / Mount.lua
Created October 9, 2013 16:17
CHOOSE YOUR MOUNTS To apply this you need to go into the unit's profile in adventure mode, fort mode is just highlight and enter. first pick is Rider, the second is mount, this code is a modify version of Hugelueman's marry revise code... also warmists.
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
@Rumrusher
Rumrusher / Mount-Order.lua
Created October 8, 2013 18:12
Rider Controls pretty basic bind this to Alt-M
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
@Rumrusher
Rumrusher / CompanionOrder.lua
Last active December 17, 2015 00:19
modded Companion order that allows you to set up a worker for comfort to do so you need to have the pointer on top of the unit you want to set up.
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"