glassPen Posted August 15, 2014 Report Share Posted August 15, 2014 (edited) I have written a simple BASH script for GNU Linux to install maps that users make for 0ad. Please review and improve. Use as you would like. See readme. This was originaly made for SwampGremlin's map. EDIT by Sanderd17: Removed the script as we cannot accept scripts that require to be run as root, unless really necessary. Edited August 16, 2014 by sanderd17 Quote Link to comment Share on other sites More sharing options...
FeXoR Posted August 15, 2014 Report Share Posted August 15, 2014 May I ask what's wrong with "copy and paste"?(Not sure where Altas saves the maps ATM. Maybe it would help do add a link or a README.TXT to the folder the screenshot folder is in containing information about the paths (simple) modifications should go to) 1 Quote Link to comment Share on other sites More sharing options...
niektb Posted August 15, 2014 Report Share Posted August 15, 2014 In alpha 16 it is just a matter (in windows) of placing the map in a sub folder of My Documents. Quote Link to comment Share on other sites More sharing options...
FeXoR Posted August 15, 2014 Report Share Posted August 15, 2014 (edited) Well, for me (current SVN) it's "Documents\My Games\0ad\mods\user\maps\scenarios" (or "skirmish").That's not a path easy to guess... Edited August 15, 2014 by FeXoR Quote Link to comment Share on other sites More sharing options...
leper Posted August 15, 2014 Report Share Posted August 15, 2014 Assuming mappers/modders provide a zip file containing maps/{scenarios,skirmish}/* and the ui folder with the preview image (can't remember that path), you can just drop that file into the user mod (see GameDataPaths on the wiki). (No compression or DEFLATE for the zip only.) Quote Link to comment Share on other sites More sharing options...
glassPen Posted August 15, 2014 Author Report Share Posted August 15, 2014 (edited) Yes, it seems easy enough. But when in game i noticed that apparantly it isn't for allot of people. Also, the install dir varies with platform and install method.Also this script of for linux, not windows. Also when installing on nix the /usr/share is not owned by the user group. Edited August 15, 2014 by glassPen Quote Link to comment Share on other sites More sharing options...
FeXoR Posted August 15, 2014 Report Share Posted August 15, 2014 (edited) Assuming mappers/modders provide a zip file containing maps/{scenarios,skirmish}/* and the ui folder with the preview image (can't remember that path), you can just drop that file into the user mod (see GameDataPaths on the wiki). (No compression or DEFLATE for the zip only.)That's the best way as is now, I agree. Still not very comfortable IMO.(E.g. the mappreview should be searched for in the path the map is in also) Edited August 18, 2014 by FeXoR Quote Link to comment Share on other sites More sharing options...
sanderd17 Posted August 16, 2014 Report Share Posted August 16, 2014 I'm sorry, read your script, and I had to remove it. There's really no way we can accept that script to be ran as root. As other comments mentioned, moving it to the user mod (i.e. ~/.local/share/0ad/mods/user on Linux) will also install the map. This does not require root privileges, and allows the map to stay available when updating the game. Next to being dangerous (although your code seemed to have enough quotes on first sight), it's also a bad habit to run scripts as root. We've got a lot of error reports about users trying to build the SVN, just because they build it as root. They did it out of habit, and it messed up paths and file permissions. As such, we now explicitly stop the execution of both the compilation script and the pyrogenesis executable when it's run as root. This should also be done in your script if you want to publish it again. Quote Link to comment Share on other sites More sharing options...
greenknight32 Posted August 16, 2014 Report Share Posted August 16, 2014 (edited) Assuming mappers/modders provide a zip file containing maps/{scenarios,skirmish}/* and the ui folder with the preview image (can't remember that path), you can just drop that file into the user mod (see GameDataPaths on the wiki). (No compression or DEFLATE for the zip only.)If the mod contained those folders, wouldn't it mess things up for those who already had them? Even if the game would read multiple maps folders, it would be messy. Edited August 16, 2014 by greenknight32 1 Quote Link to comment Share on other sites More sharing options...
leper Posted August 16, 2014 Report Share Posted August 16, 2014 If the mod contained those folders, wouldn't it mess things up for those who already had them? Even if the game would read multiple maps folders, it would be messy.No it would not. It just puts all those files in one (virtual) folder that is read by the game. Quote Link to comment Share on other sites More sharing options...
Pureon Posted August 16, 2014 Report Share Posted August 16, 2014 ... the mappreview should be searched for in the path the map is in also Would that be possible guys? If it can't find it in the default folder, it looks for the preview image there. Quote Link to comment Share on other sites More sharing options...
leper Posted August 16, 2014 Report Share Posted August 16, 2014 Should be possible (would move pictures out of the art folder though), but I'd rather have all of those images in one folder (so either next to the maps, or in the art folder) than spread out. Quote Link to comment Share on other sites More sharing options...
greenknight32 Posted August 17, 2014 Report Share Posted August 17, 2014 No it would not. It just puts all those files in one (virtual) folder that is read by the game.I figured the game would probably deal with it ok, but would the player be seeing maps1 and maps2 etc? That's what I meant by messy. Quote Link to comment Share on other sites More sharing options...
leper Posted August 17, 2014 Report Share Posted August 17, 2014 No just map1.zip and map2.zip (with better names) in the user/ folder. Quote Link to comment Share on other sites More sharing options...
greenknight32 Posted August 18, 2014 Report Share Posted August 18, 2014 No just map1.zip and map2.zip (with better names) in the user/ folder.That's what I meant. Suppose there's a new version of one of those maps, you want to replace the old version, and it's in one of five different maps folders.... Quote Link to comment Share on other sites More sharing options...
glassPen Posted August 20, 2014 Author Report Share Posted August 20, 2014 Ok, I am going to rewrite the script taking into account the comments. Quote Link to comment Share on other sites More sharing options...
glassPen Posted August 20, 2014 Author Report Share Posted August 20, 2014 Ok, try this one.0adMapInstall.tar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.