Page 1 of 2

Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 9:17 am
by bags
Is there any interest in a simulator of combat for this game?

I'm working on one. It's currently entirely text based until I get the combat logic working, then I figure I'll make a UI for setting up the scene.

Just curious if anyone would want something like this to mess with or if I'm wasting my time.

Code: Select all
Sub or outpost for player 1?: Sub
Sub or outpost for player 2?: Outpost
Enter base shield: 50
----------------------------
Enter number of drillers for player 1: 50
Enter number of drillers for player 2: 50
----------------------------
Enter the name of a local specialist for player 1: Thief
Enter the name of a local specialist for player 1: Assassin
Enter the name of a local specialist for player 1: done
Enter the name of a local specialist for player 2: Assassin
Enter the name of a local specialist for player 2: done
Enter the name of a global specialist for player 1: done
Enter the name of a global specialist for player 2: done
----------------------------
Player 1 has a sub with 50 drillers.  [Thief, Assassin]
Player 1 has the following global specialists: []
Player 2 has an outpost with 50 drillers.  [Assassin]
Player 2 has the following global specialists: []
----------------------------
Player 1's Thief steals 8 drillers.
Player 1's Assassin kills all of player 2's specialists.

Player 2's Assassin kills all of player 1's specialists.

Player 1 survives with 16 drillers.

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 9:47 am
by aclonicy
I'd love that, although where would I get it?

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 10:20 am
by bags
aclonicy wrote:I'd love that, although where would I get it?


I'm writing it atm, I guess I'll look into making it embedded in a web page or something? Not sure, I am not that learned in web development. Regretting not taking that project class in uni now.

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 11:12 am
by rlin81
I think a lot of it may be able to be done in a spread sheet google spread sheet for example.

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 11:22 am
by v3xt
What are you writing this in? I'd considered coding a simulator on my own, but I haven't had an excessive amount of free time. The thing about creating a simulator though is that I'd want it to be able to do more than just a basic battle simulation, as that can already be achieved in game pretty easily. I'd like to see a simulator that takes into account sentry fire and allows you to plan what would happen if an opponent launched multiple subs, or 2 opponents launched subs at you. It would need some kind of GUI. I'd code my own, but I'm not really sure how to recreate the Time Machine, and I think that would be a critical component.

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 11:59 am
by bags
v3xt wrote:What are you writing this in? I'd considered coding a simulator on my own, but I haven't had an excessive amount of free time. The thing about creating a simulator though is that I'd want it to be able to do more than just a basic battle simulation, as that can already be achieved in game pretty easily. I'd like to see a simulator that takes into account sentry fire and allows you to plan what would happen if an opponent launched multiple subs, or 2 opponents launched subs at you. It would need some kind of GUI. I'd code my own, but I'm not really sure how to recreate the Time Machine, and I think that would be a critical component.


Well sentry fire is really easy to take into account, since it's 5% damage. I have no interest in re-writing their game as a sandbox mode, I just figured I'd make something to simulate combat since I've seen people ask for that before on the forums.

I don't think it would be too challenging to do multiple sub combats, because I could just take the result of the first combat, then run the simulation method on the other subs and keep going until all subs have fought.

Also, it'd be helpful for people with complex battles with lots of global/local specialists if they could post the combat summary according to the game so I can test the accuracy of my simulation :)

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 3:20 pm
by v3xt
I know sentry fire isn't complicated on it's own, but it could be confusing if the sentry had multiple subs inside it's range. Also, and this might be complicated, it would interesting if you could have the simulator make basic assumptions about what your opponent might do to counter your attack. i.e. "If opponent promotes to King, you will lose"

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 3:23 pm
by bags
v3xt wrote:I know sentry fire isn't complicated on it's own, but it could be confusing if the sentry had multiple subs inside it's range. Also, and this might be complicated, it would interesting if you could have the simulator make basic assumptions about what your opponent might do to counter your attack. i.e. "If opponent promotes to King, you will lose"


That doesn't seem too complicated, all I'd have to do is if you win the fight with a certain number of drillers (10, enemydrillers/3) point out that if they had a king or general, you'd lose. That's a good idea though, I've been surprised by a king a few times without thinking of the possibility.

Code: Select all
Sub or outpost for player 1?: Sub
Sub or outpost for player 2?: Sub
----------------------------
Enter number of drillers for player 1: 50
Enter number of drillers for player 2: 48
----------------------------
Enter the name of a local specialist for player 1: Assassin
Enter the name of a local specialist for player 1: done
Enter the name of a local specialist for player 2: Assassin
Enter the name of a local specialist for player 2: done
Enter the name of a global specialist for player 1: done
Enter the name of a global specialist for player 2: done
----------------------------
Player 1 has a sub with 50 drillers.  [Assassin]
Player 1 has the following global specialists: []
Player 2 has a sub with 48 drillers.  [Assassin]
Player 2 has the following global specialists: []
----------------------------
Player 1's Assassin kills all of player 2's specialists.

Player 2's Assassin kills all of player 1's specialists.

Player 1 survives with 2 drillers.

Player 1 would have lost if Player 2 had upgraded to a General
Player 1 would have lost if Player 2 had upgraded to a King


There, added.

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 3:30 pm
by v3xt
It would be more complicated if you wanted to make it thing of more abstract things (hiring a smuggler and moving a martyr in from far away). For simpler things you could cover what would happen if a General, or War Hero was present, and maybe if an inspector arrived?

Re: Any interest in a combat simulation?

PostPosted: Mon Jan 25, 2016 3:34 pm
by bags
v3xt wrote:It would be more complicated if you wanted to make it thing of more abstract things (hiring a smuggler and moving a martyr in from far away). For simpler things you could cover what would happen if a General, or War Hero was present, and maybe if an inspector arrived?


The Martyr thing would depend on the distance they had to ferry it. As a joke I could have it always point out that a martyr could be ferried in, but that seems rare enough to leave out.

War hero and inspector seem easy enough to account for.