Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 138 139 [140] 141 142 ... 360

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

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2085 on: January 29, 2015, 02:43:22 pm »

I'm pretty sure it's missing from Windows.

Looking at the symbols.xml quickly it's like the only one that's outright missing, too. It's taunting us.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2086 on: January 29, 2015, 02:54:02 pm »

Any idea why this is happening?

Code: [Select]
[DFHack]# tile/material-change -floor -unit 3387 -plan 5x5_X -material GOLD
C:\Users\Miles\Desktop\My_DF2\hack\lua\utils.lua:595: error: invalid arg: 1: flo
or
stack traceback:
        [C]: in function 'error'
        C:\Users\Miles\Desktop\My_DF2\hack\lua\utils.lua:595: in function 'proce
ssArgs'
        ...les\Desktop\My_DF2\hack\scripts/tile/material-change.lua:95: in main
chunk
        (...tail calls...)

I think I know what it is saying, but it doesn't make sense, since I have
Code: [Select]
validArgs = validArgs or utils.invert({
 'help',
 'plan',
 'location',
 'material',
 'dur',
 'unit',
 'floor',
 'remove'
})
local args = utils.processArgs({...}, validArgs)
In my code.

I think I know what's happening. You need to exit and restart DF or temporarily add 'validArgs = nil' to your script.

DFHack keeps track of the global variables of each script. They persist even if you change the script. I suspect you added the floor option while DFHack was running, so the 'validArgs or ...' returns validArgs because validArgs isn't nil.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2087 on: January 29, 2015, 03:02:04 pm »

startdwarf works for me in 0.40.24. Make sure you're using a version of DFHack that has the necessary offset (i.e. not r0).

I thought it was only found on mac/linux?
Quietust found it for 0.40.24 on Windows but apparently nobody added it to symbols.xml. Should be 0xB4C833.
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.40.24-r1
« Reply #2088 on: January 29, 2015, 03:07:53 pm »

So I add this to it?

Code: [Select]
        <vtable-address name='start_dwarf_count' value='0xB4C833'/>
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 :::

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2089 on: January 29, 2015, 03:11:45 pm »

No, it's a global (and already has a line in symbols.xml). Find the start_dwarf_count line for Windows (here) and add the offset to it.
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.40.24-r1
« Reply #2090 on: January 29, 2015, 03:19:36 pm »

I did, looks like this now:

Code: [Select]
        <global-address name='start_dwarf_count' value='0xB4C833'/>
But doesnt work. Still have 7 embark units.
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 :::

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2091 on: January 29, 2015, 03:27:17 pm »

What's the output of ":lua ~dfhack.internal.getAddress('start_dwarf_count')"?
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.

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2092 on: January 29, 2015, 03:27:56 pm »

Please, Meph. This isn't hard!

Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.40.24-r1
« Reply #2093 on: January 29, 2015, 03:30:55 pm »

Neat. :)

Could you please post the line in symbols.xml, or whatever else you changed?

PS: I personally prefer RAWs. :P
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 :::

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2094 on: January 29, 2015, 03:33:17 pm »

There's absolutely nothing weird about it. Symbols.xml in the \hack directory, the section right underneath the big evil Windows flag.

Code: [Select]
...
        <global-address name='save_on_exit' value='0x1839D92'/>

        code

        <global-address name='start_dwarf_count' value='0xB4C833'/>

        generated standingorders

        <global-address name='standing_orders_gather_minerals' value='0x00e80e64'/>
...
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.40.24-r1
« Reply #2095 on: January 29, 2015, 03:50:15 pm »

Ah, found my mistake. There are 4 entries of start_dwarf_count, while I only changed one of them. Fixed now, works. Thanks for the help and the patience.
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 :::

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2096 on: January 29, 2015, 03:55:36 pm »

Ah, found my mistake. There are 4 entries of start_dwarf_count, while I only changed one of them. Fixed now, works. Thanks for the help and the patience.
Well, you need to change only one of them, but it needs to be the correct one. The others are for Linux and Mac.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2097 on: January 29, 2015, 04:00:04 pm »

Ah, found my mistake. There are 4 entries of start_dwarf_count, while I only changed one of them. Fixed now, works. Thanks for the help and the patience.
Well, you need to change only one of them, but it needs to be the correct one. The others are for Linux and Mac.
There's also one in the commented-out section at the start of the file.
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.40.24-r1
« Reply #2098 on: January 29, 2015, 04:05:33 pm »

HAhahahaaa.... *dies

So I just broke startdwarf on mac and linux. :D (no worries, I know how to fix it now)
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 :::

Gorobay

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r1
« Reply #2099 on: January 29, 2015, 04:56:42 pm »

Given a unit, how can I determine what site they live in?
Logged
Pages: 1 ... 138 139 [140] 141 142 ... 360