.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Mod: DomModGen (AnyAny/IndyFunPits) (http://forum.shrapnelgames.com/showthread.php?t=42415)

pyg February 25th, 2009 01:51 AM

DomModGen (AnyAny/IndyFunPits)
 
1 Attachment(s)
DomModGen is a short bit of python that simplifies and automates some aspects of Dominions 3 mod creation.

AnyAny was an attempt to create games consisting of multiple instances of a given nation. Unfortunately this is not possible with all nations at this point, but can be done currently with EA Kailasa and LA Ulm. By way of example the following code creates a mod of just three Kailasa players:
Code:

#!/usr/bin/env python
# -*- Mode: Python; tab-width: 4 -*-

from DMG import D3MNation, D3M
from dmg.nations import EA_Kailasa

new_mod = D3M(era = 1, modname = "AnyAny Kailasa")
new_mod.remove_default_nations()
EA_Kailasa.create_nation(new_mod, "My Kailasa", None)
EA_Kailasa.create_nation(new_mod, "No, My Kailasa", None)
EA_Kailasa.create_nation(new_mod, "Going Bananas", None)

print new_mod



IndyFunPits adds semi-random nations composed of independents and magic site recruitables with national *features*. Nations have 2-3 magic paths with recruitable mages and gem income for those paths. Although they are playable nations they are not that fun/powerful and in the included mods they have their flags changed to match the independent flag. They are intended for use in games as strong/interesting independents similar to SemiRand. Included are mods that add ~20 IndyFunPits nations to each of the three eras.

You may use this all freely however you like (public domain). I would appreciate PM bug reports.

lch February 25th, 2009 05:13 AM

Re: Custom nations
 
Quote:

national_features = ["Calvary",
Calvary is a synonym for Golgatha, or something. I assume you meant Cavalry. :)
Very nice start.

pyg February 25th, 2009 10:10 AM

Re: Custom nations
 
Quote:

Originally Posted by lch (Post 676626)
Quote:

national_features = ["Calvary",
Calvary is a synonym for Golgatha, or something. I assume you meant Cavalry. :)
Very nice start.

Ack! Well maybe they are just a doomed nation with heavy horsemen ;)

Fixed.

Gandalf Parker February 25th, 2009 12:20 PM

Re: Custom nations
 
Nice.
I had a couple of half-done projects along the same line to add as another game-type on the server.

Perhaps I will use this one instead. To create a randomly generated AI opponent for online games.

pyg February 25th, 2009 12:28 PM

Re: Custom nations
 
Quote:

Originally Posted by Gandalf Parker (Post 676684)
Nice.
I had a couple of half-done projects along the same line to add as another game-type on the server.

Perhaps I will use this one instead. To create a randomly generated AI opponent for online games.

It would actually be a small change to set the flag the same as the independents and as AIs they would look/feel a lot like really strong independent nations. This will actually be an upcoming example for SP use where you pick an original nation to play and it sets all the rest (AIs) to IndyPundits with the independent flag. Actually SP use was the primary reason the IndyPundits mod happened.

pyg March 6th, 2009 01:16 AM

Re: DomModGen (AnyAny/IndyFunPits)
 
1 Attachment(s)
I've been adding features to dmg so that now it can, with minimal hints, add arbitrary .dm files. To test it I've generated a very large mod set in the Late Era with all the original nations plus Rohan, Trolls, Carthacia, Seraphim, Haida Gwaii, The Hoburg Alliance, Urdheim, Machaka Spider Cult, Padmassa, Sar Elad, Skavenblight, plus just for fun CBM 1.41 and CPCS .04. It comes with all the necessary .tga files (repackaged) as well.

I'm sure there are some conflicts/bugs somewhere but I haven't discovered them yet. This is for demo/testing purposes.

Code:


#!/usr/bin/env python                                                                                                     
# -*- Mode: Python; tab-width: 4 -*-                                                                                       

from DMG import D3M

mod = D3M(era=3, modname="DMG MegaMod")
mod.add_all_nations()
dm = open("CBcomplete_1.41.dm", "rb").read()
mod.add_dm(dm, False)
dm = open("CPCS.dm", "rb").read()
mod.add_dm(dm)
dm = open("rohan.dm", "rb").read()
mod.add_dm(dm)
dm = open("troll_kingdom.dm", "rb").read()
mod.add_dm(dm)
dm = open("CarthaciaE.dm", "rb").read()
mod.add_dm(dm)
dm = open("Crusade.dm", "rb").read()
mod.add_dm(dm)
dm = open("haida.dm", "rb").read()
mod.add_dm(dm)
dm = open("Hoburg_D3SE.dm", "rb").read()
mod.add_dm(dm)
dm = open("kobold.dm", "rb").read()
mod.add_dm(dm)
dm = open("machakaspidercult.dm", "rb").read()
mod.add_dm(dm)
dm = open("padmassa_ea.dm", "rb").read()
mod.add_dm(dm)
dm = open("sarelad.dm", "rb").read()
mod.add_dm(dm)
dm = open("Warhammer Skaven.dm", "rb").read()
mod.add_dm(dm)                                                       

print mod


Sombre March 6th, 2009 05:38 AM

Re: Custom nations
 
Quote:

Originally Posted by pyg (Post 676686)
This will actually be an upcoming example for SP use where you pick an original nation to play and it sets all the rest (AIs) to IndyPundits with the independent flag.

Why? I don't get it. What's the benefit of the AIs in SP all having the same (indy) flag? The game still plays the same.

pyg March 6th, 2009 11:16 AM

Re: Custom nations
 
Quote:

Originally Posted by Sombre (Post 678425)
Quote:

Originally Posted by pyg (Post 676686)
This will actually be an upcoming example for SP use where you pick an original nation to play and it sets all the rest (AIs) to IndyPundits with the independent flag.

Why? I don't get it. What's the benefit of the AIs in SP all having the same (indy) flag? The game still plays the same.

It's not all that significant, but if you enjoy SP with strong independents and/or SemiRand/Chaos maps having a real AI hiding behind the independent flag can be interesting because you don't expect independent flags to be a threat. Suddenly being invaded by a massive army of independents where you weren't expecting can throw off your plans. I'm currently working on some AI nations that will be somewhat stronger than the original nations for use this way. (dmg/nations/II_AI.py). I will post it into this thread when I have something. I find it most interesting to mix regular national flagged AIs and with independent flagged ones about 1:1.

Sombre March 6th, 2009 12:06 PM

Re: DomModGen (AnyAny/IndyFunPits)
 
I think you could quite easily tell it wasn't an indy province, even from a cursory inspection. Maybe if you stopped yourself from paying any attention you wouldn't. It just sounds boring to me, fighting interchangeable armies of indy troops for the entire game. You wouldn't even have any enemy nations to shake your fist at if you lost a fight.

Ballbarian March 6th, 2009 02:38 PM

Re: DomModGen (AnyAny/IndyFunPits)
 
Sounds like fun to me pyg.
Thanks for sharing! :)


All times are GMT -4. The time now is 10:07 PM.

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