.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 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old June 5th, 2005, 12:54 PM

The_Paladin The_Paladin is offline
Private
 
Join Date: Jul 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
The_Paladin is on a distinguished road
Default New Map Utils For Dom2 - Now Available

Dominions 2 Genesis Forge Pack Utilities Version 0.7 Beta is now available for download as an attachment to this post. Read the rest of the thread for details.

--- Original Message Follows ---

About a month ago I returned to this great game and it has been consuming much of my free time since (*sarcastically* thanks shrapnel ). Largely I returned because of Zen's and SaberCherry's excellent mods - practically a new game to learn again since a small change causes such a ripple effect in a complex game like dominions.

Anyways I developed a few utils for my personal use on my LAN. If the community is interested, I will iron out the bugs in them, enhance them a bit, and make them available.

Mostly these utils are for SP or CO-OP MP play though I could see use of them for imposing handicaps in regular MP.

The first is a util that takes a Dom2 map, randomly places all the specified nations on the map, and enhances those specified as computer players by giving them a specified number of extra provinces and extra castles in those provinces. Of course the computer provinces are in blocks (not just randomly across the world) and in the proper location (i.e. water nations in the water - though I have allowed the extra provinces to be outside the water or visa-versa for land nations). The util is practically ready for release save that it has a bug that I have been too lazy to fix but as I said if people show interest I will get off my lazy butt... sit back on my lazy butt ... then get to work.

The second is a util intended to further enhance the computer (again though could be used for handicapping humans) by creating a custom mod on the fly for each of the computer nations. At the moment this involves giving all of their national units a supplybonus (for obvious reasons), extra gem income by adding sites to their capital, and all their mages a research bonus (I tried giving them sages as a national commander but the... ever clever computer... wouldn't recruit them).

The third utility is an extension of sorts of the second but in this instance creates another random mod for each of the specified nations that gives them, based on user-specified data, additional abilities either chosen specifically or at random (note for clarity - not all nations get the same abilities - they are chosen on a nation-by-nation basis). Currently my list of such abilities for a nation is:

Note: when I specify something like [+2, +5, +7] it means the ability can be selected from either 2, 5, or 7.

- National troops gain +100 shock resistance
- National troops gain +100 fire resistance
- National troops gain +100 ice resistance
- National troops gain +100 poison resistance
(For these I would like to specify increments but presently modding doesn't allow that it seems)

- National troops gain [+3, +6, +9] to any of their stats
(HP, PROT, MR, STR, DEF, MOR, etc, etc).

- National commanders get standards
- National mages / commanders gain [+1, +2, +3] random magic skill picks
- National troops gain recuperation
- (Some) National troops gain regeneration
- (Some) National troops become ethereal
- (Some) National troops gain immortality
- Nations gain additional troops to recruit (hehe... I once had Ermor able to recruit immortal VQs... that was funny... until they whipped me with them).

Anyway I have a few others I'm sure I've forgotten but I'm sure people get the just of it. Utils 2 and 3 at present I manually change code for but again if interest is shown I will enable them to use a configuration file... if I'm really ambitious I might even make the abilities able to be configured by the user.

To me it makes the AI much more interesting and my CO-OP games certainty much more challenging. Util 1 means you see tons more national troops and Util 2 and 3 give you kind of interesting problems to deal with. For example I was playing as Caelum and Ulm... of all people... gained both cold and shock resistance. That was nasty and I had to resort to flaming arrows to even dent them. And another game I modified the storm spell to a low level without gem or fatigue requirements and every air nation was using storms all the time (just like humans ).

So if you are interested please post and let me know.

Oh and BTW for utils 2 and 3 I use the Recruitable Rebalance mod as a basis for the units before changes. So if I do go ahead with this I would feel obligated only to do so with SaberCherry's permission. So if you happen by SC, let me know if that's ok with you.
Attached Files
File Type: zip 357480-D2GenFor.zip (89.3 KB, 231 views)
__________________
-Paladin
Reply With Quote
  #2  
Old June 5th, 2005, 01:10 PM
Boron's Avatar

Boron Boron is offline
Lieutenant General
 
Join Date: May 2004
Location: Bavaria , Germany
Posts: 2,643
Thanks: 1
Thanked 0 Times in 0 Posts
Boron is on a distinguished road
Default Re: New Map Utils For Dom2

Wow your utils sound ultranice .
Please publish them. In a few weeks zen will release his nation mod too so you may have to base your tool 2+3 maybe upon Zen's nation mod too
Reply With Quote
  #3  
Old June 5th, 2005, 04:59 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: New Map Utils For Dom2

Nice work. What do you write in?

They sound close to the stuff Ive done on my site www.dom2minions.com or that Leif did on his (hmm I forget the site but Im sure its in the links page on mine)

Check them out. Most of mine are half-done unfinished projects. Feel free to snatch and comlete them. Also if you want to set something up for a nightly re-generation and download I can set something up for you
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #4  
Old June 5th, 2005, 11:57 PM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default Re: New Map Utils For Dom2

Using any of my work is fine with me, Mr. Paladin They sound like neat utilities! I only wish I had thought of something like that. I loved the feeling in Master of Magic and Age of Wonders for the first few games, when the capabilities of all the races were mysterious and scary...
__________________
Cherry
Reply With Quote
  #5  
Old June 6th, 2005, 12:03 AM

The_Paladin The_Paladin is offline
Private
 
Join Date: Jul 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
The_Paladin is on a distinguished road
Default Re: New Map Utils For Dom2

The original post has been edited and the first utility attached to it. I have tested it on both the Orania and Faerun maps it seems to work fine. However please let me know if you have any problems or any other comments / suggestions. The attachment contains a Windows executable, config file, and readme.

Installation is pretty simple - just extract the Zip to your Dominions 2\Maps directory and read the readme.txt for further instructions.

I will begin working on finalizing the other two utils as well but they will take longer than just an afternoon as this did. When they are done I will post them here.

I did not know about Zen's upcoming unit balance mod but I may look into that when the time comes as well. Thanks Boron.

Gandalf, I wrote the code in C++. I knew you had done work on random map generation before but I didn't know about all the other projects. It seems to me I've heard about Leif's work as well. At any rate I would say that my utils are in spirit close to your Semi-Random map thoughts you proposed in one of your links. Ironically enough I originally called my util DomMap before I realized that's the exact same thing you have on your site. I temporarily changed my to DomMapMod and when I get the others to a point I'm happy with them, I'll combine all three into a more unique name to prevent confusion.

If people are interested in my utils and once they get out of beta stage I may take you up on the offer to set up a regeneration download. For the time being though if you want to just host my file as well it would be appreciated.
__________________
-Paladin
Reply With Quote
  #6  
Old June 6th, 2005, 12:09 AM

The_Paladin The_Paladin is offline
Private
 
Join Date: Jul 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
The_Paladin is on a distinguished road
Default Re: New Map Utils For Dom2

Thanks SaberCherry . For utils 2 & 3 I'll probably include a copy of your Recruitable Rebalance mod in the zip as I'll be using it as kind of a null / base unit mod in which to insert the new abilities at random.
__________________
-Paladin
Reply With Quote
  #7  
Old June 6th, 2005, 10:05 AM
Endoperez's Avatar

Endoperez Endoperez is offline
National Security Advisor
 
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
Endoperez is on a distinguished road
Default Re: New Map Utils For Dom2

I was planning to make a program that also edits DomII maps, and posibly mods too. I had different goals, like making independent nations (amazon provinces, new inpeds, indeps ruled by other units (like Lizards ruled by C'tissians)) etc. Also special provinces in spesific terrain that would have site/nation combinations.

Unfortunately, I only know Java. My holiday just started, and I was just about ready to start working on it, both to train my skills in Java and to have a useful util. Would you mind if I asked you for some help, spesifically, how does your program spesify those "blocks"?
Reply With Quote
  #8  
Old June 6th, 2005, 10:33 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: New Map Utils For Dom2

Im thinking it could be done by reading in the #neighbor lines to an array. Choosing any province with more than 4 neighbors, and then making it and all of those neighbors into a "nation", might give good results.

Anything done in Java or C++ I guess would run on my server if it has a non-gui run mode and doesnt do anything too Windows specific. So if you want to have a util that creates a "new fresh scenario every day for download" we can set that up easily.

I was considering that a master utility could take all the time it wants to "think" about things if it runs that way. And the DomMap maps arent TOO bad with A LOT of switches so if you figure out a formula that fairly often generates a map that has patterns and colors you like. Then you could run a map, rework the .map file, add a .mod file, and zip up the whole thing. Even if it sucks you can redo it every day which makes it worth checking on. Seems to work for my site.

Gee you guys make me consider getting back into my projects. My data files would be compatable even if my code isnt (I do mine in Basic)

Gandalf Parker
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
Reply With Quote
  #9  
Old June 6th, 2005, 10:48 AM
Endoperez's Avatar

Endoperez Endoperez is offline
National Security Advisor
 
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
Endoperez is on a distinguished road
Default Re: New Map Utils For Dom2

I have also considered making an Applet out of it, so that you could choose the parameters for a random map to a server. It would still need the 100+mb download of Java Runtime Edition.
Reply With Quote
  #10  
Old June 6th, 2005, 12:21 PM

The_Paladin The_Paladin is offline
Private
 
Join Date: Jul 2004
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
The_Paladin is on a distinguished road
Default Re: New Map Utils For Dom2

My utils have no GUI component at the moment (and probably never will since they are quite a few options especially in the later two that would prove extremely time consuming to guify). Also since the functions I use are Windows console functions they are essentially all old DOS routine type stuff that is emulated or has equivalents under Linux / Unix (like printf, fopen). So I don't see OS compatibility as being a problem.

To Endoperez, Gandalf and anyone else who is interested I would be happy to help if I can with your projects. For anyone else who does not care about programming please feel free to skip this - you have been forewarned .

About Java - I do know Java though I don't much care for it... Its very similar to C++ though just lacks the performance I need for my RL work. I would hesitate to use an applet for the reason you have suggested - the massive download and for the operations you need they are fairly portable from machine to machine unless you are intending to provide a GUI component in which case then yeah there will be some issues with compatibility.

Its been a while now but I believe if you use regular interpreted Java you can often embed a small version of the interpreter inside the executable. Depending on how fancy the functions are you use, the required interpreter is often small enough to offer downloads with. I believe also that MS's J++ or Borland's... something or other that escapes me... they allow you to create a Intel compiled version as opposed to an interpreted version. I remember doing that once. That should allow your program to run on anything save Macs. You might not want to shell out the large dollars though for J++. Worse case scenario though most simple Windows-based Java programs can be readily converted to C++ with only changing the entrypoint function and a few function calls. Before I start rambling too much though I better move on.

The readme.txt file gives a little more info as to how I formed the blocks but in more detail essentially Gandalf is mostly right. I use arrays of two structure types, Province and Nation, which contain:

Province:
TerrainType
Available
NeighbourArray

Nation:
TerrainType
OwnedProvinces

Procedure:

1) Create an array of provinces by reading in the #terrain statements from the .MAP file. That also allows me to detect their type so the water nations can be put below the sea. I set the terrain type and available flags in the province structure appropriately.

2) Search again the .MAP file (technically this is done within step 1 but for clarity I separated them) for #neighbour statements. For each such statement, add the neighbour province to the other province's NeighbourArray. For example if the statement was #neighbour 3 12, province 3's neighbour array structure would add province 12 and province 12's structure would add province 3.

3) For each nation participating on the map, I randomly choose a province (generate a random number and choose it). I make sure the nation's terrain preference matches the selected province (water for water, land for land) and if so add that to a list (or array) of the nation's owned provinces. Within the province structure, I now set the available flag to false. If not just repeat until a match is found.

4-a) Again for each nation create a list of current neighbours to the owned provinces. This is the key to forming the blocks. That is accomplished by examining the current list of owned provinces the current nation and forming a master list of all potential neighbours. For each owned province, all members of their individual neighbour list are added to the master list. Essentially it is the union of the owned province's neighbour sets. Duplicates are fine as I will deal with them later.

4-b) Taking the master neighbour list, randomly (random number) choose a province amongst them. If that province is available (i.e. its flag indicates that it is), then add it to owned province list and mark it as unavailable. If not repeat step 4-b until a province can be assigned. Once a province is assigned return to 4-a until all additional provinces are assigned for that nation. Then repeat for all other nations.

That's it essentially. I've left out some details that would detract from the point but essentially this is it. Oh and about duplicates in the master neighbour list. I like them as they occur only if more than one owned province neighbour the same un-owned province. That encourages creating blocks of provinces as opposed to a snake like shape. And its ok to add provinces to that list that are already owned by someone, as the available flag will not be set.

I think this should answer your question but if its not clear just let me know. Sorry for the math / programming - I'm a grad student in the middle of writing my PhD thesis so I'm kind of used to writing like this these days.
__________________
-Paladin
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 02:45 AM.


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