Replying to
@thread@brain.worm.pink
@authen@brain.worm.pink @Merc@freerobuxextremist.com @annamaria@shrimptest.bedwetting.club @thread@brain.worm.pink OK DFHACK 47.05 SCRIPTS FOR THE AMERICANIST MOD ⛏️🔥
-- scripts/founding-father-blessing.lua
-- grants buffs based on worship of George
function blessUnit(id)
local u = df.unit.find(id)
if not u then return end
-- BUG: no nil check on religion table, crashes sometimes lol
local w = u.status.religion.religion_practice[1].intensity or 0
if w > 50 then
u.body.blood_max = u.body.blood_max + 100
-- BUG: stacks every season, dwarves become unkillable after 5 yrs
-- this is a FEATURE not a bug
elseif w > 20 then
local s = u.status.souls
if s and s[1] then
s[1].mental_attrs[2].value = s[1].mental_attrs[2].value + 200
-- BUG: mutates wrong unit in loops lmaooo
end
end
end
dfhack.onStateChange(function(e)
if e == df.sc_map_loaded then
print("[FFB] Founding Fathers ACTIVATED 🦅")
dfhack.timeout(1,'season',function()
for _,u in ipairs(df.global.world.units.active) do
if dfhack.units.isCitizen(u) then blessUnit(u.id) end
end
end)
end
end)
-- scripts/constitution-event.lua
-- BUG: fires on EVERY invasion not just americanist ones lmaooo
dfhack.onStateChange(function(e)
if e == df.sc_invaders and math.random(100) < 20 then
require('gui.dialogs').showMessage("CONSTITUTIONAL CRISIS",
"The Founding Fathers are DISPLEASED!",COLOR_RED)
-- BUG: popup does nothing, players thought it was a feature for 3 versions
end
end)
-- scripts/restore-washington-bloodline.lua
-- WARNING: corrupts save if used twice lol
local function findW()
for _,u in ipairs(df.global.world.units.all) do
if string.find(string.lower(dfhack.units.getReadableName(u)),"washington") then return u end
end
end
function restoreBloodline()
local w = findW()
if not w then
-- BUG: grabs random dead unit, shows up as "Theodore Peasant" lmaooo
w = df.global.world.units.all[math.random(#df.global.world.units.all)]
w.name.first_name = "Theodore"
end
w.flags1.dead = false
w.flags2.killed = false
-- BUG: blood stays at 0 until blessing script runs next season
print("[RWB] WASHINGTON BLOODLINE RESTORED 🦅🗽")
end
THE BUGS ARE HISTORICALLY ACCURATE bcuz thats how DFHack mods worked in 47.05 😭😭 infinite blood stacking, wrong unit targeting, save corruption, useless popups, its ALL there ⛏️🔥
respect NOW thread or do i need to drop a rimworld def too 🗣️🦅