Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 8 9 [10] 11 12 ... 61

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

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #135 on: March 29, 2013, 05:17:19 pm »

Two things;

1. A plugin that spawns a particular creature's corpse?
2. I asked this in the main thread, but how do you activate friendship, embark, and migrant functions in Dfusion?

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #136 on: March 29, 2013, 07:20:48 pm »

Easier n' pie.
How do I use that? If I put it in the scripts folder with the filename getbloodcount.lua then I get an error when I try to use it (lua:7: cannot use '...' outside a vararg).
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

robertheinrich

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #137 on: March 29, 2013, 07:37:17 pm »

Easier n' pie.
How do I use that? If I put it in the scripts folder with the filename getbloodcount.lua then I get an error when I try to use it (lua:7: cannot use '...' outside a vararg).

Try this instead (tested it and it works):

Code: [Select]
-- Gets blood count of creature (7000 is max for most humans)
function getBloodCount(unit)
   if not unit then
      qerror("No unit selected or specified; aborting!")
   end
   return unit.body.blood_count
end

arg = ...

if tonumber(arg) then
   bloodCountUnit = df.global.world.units.all[tonumber(arg)]
else
   bloodCountUnit = dfhack.gui.getSelectedUnit()
end

print(getBloodCount(bloodCountUnit))
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #138 on: March 29, 2013, 07:45:12 pm »

yeah, sorry, forgot an end in there :x

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #139 on: March 29, 2013, 07:49:15 pm »

Much obliged.

Now, to figure out how on earth a child can have more blood in him than all but a very few of the adults... Just four more years until he reaches full size.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #140 on: April 01, 2013, 07:45:59 pm »

Is it possible to make children follow around a specified dwarf in the same way that trained animals follow their trainer?
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Roses

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #141 on: April 01, 2013, 09:43:41 pm »

With the triggering, is it possible to trigger a specific megabeast, or specific race to attack?
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [SUGGESTIONS] for DFhack plugins
« Reply #142 on: April 02, 2013, 12:27:36 am »

Specific race yes, but the triggers in the entity have to be met. For example a certain amount of dwarves or fortress wealth. The siege hits instantly when you run the script. All others have a change of appearing, but sieges do work flawlessly.
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: [SUGGESTIONS] for DFhack plugins
« Reply #143 on: April 02, 2013, 12:57:30 am »

With the triggering, is it possible to trigger a specific megabeast

I wish.

or specific race to attack?

Oh yeah. The version I posted in my modder's scripts topic has that.

Roses

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #144 on: April 02, 2013, 12:56:00 pm »

I'm not sure, but I think transformed critters giving birth may crash the game.

However! trueTransformation may prevent this. If it does, coooool beans.

Actually, it looks like it doesn't.

In the arena, the kittens were messed up in terms of names and group affiliation (ie, immediately attacked their mothers, who belonged to group 1).

However, in fortress mode they did not, and appear normal.

Also:
Blargh. I'd love to test this but I can't get trueTransform to work. Do I have to do something special to enable it? There's a dll of the right name in the plugins folder, but the example syndrome doesn't work. Does it really have to be male ducks? I deleted ducks out of the game (it's Zelda). What if I used a male rabbit? Does it not work in the arena?

It seems truetransform ONLY works in fortress mode  ???.
_____________________________________________________________________________
So, yeah.

Looks like reaction created creatures are a go!

...Once someone takes this proof-of-concept and fleshes it out into a real DFHack plugin...

Does this mean we could transform a Dwarf into some creature, have that creature give birth, and then transform back into the same Dwarf but have the baby be a member of the civilization?
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #145 on: April 02, 2013, 02:28:35 pm »

Oh, derp. I remember that when I was playing Dwarf Fortress for once (the Dragon Ball mod), I had a saiyan give birth on the full moon--when all saiyans are Oozaru. She gave birth to two golden oozaru, who then proceeded to kill half the fortress. (They have [CRAZED] as a tag). Not sure if they'd be hostile without the CRAZED tag, though :P

Sorcerer

  • Bay Watcher
  • [magical]
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #146 on: April 02, 2013, 04:20:09 pm »

How about a reaction with a more controlled output, would that be possible?
So instead of having a reaction with:

   [PRODUCT:80:1:STUFF:RUINED_STUFF:NONE:NONE:NONE]
   [PRODUCT:20:1:STUFF:REFINED STUFF:NONE:NONE:NONE]

you would have a reaction output which actually has a 20% chance of getting one item and 80% of getting the other.

Logged

Lav

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #147 on: April 02, 2013, 05:23:13 pm »

Since DFHack can prospect at embark screen, is it possible to create a custom search script for embark? One that would take more parameters than the official one.
Logged
Seems to be the way with things on this forum; if an invention doesn't involve death by magma then you know someone's going to go out of their way to make sure it does involve death by magma... then it gets acknowledged as being a great invention.

robertheinrich

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #148 on: April 02, 2013, 07:30:44 pm »

Since DFHack can prospect at embark screen, is it possible to create a custom search script for embark? One that would take more parameters than the official one.

What exactly would you want to search for?
Logged

Lav

  • Bay Watcher
    • View Profile
Re: [SUGGESTIONS] for DFhack plugins
« Reply #149 on: April 03, 2013, 05:54:10 am »

Oh, there are plenty of factors which I'm looking for time to time, depending on what kind of fort I'm planning to build.

Sand (often requested).
Specific minerals or layer stones.
Vegetation density.
Tree density.
Cliffs.
Specific types of terrain (glacier, desert, moist broadleaf forest, lake, sea etc).
River size.
River convergence.

I'm pretty sure some people could add their own suggestions, there were plenty of ideas for embark finder improvement through the years.

Ideally, such a tool could support logical operators, or alternatively allow the user to assign weights to different search parameters.
Logged
Seems to be the way with things on this forum; if an invention doesn't involve death by magma then you know someone's going to go out of their way to make sure it does involve death by magma... then it gets acknowledged as being a great invention.
Pages: 1 ... 8 9 [10] 11 12 ... 61