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

This Month's Specials

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

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 3: The Awakening > Scenarios, Maps and Mods

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #16  
Old February 26th, 2009, 03:26 PM

pyg pyg is offline
BANNED USER
 
Join Date: Jan 2009
Location: a small farm
Posts: 340
Thanks: 73
Thanked 103 Times in 42 Posts
pyg is on a distinguished road
Default Re: Nation Library

So I have a prototype now with dmg (DomModGen) I used chrispedersen's UlmCivilWar mod as an example and wrote the equivalent of his second nation (Tolkein's) with dmg classes and methods. The last couple of lines wrap the nation in a mod and printing it lets you >file.dm or |more to test. This example is included in the dmg.zip if you want to mess with it. I've included variable names and snipped text for readability. Anyway just applying a loop, incrementing the slot, and changing name could generate chris's mod. Seems to be missing unique pretenders unless LA Ulm doesn't have any.... and dmg is missing it because there has not yet been a need This has not been well tested so bugs are probable but I started a game with it and it looked Ulmish.

Code:
#!/usr/bin/env python                                                                                                       
from dmg import D3MNation, D3M

era = 3
slot = 73

LA_Ulm = D3MNation(era,
                   slot,
                   name = "CountVonTolkien",
                   brief = "Ulm is a human kingdom... snipped ...trade in the arcane.",
                   summary = "Race: Stocky humans... snipped ...Priests: Weak.",
                   flag = None)
LA_Ulm.add_units([482,1013,1014,1015,1017,1034])
LA_Ulm.add_commanders([1016,1018,739,740,1023,1012])
LA_Ulm.set_PD(defcom1 = 1016,
              defcom2 = 739,
              defunit1 = 1013,
              defunit1b = 482,
              defunit2 = 1024)
LA_Ulm.add_site("The Ruined Keep")
LA_Ulm.add_site("Black Forest")
LA_Ulm.add_site("The Black Temple")
LA_Ulm.set_forts(castleprod = 25,
                 startfort = 3,
                 defaultfort = 8,
                 farmfort = 3,
                 forestfort = 35,
                 mountainfort = 6,
                 swampfort = 11)
LA_Ulm.set_startarmy(startcom = 1016,
                     startscout = 1018,
                     startunittype1 = 1013,
                     startunitnbrs1 = 8,
                     startunittype2 = 1015,
                     startunitnbrs2 = 8)
LA_Ulm.copy_national(spell = "Sanguine Heritage",
                     new_name = "Tolkien's Taking",
                     new_desc = "And so it is given, One from another, for time immemorial.")

new_mod = D3M(era = era, modname = "LA_Ulm Test")
new_mod.add_nation(LA_Ulm, slot = slot)

print new_mod
Reply With Quote
The Following 2 Users Say Thank You to pyg 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 02:53 AM.


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