Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Manual Settings Configuration  (Read 954 times)

Remuthra

  • Bay Watcher
  • I live once more...
    • View Profile
Manual Settings Configuration
« on: February 22, 2014, 01:49:58 pm »

Alright, so for the past few releases I haven't been able to get the configuration exe working. I can run the utilities manually, and play the game, but is there any way to manually configure the files without using the gui system?

yaymeh

  • Bay Watcher
    • View Profile
Re: Manual Settings Configuration
« Reply #1 on: February 22, 2014, 02:35:08 pm »

As far as I can tell, everything works with tags in front of the definitions in the raws. You just have to look for those:
YESSOMETHING
!NOSOMETHING!

The first ones are only so you can tell which feature a line belongs to, the second ones - and this is the important part - break the first "[" of the line they are in, which means the definition doesn't get parsed or something and the entry is deactivated.

So to change the settings manually, you just need to find the right tag for the setting you want (like pe: YESTEMPLE, YESTHATCHERY, YESTHROWING, YESTOOLMAKER) in the raws (you can grep for YES and \!NO if you have trouble finding the right one to get a list) and then you run sed over the whole folder with find-exec or something to replace the YESTAG[ (+ the "[") with a  !NOTAG! or the other way around.

Example (in your raws folder):
Code: [Select]
find ./ -type f -exec sed -i 's/YESTANNER\[/\!NOTANNER\!/' {} \;
« Last Edit: February 22, 2014, 02:43:07 pm by yaymeh »
Logged

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Manual Settings Configuration
« Reply #2 on: February 22, 2014, 04:17:37 pm »

you can use this to find most of the options. it's a bit unwieldy at the moment but it has everything in it.

it might be possible to actually fix it though, if you post some machine details and the actual error. 'it doesn't work' is pretty difficult to debug.

Remuthra

  • Bay Watcher
  • I live once more...
    • View Profile
Re: Manual Settings Configuration
« Reply #3 on: February 22, 2014, 04:30:51 pm »

Nah, I'm running the thing through Wine, so I doubt the problem is easily fixable.

Thanks for the tips, though. Very useful to know.

yaymeh

  • Bay Watcher
    • View Profile
Re: Manual Settings Configuration
« Reply #4 on: February 22, 2014, 05:18:47 pm »

Uhm... so if wine is the problem... did you try setting up a fresh wineprefix recently?
Code: [Select]
export WINEARCH=win32
export WINEPREFIX=~/yournewprefix
winetricks DOTNET40
optionally: wincfg ( set virtual desktop = on, to your screen resolution or something )

Should work just fine... well, on the other hand, if you don't like wine, I'm mostly using find + sed, too. It's faster and easier on the eyes because the dotnet40-GUI flickers so horribly (feels like there's something glitchy and cpu-intensive that should really run in its own thread but can't do that due to some of wine's fake thread-handling shortcuts so instead it just runs in the main GUI drawing loop thingy and makes it blink/redraw in a twitchy fashion xD, well, I don't know).

Theoretically, with the source Splinterz posted, it should be really easy to do a small CLI-GUI for the binary ones at least... if I wouldn't suck at bash so much I could almost write i :3

Well, I guess at least I can almost manage to make a semi-functional list for easy copy-pasting (working only for the binary raw-only options of course):
Code: [Select]
for option in $(curl https://raw.github.com/splintermind/masterwork-dwarf-fortress/gold/Settings%20Source/exportedOptionTags.txt | grep -o "opt[^ ]*" | grep -v "Num"); do opt=$(echo $option | sed "s/^opt//" | tr [:lower:] [:upper:]); echo "find ./ -type f -exec sed -i 's/YES$opt\[/\!NO$opt\!/' {} \;"; echo "find ./ -type f -exec sed -i 's/\!NO$opt\!\[/YES$opt\[/' {} \;"; done;

which should output something like this, just much longer...:
Spoiler (click to show/hide)

Aaaand if I'd still remember how that "make curses gui from lists or lists of pairs"-progam was called, that would even be useful and not just a mess :3

Anyway: Just use sed, it'll work out somehow! sed is like magma. Just use it, don't worry. On everything. If necessary use it on binaries or combine it with sudo - it can potentially fix every problem theoretically! :D


Logged

splinterz

  • Bay Watcher
    • View Profile
    • Dwarf Therapist Branch
Re: Manual Settings Configuration
« Reply #5 on: February 22, 2014, 05:26:06 pm »

ugh. the latest version is still flickering? i thought that had been resolved a while ago.

yaymeh

  • Bay Watcher
    • View Profile
Re: Manual Settings Configuration
« Reply #6 on: February 22, 2014, 05:38:49 pm »

Really? I thought that was normal - I often see weird behaviour in all sorts of dotnet4 GUIs, most of the time you have to be glad they run in wine at all ;)
Mine flashes in a 2-4 second rhythm (1-2 seconds unresponsive between window updates) under wine 1.7.12 archlinux-x86-64/nvidia

Maybe I have an obsolete or weird version of the GUI...
Code: [Select]
085276fde9f449c3cab0a841e78f3a44  Masterwork Dwarf Fortress.exe
Had to do some rather obscure dark magic to get newest masterworks up and running with my self compiled DF and the bleeding edge libs from my system & stuff... so I don't really dare to extract a clean version again
Logged