The forum
[Script] Rise of Nations
Author | Replies | ||||||||
ekultails | Sunday 20 March 2016 at 19:27 | ||||||||
ekultails![]()
|
This script supports:
Please note, that it does NOT support Rise of Nations: Extended Edition from Steam. There is no known workaround for it yet. Since the game engine was redesigned to utilize DirectX 10 instead of DirectX 9 there are some Wine compatibility issues. This relies on Wine 1.7.18, a version known to work really well with Rise of Nations. The additional depdencies required for sound and video to work properly are: directmusic, dsound, mfc40, mfc42, msvcirt, msxml4, and vcrun6. There is a false-positive report from PlayOnLinux that says that Wine has crashed when launching the installer. This can be ignored and this script does notify the user about it before it executes the launcher. Outside of Wine, the Rise of Nations configuration file at "drive_c/users/$USER/Application Data/Microsoft Games/Rise of Nations/rise2.ini" is tweaked. The introduction and main menu videos do not work so they are disabled. That file can also be used for turning on/off fullscreen and setting any custom resolution. Test Environment:
Installation/Gameplay Screenshots:
Icons:
[code language=playonlinux]
|
||||||||
ekultails | Sunday 20 March 2016 at 19:30 | ||||||||
ekultails![]()
|
I'm having some trouble with the PlayOnLinux code tags, but the script is still readable from my inital post.
Edited by ekultails |
||||||||
MTres19 | Friday 20 May 2016 at 0:27 | ||||||||
MTres19![]()
|
Overall the script looks good, but I have several things that could be corrected to make it better: 1. $PREFIX should have a more unique name than RoN. Not that it's likely that there will be another script that uses the same name, but it would be a good precaution to take. 2. The use of $HOME is discouraged, since it can't be relied upon to be set in all cases. $POL_USER_ROOT will point to /home/<user>/.PlayOnLinux, and can be relied upon to exist. 3. One should never use "Program Files" in a path. Wine translates this based on the set language, and it could be in, for example, Russian, for all you know. Use the $PROGRAMFILES variable instead. (e.g. $POL_USER_ROOT/wineprefix/$PREFIX/drive_c/$PROGRAMFILES/Microsoft Games/Rise of Nations) 4. Per PlayOnLinux contribution guidlines, messages must be translatable. It would be best to make your message about compatibility as concise as possible, leave the explanations for the description on the POL website, then wrap it in eval_gettext. For example:
5. As you also might have noticed in my example above, you should also keep the window title to "$TITLE". This keeps consistency, since many function scripts (i.e. those run with POL_Call) set the window title to "$TITLE" anyway. 6. There is no need for POL_SetupWindow_check_cdrom if you're only checking for Setup.exe. You should instead check for the presence of a file that will likely be unique to that CD. 7. If possible, you should avoid using old development versions of Wine. If 1.8.2 also works, it should be used since it is more likely to be already downloaded by another script. But if functionality is lost when moving to 1.8.2, you should stay with what you have. Or move to the latest development version, which is 1.9.10, I think. 8. While I can see that you have done research to find the POL_Calls you have, have you tested it first without any, then added them back in, one at a time, and omitted the ones that didn't do anything? The AppDB can be really useful, but lots of the tests are old or are people following old tutorials, and you kinda have to use the Scientific Method to sort through and find the tips that are actually helpful. 9. Try using:
If that doesn't work, the warning message should still be shortened. (See #4.) You also don't need to warn the user to not start the game upon exiting the installer. PlayOnLinux now warns a user about this when he or she first runs a script. 10. Except under certain very unusual circumstances, POL_SetupWindow_WaitBefore and POL_SetupWindow_WaitExit are not both needed. If the installer runs "synchronously" (i.e. the script is paused while the program executes), use POL_Wine_WaitBefore, and get rid of POL_Wine_WaitExit. If the program runs asynchronously (i.e. the script continues executing while the installer runs), use POL_Wine_WaitExit, since POL_Wine_WaitBefore doesn't pause the script. 11. Again, the long messages are a problem. (Don't worry, I've made this mistake too.) Just keep the question part, and make the window title "$TITLE". 12. Again, you should avoid using both POL_Wine_Wait* commands, and again POL_SetupWindow_check_cdrom isn't useful unless it's finding a unique file. 13. I would assume that $USER is also not reccommended. You can get the username from Wine, however, like this:
And then use $USERNAME instead of $USER. (That was pretty much copied from the POL_LoadVar_PROGRAMFILES function.) 14. A more elegant way to write multiple lines to a file would be:
Though that doesn't really matter. I also noticed you had "ForceGIDCursor." I fixed that in the example above. 15. Ending success messages are not encouraged. However, you can add a link to your GitHub repository in the script description when you submit it, and you'll get emails when people comment on your script. 16. Lastly, and mostly just a personal preference of mine, is to separate parts of the script (initialization, finding the CD, running the setup, etc.) by blank lines. You don't have to bother with this; I just find it easier to read that way.
There you go. Hopefully I didn't sound too harsh---most of the issues are really quite minor. Regards, - |
||||||||
ekultails | Tuesday 25 October 2016 at 5:38 | ||||||||
ekultails![]()
|
Thank you again, MTres19, for your invaluable feedback. :-)
I have updated the code to my PoL script to line up with all of your suggestions: [ https://github.com/ekultails/playonlinux/blob/master/rise_of_nations.pol ]. It has been tested on my local system to be working so hopefully others can try this out, too. |
This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca@playonlinux.com