Bay 12 Games Forum

Please login or register.

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

Author Topic: Advanced building reaction idea - Assistance required please.  (Read 3948 times)

FantasticDorf

  • Bay Watcher
    • View Profile

Hello, I'm not usually one to shy away from raw fiddling but I've met my match.

Ive hit a bit of a snag as after looking through the DF wiki and existing raw files for reference i can't feasably imagine a way to make this idea happen with my own technical skill of the game. So im throwing it out into the public forum for assistance, mainly because im interested whether its even possible with the current tools within the game as they are at the moment.

The basic idea is that within the confines of a workshop, i could apply a cage (drawing upon a animal stockpile of empty cages) with [EMPTY] as the first half of a reaction, then apply a animal as a second stage, but that would infer it'd probably walk free/scare dwarves before the designated animal is placed within the cage as a product. Being the same animal brought or manifested to the workshop as before.

This would have greater application in a number of different ways, though some of them are more complex from a programming/modding angle than others but draw upon the 'capturing' building reaction as I've loosely detailed above.

> Knocking a animal non-lethally unconscious and/or within a firm grip of a lasso after softening up and then transferring to a cage directly within the workshop building (this is more a suggestion for the DF development arcs benefit since it is a marked goal, this process would draw upon the "trapper" skill ideally as for being appropriate)

> Similar as above, a processing centre for enslavement, taking surrendering POW's and captured sentients and then forcefully applying a caste or modifier onto them or some other kind of process, could be applied for capturing criminals. (again more of a DF development arc suggestion)

> Easier management of farming workshops, as animals can be en-masse collected in a cage or transferred from a cage sheared/milked and then put back inside the cage or sequentially released back into the pastures by haulers without them breaking free and walking off.

> Incubators for forcefully hatching eggs and then go about trapping the contents within a cage, so that micromanagement on egg stocks could be loosened and egg laying races might have a chance to reproduce successfully in worldgen/fortress mode on top of livestock management (facilitated by the "animal caretaker skill") slightly abusable from a modding perspective embarking with eggs (unless somehow those eggs could be modified to be sterile/wild-hostile)

> Manifesting a psuedo ressurection/summoning of a animal out of thin air and a set of components (such as blood and bones and some leather) anew or bring otherworldly supernatural creatures into this veil of reality/from the realm of death as zombies as per fortress driven necromancy or magic.

Feedback on the feasability of these things would be very much appreciated. I hope my project outlay, where it might just be outlandishly ambitious within the real context of the game at-least manages to inspire others to pursue their own projects.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Advanced building reaction idea - Assistance required please.
« Reply #1 on: May 17, 2016, 10:06:20 am »

You cant use creatures in reactions, period. None of this is remotely possible through raw modding.

There are a couple of dfhack tricks to target creatures ON workshops, I did that a lot for creature-armory, training and feeding. That was in 34.11, I dont know if said dfhack scripts still exist or can work in that way.

You can convert captured invaders into your civ with dfhack as is.

Sounds like harder management of lifestock and eggs.

You can already create creatures out of thin air with dfhack.
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 :::

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #2 on: May 17, 2016, 11:02:19 am »

You cant use creatures in reactions, period. None of this is remotely possible through raw modding.

There are a couple of dfhack tricks to target creatures ON workshops, I did that a lot for creature-armory, training and feeding. That was in 34.11, I dont know if said dfhack scripts still exist or can work in that way.

You can convert captured invaders into your civ with dfhack as is.

Sounds like harder management of lifestock and eggs.

You can already create creatures out of thin air with dfhack.

Thank you for the reply, this is indeed useful.
> You cant use creatures in reactions, period. None of this is remotely possible through raw modding.
> You can already create creatures out of thin air with dfhack.
> You can convert captured invaders into your civ with dfhack as is.

Ok then. I can understand the premise of that, like i said. I did look around the raws and the advice offered by the DFwiki for consultation. From the looks of things, this would be something for Toady to potentially expand in the future or by some very advanced application of transformative magic/summoning on a domestic scale potentially within the magic arc throwing out a guess.

There are a couple of dfhack tricks to target creatures ON workshops, I did that a lot for creature-armory, training and feeding. That was in 34.11, I dont know if said dfhack scripts still exist or can work in that way.

Ah, so much like dragging a sheep/cow to a farmers workplace, if you could get a animal or sapient IN a workshop atleast, reactions could be done.

EDIT *thanks for the brainwave* - Actually mentioning that, that'd be the perfect method if we could look into the code reaction for shearing in bringing a allotted animal, as for instance if a cage with [EMPTY] was prepared the dwarf could run off to collect the weakened animal with a restraint and pull it in then apply a put into cage interaction and the cage as end-product. I guess once the basis of those interactions are laid bare we'd have a lot more material to work with in understanding it.

As to leashing the dwarf responsible could wrestle and apply a leash/rope on as a wrestling manuever in hindsight so that progress could be monitored from the reports

Sounds like harder management of lifestock and eggs.

Well i guess its more of a alternative, given that if its succession on skill based percentage like herbalism, you could accrue a venerable stockpile of eggs and then focus hatch them all individually/in clusters in order to hatch the animal or leave it to the natural method of allowing a mother to brood on top from a gameplay perspective (force hatching elk bird eggs for instance, collecting the eggs so they are not distracted and starve on nest boxes)
« Last Edit: May 17, 2016, 11:07:19 am by FantasticDorf »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Advanced building reaction idea - Assistance required please.
« Reply #3 on: May 17, 2016, 11:19:12 am »

I'm not perfectly sure what you want to achieve.

Players can already put creatures in and out of cages, or assign them to chains or pasture them somewhere.
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 :::

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #4 on: May 17, 2016, 12:16:11 pm »

I'm not perfectly sure what you want to achieve.

Players can already put creatures in and out of cages, or assign them to chains or pasture them somewhere.

Well i mean in the context in moving animals securely that 'dont' belong to yourself actively seeking them out. I want some kind of reaction that takes a cage as reagent 1 and a animal is reagent two to which then reagent 2 is deposited inside a cage easily. Nothing i've seen so far suggests this to be explicitly possible. If the animal is already in a cage the same reaction could be applied to simply take the animal out of the cage securely, do the action then return the animal to the cage.

As to say with my ritual building example, any number of creatures you spawn dont HAVE to be nessecarily fortress friendly and could probably very easily with a building destroyer tag smash a workshop while inside it, so transferring to a cage as the end result would be safer. Same goes for the incubator, cave dragon eggs for instance are going to spawn very angry scaly hostile lizards if the parents are not domesticated (by modding or otherwise). So putting it in a cage would probably be best for safety and FPS conservation *very important when you're manifesting entities potentially on repeat commands*.

Its more or less a suggestion to facilitate a processing plant, because its easier to drag something to one point actively and safely in hand rather than to take a cage to it in some circumstances, and probably a lot easier from a coding perspective (say if there was a conflict or the job was cancelled and it walks off/continues to go on a rampage it'd never get done.)

All your own animals are complacent with dwarven manhandling. This is to address everything else.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Advanced building reaction idea - Assistance required please.
« Reply #5 on: May 17, 2016, 01:46:49 pm »

You want to spawn unfriendly buildingdestroyers in cages, just to sacrifice them in another reaction in a ritual temple, or make unfriendly dragons hatch from eggs?
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 :::

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #6 on: May 17, 2016, 02:22:04 pm »

You want to spawn unfriendly buildingdestroyers in cages, just to sacrifice them in another reaction in a ritual temple, or make unfriendly dragons hatch from eggs?

I mean within the realms of possibility to make these things possible via a framework of having the reaction put the creature brought fourth to you in a cage safely rather than being let free. I personally was thinking of applying summoned in dangerous creatures being applicable in pits or trap networks for grinding/live training. Its not what i am planning to do personally but what options are open TO do.

Embark with a surplus of alligator eggs, a expert animal caretaker and trainer and have your own platoon of alligators and a egg/meat industry with a incubator for instance. Or reel in that passing group of chinchillas/wild boars without having to laboriously coax them into a rube goldberg machine.

Those are but a few examples. Ease of living and management is the most essential part, it saves time if you can assign a dwarf with a bit of nudging, to go out into the field wrestle down and collect a animal, then transfer it into a cage for training/pitting without having to bring the animal to yourself.

EDIT - Carrying a cage with you would also slow you down for the speed required to chase down a creature providing its not chasing you first.
« Last Edit: May 17, 2016, 02:49:09 pm by FantasticDorf »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Advanced building reaction idea - Assistance required please.
« Reply #7 on: May 17, 2016, 04:09:08 pm »

Oh, ok, in that case:

You can make a workshop that spawns creatures from eggs using create-unit.

IndigoFenix made a cage-thrower weapon, it shoots nets (cloth cages) at enemies, when you hit, they get caged. dfhack, of course.
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 :::

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #8 on: May 17, 2016, 05:01:46 pm »

Oh, ok, in that case:

You can make a workshop that spawns creatures from eggs using create-unit.

Something along those lines would be palatable if nothing else regularly was accessible within the game combined with my suggested caging reaction so its all within one singular process as a very good application of it, though family relationships with sapients might get screwy if they manifest that way. (unless it wasn't forced and just kept a egg actively alive for a chance of hatching)

IndigoFenix made a cage-thrower weapon, it shoots nets (cloth cages) at enemies, when you hit, they get caged. dfhack, of course.

I've heard about that before. Its interesting but not really the kind of thing I would personally be aiming for, though nets are intruiging, imagining that the lasso, could work like a net in that respect in being thrown to immobilise a creature via a long range attack proc by a dwarf/user initiating a wrestling move to tighten and affirm control with risk of breaking based off size and strength depending on the material. Using it as a [TOOL] (because honestly those item classes dont recieve enough love) for broader adventurer mode and fortress mode application.

Heh im getting carried away with my suggestion talk, i apologise.

Having it spring up to catch is very trapish but also perhaps might be jarringly outside the narrative of vanilla in making sense in my own opinion (seeming as indigo puts a lot of input into the 'masterwork' mod series, but what do it know? You tell me, would it be silly?)

Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Advanced building reaction idea - Assistance required please.
« Reply #9 on: May 17, 2016, 05:49:40 pm »

Its pure rethoric, because none of your suggestions are remotely possible. Writing a dfhack plugin that gives a new job, teaches the AI to take a cage, head out at specific animals you want to cage, wrestles them, and then runs reactions in workshops taking caged animals as reagents... that would far outstrip the most complex plugins ever written.
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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #10 on: May 18, 2016, 04:37:05 am »

I could write custom AI using basic scripting since 0.40.01, actually, but I wouldn't bother lol.

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #11 on: June 24, 2016, 05:51:55 pm »

Its pure rethoric, because none of your suggestions are remotely possible. Writing a dfhack plugin that gives a new job, teaches the AI to take a cage, head out at specific animals you want to cage, wrestles them, and then runs reactions in workshops taking caged animals as reagents... that would far outstrip the most complex plugins ever written.


I've gone away to think about this.

A lasso is a divergent idea, and i shouldn't have brought it up here where its not appropriate. Creating a reaction with a animal as a reagent directly is quite difficult and may have come around as per me misunderstanding farming (as per bringing the sheep in to shear, technically you couldn't do it without the "sheep reagent" so to speak, unfortunately I am personally unaware where i might view the innards of that reaction or who to speak to)

Im still going to chase up my capturing station however. Recent developments in other mods show that making units from scratch from workshops can be done as you've mentioned before with egg conversion, as well as DFhack teleport spawning on the spot. and it can all be locked behind skill barriers etc to stop abuse where its not needed.

As for the AI surrounding it, *Smakemupagus* (my mistake i made a issue in identifying the owner of the modification) in contrast uses 'item tool slaves' within their orc masterwork modification, and i could see that perhaps via a trigger of wrestling success/lockdown (ok possibly with a lasso if we're really towing the line and it makes it easier for defining the interaction if they are not using their hands) a animal could be converted into a tool/pet/slave as applicable then brought to a workshop via a 'overseer' to initiate whatever happens there. The item tool could then be turned into a creature forcefully via dfhack spawning and teleporting upon arrival, triggering a cage trap either built in or by necessity placed nearby to lock them down or let go on part of domesticity which can be regulated by dfhack. Monumental code to categorise everything i admit given the diversity of everything unless it was flexible enough to fill in the blanks off a framework.

Then it'd just be search a male/female animal (or some other defining feature) of that description job via details to declutter workshops (from the github logs, identified by *modtools/create-unit -race HYDRA -caste FEMALE etc expwnent's modifications in this field) as exampled in for one queued up job with or without a tool, bring the item back, let the workshop do its thing and release. Probably a pity that re-issuing the creature would not save state but in theory it'd work. Also in the same vein you could buy directly wild creatures outside cages for whatever purpose freely in trade and sell abusive sentients like titans without bugs of them freeing them by sending them to the 'decompressed animal handling' workshop.

As toady/or threetoe (i forget) once said. You can't make a creature breath bees, but you can make a creature breath bee statues that can transform into bees.

« Last Edit: June 24, 2016, 06:05:12 pm by FantasticDorf »
Logged

Bogus

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #12 on: June 25, 2016, 09:44:09 am »

you *may* be able to fetch, pick up and bring to a workshop an animal for a custom job by forcing the workers' every single action along the way. i havent done this with creatures but it is possible with job items, and someone wrote a script at some point that basically does veterinary medicine by issuing hospital jobs for wounded animals, which also involves fetching. this is very hacky tho and interferes heavily with what df is trying to do during the job, so you frequently have to undo the things that are happening in df memory as part of the normal procedures, like path goals, item selection, etc.

more specifically, you can make a dwarf go pick up an item like a lasso as part of a reaction or possibly other job, and then walk with it to some other location, for example an animal. how you find or specificy that animal is another question. it is also possible to transfer that item into the inventory of the animal (as an attachment, like wound dressing, its a flag somewhere). you could roll some check on wrestling skills etc. and then abort the job if it fails, for example. as for using the animal directly, see above. im unsure it is possible at all without a proper creature hauling job, ie, butchery, milking, pasturing, etc. turning it into an item and have the dwarf pick that up could work, same as spawning. you could probably also re-use the same animal by killing or otherwise zoning it out during the process and reviving it when the job is done.

actually the thread about veterinary medicine recently re-emerged, maybe you can glean some wisdom from it:
http://www.bay12forums.com/smf/index.php?topic=150251.0
« Last Edit: June 25, 2016, 10:17:21 am by Bogus »
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #13 on: June 25, 2016, 11:04:50 am »

Yes thank you for replying especially. I have read the thread you have supplied before; using a editor to modify the animals to the local faction temporarily then going through the procedure of treating them, it wasn't kicking around at the top of the forum when i made this but i saw it a little bit before i went on to reboot this thread.

The revival method sounds nice, though just petrifying them into a item then 'unmelting them' from it rather than a full re-set resurrection would probably be more preferable and realistic (on account of weight, even if trivial)

Hmm.

Would a set of code just to throw up a example (highly unpolished and speculative i haven't seen much github DF code to correct particular mistakes) that is open ended to draw off a database from another hack file (A dfhack spawn creature portfolio so to speak, might help with UI to have a great big list of things to click and spawn at the cursor via a separate application) work?
Quote
(*Workshop reaction trigger A*) IfRace=True)
 (*spawn/teleport code)
 (tocages)

Coding wise using a compulsory  tocages command post-teleport/resurrection if there isn't a better alternative in teleporting directly (i've raised this question on expwnents thread) into a cage might work in subduing wild creatures instead

Wrestling or perhaps a level of animal training (which might be more palatable if it retains the dimensions of that harder more value animals are harder to train) seem to be suitable skill checks.

*edit, been reading up on some github dfhack commands and most of them are centered around the cursor, it may require a separate script to kill and resurrect a individual without cursor interaction (unless it was handled ui trigger wise) via the 'exterminate' and 'full heal' commands.

EDIT 2 - With a great deal of rummaging through the DFhack commands i have happened across item-trigger
Quote

"This powerful tool triggers DFHack commands when a unit equips, unequips, or attacks another unit with specified item types, specified item materials, or specified item contaminants."

Attaching it to a lasso item tool might help with future combinations for wrangling.

EDIT 3 - interaction-trigger

"This triggers events when a unit uses an interaction on another. It works by scanning the announcements for the correct attack verb, so the attack verb must be specified in the interaction. It includes an option to suppress this announcement after it finds it."

Again useful. Could be used to define the transition phase for turning a animal into a object or whatever else may occur. In conjunction with item trigger and a AI routine that can hone in on a animal (perhaps re-modified hunting AI pathfinding? with some argumentatively negating counter arguments to narrow down a individual or a particular caste on the map at any one given time) we have the first basis of initiation.

To finalise, the creature would be hauled and ressurected (/unpetrified from that form, psuedo obsidianisation?) then 'tocages' can come into force to assign it to a cage before negating a pet state if nessecary.

> Counterarguement to meph.

They use jugs. Jugs are civilization tool (nestboxes, large containers too, to count as static item tools) but i understand the argument you're putting forward.
« Last Edit: June 25, 2016, 01:12:28 pm by FantasticDorf »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Advanced building reaction idea - Assistance required please.
« Reply #14 on: June 25, 2016, 01:06:02 pm »

Quote
Attaching it to a lasso item tool might help with future combinations for wrangling.
Dwarves dont use tools in fort mode.
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 :::
Pages: [1] 2 3