.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening

Reply
 
Thread Tools Display Modes
  #1  
Old June 29th, 2012, 02:22 PM

Larz Larz is offline
Corporal
 
Join Date: Feb 2010
Location: Cary, NC
Posts: 56
Thanks: 1
Thanked 51 Times in 16 Posts
Larz is on a distinguished road
Default Single Player Improvement

I know that Single Player is kind of the red-headed stepchild of the Dominions community, but I still occasionally like to play a SP game. To make the AI more of a challenge I have been using the SemiRand program to create games with more intelligent AI pretenders. I have had some problems getting it to work the way I want, plus I had ideas for other ways to improve the AI that weren't supported, so I wrote a utility to create SP games that are a little more challenging.

I wanted to guide the AI away from making stupid choices, so I took the idea of the pre-made pretenders from SemiRand and added the ability to create custom mods that can improve the chances of the AI making good choices. I haven't really explored the possibilities very deeply except for modding the AI nations to remove sub-optimal units (to get the nation to concentrate on sacred units when using a bless strategy for instance).

This utility also removes or limits independent units (through either No-Indy maps, Partial-Indy maps or the Better Independents mod) to keep the AI from fielding hordes of useless chaff. Optionally, you can set up random teams of nations allied against you. This will keep the AI nations from killing each other off while you just sit there.

Also, you can limit the magic levels available to 6th, 7th or 8th to help out the AI since it does not use high level magic effectively. When limiting magic you can choose whether or not to use Vanilla or CBM(1.94). If you choose Vanilla, gem gems will get removed. No matter what level or type of magic restriction you use ALL global enchantments will also be removed. The reason for these changes is that the AI can't effectively use gem generators or global enchantments(casting or dispelling). This utility also supports adding mod nations to the mix of allowable nations (though you will have to create at least one pre-made pretender for it if you choose the AI to use it).

The goal of this utility is to create more enjoyable SP games, not to provide a multi-player testbed. The games created will be unbalanced and you will see some crazy stuff. Don't use any skills gained in winning these games in MP games.


To summarize here are the features of this utility:

- Intelligent pretenders/scales for AI opponents.
- Ability to generate No Indy maps (or Partial Indy, or use the Better Independents Mod) to reduce the AI tendency to use hordes of useless chaff.
- Ability to restrict magic to 6th/7th/8th level since the AI does not effective use high level magic.
- If magic is restricted (which I recommend) than ALL Global Enchantments will be removed and all gem generators will be removed.
- Can use CBM along with the restricted magic.
- Create teams of AIs for you to fight so they won't all kill each other off and will instead work together against you.
- Support for mod nations.
- Support for small mods tied to specific nations and pretender builds to give the AI some help or steer it toward a specific strategy.

NOT supported:

- Water nations (the AI has trouble going into and out of the water so water nations seem pointless to a fun SP experience)

There are a limited number of premade pretenders for each nation (most stolen from the excellent SemiRandom utility). It would be great if others could contribute effective builds for the AI and mod snippets that may help them. No need to worry about design points, it's OK for the AI to cheat (you could create a dom10, all 10s in magic perfect scales build). The mod snippets are tied to a specific pretender build so they can be used to support a particular strategy. If anyone has any other ideas for improving the AI let me know.

One thing I have found helpful is to use the --comptrn switch when testing dom3. This will let you see all of the AIs turns so you can see how the AI "thinks".


Here is a screenshot of the application:

Click image for larger version

Name:	Capture.jpg
Views:	316
Size:	48.5 KB
ID:	12215

Instructions:
First, point to your dom3 executable, then choose whether you want to use an existing map or generate a random map. Look in the settings.txt file for the look-and-feel settings for generated random maps. Next, choose the Era and nation you which to play. the choose the AI nations. You can either select a number of random nations or choose specific nations from a list. You can then choose the difficulty and whether you want there to be teams of allied AI nations. Then choose whether you want there to be no recruitable independents or you want to use the Better Independents mod. (I prefer no independent but if you just can't live without independent commanders use the BI mod). Then you can choose a magic restriction level if you wish.

Just press "Generate Game" and a map and a custom mod (if needed) will be created. You can then directly launch dominions and the correct map and mod will automatically be loaded (or you can launch yourself, just note the names of the map and mod file). Then once Dominions is launched just generate a new game, add the players (just leave at random, they will get set correctly), and choose your nation. You are now good to go.

Here are links to download this utility for Windows/Linux/Mac.

Windows:
http://dom3editor.googlecode.com/files/dom3ai_win.zip

Linux:
http://dom3editor.googlecode.com/fil...i_linux.tar.gz

Mac:
http://dom3editor.googlecode.com/files/dom3ai_mac.zip


The source code for this is open and located at https://github.com/larzm42/Dom-3-AI (if you are interested).
__________________
Try the dom3editor for easy Dominions 3 mod creation.

Last edited by Larz; January 17th, 2013 at 02:56 PM.. Reason: New release
Reply With Quote
The Following 8 Users Say Thank You to Larz For This Useful Post:
  #2  
Old June 29th, 2012, 03:27 PM

Valerius Valerius is offline
Major General
 
Join Date: Mar 2007
Posts: 2,046
Thanks: 83
Thanked 215 Times in 77 Posts
Valerius is on a distinguished road
Default Re: Single Player Improvement

Interesting idea, thanks for doing that. Aside from test games I only play MP but I suspect the majority of Dom players are SP gamers.

Given my MP focus I'll never get around to doing this (and even if I did I wouldn't have a program to generate things on the fly like you do) so this might be a good place to mention some ideas I had to help the AI.

Taking the idea of limiting the AI's ability to make bad decisions a little further it occurred to me that it could be helpful to have AI friendly nation lineups.

Taking Niefel as an example, the AI friendly version of the nation might have:

Niefel giants have reinvig 2 and 5% regen
Some commanders would autocast divine bless, others might autocast grip of winter
Units that the AI will not use effectively will be removed or boosted so they are effective (since you don't have to worry about a human player abusing them you have a lot of freedom to make unit changes)

So for each game a mod would be compiled using AI friendly nations for all nations except the player's (if it's a coop game then you could specify more than one nation to not use the AI friendly version).

Note that the idea wouldn't be to create AI nations that can crush human players but to limit the AI to choices that are effective and thematic in order to create a fun more experience for the player.

Ideally there would also be a random element in place during pretender creation combined with some rules. For instance, a nation might have a rule that it can't take more than Sloth 2 and Death 1 and perhaps have a minimum dominion of 6. So it would be prevented from making bad decisions but at the same time there is an element of surprise on each play through. You may know that the AI friendly Niefel has that reinvig 2 and 5% regen on Niefel giants but this time around the AI took some N magic to boost the regen even more and some F magic so those giants might land hits and not just rely on their cold auras.
Reply With Quote
  #3  
Old June 29th, 2012, 04:21 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Single Player Improvement

Kindof an all-in-one? A one-stop for all the AI improvements? Sounds good.
Id rather have seen SemiRand work for intelligent gods. Plus it had other features for improving solo play. Otherwise you are trading one type of predictable behavior for another.
EDIT: they are the semirand gods? good move

If the program can generate NI maps then why not generate PI maps? Allow setting a percentage. I prefer 1 to 10 so that most of the provinces are no-recruit but it still allows for some provinces to offer nice surprises. It still forces the AI to use much less indepts. And it makes those recruitable sites prime real estate.

How about random scattering of castles with inside and outside defenders? And PD? random labs and temples appropriately guarded?

How about an option to sprinkle the map with magic items? How about an option for 100% magic sites? How about surprise units scattered out?

Will the maps go up to 1495? will the have new color options? the Sepia option of Elmokki's maps would go over well.
EDIT: colors are in the settings file. Never mind.

Last edited by Gandalf Parker; June 29th, 2012 at 04:30 PM..
Reply With Quote
  #4  
Old June 30th, 2012, 03:46 AM

earcaraxe earcaraxe is offline
Captain
 
Join Date: Mar 2010
Location: Budapest
Posts: 831
Thanks: 115
Thanked 8 Times in 8 Posts
earcaraxe is on a distinguished road
Default Re: Single Player Improvement

one trick i have been using when playing SP is to mod all the AI nations mages research bonus to maximum (30), so the AI wont lag behind in research and will use soome high level spells.
Reply With Quote
  #5  
Old June 30th, 2012, 05:19 AM

Admiral_Aorta Admiral_Aorta is offline
Second Lieutenant
 
Join Date: Dec 2010
Posts: 517
Thanks: 17
Thanked 35 Times in 24 Posts
Admiral_Aorta is an unknown quantity at this point
Default Re: Single Player Improvement

Quote:
Will the maps go up to 1495?
also will the new maps hit me in the face with a hammer, this is vital to my player experience
Reply With Quote
  #6  
Old June 30th, 2012, 09:54 AM
Fantomen's Avatar

Fantomen Fantomen is offline
Major
 
Join Date: Feb 2009
Location: Me a viking
Posts: 1,012
Thanks: 81
Thanked 122 Times in 73 Posts
Fantomen is on a distinguished road
Default Re: Single Player Improvement

Any possibility to compile a mac version? Or maybe we could try and make a wrapper for it...

Sounds super nice.

Frosted on dom3mods also mentioned that it is theoretically possible to make a truly better AI by setting all players human, and creating a program that plays all nations except one for you. In theory, such a program could be implemented in a dom3 server, but making it would require lots of work, AI programming experience and possibly reverse engineering the game in the process, which isn't legal. So it's just an idea, but possible. A sort of robot dom player.
Reply With Quote
  #7  
Old June 30th, 2012, 10:53 AM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default Re: Single Player Improvement

I love the idea of a robot dom player because it totally lays out the basic problems of trying to improve the AI
Reply With Quote
  #8  
Old June 30th, 2012, 02:50 PM
Fantomen's Avatar

Fantomen Fantomen is offline
Major
 
Join Date: Feb 2009
Location: Me a viking
Posts: 1,012
Thanks: 81
Thanked 122 Times in 73 Posts
Fantomen is on a distinguished road
Default Re: Single Player Improvement

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 This is only possible by either reverse enginering the game or in cooperation with illwinter. No idea what they would say, but it would be very nice.

Since they are okay with people ripping the graphics from CEO3 to make mods for dom3 and so on, they might have no problem with someone hacking the game to make a useful addon.
Reply With Quote
  #9  
Old July 1st, 2012, 10:20 AM
Ragnarok-X's Avatar

Ragnarok-X Ragnarok-X is offline
Major General
 
Join Date: Jan 2004
Location: Germany / Bielefeld
Posts: 2,035
Thanks: 33
Thanked 18 Times in 12 Posts
Ragnarok-X is an unknown quantity at this point
Default Re: Single Player Improvement

Seems like a very very good tool.
Reply With Quote
  #10  
Old July 2nd, 2012, 02:57 AM

jimbojones1971 jimbojones1971 is offline
First Lieutenant
 
Join Date: Jan 2011
Posts: 754
Thanks: 72
Thanked 12 Times in 11 Posts
jimbojones1971 is on a distinguished road
Default Re: Single Player Improvement

Quote:
Originally Posted by Admiral_Aorta View Post
Quote:
Will the maps go up to 1495?
also will the new maps hit me in the face with a hammer, this is vital to my player experience
Not sure if the game will, but I could possibly help? To value add the experience, I will also be wearing a kilt and playing a ukulele with my feet at the same time, and riding a unicycle.

This still won't get you beyond 1495 provinces, but after the first few hammer blows you won't be able to count beyond 10 so it will FEEL like a very large number.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 09:31 AM.


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