.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Dominions 3: The Awakening (http://forum.shrapnelgames.com/forumdisplay.php?f=138)
-   -   Utility: Single Player Improvement (http://forum.shrapnelgames.com/showthread.php?t=48954)

JonBrave July 3rd, 2012 04:18 PM

Re: Single Player Improvement
 
Quote:

Originally Posted by Fantomen (Post 807447)
Well, basically it would require a program that could decipher .trn files properly, and then output a correct 2h file. Or in other words, mimic the game client

I don't get this. I understand you're proposing an external program to read in the .trn files, then have a think like an external human player and produce its own move. That's just some AI, shouldn't be too difficult. What I don't get is: how are you going to get the external program to actually click the buttons and drag the units to do its move and so produce the 2h file? That seems much harder....

Gandalf Parker July 3rd, 2012 04:32 PM

Re: Single Player Improvement
 
Personally I think it would be easier with a macro program which is designed to do that very thing. They are usually used by advanced players in online games. Particularly online worlds to do the "grinding" (doing the same task repeatedly to gain levels). Macro recording software are designed so that you can write extensive files that will play the game for you. Then it runs on top of your game doing the mouse moves, the clicks, hitting the keys, etc. This way you could concentrate on the player part, and leave things like files and file transfer to host for the Dom3 game to do. No mucking around internally

My personal favorite is AutoHotKey which I use to give Dom3 capabilities that the devs havent put in. Most wouldnt call me a programmer but I have gotten it to do some fun things. I think a programmer could do quite abit with it.

http://www.autohotkey.com/docs/commands.htm

momfreeek July 3rd, 2012 05:25 PM

Re: Single Player Improvement
 
Trouble is, autohotkey is not good at collecting information from the game. It would be a fraught task to program the collection of all the information needed by the AI to make decisions (reading the screen, counting troops, reading army reports). Probably easier to rebuild a picture of the gamestate from binary data in the save file (not thats its simple.. I've no experience of reverse engineering).

It might be realistic to use autohotkey or similar to give orders. With all the information down to commander numbers it should be relatively straight forward to predict the layout of the interface.

Gandalf Parker July 3rd, 2012 05:53 PM

Re: Single Player Improvement
 
Glean info from the debug log?

Soyweiser July 3rd, 2012 06:21 PM

Re: Single Player Improvement
 
Quote:

Originally Posted by JonBrave (Post 807688)
Quote:

Originally Posted by Fantomen (Post 807447)
Well, basically it would require a program that could decipher .trn files properly, and then output a correct 2h file. Or in other words, mimic the game client

I don't get this. I understand you're proposing an external program to read in the .trn files, then have a think like an external human player and produce its own move. That's just some AI, shouldn't be too difficult. What I don't get is: how are you going to get the external program to actually click the buttons and drag the units to do its move and so produce the 2h file? That seems much harder....

You are joking right? The external program just generates the .2h file.

Gandalf Parker July 3rd, 2012 07:15 PM

Re: Single Player Improvement
 
We really should split this conversation to its own thread, and return this thread to the OT about his excellent program.

jimbojones1971 July 3rd, 2012 10:13 PM

Re: Single Player Improvement
 
First up, I've had a play with the program - it works very nicely, so thanks :-)

I'd really like to be able to easily include CBM in particular. The ability to include other mods would be a nice bonus, though. I will have a look and see if I can work out how to do this for myself in case you don't have time.

Quote:

Originally Posted by JonBrave (Post 807688)
Quote:

Originally Posted by Fantomen (Post 807447)
Well, basically it would require a program that could decipher .trn files properly, and then output a correct 2h file. Or in other words, mimic the game client

I don't get this. I understand you're proposing an external program to read in the .trn files, then have a think like an external human player and produce its own move. That's just some AI, shouldn't be too difficult. What I don't get is: how are you going to get the external program to actually click the buttons and drag the units to do its move and so produce the 2h file? That seems much harder....

Basically, they are "externalising" the AI logic. The flow goes something like this:

1) Dom3 server generates .trn file
2) "Robot Artifical Intelligence (AI)" reads .trn file to understand the current situation
3) "Robot AI" decides on moves based on step 2) - hopefully in a cleverer, or at least different, fashion to what the internal Dom3 AI does
4) "Robot AI" generates .2h file containing its moves
5) File is submitted to the Dom3 server

At the moment, you as a player do steps 2) through 4) using the Dom3 client. But in the proposed solution, the Dom3 client never comes into play - the external "Robot AI" does all of that, without ever opening Dom3 - thus no need to touch buttons, move things etc.

This is being proposed as a way of allowing the current AI in Dom3 (which some people have an issue with) to be replaced, without having to modify the actual Dom3 code base.

I personally think that this is an excellent idea. It does of course depend on having a good understanding of the formats for both .trn and .2h files, but since it doesn't remove the need for Dom3 licences from a player's perspective I am cautiously optimistic that it would be OK with the devs (never having dealt with them in person).

Fantomen July 4th, 2012 01:08 PM

Re: Single Player Improvement
 
I believe the one major benefit would be that you could integrate it into a server, like llamaserver, and have it take care of abandoned nations in mp games without actually turning them ai, so if you find a sub you just switch back to human control. It could work as easy as having a specific mail account for the robot, like domrobot@exampleserver.net, which you assign to abandoned nations rather than turning ai.

JonBrave July 4th, 2012 04:26 PM

Re: Single Player Improvement
 
The external AI program will never get written. Without the actual codebase of the real Dom3, the amount of work you'd have to do just to generate consistently legal moves would be huge, before you even get to producing a sensible and better AI opponent. Or, Andy Murray could win Wimbledon this year.

jimbojones1971 July 5th, 2012 04:51 AM

Re: Single Player Improvement
 
Quote:

Originally Posted by JonBrave (Post 807850)
The external AI program will never get written. Without the actual codebase of the real Dom3, the amount of work you'd have to do just to generate consistently legal moves would be huge, before you even get to producing a sensible and better AI opponent. Or, Andy Murray could win Wimbledon this year.

Most likely correct. It is still a good idea, however.


All times are GMT -4. The time now is 03:23 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.