Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Broke DFHack plugin with localisation patcher.  (Read 588 times)

kiwiphoenix

  • Bay Watcher
    • View Profile
Broke DFHack plugin with localisation patcher.
« on: February 08, 2014, 05:51:32 pm »

So... I found DFLocalise recently, used it to tweak the skill ranks and calendar months for clarity.
However, I found that in the patched exe, DFHack's Embark Anywhere plugin no longer works, returning the message:

[...]scripts/embark.lua:23: attempt to index local 'seg' (a nil value)
stack traceback:
[...]scripts/embark.lua:23: in function 'embark'
[...]scripts/embark.lua:23: in main chunk
(...tail calls...)

Tried removing the Embark plugin and replacing it after patching, but that didn't help.
Never used lua before, and am completely lost.
Any lua-literate people out there who'd be willing to shed some light on the situation?

For reference, the Embark plugin code:
Spoiler (click to show/hide)
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Broke DFHack plugin with localisation patcher.
« Reply #1 on: February 08, 2014, 08:54:19 pm »

It's lua, so it's a script.

Anyway:

This line ain't working:

Code: [Select]
   local seg=ms.get_code_segment()
The translation patcher changes some offsets around, so I'm not really surprised.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Broke DFHack plugin with localisation patcher.
« Reply #2 on: February 09, 2014, 04:25:27 am »

Yes it's known bug. The translation patcher should not mark segments as executable (why would you want to execute the text?). This confuses the multi-embark hack.