Post by dimovski on Feb 5, 2018 4:54:30 GMT -6
Hello everyone.
Having finished my 1st semester in Mechanical Engineering, I now have around 4 weeks of free time to spend on relaxing and refreshing my coding skills.
I have been thinking about creating a Semi-Multiplayer Mod for Rule the Waves. It would require each of it's users to have Python installed on their PCs (for now, theoretically I may implement a half-assed GUI and export everything as an .exe file at some later date) and would work as follows:
1)Player One picks his country - this determines which other countries are available to the other players (up to 6 due to the 7 nation limit in RtW).
2)Players Two to Seven pick their countries.
- this can be handled by one Python file easily
3)Player One starts a game with his country of choice, assembles his Legacy Fleet and zips the whole save folder to Player Two.
4)Player Two starts a game with his country of choice, assembles his Legacy Fleet and saves the game.
5)Player Two opens a Python file, pastes the file location of his save and of the save that belongs to Player One.
6)The program then imports the coastal artillery, subs, ships and ...d files of Player Two from his save into the save file of Player One.
7)Player Two sends the main, modified save of Player One to Player Three. Players Three to Seven do the same steps as Player Two.
- this can be handled by yet another Python file
8)Now Player One opens a 3rd program. This program will create a copy of the save file sent to Player One by Player Seven.
9)Player One will then play his turn and open a fourth program which will export his ships, designs, coastal artillery and subs to this copied file, export his diplomatic relations to other countries into a helper file, switch the playable country inside the copied file and rename all .d files to work with this change. Player One then sends the copied file to Player Two.
- this requires 2 Python files
Only when Player Seven completes his turn would the main save file "tick" into the next month.
Sea battles would be handled by one player starting the battle and instantly saving the game, opening a program which would create a main battle file, and then proceeding to fight the battle. Another program would be required which would ask the player to enter his and enemy losses into it and assemble a battle helper file. He would then send his opponent the save so that the opponent, too, can fight the battle (after running yet another program to switch sides in the battle save file). The opponent would then enter the outcome of his battle into the program, which would then go through each ship and determine it's fate by a random number generator. On "0" the ships fate would be simulated by the outcome of the 1st battle, on "1" by the outcome of the 2nd battle. Then, this program would export the outcome of the battle into the main save file.
What do You guys think about this? Would You play such a semi-multiplayer mod or is it too much of a hassle to fumble around with 5-6 Python files?
For now, I have coded the nation-picking part [Steps 1-2], and I've already managed to create a little program to switch nations around in the .bcs save file. The next step would be to go through each ship design file and rename its extension to fit the new number given to the switched nation, aswell as to rename the "BuildingNation=X" of each design file accordingly.
N.B. I used the term "program" quite liberally here, many of these "programs" would be Python files with ~20 lines or so.
Having finished my 1st semester in Mechanical Engineering, I now have around 4 weeks of free time to spend on relaxing and refreshing my coding skills.
I have been thinking about creating a Semi-Multiplayer Mod for Rule the Waves. It would require each of it's users to have Python installed on their PCs (for now, theoretically I may implement a half-assed GUI and export everything as an .exe file at some later date) and would work as follows:
1)Player One picks his country - this determines which other countries are available to the other players (up to 6 due to the 7 nation limit in RtW).
2)Players Two to Seven pick their countries.
- this can be handled by one Python file easily
3)Player One starts a game with his country of choice, assembles his Legacy Fleet and zips the whole save folder to Player Two.
4)Player Two starts a game with his country of choice, assembles his Legacy Fleet and saves the game.
5)Player Two opens a Python file, pastes the file location of his save and of the save that belongs to Player One.
6)The program then imports the coastal artillery, subs, ships and ...d files of Player Two from his save into the save file of Player One.
7)Player Two sends the main, modified save of Player One to Player Three. Players Three to Seven do the same steps as Player Two.
- this can be handled by yet another Python file
8)Now Player One opens a 3rd program. This program will create a copy of the save file sent to Player One by Player Seven.
9)Player One will then play his turn and open a fourth program which will export his ships, designs, coastal artillery and subs to this copied file, export his diplomatic relations to other countries into a helper file, switch the playable country inside the copied file and rename all .d files to work with this change. Player One then sends the copied file to Player Two.
- this requires 2 Python files
Only when Player Seven completes his turn would the main save file "tick" into the next month.
Sea battles would be handled by one player starting the battle and instantly saving the game, opening a program which would create a main battle file, and then proceeding to fight the battle. Another program would be required which would ask the player to enter his and enemy losses into it and assemble a battle helper file. He would then send his opponent the save so that the opponent, too, can fight the battle (after running yet another program to switch sides in the battle save file). The opponent would then enter the outcome of his battle into the program, which would then go through each ship and determine it's fate by a random number generator. On "0" the ships fate would be simulated by the outcome of the 1st battle, on "1" by the outcome of the 2nd battle. Then, this program would export the outcome of the battle into the main save file.
What do You guys think about this? Would You play such a semi-multiplayer mod or is it too much of a hassle to fumble around with 5-6 Python files?
For now, I have coded the nation-picking part [Steps 1-2], and I've already managed to create a little program to switch nations around in the .bcs save file. The next step would be to go through each ship design file and rename its extension to fit the new number given to the switched nation, aswell as to rename the "BuildingNation=X" of each design file accordingly.
N.B. I used the term "program" quite liberally here, many of these "programs" would be Python files with ~20 lines or so.