Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Notes Screen  (Read 956 times)

Lightman

  • Bay Watcher
  • The groboclones are looking for you.
    • View Profile
Notes Screen
« on: December 25, 2014, 10:20:38 pm »

In addition to the location-based notes, it'd be nice to have a "Notes" page in the 'z' status screens (Animals  Kitchen  Stone ... Notes).

It would be a simple text-entry screen, hopefully allowing multiple pages.  Text would be saved to data/save/region#/notes.txt.  My thought is to have a few, basic commands:

Ctrl-E   start editing
Ctrl-X   exit editing
Ctrl-R   reload notes.txt (so it could be edited outside the game, if needed)
Ctrl-S   save (saved also when game is saved)
Ctrl-N   new (clear)
Ctrl-K   cut (delete) line

We can use other programs to store notes but I think it'd be very useful to have something in-game. For example, when I play a game with a friend, it would make our coordination much simpler and help us keep track of what tasks we want to get done and prioritise.  This may be particularly useful when using primitive, text-output mode.
Logged

SixOfSpades

  • Bay Watcher
  • likes flesh balls for their calming roundness
    • View Profile
Re: Notes Screen
« Reply #1 on: December 26, 2014, 12:36:44 am »

If editing the file out-of-game is important to you, I don't see the benefit of being able to edit it IN game. I mean, it's already dead easy to just have the .txt file open in another window while you play, what's to be gained from having an in-game text editor that can only load 1 file? True, having multiple "pages" is something that programs like Notepad don't offer, and multiple "pages" is the best way to illustrate things happening on different z-levels . . . but DF's existing Notes screen already does that, by literally using different z-levels.

What I'd like to see in the Notes screen is the ability to Copy & Paste designations, rather like a macro. Arranging things like bedrooms would be a breeze if I could just dig out & furnish one bedroom, make a new burrow defined by that room, and then move, rotate, & flip that burrow however I want, and then Paste that burrow as many times as I like. Furniture would be a problem, though: Would that in the Copied rooms have to match the material and quality of the original furnishings? What happens if the original room contains an artifact? Etc. It's a difficulty, but happily only a minor one.
Logged
Dwarf Fortress -- kind of like Minecraft, but for people who hate themselves.

Lightman

  • Bay Watcher
  • The groboclones are looking for you.
    • View Profile
Re: Notes Screen
« Reply #2 on: December 26, 2014, 04:11:39 am »

1. External editing is not the focus.  Adding a simple re-load function would be trivial if the file is plain-text, which is my suggestion.  The idea is that the Notes screen editor should start as simple as possible.  I'd like to see it added sooner rather than later.  Another editor could be used 'offline', where complex editing is necessary and the in-game editor could develop over time.

2. Especially in the scenario I described, having "another window" is not a good option.  A terminal session doesn't allow for lots of easy window management and the issue of sharing the data with another user must be solved. There are other ways of dealing with this but I think an in-game feature would be preferable.

3. By "pages" I mean that the text content can be longer than one screen.  What you described was not what I had in mind but it's an interesting thought.  DF doesn't have a "Notes screen".  It has location-based notes, which is not what I want.  I want a (near) full-screen scratch-pad for general notes.

4. I hadn't considered copying/pasting designations like that. It would be grand if the editor eventually advanced enough to do such things. I had thought that 'links' to dwarves and such would be really cool.  For example, "Urist Dwarf" could be followed directly to the dwarf (location or thoughts) or "Main Bridge" could link to an existing, location-based note with that name.
Logged

dudlol

  • Bay Watcher
    • View Profile
Re: Notes Screen
« Reply #3 on: December 27, 2014, 02:22:55 am »

Best implementation of this I can possibly think of (and simulating simply using a second program) would be:

Assign a key, or key combination, which instantly takes you to a seperate notes screen and pauses the game
< and > on the notes screen take you up and down levels immediately
Enter any characters on the screen (though you'd loose access to < and >, some workaround required)
Assign a second key or combination which 'overlays' your notes across the game, causing the game to flash between the two screens similar to the display for two creatures on the same tile

No idea how hard it would be to implement, but it seems the most useful for drawing out plans and whatnot with notes, then efficiently transferring them over to the actual game area. If it outputs them to .txt files (entire layouts could go in one .txt files if it saves the dimensions of the maps and uses something to designate the end of a layer and what z level said layer is on) this could also facilitate creating entire complex layouts in one game (or at work via google docs or whatever) and using them in another game.

Iono. Thoughts that seem to apply to the topic. Doubt it will happen any time soon though. Alt+Tab into a stack of notepad documents isn't that difficult compared to implementation of an entire new feature. Which is what I do. Just keep several stacked up when I'm trying to draw things, then use alt+tab and alt+shift+tab to go up and down. You end up with a billion documents open, but notepad isn't exactly resource intensive.
Logged

Lightman

  • Bay Watcher
  • The groboclones are looking for you.
    • View Profile
Re: Notes Screen
« Reply #4 on: December 27, 2014, 04:16:32 am »

Those ideas might be worth exploring, later on. For now, I'd simply like an in-game scratch-pad for general notes. It would make it easier for me to keep notes together with a specific game. It'd be especially useful when playing in text mode, as I am. And again, it would be very helpful in a multiplayer (hot seat) situation, as is also the case for me.
Logged

SixOfSpades

  • Bay Watcher
  • likes flesh balls for their calming roundness
    • View Profile
Re: Notes Screen
« Reply #5 on: December 27, 2014, 12:11:29 pm »

Another possible use for an in-game notepad would be to customize the engravings on slabs. Instead of the regular old "Here Lies Urist", at your discretion you could add things like "He was a lazy sot who never did jack until he got lucky and killed that cave dragon. At least two of his kids look like they'll amount to something."
Logged
Dwarf Fortress -- kind of like Minecraft, but for people who hate themselves.

lethosor

  • Bay Watcher
    • View Profile
Re: Notes Screen
« Reply #6 on: December 27, 2014, 02:26:27 pm »

An in-game text file editor should be relatively easy to implement with DFHack, although a Lua-based editor wouldn't be easy to invoke in PRINT_MODE:TEXT (since DFHack keybindings require SDL) - you'd need to invoke it with "./dfhack-run [command]", which is less convenient. It would be possible to use C++ to add, for example, a "Alt+N: Notepad" option to the sidebar which works in all print modes, but a 10-line plugin for something so simple would be overkill. I'm thinking of implementing an alternative way to invoke command-prompt which works in PRINT_MODE:TEXT - once this works, it would be fairly easy to set up a script with a short name (e.g. "np") as an alias to the notepad script.
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.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Notes Screen
« Reply #7 on: December 27, 2014, 03:04:15 pm »

The game already has help screen which allows links, it just doesn't use allow in-game edits or use plain-text files.  There is an editor for that format lying around somewhere, so this feature request would consist of adding a general note command in the Notes view (or a notes tab in the Status menu) and beefing up the game's existing text editing.

Not sure of the exact terms used in the game, but each "page" of help is its own file (with no file extension) with the ability to scroll up and down if that file is longer than the screen height.  A single-file solution would be a good starting point, but it should keep an eye toward multiple files in the future by putting things in a region#/notes/ folder.

Yes, there are off-the-shelf open-source text editors that could be incorporated, but I can easily imagine issues with the license.  Toady would pretty much be on his own reinventing the text editor.
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