Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3 4 ... 44

Author Topic: Putnam's DFHack scripts  (Read 114921 times)

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #15 on: March 12, 2013, 07:12:09 am »

Putnam some improvements if i may :) :
Code: [Select]

for itemid,inv_item in ipairs(unit.inventory) do
local item=inv_item.item
if getMaterial(item)~=nil and getSyndrome(getMaterial(item))~=nil then -- then these function will not need ugly item.item in them

-- also there is
material=dfhack.matinfo.decode(item) -- or .decode(mat_type,mat_index)
-- then this will have:
material.inorganic --reference to raws for inorganic materials
material.plant -- reference to raws for plant materials
material.creature -- reference to raws for creature materials
more about last point: here

Maklak

  • Bay Watcher
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #16 on: March 12, 2013, 09:23:59 am »

Would it be relatively easy to modify the script to apply different syndormes (really just similar syndrome of varying strength) depending on item quality? That way we could for example have masterwork power armour give the user more toughness than the basic quality one.
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

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #17 on: March 12, 2013, 09:31:33 am »

That should be possible.  Putnam would have to decide on a formula for the severity of the syndrome based on the item quality, but it should be theoretically possible.

As for the utility itself, this is quite clever and a very useful addition.  I find it shocking that I'm having trouble thinking up applications for it for my mods though...
Logged
Through pain, I find wisdom.

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #18 on: March 12, 2013, 01:53:55 pm »

I have a question. What about hauled items with a syndrome ?  (lets assume one has dynamite-ammo in his mod, and a hapless dwarf tries to carry it to a ballista)

Would the syndrome be applied to the dwarf carriyng it, because if yes, that would be... bad. Hilarious, but bad.

Oh, lol, good question.  And I guess old-school boiling syndrome ammo is definitely not compatable, unless by adding in some immunities :)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #19 on: March 12, 2013, 02:15:16 pm »

Yeah, the hauling issue... not sure what to do with that.

EDIT: I think that hauled stuff has a mode of 0 in the inventory, which should make it very easy to disallow hauled items from affecting.
« Last Edit: March 12, 2013, 02:20:10 pm by Putnam »
Logged

KingofstarrySkies

  • Bay Watcher
  • It's been a long time...
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #20 on: March 12, 2013, 02:20:15 pm »

So, let me get this straight.
You can have a sword. That when it hits someone.
TURNS THEM INTO A WEREBEAST.
OR A HUSK.
OR A CORPSE.
YES.
No, really, this should be used WAAAAAAY more often in mods.
Logged
Sigtextastic
Vereor Nox.
There'll be another King, another sky, and a billion more stars...

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #21 on: March 12, 2013, 02:23:07 pm »

Umm... I actually haven't tested that, believe it or not! It may be possible. add-spatter already did that before I made this. This is more about magical swords that make you slow while you use them but can cut through anything or w/e.

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #22 on: March 12, 2013, 02:31:55 pm »

If I understand your answer: Ammo made of, or spattered, with syndromes is a separate issue from hauling, right?  Once the archer claims it is has a different... um... inventory mode?

Do you know whether a non-magic blade spattered with a syndrome poison will affect the wielder?

expwnent

  • Bay Watcher
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #23 on: March 12, 2013, 02:34:04 pm »

Neat extension.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #24 on: March 12, 2013, 02:38:12 pm »

If I understand your answer: Ammo made of, or spattered, with syndromes is a separate issue from hauling, right?  Once the archer claims it is has a different... um... inventory mode?

Do you know whether a non-magic blade spattered with a syndrome poison will affect the wielder?

It shouldn't. Spatters are stored... somewhere else, as are items in containers (which is the same thing as spatters, I think).

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utility
« Reply #25 on: March 12, 2013, 02:38:52 pm »

Well, the easiest way would be to use the SYN_AFFECTED_CLASS, using a class that dwarves dont have. For the ammo/negative effects that should only hit enemies.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #26 on: March 12, 2013, 02:39:53 pm »

So in theory, we could have a poisoned blade that infects people with an unrelated splatter of venom from a giant desert scorpion, and the poison added by the utility just makes the victim turn into a werebeast?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #27 on: March 12, 2013, 02:40:30 pm »

Well, the easiest way would be to use the SYN_AFFECTED_CLASS, using a class that dwarves dont have. For the ammo/negative effects that should only hit enemies.

Easier is to download the new version, which provides immunity to haulers :V

So in theory, we could have a poisoned blade that infects people with an unrelated splatter of venom from a giant desert scorpion, and the poison added by the utility just makes the victim turn into a werebeast?
In theory, you could... use add-spatter for that. https://github.com/angavrilov/dfhack/blob/master/plugins/raw/reaction_spatter.txt

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #28 on: March 12, 2013, 02:43:00 pm »

OP weapons of mass destruction, here we go.

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Putnam's DFHack modder's utility
« Reply #29 on: March 12, 2013, 02:46:05 pm »

Well, the easiest way would be to use the SYN_AFFECTED_CLASS, using a class that dwarves dont have. For the ammo/negative effects that should only hit enemies.

I was thinking SYN_IMMUNE_CLASS or SYN_IMMUNE_CREATURE, then you only have to tag your entity's creatures rather than every single other creature.

Quote from: Putnam
Easier is to download the new version, which provides immunity to haulers :V

:) that too
Pages: 1 [2] 3 4 ... 44