Bay 12 Games Forum

Please login or register.

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

Author Topic: [DFHack] modtools/create-unit (version 0.4) (beta)  (Read 30618 times)

lethosor

  • Bay Watcher
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #105 on: November 16, 2015, 04:19:18 pm »

Are you using DFHack r4? That's a known bug in the confirm plugin that's fixed in the next/upcoming release. For now, you can add "confirm disable haul-delete" to the end of dfhack.init.

(Also, that's not related to create-unit, so it should be in the DFHack thread.)
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #106 on: November 17, 2015, 12:39:55 pm »

Since I have very little experience with using DFHack for modding, I wanted to ask how to use this script so the unit is spawned by the use of an interaction and (if at all possible) be part of the group of whomever did the interaction (in case a sieger uses it).

Any answers would be deeply appreciated.
Dug around the scrips and found interaction-trigger exists, so don't need answer on that anymore. That said, is there an option to make the spawned unit be of the same group as the one performing the interaction (if it's not the local group)? A yes or no is enough.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #107 on: November 17, 2015, 03:54:02 pm »

Since I have very little experience with using DFHack for modding, I wanted to ask how to use this script so the unit is spawned by the use of an interaction and (if at all possible) be part of the group of whomever did the interaction (in case a sieger uses it).

Any answers would be deeply appreciated.
Dug around the scrips and found interaction-trigger exists, so don't need answer on that anymore. That said, is there an option to make the spawned unit be of the same group as the one performing the interaction (if it's not the local group)? A yes or no is enough.
IIRC local is the player's civ.  To make it work for anyone you need to get a hold of the actor's civ and group.  That can be done with a script that calls create-unit.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #108 on: November 18, 2015, 10:53:04 am »

Since I have very little experience with using DFHack for modding, I wanted to ask how to use this script so the unit is spawned by the use of an interaction and (if at all possible) be part of the group of whomever did the interaction (in case a sieger uses it).

Any answers would be deeply appreciated.
Dug around the scrips and found interaction-trigger exists, so don't need answer on that anymore. That said, is there an option to make the spawned unit be of the same group as the one performing the interaction (if it's not the local group)? A yes or no is enough.
IIRC local is the player's civ.  To make it work for anyone you need to get a hold of the actor's civ and group.  That can be done with a script that calls create-unit.
Thanks. I'll try poking around to see if I can get the actor's group.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #109 on: June 25, 2016, 07:12:33 am »

Ressurecting this thread on behalf of asking a well meaning question.

From broadly looking at your github (i've been on github before with other applications modfication/pull-request codebase wise, like yeah ill leave it to the experts for DF code but i can grasp what does what broadly) teleportation does so to the cursor/prefixed place.

Would it be possible to teleport a being inside a container (cage/other) directly from the teleport command solely? As to say to simulate the game crashing effects of teleporting yourself then having someone drink you within a cup or eat you out of a bowl.

As to which, via running a dfhack script, you could via a workshop, spawn a creature then teleport it directly into a cage placed in a particular area adjacent to the workshop (in the same breadth you could just trigger a cage trap in the same configuration to get around it). same goes for objects, if you wished to create a 'sorter' between conveyorbelts if at all relevant, by having a block/workshop autonomously separate and deposit for example by use of teleporting goods around.

Im optimistic and i wont know a answer (or even a resulting question) if i dont ask.   :)
Logged

Evans

  • Bay Watcher
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #110 on: September 15, 2016, 09:49:54 am »

create-unit script has some problems.

When I run this to create a different races of animal men for example, every member of another specie is giving the very first name.
for example if I use MOUNTAIN as a name base, and spawn wolf man, hyena man, lion man
each and every one of them will be named Abbey Oltarlikot.

This goes further - if I spawn 3 of each race, the following names will also be identical, so I end up with 1st named Abbey, second Something, third SomethigElse etc etc.

Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

Bogus

  • Bay Watcher
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #111 on: September 15, 2016, 10:55:46 am »

Quote
Would it be possible to teleport a being inside a container (cage/other) directly from the teleport command solely? As to say to simulate the game crashing effects of teleporting yourself then having someone drink you within a cup or eat you out of a bowl.

As to which, via running a dfhack script, you could via a workshop, spawn a creature then teleport it directly into a cage placed in a particular area adjacent to the workshop (in the same breadth you could just trigger a cage trap in the same configuration to get around it). same goes for objects, if you wished to create a 'sorter' between conveyorbelts if at all relevant, by having a block/workshop autonomously separate and deposit for example by use of teleporting goods around.

should be possible to put things into cages using general refs, however this is not included in the teleport script afaik so you would have to add that functionality manually. creatures may need additional flag setting when being put in cages. as for creatures contained in other items, i dont know.

as for the eating part, i doubt there is code in the game to handle the process beginning with the fact that normal creatures cant be eaten whole at all. altho vermin can, so maybe part of the game logic can be used for it (doubt it tho). either way it would be a lot of work if possible at all.

unsure if i understood the question correctly, but in principle you can write a sorting script that detects items on position or in building A and teleports them to location B or C. using a teleport script you could also make a building that transports items into another building, either instantly or when a certain condition is met (timer, reaction, ...)
Logged

flyteofheart

  • Bay Watcher
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #112 on: September 18, 2016, 01:34:33 am »

nvm delete
Logged
Encrusted with fried bread and menacing with spikes of coconuts
living the dream

avnged7fold12

  • Escaped Lunatic
    • View Profile
Re: [DFHack] modtools/create-unit (version 0.4) (beta)
« Reply #113 on: October 10, 2020, 05:12:39 pm »

Idk if this is the place to ask this since there haven't been any messages here in years but was gonna ask if there were still any plans to set up an invasion script with this. Would be something I would like to see
Logged
Pages: 1 ... 6 7 [8]