can't autotest levels with space in name

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

can't autotest levels with space in name

Post by filbo »

No permutation which I have tried has worked for:

$ rocksndiamonds --mytapes --execute "autotest Legend Of Zelda"
rocksndiamonds: fatal error: no such level identifier: 'Legend'
rocksndiamonds: aborting
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: can't autotest levels with space in name

Post by Holger »

Yep, right, it's currently not supported -- please just rename it to "zelda" or "rnd_zelda" or something similar that does not contain spaces.

In general, it is a little bit less trivial than it looks at the first view -- for example, does "autotest Legend Of Zelda 002 003" mean "play levels 2 and 3 of the set 'Legend Of Zelda'", or does it mean "play level 3 of the set 'Legend Of Zelda 002'"?

If I should have too much time one day, I may extend it a bit so that "autotest Legend\ Of\ Zelda" or "autotest ''Legend Of Zelda" would work.

The easiest workaround for your exact example would be just checking if the last character looks like a number or not, and use the whole remaining string if it does not, but this would again bring up cases like "autotest Zelda 2", of course. Oh well...

As I consider the "autotest" feature some sort of an "expert feature", I think that just renaming the directory to contain underscores instead of spaces etc. would do the job for now. :-)
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: can't autotest levels with space in name

Post by filbo »

Yeah, I can do that. Don't really like to change it from what a future download would produce, since that leads to future bugs / duplications / misbehaviors...

AFAICR, the directory named 'Legend Of Zelda' came directly out of files downloaded from artsoft.org. It is, in fact, a frequent annoyance to me that the EMC levels are in '.../Emerald Mine Club/...' -- I'd really prefer if zero files ever had a space in their name. But at least in the EMC levels' case, the terminal path component (== levelset token, in RnD's thoughts) lacks spaces.
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: can't autotest levels with space in name

Post by Holger »

Yeah, I can do that. Don't really like to change it from what a future download would produce, since that leads to future bugs / duplications / misbehaviors...
Definitely true, and I do it just the same (not renaming such directories, to prevent future confusion). My solution: Using a directory tree ".../Levelstuff/People/<name>/Some_Level_Set With Strange-Naming-Convention Nr. 001" completely outside the R'n'D level directory tree, then creating a symbolic link in the R'n'D level directory (either in the central installation location, or in the personal R'n'D data directory inside the user's home directory), like "levels/rnd_some_level_set_with_strange_naming_convention_nr_001" pointing to that strangely named original level set directory. And you're done. :-)
AFAICR, the directory named 'Legend Of Zelda' came directly out of files downloaded from artsoft.org.
No, it's named "zelda" there (in the archive file "Zelda-1.0.0.zip"). And "zelda2" in "ZeldaII-1.0.0.zip".
It is, in fact, a frequent annoyance to me that the EMC levels are in '.../Emerald Mine Club/...' -- I'd really prefer if zero files ever had a space in their name.
I _strongly_ prefer files with no white space in their names at all, too! Not sure from where you got your EMC collection -- the "official" current 7z archive file "Emerald_Mine_Club-2.1.1.7z" on artsoft.org uses the directory "Emerald_Mine_Club"!

May it be possible that you got these two level set archives from somewhere else?!
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: can't autotest levels with space in name

Post by filbo »

Hmmm, wow, I don't think so ... will have to investigate tonight.

My directory structure was initially out of Ubuntu (Debian) packages of RnD 3.x (possibly 2.x), including their install script which, after installing the binaries, would ask whether you wanted to download stuff that didn't meet their strictest license terms, direct from artsoft. Later I 'fossilized' that by replacing contents with new downloaded contents from artsoft, but retaining the directory framework.

And then of course it's years of accreted mess on top of that. My working build tree is in something like /usr/share/games/rocksndiamonds/downloads/src/git/rocksndiamonds/... :)
Post Reply