Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 169 170 [171] 172 173 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1120830 times)

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2550 on: April 29, 2015, 06:42:58 am »

Nice cleanup Dirst, I'll use that one.

I also added orientation in my local. Creatures spawn asexual so animals will have the 'marry' flag for the opposite sex as true and intelligent creatures will be based on raws. I think we are getting to the stability of the 0.34 version of this script.

i fixed a line in the code I posted above (it was really really late).

Asexual creatures don't matter in my case since I'm using it to spawn genderless creatures, but we are trying for something of general usefulness.
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

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2551 on: April 29, 2015, 08:07:15 am »

Excellent work on spawn-unit. I'll take a look at it this weekend if I can and polish it up a bit and try fix the rest of the problems for civ members and such.
Logged

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2552 on: April 29, 2015, 06:00:53 pm »

When using gm-editor to view a prepared meal, in ingredients.item_foodst.T_ingredients:<numbers>, there is a variable called unk_10. That variable controls the quality of the individual ingredients.

utunnels

  • Bay Watcher
  • Axedwarf
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2553 on: April 29, 2015, 08:36:37 pm »



Why is it "unknown mode" instead of "Dwarf Fortress"?
Logged
The troglodyte head shakes The Troglodyte around by the head, tearing apart the head's muscle!

Risen Asteshdakas, Ghostly Recruit has risen and is haunting the fortress!

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2554 on: April 29, 2015, 08:43:37 pm »

That's one of my scripts (so this thread would be more appropriate). I'm assuming that's an unretired fortress, which is a game type new to 0.40.xx that that script doesn't yet recognize. You can run "load-screen disable" to check if you'd like.
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.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2555 on: April 30, 2015, 07:26:22 am »

Second, syndrome-trigger doesn't seem to be able to find named syndromes defined in regional interactions.  I don't know how to use a regional interaction to apply a syndrome defined in a material.  Is there an event I could hook into instead that would fire when a creature (preferably a certain type) appears on the map?
I was looking around the Lua API, and it sounds like Eventful's onSyndrome callback might be able to hear stuff done by regional interactions.  Anyone happen to know if it's just the same interface that syndrome-trigger uses?

Thanks!
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

endlessblaze

  • Bay Watcher
  • likes dragons for their fiery breath
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2556 on: April 30, 2015, 07:31:23 am »

Come to think of it, is there a command or something to change a regional interaction?

Say an evil biome has thralling clouds, could you change the clouds into say.....skin necroses? Maybe healing for good biomes?
Logged
Kids make great meat shields.
I nominate endlessblaze as our chief military executive!

Qrox

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2557 on: April 30, 2015, 09:13:29 am »

I was just thinking of creating a trade helper but stuck on finding a function that returns an item's trade value. So long I just found a function that returns an item's base value, and two functions that returns an item's improvements value and dye value in trade respectively. And a struct that seemingly contains a caravan's trade value modifiers, but which I can't fathom its meaning. Am I missing anything here?

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2558 on: April 30, 2015, 07:53:33 pm »

I was just thinking of creating a trade helper but stuck on finding a function that returns an item's trade value. So long I just found a function that returns an item's base value, and two functions that returns an item's improvements value and dye value in trade respectively. And a struct that seemingly contains a caravan's trade value modifiers, but which I can't fathom its meaning. Am I missing anything here?
The various skills involved in assessing value and negotiating for said value, the mental attributes associated with said skills/involved directly, the presence of an accidentally activated pressure washing system, uh, I assume the trade value modifiers are the stuff requested for next year right?

Come to think of it, is there a command or something to change a regional interaction?

Say an evil biome has thralling clouds, could you change the clouds into say.....skin necroses? Maybe healing for good biomes?
Oh dear, that's a hell of an idea, though I think that stuff is a pain to hack that directly, much less permanently.
Logged

Qrox

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2559 on: May 03, 2015, 01:34:51 am »

I was just thinking of creating a trade helper but stuck on finding a function that returns an item's trade value. So long I just found a function that returns an item's base value, and two functions that returns an item's improvements value and dye value in trade respectively. And a struct that seemingly contains a caravan's trade value modifiers, but which I can't fathom its meaning. Am I missing anything here?
The various skills involved in assessing value and negotiating for said value, the mental attributes associated with said skills/involved directly, the presence of an accidentally activated pressure washing system, uh, I assume the trade value modifiers are the stuff requested for next year right?

Ughhh... I think I'll just shelve it until I've got time to do !!SCIENCE!! with that. And thanks.
On another note, does anyone know how to do binary search on a sorted vector? (namely, df.global.world.plants.* vectors). There is a binary search function in utils.lua but it only supports lua functions as comparators and the vectors are sorted by address. My current workaroud is to use tostring(element) to get a string containing the elements' addresses but I fear such a filthy workaround could break at any time.
« Last Edit: May 03, 2015, 11:52:03 pm by Qrox »
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2560 on: May 03, 2015, 11:11:09 am »

I was looking around the Lua API, and it sounds like Eventful's onSyndrome callback might be able to hear stuff done by regional interactions.  Anyone happen to know if it's just the same interface that syndrome-trigger uses?

Thanks!

onSyndrome should detect anything, including syndromes added by other scripts.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2561 on: May 03, 2015, 03:40:13 pm »

I was just thinking of creating a trade helper but stuck on finding a function that returns an item's trade value. So long I just found a function that returns an item's base value, and two functions that returns an item's improvements value and dye value in trade respectively. And a struct that seemingly contains a caravan's trade value modifiers, but which I can't fathom its meaning. Am I missing anything here?
The various skills involved in assessing value and negotiating for said value, the mental attributes associated with said skills/involved directly, the presence of an accidentally activated pressure washing system, uh, I assume the trade value modifiers are the stuff requested for next year right?

Ughhh... I think I'll just shelve it until I've got time to do !!SCIENCE!! with that. And thanks.
On another note, do anyone knows how to do binary search on a sorted vector? (namely, df.global.world.plants.* vectors). There is a binary search function in utils.lua but it only supports lua functions as comparators and the vectors are sorted by address. My current workaroud is to use tostring(element) to get a string containing the elements' addresses but I fear such a filthy workaround could break at any time.

df.(type).find(id)

Qrox

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2562 on: May 03, 2015, 08:57:10 pm »

I was just thinking of creating a trade helper but stuck on finding a function that returns an item's trade value. So long I just found a function that returns an item's base value, and two functions that returns an item's improvements value and dye value in trade respectively. And a struct that seemingly contains a caravan's trade value modifiers, but which I can't fathom its meaning. Am I missing anything here?
The various skills involved in assessing value and negotiating for said value, the mental attributes associated with said skills/involved directly, the presence of an accidentally activated pressure washing system, uh, I assume the trade value modifiers are the stuff requested for next year right?

Ughhh... I think I'll just shelve it until I've got time to do !!SCIENCE!! with that. And thanks.
On another note, do anyone knows how to do binary search on a sorted vector? (namely, df.global.world.plants.* vectors). There is a binary search function in utils.lua but it only supports lua functions as comparators and the vectors are sorted by address. My current workaroud is to use tostring(element) to get a string containing the elements' addresses but I fear such a filthy workaround could break at any time.

df.(type).find(id)

Nope, that function expects a number as parameter and treat it as the index or the id. What I want to do is to find a specific object inside a vector sorted by its element's memory address...
« Last Edit: May 04, 2015, 06:52:02 am by Qrox »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2563 on: May 03, 2015, 09:00:12 pm »

Why exactly would you want that?

(Trying to make sure there's no easier way to do what you want)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2564 on: May 03, 2015, 09:14:28 pm »

Do you mean the index of an object inside of a vector?
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.
Pages: 1 ... 169 170 [171] 172 173 ... 360