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 3945 times)

Putnam

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

Which part is "not", which part is "brown" and which part is "beard"? Or is one part "brown beard"? Or is it actually a weird hash and not just arguments compressed beyond recognition like I'm thinking?

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #31 on: June 25, 2016, 06:33:16 pm »

Which part is "not", which part is "brown" and which part is "beard"? Or is one part "brown beard"? Or is it actually a weird hash and not just arguments compressed beyond recognition like I'm thinking?

Ah. Im reading off the same page as what you're concerned about now.

If it helps clarity, ordering them into a structured code isnt too far out a possibility, my idea was as you describe, a hash generated by the plugin to infer that data implicitly from the database but obviously you want something you can identify along the lines of SIAMANG(or some other creature identifier)00(true - male/female)f2(possible fur colour variations)0b(true - blue)0w(true - white) etc etc. so it's all there as a example and you can type and modify every stage. That is unless the plugin does it for you via UI to shortcut and issues a code for you to use (CTRL+V being handy)

Of course this has to account for all the raws and some will be longer than others.

« Last Edit: June 25, 2016, 06:35:46 pm by FantasticDorf »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #32 on: June 25, 2016, 06:38:41 pm »

If there's a UI, you can feed that directly into Dwarf Fortress through DFHack, no reason to have the hash in the middle.

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #33 on: June 25, 2016, 06:49:48 pm »

If there's a UI, you can feed that directly into Dwarf Fortress through DFHack, no reason to have the hash in the middle.

Well then that's good news, it'd still need to read through and identify/understand raws though with some degree of detail so that a misclick doesn't extinct your entire dwarven race or spawn a dwarf x200 taller than the norm (like i say, if it was somewhat flexible with the options on offer to also be able to edit a entry before you spawn it, for pink beards that carry over generations to scientifically show and prove genealogical processes at work if the game will allow it)

EDIT - I wouldn't push my luck on those claims, i know how firmly set the raws are in DF from raw editing, though in most terms you wouldn't be editing raws but forcing a creature into being, seeing if there was any difference would be a interesting experiment.

I recall seeing a screen for the differing race mods of masterworks, a bestiary perhaps in the same UI vein (with less fat UI bars) would best exhibit these assets being able to sort through species, gender etc etc.

Carefully getting back on topic, the theory for the capturing is set and in place, because obviously the plugin we've been talking about doesnt necessarily exist outside the land of the theoretical, using your ID splicing on a net cage to be took back and then have the creature spawned (to be herded into a cage via also dfhack) its all set.
« Last Edit: June 25, 2016, 06:54:45 pm by FantasticDorf »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #34 on: June 25, 2016, 06:57:17 pm »

Not spawned, just moved. The point is that the unit is never despawned or spawned, just moved. There is no need to remember any information except unit ID.

It's not exactly purely theoretical, either. Here's the code for adding the unit's ID to the item.

Code: [Select]
function addUnitRefToItem(unit,item)
    item.general_refs:insert('#',{new=df.general_ref_unit_climberst,unit_id=unit.id})
end

The main problem is taking the unit out of active. I'm not even sure if that's a problem, it could literally be as simple as taking the unit out of the active units vector.

The next problem is putting it back in, which could be exactly as easy. Teleporting the unit to the place where you used up the cage is trivial and the code for that already exists.
« Last Edit: June 25, 2016, 06:59:20 pm by Putnam »
Logged

Bogus

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #35 on: June 26, 2016, 03:23:56 am »

Quote
That's a interesting insight. Im aware its not a modifiable civ reaction, and more of a untouchable base game thing, maybe i was looking at it the wrong way. Instead of the dwarf dragging the sheep to conduct a workshop routine with the shearing stat attached, a pre-defined job attached to 'shearing' that occurs only within the boundaries of the workshop?

Mmm, knowing this modding tools could probably automate shearing by providing a ban of particular animals and determining suitability by state to automatically queue up shearing jobs on selected animals.

basically the job and job logic is hardcoded, where the hauling bit is shared by a number of job types, but is largely inacessible to dfhack as far as i know. the worker or job carries a reference to the animal and the worker gets its path goal set to the animal location, that is about it. the workshop routine part seems to handle the selection of the target animal, this part you can probably easily modify or substitute, so yes probably this automated shearing thing can be done.

if you are very lucky you can put an animal into "hauled by" mode by force, without the proper job type.

as for zoning the animal: maybe you can move it out of the map area, there is an "outside" zone that gets used by migrants and other things. as far as i remember, when a migrant wave or somesuch appears, all of the units involved appear in the active units vector but are outside the map, and then one by one enter the actual map. so you could conceivably use that zone to store your animal, without changing its status. you probably would have to remove path goals or immobilize it someway to make sure it doesnt enter the map.
« Last Edit: June 26, 2016, 03:37:03 am by Bogus »
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #36 on: June 26, 2016, 04:35:47 am »

Man-handling beasts by forcing the job after locating them inside the temporary net cage (which also in regards to lasso's would probably have to spawn the end result at the dwarf's feet to avoid it colliding with the environment, also allowing aquatic wrangling?) could work if you somehow triggered a 'handling dangerous creature' routine for a edge of danger or turned it into a pet for the duration of it being hauled to force the interaction with a destination to be. But if they are being taken to a workshop as the end result (or perhaps a normal cage, in which then its more relevant), then i guess there would not be such a need unless the workshop reaction (such as slaughtering, milking etc) required it.

Really goes to whether you want the workshop to be a proxy for this by issuing a command to be sourced back there (akin to reviving the dead body/spawn object or spawning a new creature) or for it to happen out in the field.

How to access that animal reference is something that probably needs to be put forward to to toady for a comment. Shearing and milking are universal tags for that job and there is clear targeting at work (made even more precise at slaughter commands), but if you moved the focus, you could use the same system to determine by species, gender and potentially even individual for greater control and call out workshops that run off animal properties. For instance, you could determine whether you wanted blood/poison and then source it from a creature within your pets.

> Its amusing that we can banish units from reality so easily by putting them out of map bounds.
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Advanced building reaction idea - Assistance required please.
« Reply #37 on: June 30, 2016, 05:20:19 pm »

I really take no pleasure in bumping this, but it's fizzled out and i have a meaningful discovery to share.

Cages can be used in building reaction because they are a item token (i previously thought this was not possible for cages), to which a custom 'corpse piece/corpse' generated from the lasso interaction could be took back to the workshop (after joining a refuse pile filtering them out, like tanning), then put inside the cage prepared there and fullheal for the part inside the cage into the animal it came from.

If this is a little convoluted possibly, this is my point of reference for this.

> http://dwarffortresswiki.org/index.php/DF2014:Reaction#Modifiers

> http://dwarffortresswiki.org/index.php/DF2014:Item_token

> http://dwarffortresswiki.org/index.php/DF2014:Item_token#CORPSEPIECE

As much dfhack and stashing units in subspace pockets of reality we can avoid the better.
« Last Edit: July 01, 2016, 02:20:07 am by FantasticDorf »
Logged
Pages: 1 2 [3]