Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 59 60 [61] 62 63 ... 137

Author Topic: [MODDING] 0.43.x QUESTIONS THREAD  (Read 201900 times)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #900 on: May 02, 2016, 12:44:06 am »

I'd like to create a unit on the surface about 1/4 of the way from the top left corner of the map.

What would be the best way using a lua script to find the coordinates of that location?

Code: [Select]
local x,y,z=dfhack.maps.getTileSize()

then divide x and y by 4

z you'll have to figure out in slightly more complicated ways

pantsentranced

  • Escaped Lunatic
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #901 on: May 02, 2016, 12:46:42 am »

Thanks!

Any thoughts on how to figure out the z?

That was really the part that was stumping me.
Logged

overseer05-15

  • Bay Watcher
  • Personal Text
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #902 on: May 02, 2016, 09:56:28 am »

How exactly does the extra butcher object tags work? I'm trying to have a unit drop a chain on butcher, but it doesn't seem to be working.
Logged
adult food like, I presume, steak and potatoes and tax forms,

My game giveaway

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #903 on: May 02, 2016, 10:02:04 am »

Thanks!

Any thoughts on how to figure out the z?

That was really the part that was stumping me.
I would start from the highest z you got from Putnam's trick and keep ticking downward until the dfhack.maps.getTileType(pos) is no longer open space.  You are then either on the ground, in a liquid, or in a tree.  Handling the special cases will take a bit more work.

(Note that getTileType wants an array with elements "x", "y" and "z".  There is probably a xyz2pos function but I'm not at a machine right now where I can look it up.)
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

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #904 on: May 02, 2016, 12:02:40 pm »

xyz2pos(x,y,z), in fact.

Bozdogan

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #905 on: May 02, 2016, 03:27:11 pm »

How is this?

Quote
[REACTION:MAKE_WOOD_BED]
        [NAME:make wood bed]
        [BUILDING:CARPENTER:NONE]
        [REAGENT:A:wood:1:WOOD:NONE:NONE:NONE]
        [REAGENT:B:1:PILLOW:NONE:NONE:NONE]
      [REAGENT:C:1:QUILT:NONE:NONE:NONE]
      [REAGENT:D:1:MATRESS:NONE:NONE:NONE]
        [PRODUCT:100:1:BED:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
        [SKILL:CARPENTRY]
Logged

Sver

  • Bay Watcher
  • An army marches on its oiling and waxing
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #906 on: May 02, 2016, 03:35:03 pm »

Turn this
Code: [Select]
        [REAGENT:B:1:PILLOW:NONE:NONE:NONE]
      [REAGENT:C:1:QUILT:NONE:NONE:NONE]
      [REAGENT:D:1:MATRESS:NONE:NONE:NONE]

into this (presuming your custom items have IDs like this)
Code: [Select]
        [REAGENT:B:1:TOOL:ITEM_TOOL_PILLOW:NONE:NONE]
      [REAGENT:C:1:TOOL:ITEM_TOOL_QUILT:NONE:NONE]
      [REAGENT:D:1:TOOL:ITEM_TOOL_MATRESS:NONE:NONE]
Logged
DF Combat Reworked
No overpowered force transfer, no easy life without a kidney, more functional variety among the weapons and other improvements.

Paperkoopa

  • Escaped Lunatic
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #907 on: May 03, 2016, 09:07:58 am »

So I was working on a interaction that converts enemies into a pet for your own faction (basically I want them to be trainable pets).
The interaction turns the affected creature into a new caste with changed propierties ([PET], [TRAINABLE], etc...).
So far everything worked fine except for the fact that the merchants I attacked were still considered as merchants and thus were not shown on the animal screen.

So my question is: Can you change the factions/hostility of other creatures with an interaction/syndrome?

I can apply [CRAZED] and thing like that just fine, so it is possible to catch them in cages, but in the end they still belong to their own faction.

Thanks!
Logged

Sver

  • Bay Watcher
  • An army marches on its oiling and waxing
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #908 on: May 03, 2016, 09:29:27 am »

I don't think it's possible with regular interactions. Maybe with a dfhack script, but I don't know much about it.
Logged
DF Combat Reworked
No overpowered force transfer, no easy life without a kidney, more functional variety among the weapons and other improvements.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #909 on: May 03, 2016, 09:38:04 am »

I don't know how it works, but the Succubus mod has something that converts enemies to your civ.
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

Paperkoopa

  • Escaped Lunatic
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #910 on: May 03, 2016, 10:00:21 am »

I don't know how it works, but the Succubus mod has something that converts enemies to your civ.
I've looked into it and like Sver said:
I don't think it's possible with regular interactions. Maybe with a dfhack script, but I don't know much about it.
it is done with dfhack. Too bad, it's just this one thing that's missing...
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #911 on: May 03, 2016, 11:24:32 am »

I know that Toady nerfed undeads. Less smart and all that.

Can they still do interactions?
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 :::

Sver

  • Bay Watcher
  • An army marches on its oiling and waxing
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #912 on: May 03, 2016, 12:21:10 pm »

Quicktested on arena. Seems they still do. If the required bodypart is intact, indeed.
Logged
DF Combat Reworked
No overpowered force transfer, no easy life without a kidney, more functional variety among the weapons and other improvements.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #913 on: May 03, 2016, 12:41:39 pm »

Interesting. I just made a civ of necromancers. Every member can resurrect corpses, but with a long delay. If that delay is re-set if they die and get animated, their sieges might be near-unstoppable.
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 :::

Sver

  • Bay Watcher
  • An army marches on its oiling and waxing
    • View Profile
Re: [MODDING] 0.42.x QUESTIONS THREAD
« Reply #914 on: May 03, 2016, 12:57:33 pm »

Well, you can make necromancers non-reanimatable. After all, they're already undead when "alive".

Or not. Crushing risen dead to the pulp is always a solution for the player, so it's really all in their hands.
« Last Edit: May 03, 2016, 01:01:47 pm by Sver »
Logged
DF Combat Reworked
No overpowered force transfer, no easy life without a kidney, more functional variety among the weapons and other improvements.
Pages: 1 ... 59 60 [61] 62 63 ... 137