|
Post by tortugapower on Jun 13, 2019 15:09:53 GMT -6
Does the game have to be running for this to work? Game does not have to be running for this to work! The .exe does take a little while to load. Did you close it yourself, or did the command prompt (black box) open and then close by itself? If you run the .exe from the command prompt directly, it won't automatically disappear when it completes. If there was an error, you can then see what it is and report what you see here. Things to double-check: make sure that the ai_wars.txt file is pointing to your game in the file="..." line. For instance, if you want to run this for Game7, make sure it is "./Game7/Autosave.bcs". Switch Game7 to a different game number to run for a different game -- the tensions will be stored.
|
|
|
Post by tortugapower on Jun 20, 2019 15:43:45 GMT -6
Updated to v0.305, which mostly changes how the settings file is parsed and loaded. clevebro If you have a chance to download the new version and check how it works, I'd be curious if at least it works with spaces in the directory now. (I don't think it will work with the localization issues yet.) I'm leaving v0.302 as I haven't stress-tested v0.305, so it could have some big issue (although it ran for me).
Edit: ALSO. I am shifting my time to develop the Combat Auto-Resolve Simulator for RtW2. I can't do what I want to do with this one until we can somehow feed the game updates without having to quit and load the game. I'm happy to continue supporting this if people find issues.
And if any API-like structure is implemented into the game, I'll resume work on this.
|
|
|
Post by oldspec4 on Jun 21, 2019 11:04:56 GMT -6
Excellent news on the Combat Auto-Resolve Simulator. I enjoyed the designing ship aspect of RTW1 but not so much the numerous tactical battles; and your simulator for RTW1 works for me.
|
|
|
Post by Capsized on Jun 27, 2019 0:17:24 GMT -6
I can't do what I want to do with this one until we can somehow feed the game updates without having to quit and load the game. I gave a few minutes (no more) of thought to that. i have an idea that still needs some changes to RTW2, but should be a lot easier to implement than an API. If the game .exe could take as an argument the game save, and if the game was activated (with licence and so on) directly load the save, we could be doing something like: 0) start the game throught a script 1) the script looks at the savegame every second or so 2) if the save game changes, after a short delay (to make sure that all files are saved), the script close the game 3) the script runs the AI wars 4) the script restart the game with something like "rtw2.exe -game1" 5) the game is restarted with the AI wars done. So the player would have to suffer a few seconds delay when saving the game but that's it. Bonus for the testers: The testers also could use the command line argument, and have a cycle of modify the game file => test => modify the game file => test... that would be lot faster than if they have to manually load the save game each time. And finally this has no impact at all on the "normal" player.
|
|
|
Post by Capsized on Jun 27, 2019 1:17:24 GMT -6
A macro recorder might be able to do exactly what I was talking about. Hum.
TO BE CONT TESTED
|
|
|
Post by tortugapower on Jun 27, 2019 1:54:19 GMT -6
Capsized I'm all ears! Closing a program and opening another program worries me in that it might be considered malaware by most virus protection or security software. I think even a simple "Load Game" button from inside the game itself, next to the Resign and next turn buttons, might even help this mod along. The best way is if the game can look at a file (e.g. "input.txt") and check a parameter there (e.g. load=0). If load=1, then it pulls in data from the file, overwriting the existing game state for those variables. That would allow full interactions.
|
|
|
Post by Capsized on Jun 27, 2019 11:41:00 GMT -6
I used the first macro recorder that Google showed me: www.macrorecorder.com/download/And that gives some useable results. In a few minutes I made a macro will double click on my AI wars shortcut, close it as soon as it shows its window, then double click the RTW2 shortcut, confirms that yes I want to play, and finally click "continue" to load the savegame. It would be easy to modify it to first save and close RTW2 before starting the AI wars. The macro is very brittle: it uses the screen coordinates so if a window is a few pixels left or right (or up or down) from the expected position it will not work correctly. On my PC it takes around 17 seconds from starting the macro until the game is ready to play, with something like 12s for the AI war script part. So not very fast but OK if it is run every few months.
|
|
|
Post by tortugapower on Aug 19, 2019 10:00:06 GMT -6
Capsized actually (unwittingly) gave me an idea. I think I can upgrade this mod's usefulness by simplifying the save/reload interaction. I think I can store the ships that should be sunk in a log, and then allow the user to tell the GUI when they want to update the game files. This will allow the mod to run wars over months without exiting to refresh the game and then apply these to the game when the user chooses. The game just won't know about any ship sinkings until the mod is told to refresh the game (and the usual Save/Load + mod restart is done).
|
|
captainsilver
New Member
Challenging the English in the Navy
Posts: 9
|
Post by captainsilver on Nov 10, 2019 5:40:15 GMT -6
Having some issues with installing the mod, similar to what clevebro was having. It spits out the error message of the file not being found before closing the command prompt window immediately. I don't really understand the difference between the Japanese or German localisation (thingy) so I don't exactly know how to fix this.
|
|
|
Post by rtello45 on Nov 22, 2019 16:21:28 GMT -6
I am trying to get ver 3.06 to work. I get to a scenario in the game. Save and exit. Run the .exe from the save folder, Game1 and the chart appears showing the current war along with a command window. I close both windows. When I reenter the game the scenario has not been played. My question is what file should the script be accessing. In one response you have Autosave.bcs and the other RTWGame1.bcs ( I am playing Game1). In the video you reference a RTWGame1.sac when you talk about the backup save. I also have no log.txt created. Any ideas
# File settings file='D:\NWS\Rule the Waves 2\Save\Game1\Autosave.bcs' refresh=0.255
# AI War Parameters chance_of_peace = 0.15 chance_of_battle = 0.40 pct_small_battles = 0.80
Game installed ion D drive
This is what appears in command prompt Settings: 0.255, 0.15, 0.4, 0.8.
Could not load existing tensions file.
[[ 1 4 53 8 4 3 3]
[ 0 0 2 0 3 3 1]
[ 0 0 1 1 1 1 1]
[ 0 0 0 5 3 2 2]
[ 0 0 0 0 0 2 0]
[ 0 0 0 0 0 2 1]
[ 0 0 0 0 0 0 1]]
Start up wars:
[[0, 2]]
File changed: same date.
I am an Administrator on the computer.
|
|
|
Post by tortugapower on Dec 23, 2019 15:44:05 GMT -6
rtello45 : sorry, I didn't check the Mod forum recently! For you and any others, feel free to mention me directly:@tortugapower As for your problem, rtello, this mod is designed to run at the same time as the game. So you run the AI mod, then run the game, and advance the months in the game. You will see what happens each new month in the AI mod GUI. If ships are being sunk, you have to exit the RtW game (without saving) and reload the Autosave. I think Fredrik is working on having load-game functionality from within the game, which will help smooth out this tedious process in the future.
|
|
|
Post by nafeij on Jan 5, 2020 0:55:14 GMT -6
tortugapower I seem to be getting this error whenever I advance each month. The GUI would stop updating afterwards. Attachments:
|
|
|
Post by akinesia on Jan 23, 2020 0:25:08 GMT -6
tortugapower The mod looks great and it shows wars staring but it does not update unless i close and restart it. while it shows various nations at war it update no battles or sunk ships. here is my setup file # File settings file='./Game3/Autosave.bcs' refresh=0.100 # AI War Parameters chance_of_peace = 0.15 chance_of_battle = 0.30 pct_small_battles = 0.80
|
|
|
Post by tortugapower on Jan 23, 2020 13:19:58 GMT -6
akinesia Yes, that's unfortunately how the mod works for the moment. Hopefully I can find a way to better integrate it, but I'll need development support to do so. I fear that is a long way away, only after RtW2 is polished a bit more first. [Edit: for clarity, even though it seems you already understand this, you don't have to close the game and reopen the Autosave unless the AI Wars mod shows a ship is sunk in the log.]
|
|
|
Post by akinesia on Jan 25, 2020 9:54:00 GMT -6
tortugapower The problem I am having is the log never updates. It stays on the month i open it and never changes. No battles are being fought as far as i can see. Thank you for all of your help. I love the auto resolve mod it makes the game so much better for me.
|
|