Thread: Nation Library
View Single Post
  #26  
Old March 1st, 2009, 12:04 AM

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

Just to show how simple it is to put a mod together with this new framework, the following snippet creates a mod of 3 Kailasa and 3 LA Ulm players. The posted version of dmg.py has not been updated yet, and won't be for a bit as I'm still working on it.

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

from dmg import D3MNation, D3M
from dmg_nations import *

era = 1
new_mod = D3M(era = era, modname = "AnyAny Kailasa/Ulm")
new_mod.remove_default_nations()
new_mod.add_nation(EA_Kailasa.get("My Kailasa", None))
new_mod.add_nation(EA_Kailasa.get("No, My Kailasa", None))
new_mod.add_nation(EA_Kailasa.get("Going Bananas", None))
new_mod.add_nation(LA_Ulm.get("CountCountCount", None))
new_mod.add_nation(LA_Ulm.get("Ulm, are you, ulm, sure?", None))
new_mod.add_nation(LA_Ulm.get("ULM FANATIC", None))
print new_mod
Reply With Quote