.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)

Larz June 29th, 2012 02:22 PM

Single Player Improvement
 
1 Attachment(s)
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:

Attachment 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).

Valerius June 29th, 2012 03:27 PM

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.

Gandalf Parker June 29th, 2012 04:21 PM

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.

earcaraxe June 30th, 2012 03:46 AM

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.

Admiral_Aorta June 30th, 2012 05:19 AM

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

Fantomen June 30th, 2012 09:54 AM

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.

Gandalf Parker June 30th, 2012 10:53 AM

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

Fantomen June 30th, 2012 02:50 PM

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.

Ragnarok-X July 1st, 2012 10:20 AM

Re: Single Player Improvement
 
Seems like a very very good tool.

jimbojones1971 July 2nd, 2012 02:57 AM

Re: Single Player Improvement
 
Quote:

Originally Posted by Admiral_Aorta (Post 807417)
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. ;)


All times are GMT -4. The time now is 05:01 PM.

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