Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: PRINT_MODE:TEXT  (Read 983 times)

vylaern

  • Bay Watcher
    • View Profile
PRINT_MODE:TEXT
« on: September 09, 2015, 01:32:20 am »

Hi,

I want to play in pure console (without X), so I use PRINT_MODE:TEXT in init.txt file.

However, I have only THE SAME resolution (means columns & rows), doesn't matter my console have some extra columns & rows that standard game settings. I was trying to change this parameters bellow, but no success :(
Is there any chance to set this?
Quote
[WINDOWED:YES]

This is the size and font for windowed mode.  Changing to the 800x600 font might make you happier.
If set below 256x256 it specifies the grid size instead, with a minimum of 80x25.

[WINDOWEDX:120]
[WINDOWEDY:80]
[FONT:curses_800x600.png]
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: PRINT_MODE:TEXT
« Reply #1 on: September 09, 2015, 06:42:47 am »

Have you configured FULLSCREENX/FULLSCREENY?
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

WovenTales

  • Escaped Lunatic
    • View Profile
Re: PRINT_MODE:TEXT
« Reply #2 on: October 18, 2015, 07:25:48 pm »

I'm hoping that this is still recent enough to not count as a necro, but I have the same problem. I've set both the WINDOW and the FULLSCREEN values to a larger value and tried both WINDOWED:YES and WINDOWED:NO, and it does seem like the TEXT print mode is locked to 80x25; while I didn't do anything with the GRAPHICS_ settings, those are disabled and I'd imagine would be ignored anyway. I assume this is (at least part of) why it's described as "primitive ncurses output"?
Logged

TruePikachu

  • Bay Watcher
  • Accomplished System Administrator
    • View Profile
    • cDusto (my personal server)
Re: PRINT_MODE:TEXT
« Reply #3 on: October 18, 2015, 08:46:15 pm »

If you have DFHack, what happens if you use Lua to set the width and height as desired? You'd set df.global.init.display.grid_x and df.global.init.display.grid_y to whatever. I can't test this, though, since I run under Windows, but looking at what happens when I set them makes me hopeful.
EDIT: This should make it set automatically on DF startup. Ofc set 80 and 25 to what you want.
Code: [Select]
$ cat > hack/scripts/fix-resolution.lua <<EOF
> df.global.init.display.grid_x = 80
> df.global.init.display.grid_y = 25
> EOF
$ echo "fix-resolution" >> dfhack.init
« Last Edit: October 18, 2015, 08:49:23 pm by TruePikachu »
Logged
He likes Pokémon, composing ≡«☼characters☼»≡, Windows for its compatability, Linux for its security, and Pikachu for its electric capabilities. When possible, he prefers to consume pasta. He absolutely detests Apple.

WovenTales

  • Escaped Lunatic
    • View Profile
Re: PRINT_MODE:TEXT
« Reply #4 on: October 19, 2015, 11:02:06 am »

Just got DFHack to check, and it looks like that tries to do something (I get a block of random characters below the game screen outside of what would normally be drawn), but it doesn't affect the actual game. It seems like the output in TEXT mode might not actually check what size its window is and just renders at the default 80x25.
Logged

TruePikachu

  • Bay Watcher
  • Accomplished System Administrator
    • View Profile
    • cDusto (my personal server)
Re: PRINT_MODE:TEXT
« Reply #5 on: October 19, 2015, 06:39:32 pm »

Just got DFHack to check, and it looks like that tries to do something (I get a block of random characters below the game screen outside of what would normally be drawn), but it doesn't affect the actual game. It seems like the output in TEXT mode might not actually check what size its window is and just renders at the default 80x25.
Are they just garbage characters, or what are they? How much sense do they make?
I believe that there is probably another thing somewhere in the render engine which would change the assumed resolution. I'd do some tests, but I don't think my VM is suitable enough to run DF.
I might need to go and disassemble the Linux version to see how it figures out the grid size to use (grid being 80x25 at default), and where it stores it for the render engine. In fact, I could probably work on the Windows version, since (in theory) the render engine just gets switch/case selected (or something like that), and the actual dimensions for the drawing handler (one step closer to high-level code than the render engine, which is e.g. "2D" or "TEXT") should be managed the same way between the two versions.

My experiment in Windows, at the title screen, widening to 81x25, caused some stuff to be cut off the right edge of the window (e.g. the version number was "v0.40.2"). But it is indeed possible that the interaction between the draw and render engines is more complicated than I thought.

+1 for official support for changing this. also +1 for adding the functionality into Windows, since one could easily use xterm or mintty to get support for Unicode and all the keystrokes...
Logged
He likes Pokémon, composing ≡«☼characters☼»≡, Windows for its compatability, Linux for its security, and Pikachu for its electric capabilities. When possible, he prefers to consume pasta. He absolutely detests Apple.