Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 251 252 [253] 254 255 ... 360

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

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3780 on: February 20, 2016, 05:07:09 pm »

Dirst: is this the most recent/functional version of create-unit?
That is identical to what shipped with PE Starter Pack for 42.05, which is where I started but that errors out.  These changes make it run without errors, but may be the source of the insubstantial historical figure issue:

In other news, I found a bug in modtools/create-unit.lua for DFHack 0.42.05-r1

I can only spawn wild animals if I change line 440 from

elseif args.civId and tonumber(args.civId) then

to

elseif args.civId and tonumber(args.civId) and tonumber(args.civId) ~= -1 then

This skips over nemesis creation for creatures in civ -1 and runs without errors, but I'm not sure if all of the loose ends are properly tied up.  I can get one of the animals named then save and reload, but not sure how else to test for save consistency.
So, there appears to be a really serious loose end here :(
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

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3781 on: February 20, 2016, 05:58:38 pm »

So I want to save the camera's position and zooms it back
df.global.window_x
df.global.window_y
df.global.window_z

Thank you.
While we're on the subject of spawning, create-unit move the camera around because it simulate some arena mode input and zooms into whenever the game felt spawning the unit to, even if I teleport is towards its intended location.

So I want to save the camera's position and zooms it back at the end of the script but I cannot find any position for the player's view anywhere. Is this accessible?

Right now you have to do it yourself. I think create-unit has bigger problems at the moment though. It's currently a proof of concept more than a working thing.

It seems more reliable than a patchy spawnunit from 0.40, for pets at least.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3782 on: February 20, 2016, 07:03:44 pm »

OK. That will be in the next version. You said "these changes" but I only saw one. Is that the only one?
Logged

jaked122

  • Bay Watcher
  • [PREFSTRING:Lurker tendancies]
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3783 on: February 20, 2016, 07:20:57 pm »

How would one go about differentiating an stl-string from an stl-vector from just the binary?


I imagine that they both look about the same as far as what data is required to represent them.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3784 on: February 20, 2016, 07:29:19 pm »

If you look at the raw data array you should see ascii characters in a string.

One thing that helps is that we can run DF in Windows, OSX, Linux, and WINE. Different ones are useful for discovering different things. I don't know the particulars. Only Quietust and Angavrilov do.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3785 on: February 20, 2016, 08:02:23 pm »

Under GCC, vectors consist of 3 pointers (12 bytes) internally, while strings consist of just 1 pointer (to a buffer with some header information followed by ASCII characters, I think). The layout of these is different under MSVC (heck, it's even different between some MSVC versions) - apparently vectors are 16 bytes with MSVC 2010, but I don't know much else.
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.

jaked122

  • Bay Watcher
  • [PREFSTRING:Lurker tendancies]
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3786 on: February 20, 2016, 09:34:35 pm »

If you look at the raw data array you should see ascii characters in a string.

One thing that helps is that we can run DF in Windows, OSX, Linux, and WINE. Different ones are useful for discovering different things. I don't know the particulars. Only Quietust and Angavrilov do.


I found the command for this actually, run strings on linux. It'll dig out all of the human readable text.


Under GCC, vectors consist of 3 pointers (12 bytes) internally, while strings consist of just 1 pointer (to a buffer with some header information followed by ASCII characters, I think). The layout of these is different under MSVC (heck, it's even different between some MSVC versions) - apparently vectors are 16 bytes with MSVC 2010, but I don't know much else.


Why are there two pointers in the gcc implementation?


Never mind, I found the stuff in the implementation, it's the pointer to the start of the vector and one element past the end, it might actually be three pointers, from what I've just read.  One for the beginning, one for the end of the used range, and one for the end of the allocated space.


Then there's the allocator, which is an element that I've never touched, and I'm not sure if it is compiled to a compile time constant, or instantiated for each instance of the class.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3787 on: February 20, 2016, 09:45:01 pm »

I think there's a specialization of the template so that if the allocator is the default one then instances of the vector don't have a field for it. That's how I would write it.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3788 on: February 20, 2016, 09:52:07 pm »

OK. That will be in the next version. You said "these changes" but I only saw one. Is that the only one?
Sorry, bad phrasing.  It was just the one change there.  I've made a lot of other changes to a WIP copy but nothing else has been an improvement.
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

Legless

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3789 on: February 22, 2016, 07:42:10 am »

Hey guys! Is there any chance to grab even unstable version (42.06) of DFHack? Need just a couple of commands.
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3790 on: February 22, 2016, 08:22:31 am »

Nope, structures aren't mapped yet.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3791 on: February 22, 2016, 12:17:17 pm »

sv-esk has updated some things, which I'll take a look at merging later today. I don't think they've checked everything, though, but if it's usable I'll try to make an alpha release soon after.
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.

notfood

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3792 on: February 22, 2016, 04:40:43 pm »

It's very usable. At least under Linux.
Logged

Dozebôm Lolumzalìs

  • Bay Watcher
  • what even is truth
    • View Profile
    • test
Re: DFHack 0.40.24-r5
« Reply #3793 on: February 23, 2016, 03:24:03 pm »

For compiling, where do I find the solution after I have run one of the "generate" batch files?
Logged
Quote from: King James Programming
...Simplification leaves us with the black extra-cosmic gulfs it throws open before our frenzied eyes...
Quote from: Salvané Descocrates
The only difference between me and a fool is that I know that I know only that I think, therefore I am.
Sigtext!

sv-esk

  • Bay Watcher
  • sorry for my bad english
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3794 on: February 23, 2016, 04:03:31 pm »

dfhack.sln will be in build/VC2010 folder, if you are seeking it.
For compiling run one of the "package" batch files. "dfhack-something-Windows.zip" package will be in build/VC2010 folder
Or run set_df_path.vbs and then run one of the "install". Package will be installed in the selected folder.
Logged
Pages: 1 ... 251 252 [253] 254 255 ... 360