Warning: Illegal string offset 'type' in [path]/includes/class_postbit.php(294) : eval()'d code on line 65
prototype SK-creating algorithm - .com.unity Forums
.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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old December 30th, 2010, 06:31 PM

Kref Kref is offline
Corporal
 
Join Date: Oct 2009
Location: Moscow
Posts: 86
Thanks: 0
Thanked 6 Times in 2 Posts
Kref is on a distinguished road
Default prototype SK-creating algorithm

Hello!
I've developed a program with prototype algorithm for SK-creating.
It is written with Borland Delphi 7, and use databade technologies (ms access 2003). I think installed BDE (borland database engine (installs automatically with delphi 7 or may be downloaded independently for free)) is required to run this program.

The algorithm searches for all combinations of equipping given chasises with given items, then searches for a spell-sequence that would make combatant satisfy the requirements. It is possible to upgrade the algorithm for searching all spell-sequences for each item combination.

The checking of combatant satisfaction is made in CheckCombatantSatisfactory and RecursSpellSeqStch procedures (they can be inspected even with notepad in ucombatantcreation.pas file). The important things about the checkings - they can be easily modified (and should be, because I didn't spent any time long to think, for example, about how to change 'general attack' or 'general damage' parameters of SK if he has soul vortex and so on); the checking may be replaced with "battles" of planned SK with some forces.

The database is filled with a minimal amount of data, including units, items and spells. That data can be copied from other sources, which I don't currently have.

The program has some currently unused code (I cutted functionality when I saw that I spent more time then I planned).

The algorithm is time-consuming. It can be made more quick, but it would require work, and it still won't work fast.

The algorithm, being modified and upgraded, can be used to make calculations and store data in database on thug creation for each mod, so that AI could create thugs without time-spending during thew game, by the cost of some disk spase. For that, battle-simulation algorithm should be added. How it can work:
- database should store units type and numbers for PD (10 and 20, for example) of each nation of the mod
- all recruitable and summonable commanders of current nation should be taken as possible chasises
- all forgeable items (by recruitable/summonable commanders) should be taken as existing items
- algorithm should automatically calculate possible thugs that can crush PD of different nations
- technology and cost requirements for each thug should be calculated and stored in different cross-tables of mod database.
Then, during runtime, AI would be able to simply look in database for thugs which he can create at cuyrrent research level.
Also, AI that calculate PD-breaking thugs can be extended - for example it can use a part of AI that hires army. By the same methods, it's not hard to imagine an algorithm that would calculate SC's for destroying, for example, 4000 gold and 4000 resourses costed army of each nation (it would need to use an AI algorithms that recruite armies and assign orders to mages, in order to see which army SK should be able to crush).

Well, that work was made to show that advancements in AI are quite possible.
One of the ways to get more sofisticated AI - open savedgame file formats (ftherlnd, .trn, .2h) to community. Then it would be possible to make independent AI programs for making 2h files, then run multiplayer games and then use that programs for computer players.

P.S. I didn't test bdesetup, because I don't know how to uninstull already installed BDE without uninstalling Delphi 7.
Attached Files
File Type: rar dom3dev.rar (647.7 KB, 79 views)
File Type: rar bdesetup.rar (4.69 MB, 82 views)
Reply With Quote
The Following 5 Users Say Thank You to Kref For This Useful Post:
 

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 05:56 PM.


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