Weapon DPS table spreadsheet + script

Please post here for questions and discussion about scenario, art and sound modding and the game editor for Distant Worlds.

Moderators: elliotg, Icemania

Post Reply
User avatar
BTAxis
Posts: 727
Joined: Tue Jun 04, 2013 5:04 pm

Weapon DPS table spreadsheet + script

Post by BTAxis »

A thing I like to do when looking at weapons is plot DPS graphs and see how they compare to each other. To this end I've written a little Perl script that outputs some relevant data for all versions of all weapons, which I then plug into a spreadsheet that generates a DPS table. I figured this might help someone else, so I've decided to share them here.

To use the script you either need to have a working version of Perl installed on your system, or you can convert it into an executable using perl2exe (google it). The script should be in the same directory as components.txt and research.txt and assumes these files exist. Output is to standard out, but you can put it in a file with a pipe:

[font="Courier New"]perl weapgen.pl > out.txt[/font]

From there, just copy the whole thing and paste it into the spreadsheet, first tab, cell A2. The DPS table will be in the second tab. DPS values of 0 will be shown in white-on-white, so they appear empty. Negative values will be highlighted in red (because they're usually bad). To plot a graph, simply select the rows on the DPS table you want and insert a "line" type graph from the insert ribbon.

Note that cell I2 on the first tab is for setting the armor reactive rating of the target. This changes how the graphs turn out. Also, I used cell range names in this workbook to simplify how the calculation looks. However, the formula in cell B2 on the DPS tab remains vanilla, just in case anyone wants to alter the calculation and doesn't want to have to delete the names first. Finally, the order the weapons appear in the output of the script is the order they are defined in research.txt.
Attachments
DistantWo..script.zip
(89.55 KiB) Downloaded 49 times
User avatar
tjhkkr
Posts: 2430
Joined: Wed Jun 02, 2010 11:15 pm
Contact:

RE: Weapon DPS table spreadsheet + script

Post by tjhkkr »

What a neat tool; thank you!
Remember that the evil which is now in the world will become yet more powerful, and that it is not evil which conquers evil, but only love -- Olga Romanov.
TanC
Posts: 74
Joined: Wed May 08, 2013 8:51 am

RE: Weapon DPS table spreadsheet + script

Post by TanC »

As a spreadsheet junkie, I appreciate this tool. Thanks! [:D]
Post Reply

Return to “Design and Modding”