Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 124 125 [126] 127 128 ... 185

Author Topic: Text Will Be Text - dfhack plugin  (Read 801446 times)

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1875 on: January 21, 2016, 09:58:13 pm »

I read that mifki struck some sort of agreement to not try to merge TwbT into dfhack because of how this mod works.

No, why. There are some changes need to be done on my side towards better interaction with dfhack and other plugins.
We've never discussed merging into dfhack though.

Btw, I need to check if for minor df updates these offsets can be found semi-automatically with byte search. Don't know why I haven't tried before.

topis

  • Escaped Lunatic
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1876 on: January 22, 2016, 09:28:25 am »

as i understand it, to get use of the dfhack automatic address scanning, one would need to define dfhack data structures for the map rendering functions and classes.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1877 on: January 22, 2016, 03:58:57 pm »

as i understand it, to get use of the dfhack automatic address scanning, one would need to define dfhack data structures for the map rendering functions and classes.
Dfhack does not have "automatic address scanning". It has some tools/scripts/best practices/experienced hackers to quicker find addresses when new version appears but there is no hard requirement for automatic scripts (though it would help and even more if e.g. the original person that found that address moves on from dfhacking).

There is zero df functions (except for virtual ones) in dfhack because it's hard to keep track of their calling convention when full program optimization is on (which is on for df) and internal functions can be called with basically random calling convention. I think ragundo is trying to add one that would allow to export very detailed world maps like in legends mode but better. AFAIK he's done windows and linux already.

I personally am sceptical about adding functions into dfhack but only because i tried it once and was too lazy/unexperienced to have anything productive.

topis

  • Escaped Lunatic
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1878 on: January 23, 2016, 01:50:06 pm »

that's what i mean, the scripts somewhat automate finding the offsets.

and if the functions that twbt patches had data structure definitions, the scripts would find the offsets for new df versions easier.
https://dfhack.readthedocs.org/en/stable/library/xml/SYNTAX.html

as i understand it, to get use of the dfhack automatic address scanning, one would need to define dfhack data structures for the map rendering functions and classes.
Dfhack does not have "automatic address scanning". It has some tools/scripts/best practices/experienced hackers to quicker find addresses when new version appears but there is no hard requirement for automatic scripts (though it would help and even more if e.g. the original person that found that address moves on from dfhacking).

There is zero df functions (except for virtual ones) in dfhack because it's hard to keep track of their calling convention when full program optimization is on (which is on for df) and internal functions can be called with basically random calling convention. I think ragundo is trying to add one that would allow to export very detailed world maps like in legends mode but better. AFAIK he's done windows and linux already.

I personally am sceptical about adding functions into dfhack but only because i tried it once and was too lazy/unexperienced to have anything productive.
Logged

endoftheline

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1879 on: January 25, 2016, 01:32:33 am »

that's what i mean, the scripts somewhat automate finding the offsets.

and if the functions that twbt patches had data structure definitions, the scripts would find the offsets for new df versions easier.
https://dfhack.readthedocs.org/en/stable/library/xml/SYNTAX.html

as i understand it, to get use of the dfhack automatic address scanning, one would need to define dfhack data structures for the map rendering functions and classes.
Dfhack does not have "automatic address scanning". It has some tools/scripts/best practices/experienced hackers to quicker find addresses when new version appears but there is no hard requirement for automatic scripts (though it would help and even more if e.g. the original person that found that address moves on from dfhacking).

There is zero df functions (except for virtual ones) in dfhack because it's hard to keep track of their calling convention when full program optimization is on (which is on for df) and internal functions can be called with basically random calling convention. I think ragundo is trying to add one that would allow to export very detailed world maps like in legends mode but better. AFAIK he's done windows and linux already.

I personally am sceptical about adding functions into dfhack but only because i tried it once and was too lazy/unexperienced to have anything productive.

Actually, the PATCHES file in TWBT describes a pretty OK procedure for finding the offsets, that works if automated too:
Spoiler (click to show/hide)

For Linux it reproduces the results for 40.24, 42.03-42.04 versions, and produces an OK looking patch for .05 too. I hope to get Win and OSX support working in a day or two and  the finished script.

I'd appreciate any extra tips about finding those addresses in a cleaner, more robust way than described in the PATCHES file.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1881 on: January 25, 2016, 04:18:03 am »

I've added/merged all offsets for .05, but didn't make a build because I'm not sure if the develop dfhack branch is ok to use.

endoftheline

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1882 on: January 25, 2016, 05:54:44 am »

That's interesting. What does your script use?

radare2 with the r2pipe Python API. It basically does all the steps described in the PATCHES.md file.

the patches compiled and seemed to not crash the game, although I only had time to look around and embark site and verify that zoom is working as intended. I need to learn how to install tilesets...

Some documentation about how to get TWBT installed properly would be nice to have. I can read the source and look at existing packs but its a massive pain, and I'm never sure I've done it the right way. As it is I just stuck a symlink in a develop branch dfhack's plugins dir, added it to plugins/CMakeLists.custom.txt, ran make install, set the rendering mode to TWBT, embarked a new fortress for a few minutes and called it a day.

Also is it normal that Hopper crashes a lot?
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1883 on: January 25, 2016, 06:05:29 am »

That's interesting. What does your script use?

radare2 with the r2pipe Python API. It basically does all the steps described in the PATCHES.md file.

the patches compiled and seemed to not crash the game, although I only had time to look around and embark site and verify that zoom is working as intended. I need to learn how to install tilesets...

Some documentation about how to get TWBT installed properly would be nice to have. I can read the source and look at existing packs but its a massive pain, and I'm never sure I've done it the right way. As it is I just stuck a symlink in a develop branch dfhack's plugins dir, added it to plugins/CMakeLists.custom.txt, ran make install, set the rendering mode to TWBT, embarked a new fortress for a few minutes and called it a day.

Also is it normal that Hopper crashes a lot?

I'd like to write Hopper scripts to find offsets eventually. I've heard about radare2 of course, but never bothered to compile it for OS X and try. Hopper doesn't crash for me, but I haven't used it on Linux much.

There's nothing to install actually, just the plugin file and shadows.png to data/art folder (the latter isn't strictly required for it to work).
As for compiling, I build it separately from dfhack with my Makefile - just set correct paths to df and dfhack and probably change gcc version, and "make inst" will do the job. CMakeLists.txt was contributed by someone else.

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1884 on: January 25, 2016, 06:45:36 am »

radare2 with the r2pipe Python API. It basically does all the steps described in the PATCHES.md file.

the patches compiled and seemed to not crash the game, although I only had time to look around and embark site and verify that zoom is working as intended. I need to learn how to install tilesets...
Thx for your contribution!
You can find some preconfigured 42.05 sets here, and optionally use PyLNP for installation.

edit:
I've added/merged all offsets for .05, but didn't make a build because I'm not sure if the develop dfhack branch is ok to use.
Loads ok so far.
« Last Edit: January 25, 2016, 06:51:21 am by fricy »
Logged

endoftheline

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1885 on: January 25, 2016, 10:52:27 am »

Quote
...
Thx for your contribution!
You can find some preconfigured 42.05 sets here, and optionally use PyLNP for installation.

edit:
I've added/merged all offsets for .05, but didn't make a build because I'm not sure if the develop dfhack branch is ok to use.
Loads ok so far.

Thanks!

Also for anyone starting out like me: don't forget to add multilevel 6 or something like that into dfhack.init
This made me recheck the patch addresses like 3 times :)
Logged

funkydwarf

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1886 on: January 28, 2016, 01:08:42 pm »

wow, wrong thread....nothing to see here


« Last Edit: January 28, 2016, 09:03:30 pm by funkydwarf »
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1887 on: February 01, 2016, 06:49:43 pm »

ETA on a build that supports DFHack 42.05-alpha1 ?
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.
Pages: 1 ... 124 125 [126] 127 128 ... 185