Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83291 - Force NWN to keep player data in ~
Summary: Force NWN to keep player data in ~
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 All
: High enhancement (vote)
Assignee: Denis Dupeyron (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 152367
Blocks:
  Show dependency tree
 
Reported: 2005-02-25 05:06 UTC by int19h
Modified: 2011-12-10 23:54 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Wrapper script (nwn,420 bytes, text/plain)
2005-02-25 05:10 UTC, int19h
Details
New wrapper for user local data (nwn-wrapper,856 bytes, text/plain)
2005-10-28 15:30 UTC, Nico Erfurth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description int19h 2005-02-25 05:06:58 UTC
One of the not-so-nice thing about NWN on Linux is that it inherits the traditional Windows way of handling game data, by dumping everything - both static game data and user data such as character files and savegames - into a single directory. In order to play, user requires write access to this directory; furthermore, several different users will have their game files overlapping. Such behavior is not expected nor desired in a multi-user OS such as Gentoo Linux. Therefore, I suggest to fix it by making a wrapper script which, when run, should create the directory for user files (~/.nwn), symlink all required read-only static game files into it, cd into it, and run /opt/nwn/nwn. As ~/.nwn is the current directory, all user files are written into it as the game runs, as would be expected from a well-behaving program. Furthermore, once implemented this removes the need to make /opt/nwn group-writable.
Comment 1 int19h 2005-02-25 05:10:42 UTC
Created attachment 52114 [details]
Wrapper script

The proposed wrapper script. This should correctly handle any NWN installation,
optionally with SoU, HotU, and custom modules installed.

Perhaps /opt/nwn/*vault (for pre-created characters which come with the game) 
should also be copied to newly created ~/.nwn? Not sure...
Comment 2 Anton Romanov 2005-10-17 12:59:36 UTC
there is also
http://home.woh.rr.com/nwmovies/nwuser/
Comment 3 Remy Blank 2005-10-17 15:10:29 UTC
Well, yes, but nwuser looks like a very ugly hack, whereas the script solution
seems quite elegant. Although I would rather invert its logic, i.e. symlink
everything from /opt/nwn *except* a list of files and directories (database,
logs, nwn.ini, nwnplayer.ini, tempclient, dmvault, localvault, saves, servervault).
Comment 4 Nico Erfurth 2005-10-28 15:30:43 UTC
Created attachment 71654 [details]
New wrapper for user local data

This is a enhanced wrapperscript which symlinks and copies files and
directories from /opt/nwn to ~/.nwn as suggested here:
http://bugs.gentoo.org/show_bug.cgi?id=83291#c3
Comment 5 Greg Watson (linuxkrn) 2006-03-12 13:21:50 UTC
so what happened here?  Did we ever get this added to portage? 
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2006-03-15 15:10:00 UTC
No.  I have this on my personal list, but dealing with pretty much anything NWN-related gives me a massive headache.  My first course of action here is to ensure that games-rpg/nwn(-data) works with all of the media sets out there, which is currently does not.  After that, I'll look at adding new features, such as this one.  I haven't forgotten about it, I've just been a bit too busy to get to it yet.
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2007-01-10 14:37:29 UTC
OK.  This is fixed in the (currently) masked version of nwn-data/nwn... please unmask it and test it out.  Once it comes out of package.mask, I'll close this bug.
Comment 8 Dan Roberts 2007-03-11 19:46:25 UTC
games-rpg/nwn-1.68-r1 is out of package.mask, I upgraded to it, and get this on starting:

/opt/nwn/nwn: line 30: syntax error in conditional expression
/opt/nwn/nwn: line 30: syntax error near `-a'
/opt/nwn/nwn: line 30: `                if [[ -z "${LANG}" -a -r ".metadata/linguas_$i" -a -d "$i" ]] '

If I comment out the relevant lines in the script (LANG= en in my case) nwn starts, but does not look for the savegames in the ~/.nwn/en directory but in the old /opt/nwn directory.
Comment 9 Denis Dupeyron (RETIRED) gentoo-dev 2008-02-17 01:27:40 UTC
(In reply to comment #8)
The new -r3 ebuilds were just committed and unmasked, and should fix this. Please test and report back.

Denis.
Comment 10 Stephen E. Baker 2008-07-09 02:21:19 UTC
Works for me in 1.68-r4. 
Should this be resolved-fixed?
Comment 11 dark_mail 2008-12-07 19:15:58 UTC
I'd rather not mark this as fixed.

I'm experiencing some issues with the savegames, coming from multiple places where they are saved/loaded (and maybe because of my german version):

/opt/nwn/saves (only contains quicksave (see below))
~/.nwn/saves (contains some outdated savegames, maybe from my own attempts to get this mayhem working)
~/.nwn/de/saves (contains the actual savegames, but I'm pretty sure I already was beyond the point of my last savegame. Additionally, the quicksave in this folder only contains symlinks to the quicksave in /opt/nwn/saves, but I cannot load it as nwn then complains about insufficient disk space and just sits there, waiting to be killed.)

The quicksave in /opt/nwn/saves only contains files marked as writable by the owner, which explains the strange behaviour when loading.
And, for a bonus, all the other savegames come without preview, instead the portrait.tga is displayed on all preview images.

With copying around the savegames I managed to somehow keep nwn playable, but IMHO this issue is not resolved yet.
Sorry I haven't come up with these issues earlier, I previously had nwn installed by hand.)
My nwn version is 1.68-r4

Anyone else having issues of that kind, maybe even a solution?
Comment 12 Denis Dupeyron (RETIRED) gentoo-dev 2008-12-08 22:32:37 UTC
(In reply to comment #11)
> I'd rather not mark this as fixed.

Just FYI, I'm currently moving across the Atlantic and my hardware is somewhere on a ship. I should get it back around early february but won't probably be able to resume development which involves demanding software such as NWN before some time after that. That's unless I'm lucky enough to get my hands on a more powerful laptop in the meantime, which is not totally impossible.

Denis.
Comment 13 dark_mail 2008-12-08 22:41:01 UTC
OK. I reverted to installing NWN by hand, but if you need someone for some testing, just drop a note here.
Comment 14 Denis Dupeyron (RETIRED) gentoo-dev 2011-12-10 23:54:50 UTC
This is now in stable and I'm not experiencing any of the problems above even when playing with another language than English. Thus I'm closing this bug. Do not hesitate to reopen if necessary.

Denis.