It is currently 29 Apr 2024, 08:28
   
Text Size

Updated random warband generator

A version of WOTC's game by telengard

Moderators: telengard, CCGHQ Admins

Updated random warband generator

Postby telengard » 22 May 2010, 15:52

I've added a lot of new functionality to this python script. It will be in the next release, but it should work fine with the current release so I'm making it available now. Modifying the script assumes you know a wee bit of python or are OK with tinkering...

The current script can be downloaded here:

http://home.comcast.net/~bsturk/dreamblade/random_warband.py

Usage

Run without any arguments it will generate a random warband using all the supported pieces and save the warband to a file named "random_warband.txt". You can do this by double clicking the file (on Windows) or running it in a command window via:

Code: Select all
python random_warband.py
If you want to save it to a different file name you can pass the filename to save to on the command line, like so:

Code: Select all
python random_warband.py my_random_warband.txt
Also, the script itself has lots of ways to filter out or auto include pieces.

If you do not want particular pieces to ever be included in a random warband, add them to the ignore_names list.

For example:

Code: Select all
ignore_names = [ 'Bristleback Basher', 'Cannibal Pariah' ]
Bristleback Basher and Cannibal Pariah in this case will never be put into a random warband.

To auto include pieces before adding any random pieces, modify the auto_add_names list.

Code: Select all
auto_add_names   = [ ]
Is an empty list so would not auto add any pieces.

Code: Select all
auto_add_names   = [ 'Unsated Ragedrake', 'Scarab Warcharm' ]
Would include 1 each of Unsated Ragedrake and Scarab Warcharm in any generated warband.

You can also limit what is added to the random warband by a combination of set, aspect, and lineage.
By default all sets, aspects, and lineages are included. Note, for all of these filters, the reference strings to use are in the all_sets, all_aspects, all_lineages lists. For aspects and lineages the 'None' string is to handle no aspect or lineage.

If you wanted to only include the Core and Anvilborn sets you would modify the include_sets list.

Code: Select all
include_sets     = [ 'Core', 'Anvilborn' ]
If you also wanted to only have Passion, Valor, and aspect-less pieces you would modify the include_aspects list.

Code: Select all
include_aspects      = [ 'None', 'Valor', 'Passion' ]
If in addition you only wanted Bloodcut and no lineage pieces you would modify the include_lineages list.

Code: Select all
include_lineages     = [ 'None', 'Bloodcut' ]
Any questions etc just post 'em here.

At some point I will be making scripts to generate sealed products...

~telengard
Author of Dreamblade:
viewtopic.php?f=51&t=1215
User avatar
telengard
DEVELOPER
 
Posts: 379
Joined: 23 May 2009, 23:04
Has thanked: 2 times
Been thanked: 27 times

Re: Updated random warband generator

Postby Twayblade » 24 May 2010, 19:56

Where does this file go specifically?
Twayblade
 
Posts: 14
Joined: 21 May 2010, 02:12
Has thanked: 0 time
Been thanked: 0 time

Re: Updated random warband generator

Postby telengard » 25 May 2010, 00:06

Twayblade wrote:Where does this file go specifically?
On Windows it goes wherever you unpacked the zip file. There should already be a file called random_warband.py, just drop this new one on top of it, overwriting it.

~telengard
Author of Dreamblade:
viewtopic.php?f=51&t=1215
User avatar
telengard
DEVELOPER
 
Posts: 379
Joined: 23 May 2009, 23:04
Has thanked: 2 times
Been thanked: 27 times

Re: Updated random warband generator

Postby telengard » 29 May 2010, 17:24

Just a note to say that I've removed the download of the .py file, but it is available in the new release which I just posted.

~telengard
Author of Dreamblade:
viewtopic.php?f=51&t=1215
User avatar
telengard
DEVELOPER
 
Posts: 379
Joined: 23 May 2009, 23:04
Has thanked: 2 times
Been thanked: 27 times


Return to Dreamblade

Who is online

Users browsing this forum: No registered users and 24 guests


Who is online

In total there are 24 users online :: 0 registered, 0 hidden and 24 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 24 guests

Login Form