Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 5 6 [7] 8 9 ... 61

Author Topic: [SUGGESTIONS] for DFhack plugins  (Read 136665 times)

Itnetlolor

  • Bay Watcher
    • View Profile
    • Steam ID
Re: [SUGGESTIONS] for DFhack plugins
« Reply #90 on: February 10, 2013, 03:19:33 pm »

After struggling with a Kea and Minecart problem that repeatedly crashed my game (until I decided to bury the damned (in many ways) minecart once and for all in a puddle, avoiding the bug initially, and then sealing it inside an obsidian black-box (DFHack, Liquids-made monolith), to prevent the bug once and for all); I thought up a good couple more plugins.

A Thief's Eye kind of plugin. Simply put, it lists your most valuable, or most-likely-to-be-taken items (or children or animals), be it by kobold or kea, or any other kind of theif. And if possible, also markup the odds of a child thief and/or the intended target child, along with the items. If possible as well, find a way to clear the "attraction" to said item of the creature in question hunting it down. kill their interest in the item in question so they can stop pursuing it, even if it means they'll still be hanging around idly as if they were scared off from the steal.

I don't think it's possible, especially since I also don't know enough programming to know how it would work or be developed, but an error-checker of sorts to scan all items and characters for any gamebreaking flaws/bugs (like my minecart that kills my game anytime it goes missing/destroyed/deleted (via DFHack)). It's mostly informative, But it can also auto-dump (or auto-assign dump/forbid) any problem-items so they can't be tampered with further. Autodump can also be given a problem-item autodump function as well, though it would have to work in tandem with the scanner to work properly.

And one more comes to mind, but a siege/ambush heads-up plugin would be interesting, as if your dwarves (especially in aboveground forts) can see the armies coming in from over the horizon. Basically, it would tell you at least the chances of it happening, based on your fort value, or whatever values either ambush or siege responds to. Of course, it doesn't need to be a HUD or sorts, but a DFHack command. Especially also helpful if you want to know what faction is coming after you if there's more than one civ pissed off at your mere existence. Prepare accordingly.

EDIT:
I just thought up another one: Death-Note
Highlight the character you want to kill, and it'll markup the heart or most-valuable organ of the creature as non-existant, or destroyed/broken, thereby killing the creature immediately. Named after Death-Note, since it's mostly by heart-attack the creatures in question are killed by. Death may not be immediate for some, and I am uncertain about the undead, and how it may affect necromancy. Nonetheless, I think this would be a fun, yet exploitable, plugin. Gore can be an option, which explodes the creature on the spot, as if they ate a full serving C4-potato salad.
« Last Edit: February 10, 2013, 03:27:07 pm by Itnetlolor »
Logged

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #91 on: February 10, 2013, 03:23:50 pm »

I just thought that thieves went for the nearest target available
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Itnetlolor

  • Bay Watcher
    • View Profile
    • Steam ID
Re: [SUGGESTIONS] for DFhack plugins
« Reply #92 on: February 10, 2013, 03:29:35 pm »

I just thought that thieves went for the nearest target available
If I remember correctly, from other exploits and trappings and etc. I read on the boards, some creatures and ambushes/sieges usually home in towards the most valuable item (where some people placed artifacts behind a giant cave spider they tamed, to also farm in on giant cave spider silk, and such). I checked the values of the items that were crashing my game, and the minecart was among the most valuable of the lot a kea could steal from me out in the open.

On that note, a Heads-Up-Display plugin that can tell you what item/unit units are going after, be it a dwarf building something (or an artifact), or a thief targeting something to steal; it could be viewed by the (v)iew unit on map, or (u)nit list screen options. Maybe even see the target of intent for anyone going berserk, hunting, or assault. I'm getting tired of guessing the items/targets that those damned birds/berserkers were going after to find the source of my problems. Lotta trial and error, and checking logs, until I found it out.

A pathfinder/path-seer tool could also be of interest. It basically shows you the path a unit is taking to reach it's desired destination (task, target, or otherwise (idle/partying/going to bedroom/dining hall)); being a highlighted Point-A (unit) to point-B (destination point) path, and the course they're taking to get there. See what crazy path they're going to get their job done. Also helps where sieges and ambushes are concerned as well; although exploitable when it comes to placing military to defend. Or as a means of faux-hindsight when placing a gauntlet of death for invaders. Knowing where they come from, and taking care of it accordingly.
« Last Edit: February 10, 2013, 03:42:44 pm by Itnetlolor »
Logged

RickRollYou2

  • Bay Watcher
  • [START_BIOME:EARTH]
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #93 on: February 12, 2013, 08:18:40 am »

...
I just thought up another one: Death-Note
Highlight the character you want to kill, and it'll markup the heart or most-valuable organ of the creature as non-existant, or destroyed/broken, thereby killing the creature immediately.

"slayrace him" already kills a singular particular creature (IIRC by setting the blood level really low so that it "bled out") so...  :P
Exploding in gore on the other hand... I'd like to see that too  ;)
Logged

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #94 on: February 12, 2013, 05:57:10 pm »

Maybe set all their body parts to evaporation temperature?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #95 on: February 12, 2013, 06:02:02 pm »

I'd say setting blood_count to 0 is good enough, hehe.

Itnetlolor

  • Bay Watcher
    • View Profile
    • Steam ID
Re: [SUGGESTIONS] for DFhack plugins
« Reply #96 on: February 12, 2013, 06:06:31 pm »

What about impact velocity? Directional, and straight downward could be options. Have them hit the ground (even when walking on the ground already) at terminal velocity. Set motion speed, and toggle the impact flag (if there is such a thing), and now you have blood fireworks. Would work even on flying creatures (explode them in mid-air).
« Last Edit: February 12, 2013, 06:08:31 pm by Itnetlolor »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #97 on: February 13, 2013, 02:03:22 am »

What about impact velocity? Directional, and straight downward could be options. Have them hit the ground (even when walking on the ground already) at terminal velocity. Set motion speed, and toggle the impact flag (if there is such a thing), and now you have blood fireworks. Would work even on flying creatures (explode them in mid-air).
Heh, this actually could work.

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #98 on: February 13, 2013, 02:36:04 am »

Just make sure to set the velocity to something like 15km/s, wouldn't want bronze colossi getting off easy now would we?
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Maklak

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #99 on: February 13, 2013, 02:38:04 pm »

A plugin that periodically (say once per a 100 frames) checks what a dwarf's "stated job" is (walking to a workshop and gathering materials counts) and records a counter during the game session. It would give the ability to print statistics, for example what percent of time a dwarf spent doing what job, but what I'm most interested in is idlers. I can just go to the U screen, but for some things it would be useful to see who was idling the most lately. You could also get statistics on soldiers sparring, doing demonstrations, etc.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

falconne

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #100 on: February 13, 2013, 02:46:56 pm »

A plugin that periodically (say once per a 100 frames) checks what a dwarf's "stated job" is (walking to a workshop and gathering materials counts) and records a counter during the game session. It would give the ability to print statistics, for example what percent of time a dwarf spent doing what job, but what I'm most interested in is idlers. I can just go to the U screen, but for some things it would be useful to see who was idling the most lately. You could also get statistics on soldiers sparring, doing demonstrations, etc.

I have a WIP plugin that does this but I put it aside because I thought people wouldn't care for such statistics. I could finish that if there's enough interest.

Edit: I've published it here: http://www.bay12forums.com/smf/index.php?topic=123279.0
« Last Edit: February 24, 2013, 06:13:10 am by falconne »
Logged
Utility plugins for DFHack, for improving Dwarf Fortress' user interface.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #101 on: March 16, 2013, 05:15:04 pm »

RISE, O GREAT THREAD, FOR MY CREATIVE BANKRUPTCY DEMANDS IT.

Quote
Coat items with materials, which affect the wearer
- Possible: ?
 - Good for magical/cursed armors.
 - Allows more advances weapons, that add interactions to the wearer.
 - For example molotov-cocktails, or a dwarven flamethrower.
 - Allows advances crafting system, use special reagents for special items.
 - For example fire imp-items give fireball, dragon-items give firebreath, GCS-items give poison immunity.

Itemsyndrome does something similar to this; the difference is mostly in the spatter, which I didn't think of. I think I could add that to itemsyndrome...

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #102 on: March 16, 2013, 05:19:49 pm »

Something to fix the caverns in adventure mode so you can actually encounter creatures in them
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #103 on: March 16, 2013, 05:25:03 pm »

Something to fix the caverns in adventure mode so you can actually encounter creatures in them

My instant transmission script for the DBZ mod showed me that there are creatures everywhere in the caverns--it's just that they're damn hard to find because the caverns are so difficult to see in. Here, try it out:

Code: [Select]
-- Allows instant transmission.

math.randomseed(dfhack.getTickCount())

if df.global.gamemode~=1 then
qerror("Adventure mode only (for now). Sorry!")
end

function getTileType(x,y,z)
    local block = dfhack.maps.getTileBlock(x,y,z)
    if block then
        return block.tiletype[x%16][y%16]
    else
        return 0
    end
end

function getPowerLevel(unit)
local speed = 1000/dfhack.units.computeMovementSpeed(unit)
local strength = unit.body.physical_attrs.STRENGTH.value/3550
local endurance = unit.body.physical_attrs.ENDURANCE.value/1000
local toughness = unit.body.physical_attrs.TOUGHNESS.value/2250
local spatialsense = unit.status.current_soul.mental_attrs.SPATIAL_SENSE.value/1500
local kinestheticsense = unit.status.current_soul.mental_attrs.KINESTHETIC_SENSE.value/1000
local willpower = unit.status.current_soul.mental_attrs.WILLPOWER.value/1000
local bodysize = (unit.body.blood_count/100)^2
local powerlevel = bodysize*speed*((strength*endurance*toughness*spatialsense*kinestheticsense*willpower)^(1/6))
return powerlevel
end

function getSubjectPronoun(unit)
local sex = unit.status.current_soul.sex
if sex == 1 then return "he"
elseif sex == 0 then return "she"
else return "it"
end
end

function getObjectPronoun(unit)
local sex = unit.status.current_soul.sex
if sex == 1 then return "him"
elseif sex == 0 then return "her"
else return "it"
end
end

function getPowerLevelComparison(unit1,unit2)
local randomnumber = math.random(2)
local subjectPronoun = getSubjectPronoun(unit2)
local objectPronoun = getObjectPronoun(unit2)
local comparison = getPowerLevel(unit2)/getPowerLevel(unit1)
if comparison < .8 then
if comparison < .1 then
if randomnumber == 1 then return "Hmm, " .. subjectPronoun .. "'s not very powerful..."
else return "Ha, " .. subjectPronoun .. "'s so weak!" end
elseif randomnumber==1 then return "I can definitely take " .. objectPronoun .. "."
else return "Eh, " .. subjectPronoun .. " shouldn't be too difficult to beat." end
elseif comparison >= .8 and comparison <= 1.2 then
if comparison == 1 then return "Huh. Identical power levels? Either this is me or this is weird."
else return "I'm about as strong as " .. objectPronoun .. "." end
elseif comparison > 1.2 and comparison <= 10 then return "Okay, " .. subjectPronoun .. "'s a bit stronger than I am!"
elseif comparison > 10 and comparison <= 100 then return "Oh man, " .. subjectPronoun .. "'s a lot stronger than me! I hope my skill can prevail."
elseif comparison > 100 and comparison <= 10000 then return "Okay, I do NOT want to fight that!"
elseif comparison > 10000 and comparison <= 1000000 then return "No way can I win against a foe like that!"
else return "QUACK!"
end
end

local function positionIsValid(x,y,z)
local occupancy = dfhack.maps.getTileBlock(x,y,z).occupancy[x%16][y%16]
local tiletype = getTileType(x,y,z)
local attrs = df.tiletype.attrs[tiletype]
if occupancy.building~=0 or occupancy.unit or not dfhack.maps.isValidTilePos(x,y,z) or attrs.shape == df.tiletype_shape.WALL  then return false else return true end
end

local player = df.global.world.units.active[0]

if ...==nil then
for _uid,unit in ipairs(df.global.world.units.all) do
print(_uid,df.creature_raw.find(unit.race).caste[unit.caste].caste_name[0],dfhack.TranslateName(dfhack.units.getVisibleName(unit)),getPowerLevelComparison(player,unit))
end
qerror("type the number for the creature you want to teleport to!")
end

local unitToTeleportTo = df.global.world.units.all[tonumber(...)]

local function teleport(unit)
local playeroccupancy = dfhack.maps.getTileBlock(player.pos).occupancy[player.pos.x%16][player.pos.y%16]
local teleportToPosX = unit.pos.x
local teleportToPosY = unit.pos.y
local timesTried = 0
teleportToPosY = unit.pos.y - 1
repeat
if timesTried > 4 then qerror("Failed to teleport.") end
local hasNotTried = true
if teleportToPosY < unit.pos.y and hasNotTried then
teleportToPosY = unit.pos.y
teleportToPosX = unit.pos.x-1
hasNotTried = false
end
if teleportToPosX < unit.pos.x and hasNotTried then
teleportToPosX = unit.pos.x
teleportToPosY = unit.pos.y+1
hasNotTried = false
end
if teleportToPosY > unit.pos.y and hasNotTried then
teleportToPosY = unit.pos.y
teleportToPosX = unit.pos.x+1
hasNotTried = false
end
if teleportToPosX > unit.pos.x and hasNotTried then
teleportToPosX = unit.pos.x
teleportToPosY = unit.pos.y-1
hasNotTried = false
end
timesTried = timesTried + 1
until positionIsValid(teleportToPosX,teleportToPosY,unit.pos.z)
dfhack.gui.showAnnouncement("You put two fingers up to your head and concentrate...",11)
player.pos.x = teleportToPosX
player.pos.y = teleportToPosY
player.pos.z = unit.pos.z
if not player.flags1.on_ground then playeroccupancy.unit = false else playeroccupancy.unit_grounded = false end
end

teleport(unitToTeleportTo)

Some info is superfluous, but it's all harmless.

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #104 on: March 16, 2013, 05:53:21 pm »

I've been walking around spamming reveal in all my test explorations, haven't seen any creatures. Additionally, the brand-new region-pops indicates 0 for all cavern creatures except the animal people (who are still absent).

Hmm, your script isn't turning up any either, but it's certainly disconcerting to know that at any moment there's about 2-12 demons far below me :D

EDIT: Strange, I generated a new world and now all three plugins show the existence of cavern creatures. Scanning down in the caverns in both adventure mode and fort mode shows cave critters. Huh. I wonder why all the other worlds I've had so far don't have any?
« Last Edit: March 16, 2013, 06:25:54 pm by HugoLuman »
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?
Pages: 1 ... 5 6 [7] 8 9 ... 61