Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 212 213 [214] 215 216 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1398862 times)

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3195 on: March 12, 2013, 04:45:24 pm »

it's a tiletype (or some tile types are "walls") a bit complex thing to wrap a head around.
Code: [Select]
--basic idea there is a LOT of tile types. For any sane way of dealing with them there are some enums with magic stuff...
--e.g.
local tiletype=somefunction_that_returns_tiletype(a,b,c)
local attrs=df.tiletype.attrs[tiletype]
--now with attrs we can do a lot of stuff...
--like:
if attrs.shape==df.tiletype_shape.WALL then print("this is a wall") end -- this is what you need...
--or:
if attrs.material==df.tiletype_material.SOIL then print("it has soil") end --this matches both soil floor and soil ramps and soil walls and...
to get tile type at location:
Code: [Select]
local function getTileType(cursor)
    local block = dfhack.maps.getTileBlock(cursor)
    if block then
        return block.tiletype[cursor.x%16][cursor.y%16]
    else
        return 0
    end
end
this is taken straigth from here

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3196 on: March 13, 2013, 07:56:13 pm »

At what point in time does the game decide if there will be a megabeast attack or siege in a particular week/month/year/whatever?

In related news, I've determined that unit.curse.anon_6[0] is the amount of time until the syndrome wears off, apparently. Also, I don't think unit.curse.maybe_body_appearance is body appearance, which is pretty damn confounding, since I have no idea what is.
« Last Edit: March 13, 2013, 10:01:49 pm by Putnam »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #3197 on: March 13, 2013, 10:07:28 pm »

At what point in time does the game decide if there will be a megabeast attack or siege in a particular week/month/year/whatever?
I believe it gets decided at the very beginning of the season, at which point it schedules a "megabeast atttack" event for a random time during that season (but not too close to the beginning or the end) - in 23a, it was a 10% chance per season once all of your "progress" counters had reached 2, and it was anywhere from 1000 to 9000 ticks from the end of the season (e.g. 8th day of the first month to the 19th day of the last month), so it's probably still like that (though it probably skips the progress checks upfront and defers them to when it selects which megabeast is going to show up, since the trigger points are in the creature raws).

In fact, I'm pretty sure it schedules all events at the beginning of the season - looking at my disassembly of 23a, that's when it decided when to trigger all types of events (caravans, migrants, diplomats, invasions, feature attacks (i.e. cave river, chasm, or magma flow), megabeasts, "curious beast" swarms, and the "Too Deep" ending), so it's highly likely that it's still done this way.
« Last Edit: March 13, 2013, 10:11:56 pm by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3198 on: March 13, 2013, 10:11:19 pm »

Haha, that's very convenient!

EDIT: I notice you have a lot of unknowns in your syndrome.ce raw entries (E.G df.global.world.raws.syndromes.all[0].ce[0]). I can tell you a few right now:

unk_e4 is the second person VERB for CE_CAN_DO_INTERACTION; unk_100 is the third; unk_11c is the mutual.

unk_1a8 is the CDI:INTERACTION for CE_CAN_DO_INTERACTION.

unk_25c is the ADV_NAME for CE_CAN_DO_INTERACTION.

EDIT 2: Any way to tell what creature a megabeast encounter will be?
« Last Edit: March 14, 2013, 12:53:17 am by Putnam »
Logged

Laggy

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3199 on: March 14, 2013, 02:40:36 am »

Quick little script if anyone is interested:

Spoiler: military_training.lua (click to show/hide)

Threw this together tonight because I basically wanted parts of make_legendary, and parts of the armoks_blessing, with the ability to customize the weapon skills it at run-time.  (*Note, this doesn't have rejuvenate, elevate_physical, elevate_mental, or brainwash).

Can be used on a single dwarf, or all of your dwarves.  Includes a list of default skills that are always trained (Shield, Armor, Biter, Kicker, Fighter, Archer, Wrestler, Dodging, Misc. Object Using, and Striking).  Because every military dwarf wants those!  But I wanted to be able to specialize in a certain weapon type.

Usage examples with a single unit selected via the 'k' or units list:

Input                                         -> military_training hammer
Output:                                      -> [DwarfName] is now a Legendary Hammerdwarf!
Output:                                      -> [DwarfName] is now a Legendary Armor User!
............etc etc etc

Input                                         -> military_training dagger axe crossbow
Output:                                      -> [DwarfName] is now a Legendary Knife User!
Output:                                      -> [DwarfName] is now a Legendary Axedwarf!
Output:                                      -> [DwarfName] is now a Legendary Marksdwarf!
Output:                                      -> [DwarfName] is now a Legendary Armor User!
............etc etc etc


If you don't have a unit selected, it goes through all your dwarves and gives them the selected skills.



P.S.  Most of the credit goes to vjek.  I 'borrowed' a lot of his code to get what I wanted.  Maybe someone else will find it useful!
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.34.11 r3
« Reply #3200 on: March 14, 2013, 03:28:25 am »

Hello!

A new release is out, with many improvements.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3201 on: March 14, 2013, 04:16:30 am »

Finally!

Good luck all.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3202 on: March 14, 2013, 04:35:19 am »

Let the madness begin!

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3203 on: March 14, 2013, 04:40:48 am »

Nice. :)

Its like christmas, with both autosyndrome and itemsyndrome being out.
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 :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3204 on: March 14, 2013, 04:58:01 am »

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3205 on: March 14, 2013, 05:00:08 am »

Excuse me asking, but what does it do? Anvil figurine claim a site? ^^
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 :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3206 on: March 14, 2013, 05:05:09 am »

A way to make anvil in smelter (because there is no way to make on in vanilla minecraft without having one and in adventure mode there is no place to get one) and a reaction that makes you create a site around 3x3 yourself by using a figurine

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3207 on: March 14, 2013, 05:27:11 am »

I understood the avnil one, I have a similar reaction in my mod. I was mostly wondering what a site does, since I never played adv. mode. I mean, I know what a site IS, but not what pros/cons it would have to create an empty 3x3 site as an adventurer.
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 :::

Askot Bokbondeler

  • Bay Watcher
  • please line up orderly
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3208 on: March 14, 2013, 05:35:26 am »

A way to make anvil in smelter (because there is no way to make on in vanilla minecraft without having one and in adventure mode there is no place to get one) and a reaction that makes you create a site around 3x3 yourself by using a figurine

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3209 on: March 14, 2013, 05:48:53 am »

I understood the avnil one, I have a similar reaction in my mod. I was mostly wondering what a site does, since I never played adv. mode. I mean, I know what a site IS, but not what pros/cons it would have to create an empty 3x3 site as an adventurer.
All* changes to df world are not kept unless they are done in some site (sites are: player forts, caves, camps (but not towns), maybe forts...) so without a site you are in the digging that you done will be gone the moment you move from that place.
Pages: 1 ... 212 213 [214] 215 216 ... 373