.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 > Scenarios, Maps and Mods

Reply
 
Thread Tools Display Modes
  #1  
Old January 24th, 2009, 10:29 PM

Omnirizon Omnirizon is offline
BANNED USER
 
Join Date: Dec 2007
Location: Illinois
Posts: 1,133
Thanks: 25
Thanked 59 Times in 36 Posts
Omnirizon is on a distinguished road
Default mass poptype set script

this is a poptype set script written in Python. at the moment, it will only do a mass set of all lands to one poptype. I really only wrote it because I wanted to make a map No Indies, but didn't want to go through by hand.

the script works like a python module. many systems already have Python installed (just type 'python' at a command line). if not, you will need to install it from python.org. you should have it anyway in this day and age; DIY scripting will be the wave of the future in an age of information anarchy and (un)interoperability.

Code:
usage:

setpop(file, type)
iterates over all '#landname' entries of file and creates a set of all province numbers.
iterates over this set and appends a sequence of:
#setland x
#poptype type
to the end of file, where x is a number popped from the set


example:

import poptypes

f = '/users/myname/mymap.map'
t = 99
poptypes.setpop(f, t)
NOTE: poptypes.py will need to be on your PYTHONPATH in order to import it. alternatively, you can just add the commands, like those shown in the example, into the file itself and launch it with the python interpreter (this is actually very easy. after adding the commands into the file just right-click it and select 'open with' then 'python'). if there's really demand for it, I will make this into a python egg, then it can be automatically added to your python's site-packages folder, and you will be able to import it with no special steps needed.

i may add to this python module, and rename it 'pydommaps' or something equally asinine. i could add scripts that automatically generate neighbor entries, or that add random poptypes.

i sorted through the mod tools list, and didn't see anything like this. is there something already? if not I can build this up if people would use it.
Attached Files
File Type: zip poptypes.py.zip (663 Bytes, 147 views)

Last edited by Omnirizon; January 25th, 2009 at 04:48 AM..
Reply With Quote
  #2  
Old January 25th, 2009, 06:28 AM

Sombre Sombre is offline
BANNED USER
 
Join Date: Feb 2007
Posts: 5,463
Thanks: 165
Thanked 324 Times in 190 Posts
Sombre is on a distinguished road
Default Re: mass poptype set script

Someone had already done this. I forget who but you can doubtless find it by searching for something like 'No indy script'.

I can't really get on with these scripts where I need to install modules and they're all a bit fiddly.
Reply With Quote
  #3  
Old January 25th, 2009, 12:04 PM

llamabeast llamabeast is offline
National Security Advisor
 
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
llamabeast will become famous soon enoughllamabeast will become famous soon enough
Default Re: mass poptype set script

Only because you're using Windows!
__________________
www.llamaserver.net
LlamaServer FAQ
My mod nations: Tomb Kings and Vampire Counts
A compilation of high quality mod nations: Expanded Nations Packs
Reply With Quote
  #4  
Old January 25th, 2009, 01:21 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: mass poptype set script

Pros and Cons.
We could make them EXE executables but that tends to (and really should) make people nervous about downloading them and running it on their machine. But if people wish it I could exe this.
__________________
-- 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
  #5  
Old January 25th, 2009, 01:42 PM

Omnirizon Omnirizon is offline
BANNED USER
 
Join Date: Dec 2007
Location: Illinois
Posts: 1,133
Thanks: 25
Thanked 59 Times in 36 Posts
Omnirizon is on a distinguished road
Default Re: mass poptype set script

this doesn't have any kind of UI. it's all done at the interactive interpreter. I could give it a UI, it wouldn't take much. then it could be usefully made into a .exe and/or an app
Reply With Quote
  #6  
Old January 25th, 2009, 02:00 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: mass poptype set script

I also meant to add that one of the advantages of raw script is the public domain-ness of the program. Its good to see so many of our community willing to post raw code.

Many users dont know how to use a pipe or command line utility.
And if you can .exe it then yes you might want to add an input for the paramters.

For me to exe it Id probably rewrite it into a language I know and then compile it. Altho I do see there are applications on the net for compiling python to exe.
__________________
-- 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
  #7  
Old January 25th, 2009, 03:29 PM

Aezeal Aezeal is offline
Lieutenant General
 
Join Date: Sep 2007
Posts: 2,691
Thanks: 5
Thanked 39 Times in 31 Posts
Aezeal is on a distinguished road
Default Re: mass poptype set script

I'd love a script where I could set certain poptypes for each landtype and then ti would randomly pick for each land from the appropriate list (this becuase dom3 K maps need defenders and poptype (I've got 5-7 or something) set manually for each province and it's a really nasty job do to.

If I could set certain poptypes for forest provinces (space) and others for all other provinces then that would be sweet.. if you could then make the defenders of the province the same as the poptype (and give a number of each defenders) it would be even better.

I'n not really asking cus it's probably a ****load more work but that is what I could use
__________________
Want a blend of fantasy and sci-fi? Try the total conversion Dominions 3000 mod with a new and fully modded solar system map.
Dragons wanted? Try the Dragons, Magic Incarnate nation.
New and different undead nation? Try Souls of Shiar. Including new powerfull holy magic.
In for a whole new sort of game? Then try my scenario map Gang Wars.
Reply With Quote
  #8  
Old January 25th, 2009, 03:48 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: mass poptype set script

A lot of that is in the SemiRand code now. Either Ballbarian or I could probably cut that part out and modify it to your needs (him better than I actually)
__________________
-- 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 January 25th, 2009, 03:50 PM

Aezeal Aezeal is offline
Lieutenant General
 
Join Date: Sep 2007
Posts: 2,691
Thanks: 5
Thanked 39 Times in 31 Posts
Aezeal is on a distinguished road
Default Re: mass poptype set script

that would be nice, I;ve not used the semirand yet, as it is it can't do what I need?
__________________
Want a blend of fantasy and sci-fi? Try the total conversion Dominions 3000 mod with a new and fully modded solar system map.
Dragons wanted? Try the Dragons, Magic Incarnate nation.
New and different undead nation? Try Souls of Shiar. Including new powerfull holy magic.
In for a whole new sort of game? Then try my scenario map Gang Wars.
Reply With Quote
  #10  
Old January 25th, 2009, 04:08 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: mass poptype set script

Maybe. IIRC it does support having your own directory of your own files for it to fill in from
__________________
-- 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
Reply

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 08:25 AM.


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