Jump to content


Buildqueue Generator


12 replies to this topic

#1 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 25 January 2006 - 12:27 PM

I uploaded a little perl script: Buildqueue Generator

It does things like:
$ perl ./bq_csv.pl itemcomp.csv "Fusion Transwarp Drive" 1
6: 14500000 Raw Resources
5: 175000 Industrial Chemicals
5: 175000 Petrochemicals
5: 600000 Crystals
5: 250000 Gaseous Elements
4: 150000 Light Metals
4: 75000 Iron
4: 75000 Radioactive Elements
4: 150000 Improved Refined Crystals
4: 150000 Improved Synthetic Materials
3: 75000 Improved Electronics
3: 25000 Improved Steel
3: 25000 Improved Processed Radioactives
3: 50000 Rare Elements
3: 50000 Improved Transaluminum
2: 250 Mk II Force Shield
2: 25000 Advanced Fuel
2: 25 Mk I Fusion Jump Drive
1: 1 Fusion Transwarp Drive

or more complex:

$ perl ./bq_csv.pl itemcomp.csv "Nuclear Transwarp Drive" 2 "Fusion Transwarp Drive" 3
6: 62000000 Raw Resources
5: 725000 Industrial Chemicals
5: 725000 Petrochemicals
5: 2400000 Crystals
5: 1100000 Gaseous Elements
4: 225000 Radioactive Elements
4: 750000 Light Metals
4: 375000 Iron
4: 200000 Synthetic Materials
4: 450000 Improved Refined Crystals
4: 200000 Refined Crystals
4: 500000 Improved Synthetic Materials
3: 50000 Steel
3: 275000 Improved Electronics
3: 75000 Improved Steel
3: 100000 Transaluminum
3: 75000 Improved Processed Radioactives
3: 100000 Electronics
3: 250000 Rare Elements
3: 150000 Improved Transaluminum
2: 750 Mk II Force Shield
2: 500 Mk I Force Shield
2: 125000 Advanced Fuel
2: 500 Mk I Nuclear Jump Drive
2: 75 Mk I Fusion Jump Drive
1: 3 Fusion Transwarp Drive
1: 2 Nuclear Transwarp Drive


I think it may be of use even for these spreadsheet users out there :-)

No warenties on supplied datafile, though.

#2 rotor911

    Veteran

  • Members
  • PipPipPip
  • 120 posts
  • Location:France

Posted 28 January 2006 - 12:40 PM

Thanks! great software! I'll try to upgrade it so it generates actual SN orders and I'll post the result here. The Windows users who want to give it a try will find a free Perl download at activestate
Victory! 75 : Great Britain

Empire# 1451 : The 360 Fighting Kingdoms

#3 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 29 January 2006 - 02:35 AM

rotor911, on Jan 28 2006, 12:40 PM, said:

Thanks! great software! I'll try to upgrade it so it generates actual SN orders and I'll post the result here.  The Windows users who want to give it a try will find a free Perl download at activestate

<{POST_SNAPBACK}>



I did not do that, because you mostly do not add the whole queue to the orders, esp.
the line with Raw Resources (which with you can get an estimate of trade value btw.).

And you most of the time has some resources stockpiled or mined.

But feel free to change it as you see fit.

#4 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 30 January 2006 - 10:50 AM

Updated the data in itemlist.csv.

Some entries where obviously wrong, like 'Mk I Nuclear Engine" using Improved Electronics
or some items needed 'Improved' as resource.

BTW:
The file itemlist.csv may be of use for you spreadsheetes as well, as it has the
build requirements for a lot of items in it.

#5 Morgwen

    Member

  • Members
  • PipPip
  • 51 posts

Posted 04 February 2006 - 05:25 PM

cestvel, on Jan 30 2006, 12:50 PM, said:

Updated the data in itemlist.csv.

Some entries where obviously wrong, like 'Mk I Nuclear Engine" using Improved Electronics
or some items needed 'Improved' as resource.

BTW:
The file itemlist.csv may be of use for you spreadsheetes as well, as it has the
build requirements for a lot of items in it.

<{POST_SNAPBACK}>



I have found it to be of great use as just a spreadsheet. However, I did go and install activeperl and it is even of better use now :drunk:

A question....
Adding your own items... say item xyz that requires:
1 Steel
2 Electronics
3 Transalunimum

How would you add something like this to the csv file?
(if I understood what's in it I can work it --<bg> )

Using your examples of complex, I've made batch files for the items I need infrequently, but require many things. -- works great!

Morgwen -- :huh:

aka
Larry
lwl@lwlawrence.com

#6 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 04 February 2006 - 07:48 PM

Morgwen, on Feb 4 2006, 05:25 PM, said:

cestvel, on Jan 30 2006, 12:50 PM, said:

Updated the data in itemlist.csv.

Some entries where obviously wrong, like 'Mk I Nuclear Engine" using Improved Electronics
or some items needed 'Improved' as resource.

BTW:
The file itemlist.csv may be of use for you spreadsheetes as well, as it has the
build requirements for a lot of items in it.

<{POST_SNAPBACK}>



I have found it to be of great use as just a spreadsheet. However, I did go and install activeperl and it is even of better use now :drunk:

A question....
Adding your own items... say item xyz that requires:
1 Steel
2 Electronics
3 Transalunimum

How would you add something like this to the csv file?
(if I understood what's in it I can work it --<bg> )

Using your examples of complex, I've made batch files for the items I need infrequently, but require many things. -- works great!

Morgwen -- :huh:

aka
Larry
lwl@lwlawrence.com

<{POST_SNAPBACK}>





please check the queue for obvious errors as the file is generated from extracted data and can have errors (as the ones I found and fixed).

Ok, you add it like this:
- open the file with wordpad or something similar (which displays the LF correct)
- add following lines to the end:
"xyz", 1, "Steel"
"xyz", 2, "Electronics"
"xyz", 3, "Transaluminum"

save and look at the power of bq_csv.pl :-)
bq_csv.pl "xyz" 1 will now show you the buildqueue for this item.

Nothing fancy, just add some lines and dont forget the "" :-)

#7 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 15 August 2007 - 06:09 AM

Updated the bq_csv.pl tool.

It calculated things wron on complex items like a "Fusion Transwarp Drive" where
the same item (here Improved Electronics iirc) where added multiple times, e.g. as part of Mk I Fusion Drives and directly as part of the Transwarp Drive).

Just download the archive again.

#8 Soerenjev

    Member

  • Members
  • PipPip
  • 83 posts
  • Location:Munich/Germany

Posted 20 August 2007 - 03:30 AM

To have it function properly you have to add the itemlist.csv to the command line so the script knows where to find its data.

perl ./bq_csv.pl itemlist.csv "Nuclear Transwarp Drive" 2 "Fusion Transwarp Drive" 3
Soerenjev
Personal Ambassador to Chief Esocura
Corsarus de Esocura

Peace in our time

#9 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 20 August 2007 - 04:12 AM

View PostSoerenjev, on Aug 20 2007, 12:30 PM, said:

To have it function properly you have to add the itemlist.csv to the command line so the script knows where to find its data.

perl ./bq_csv.pl itemlist.csv "Nuclear Transwarp Drive" 2 "Fusion Transwarp Drive" 3


Ah thanks, I am used to my tool, I use on my own, which uses a database, so I forgot to add that one.

#10 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 14 April 2008 - 08:42 AM

Updated bq_csv.pl yet again. Should finally work correct on items like "Nuclear Transwarp Drive".

$ perl ./bq_csv.pl itemlist.csv "Fusion Transwarp Drive" 1
6: 13250000 Raw Resources
5: 150000 Industrial Chemicals
5: 150000 Petrochemicals
5: 450000 Crystals
5: 225000 Gaseous Elements
4: 150000 Light Metals
4: 75000 Iron
4: 75000 Radioactive Elements
4: 150000 Improved Refined Crystals
4: 150000 Improved Synthetic Materials
3: 75000 Improved Electronics
3: 25000 Improved Steel
3: 25000 Improved Processed Radioactives
3: 50000 Rare Elements
3: 50000 Improved Transaluminum
2: 250 Mk II Force Shield
2: 25000 Advanced Fuel
2: 25 Mk I Fusion Jump Drive
1: 1 Fusion Transwarp Drive

#11 ShadowKitsune

    Ninja Code Monkey

  • Members
  • PipPipPipPipPip
  • 1,201 posts

Posted 14 April 2008 - 09:44 AM

Great job, Cestvel. :beer:

Thanks,
-SK :D

#12 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 05 July 2009 - 05:29 AM

bump

#13 cestvel

    Old Hand

  • Members
  • PipPipPipPip
  • 895 posts
  • Gender:Male
  • Location:Germany
  • Interests:Playing Games, Programming

Posted 05 July 2009 - 07:24 AM

I updated the tools (http://www.cestvel.de/dl/sntools.zip) as well as the standalong buildqueue generator (http://www.cestvel.d.../buildqueue.zip).

sntools now work with mysql (which is free available for nearly every plattform).

You still need:
- perl
- xpdf (pdftotext)
- mysql
- a local webserver to use the cgi-files

Marcus





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users