Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 4

Author Topic: Perl scripts that read RAWs and present tables of data (plants, creatures)  (Read 11904 times)

Maklak

  • Bay Watcher
    • View Profile

I wrote a script that reads plant RAWs and prints:
* Lists of plant IDs for getplants dfhack command for easy designating of trees to be cut and plants to be gathered.
* Tables with crops, their values, drinks, etc.
And another script that reads and prints tables of creatures. Then another for weapons.

EDIT: There are some similar tools.
* If you're only interested in taking a look at sortable tables of items from Vanilla or Masterwork and don't want to install perl or run any scripts, this is for you: http://www.bay12forums.com/smf/index.php?topic=131301
* If you are interested in editing RAWs in a spreadsheet, while importing and exporting them in Python, this has partial support. http://www.bay12forums.com/smf/index.php?topic=130140
* If you know of any other tools (wiki doesn't count) with partially overlapping functionality, let me know in a comment.

They should be useful for modders as part of their manuals for crops as well as spotting some anomalies in their plant RAWs. These scripts are RAW crawlers and not a part of dfhack. They also have no ability to edit anything, just display data. They shouldn't damage anything, unless you  redirect the output to overwrite some important file or do something stupid like that. Anyway, what these scripts are meant to do is to perform the bulk of the boring work when making crop tables for mods or just looking at the animals in one table. The output should normally be corrected by a human before posting, but if you see a way to make something saner, please let me know.

Download link for plants: https://dl.dropboxusercontent.com/u/71287918/Scripts/plants.pl
Download link for creatures: https://dl.dropboxusercontent.com/u/71287918/Scripts/creatures.pl
Download link for weapons: https://dl.dropboxusercontent.com/u/71287918/Scripts/weapons.pl
Download link for armour: https://dl.dropboxusercontent.com/u/71287918/Scripts/armour.pl

The scripts were written with FoE mod in mind, but also work quite well for Masterwork and other mods. The output can be set to txt/csv, bbcode (for forum), wiki or html. It requires perl to run. There are no CPAN modules necessary and it works equally well with perl 5.6 and 5.14. Except the creature script has an --eval parameter for custom filters for advanced users, which doesn't work in 5.6. Instructions to run scripts are displayed by:
$ perl -w plants.pl --help
$perl -w creatures.pl --help


This program reads Dwarf Fortress plant RAWs and prints commands for dfhack
    getplants commands for easy designating of trees and bushes to be cut.
  More importantly, it also prints formatted tables with crops. This is useful
  for DF mods and was originally developed for FoE mod. Usage:

$ perl -w plants.pl <options> files

Options:
-o=<arg>  --o=<arg>  --<arg>       where <arg> is txt|csv|bbcode|html|wiki.
       Sets output to that file format. The default is txt/csv.
         Bay12 forum uses bbcode.
-h  --help     Print this help and exit.
-d  --debug    Print much more information.
--nodebug      Dont print debug information.
--nogetplants  Wont print getplants commands for dfhack.
--nocrops      Wont print crop tables
--yesdye       Include dye-only plants in getplants macros.
--yield        Print yield per year. (There are 12 months, 28 days each.)
--freq         Print frequencies of crops for plant gathering.
--align        Print alignment of plants (Good / Evil / Savage / All)
             Since this is "All" for almost all plants, it is off by default.
--             End options. Everything else is treated as a RAW file.

There is no option to set output file, so redirect the output stream instead.

Examples:
$ perl -w ../../../Scripts/plants.pl --bbcode *plant*.* >../../../Scripts/out.txt
Will process all files in the current directory matching *plant*.*
  and write an output file suitable to paste on the forum.

$ perl -w ../../../../Scripts/plants.pl -o=html *.txt  >../../../../Scripts/out.html
Process all *.txt files in the current directory (raw/objects) and write
  the output to a html file.


This is what crops.pl prints for vanilla DF. These tables were printed with default options, but some additional columns, for example with yield per year or frequency for plant gathering can be selected as well.


Read 91 plants.

Dfhack # getplants commands for easy designating tree cutting and plant gathering:

Aboveground bushes: (only edible, cookable or brewable)
# getplants ROOT_MUCK TUBER_BLOATED BERRIES_PRICKLE BERRIES_STRAW_WILD GRASS_LONGLAND HERB_VALLEY WEED_RAT BERRIES_FISHER REED_ROPE SLIVER_BARB BERRY_SUN VINE_WHIP

Aboveground trees:
# getplants MANGROVE SAGUARO PINE CEDAR OAK MAHOGANY ACACIA KAPOK MAPLE WILLOW GLUMPRONG FEATHER HIGHWOOD LARCH CHESTNUT ALDER BIRCH ASH CANDLENUT MANGO RUBBER CACAO PALM

Underground bushes: (only edible, cookable or brewable)
# getplants MUSHROOM_HELMET_PLUMP GRASS_TAIL_PIG GRASS_WHEAT_CAVE POD_SWEET BUSH_QUARRY

Underground trees:
# getplants TOWER_CAP BLACK_CAP NETHER_CAP GOBLIN_CAP FUNGIWOOD TUNNEL_TUBE SPORE_TREE BLOOD_THORN



Aboveground crop table:
 
Name
 ID
ValueGrowsSeasonsEatCookBrew (Value) (Cook)Products (Value)Hints
muck root
 ROOT_MUCK
125N/A? All yearYesYesswamp whiskey (1) (Y)N/A--
bloated tuber
 TUBER_BLOATED
125N/A? All yearYesYestuber beer (2) (Y)N/ABrew
kobold bulb
 BULB_KOBOLD
125N/A? All yearNoNoN/AEXTRACT(Flask): gnomeblight (100)
 
--
prickle berry
 BERRIES_PRICKLE
125All yearYesYesprickle berry wine (1) (Y)N/A--
wild strawberry
 BERRIES_STRAW_WILD
225All yearYesYesstrawberry wine (2) (Y)N/ABrew
Longland grass
 GRASS_LONGLAND
225All yearNoPr.Longland beer (2) (Y)FLOUR: Longland flour (20)
 
Brew
valley herb
 HERB_VALLEY
525N/A? Spring NoYesN/AEXTRACT(Flask): golden salve (100)
 
Cook
rat weed
 WEED_RAT
125All yearYesYessewer brew (1) (Y)N/A--
fisher berry
 BERRIES_FISHER
225All yearYesYesfisher berry wine (2) (Y)N/ABrew
rope reed
 REED_ROPE
225All yearNoNoriver spirits (2) (Y)THREAD: rope reed thread (2)
 
Thread Brew
blade weed
 WEED_BLADE
225All yearNoNoN/ADYE: emerald dye (20)
 
Useless Dye
hide root
 ROOT_HIDE
125All yearNoNoN/ADYE: redroot dye (10)
 
Useless Dye
sliver barb
 SLIVER_BARB
125All yearNoNogutter cruor (1) (Y)DYE: sliver dye (20)
 
--
sun berry
 BERRY_SUN
325All yearYesYessunshine (5) (Y)N/ABrew
whip vine
 VINE_WHIP
125All yearNoPr.whip wine (3) (Y)FLOUR: whip vine flour (25)
 
Brew Mill


Subterranean crop table:
 
Name
 ID
ValueGrowsSeasonsEatCookBrew (Value) (Cook)Products (Value)Hints
plump helmet
 MUSHROOM_HELMET_PLUMP
225All yearYesYesdwarven wine (2) (Y)N/ABrew Embark
pig tail
 GRASS_TAIL_PIG
225Summer Autumn NoNodwarven ale (2) (Y)THREAD: pig tail thread (2)
 
Thread
cave wheat
 GRASS_WHEAT_CAVE
241Summer Autumn NoPr.dwarven beer (2) (Y)FLOUR: dwarven wheat flour (20)
 
--
sweet pod
 POD_SWEET
241Spring Summer NoPr.dwarven rum (2) (Y)SUGAR: dwarven sugar (20)
 EXTRACT(Barrel): dwarven syrup (20)
 
Brew
quarry bush
 BUSH_QUARRY
241Spring Summer Autumn NoPr.N/ALEAF: quarry bush leaves (5)
 
OIL: rock nut oil (5)
 SOAP: rock nut soap (5)
 PRESSED: rock nut press cake (1)
 
Leaves Embark
dimple cup
 MUSHROOM_CUP_DIMPLE
241All yearNoNoN/ADYE: dimple dye (20)
 
Useless Dye


Fake plant table:
 
Name
 ID
ValueGrowsSeasonsEatCookBrew (Value) (Cook)Products (Value)Hints





EDIT: Release v1.03 of plant script that fixed even more problems.

EDIT: Released v1.00 of creature script.

TODO: Make the first post prettier.
« Last Edit: May 11, 2014, 02:19:23 pm by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Maklak

  • Bay Watcher
    • View Profile
Re: Crop table data script
« Reply #1 on: June 07, 2013, 08:17:03 am »

This is the manual. 

Thought of the day: "Our job would be so much easier, if it wasn't for those damn end users."

0) Basics

0.0 Introduction.

0.0.0 Why the scripts and their history.

  The idea behind those scripts started when I wrote a guide to crops for DF Fallout Equestria mod. Those two tables have proven to be pretty tedious to do by hand. Both reading plant RAWs for values and writing all that bbcode to make tables on the forum took hours. Then someone asked me, if I had a script to do it. Eventually I wrote a 2kb perl script to convert a csv file to a bbcode table. It took me an evening and was encouraging, but the problem of fishing for all the values to fill the table remained.

  Then I decided that if the mod updated (which it sadly didn't, at least when it comes to plants), it would be handy to have a script that could read RAWs and print crops in human-readable form nearly instantaneously. Heck, it could even be used by modders to make manuals for farming. So I wrote it and had a working version within a week, then goofed around with generating hints and colouring crops.

  After that I figured that hey, I've got the "infrastructure" to read a subset of DF RAWs and print tables in several formats, so why not use it for something else. Since then I've been working on an off on various scripts for a while. I usually can produce a script for a new section of RAWs pretty quickly, but then continue to add features, polish and test it on various mods for a while, so it takes time before I publish something. On the plus side, those scripts tend to be pretty stable from all that extra effort.

0.0.1 Why perl.

  Well, a scripting language was a natural choice for processing text files and printing text output (html, wikicode and bbcode are really text with some "special words" in it). I've used perl before and even worked with it at my second job. So while Ruby, Python or Lua might be a better choice, I stuck with what was familiar. That said, it is a horrible language. Even after writing thousands lines of code, I have to keep looking up seemingly simple things and getting them to work by trial and error.

0.0.2 What are these scripts good for?

  My scripts are useful to give feedback to the modder. It simply helps to see all (or at least much) of that data as a table and compare different crops / creatures / weapons / whatever. The scripts can also be used to produce manuals for the user, so long as you're willing to edit their output a bit.

  They can all output html (preferable for just looking at the data), bbcode (used by forums) or csv (can be imported into a spreadsheet) and I'm pretty happy about this versatility. The scripts also provide multiple options for controlling the output, for example which columns to print. Run any of them with --help to get a brief explanation.

0.0.3 Why not integrate this with dfhack?

  Having a similar functionality within dfhack would be useful, but:
* I've never written a dfhack plugin and have little idea how to fish for RAW data with it. But I guess I could overcome this difficulty.
* Standalone scripts don't require a running copy of Dwarf Fortress. While dfhack commands might be more convenient, standalone scripts don't require reloading Dwarf Fortress after changing something in the RAWs.
* Now that I have these scripts, I don't feel compelled to port them to dfhack and it wasn't requested.


0.1 Getting Perl

  To run my scripts you need to have Perl interpreter installed. Just type this into the console to check if you already have it.
$ perl -v

  If you're using Linux, there is a very good chance you have perl. If not, use Synaptic packet manager to get it. Simple as that.

  If you're on Windows, there is Strawberry Perl, or the outdated version that comes with MSYS. It runs my scripts, but is otherwise worth it only if you need a Unix shell under Windows. If in doubt, go for Strawberry. Finally, Urist McTeellox, a Perl professional, recommended DWIM Perl for having Padre IDE and lots of CPAN modules.

  My scripts are very backwards compatible, run on a version of Perl that's over 10 years old and require no additional CPAN modules. I've tested them for perl 5.14 and perl 5.6.


0.2 On using the command line. 

  My scripts have no graphical user interface and use the console instead. If you're not familiar with concepts such as current directory or standard input and output, I strongly suggest that you familiarise yourself with a shell tutorial. This one is pretty good. http://community.linuxmint.com/tutorial/view/100 Either way, this is what you need to know to use my scripts:

  Any time you see something like this
$ ls -l
it is a shell command. You can paste that into the console and see the result. You skip the dollar sign, which is called command prompt and means "execute the thing after the dollar in the console". I use the names console and shell as synonyms. You have to press enter to run any command you type or paste into a console.
  A few times I'm using # as the command prompt, mostly for dfhack getplants command. Anyway, a # means it is a dfhack command, not shell. Under Unix it may also mean running a command as a superuser, but the # isn't used in that context in this manual.

  Globs are short-cuts for multiple file names, commonly used as convenient short-cuts for shell commands. The important things to remember about globs is that they are expanded to a list of files as separate arguments, * stands for any character string and ? stands for any one character. Don't put globs inside quotation marks or they won't be expanded. You can check what they do with ls command. For example.
$ ls *plant*.txt
$ dir *plant*.txt
Should print things like plant_grasses.txt, plant_standard.txt and any other plant-themed files you may have.

  Personally I just use glob *.txt which makes the scripts read all the RAW files (skimming most of them). It takes only a few seconds anyway.

  Any time you see something inside <these>, it means "substitute this to a suitable value". For example a --sort=<column> is not to be used verbatim, but instead becomes --sort=ID or --sort=NAME or similar. The <> signs are to be removed when you do the substitution, they are just markers.

  A console program (or in this case, a shell script) is normally executed with a series of parameters. You might for example see something like this
$ grep -l "short sword" *
This first thing the shell does is to expand the glob * into a list of matching files in the current directory (in this case all files inside the raw/objects). It then runs the grep program, giving it a list with "-l", "short sword" and any found files. It is up to grep to interpret what it gets. In this case it sees "-l" and interprets it as an option to just list files containing the pattern. Then it sees "short sword", which doesn't match any of it's recognized options, so it gets interpreted as the pattern to look for. Everything else is treated as a list of files to check. The quotation marks around "short sword" are important, because otherwise it would get interpreted as two separate parameters.
$ grep -l short sword *
Now grep gets a list of parameters with "-l", "short", "sword" and a list of files. It then looks for "short" and considers "sword" to be a file name. This is especially important with long file names or options containing custom text, such as "--extra=To do". These parameters are also not the same and get interpretted differently: --a--b, --a --b, "--a --b". Basically, the shell copies any parameters inside quotation mark verbatim (well, not quite and there are three kinds of quotation makrs, but this is outside the scope of this tutorial), so if you need a space o a * or some other non-alphanumeric signs as parameters, surround them with quotation marks.

  The minuses at the beginning of options are just a convenient convention to differentiate options from file names. If some file has a name like -f, you can use -- to tell the script "everything from now on is a file, even if it starts with a minus".
 
  When using the console, you'll often find yourself typing long commands. If you want tot repeat them, or use something similar, there is a convenient way to do it. By using up and down arrows, you can scroll the history of recently used commands, select the one you want, edit it and run with enter.

  Oh and when you're redirecting output stream be careful where you point it. You can redirect standard output of a console program or script to a file by appending the command with >out.txt where "out.txt" is the name of the file you want to save to. Just be mindful that if you have write permission to that file, it will be overwritten.

  There are a few shell commands that will make your use of my script (and hopefully dealing with mods) easier. The most important are:
Display files in current directory       $ ls
Change current directory       $ cd
List files containing pattern:       $ grep -l "Thunder" *
Show files with patterns and context:    $ grep  -C 10  "SADDLE" *


0.3 Script, RAWs and directories.

  Dwarf Fortress RAWs are text files inside <DF directory>/raw/objects You'll need to pass (some of) them as parameters to my scripts. I usually like to cd to raw/objects, then just use globs, such as *.txt.

  The rest of this manual assumes you are inside the RAW directory and both the scripts and output files are somewhere else.

  While the values in tables are taken from the RAWs, the spacing, comments, hints, etc. may be imperfect, so you are encouraged to edit these tables before using them as part of some manual. Ether way, the scripts do the bulk of the tedious work for you.


0.4 Output types and txt/csv. 

  While at first I just wanted to generate tables with bbcode to post them on the forum, several other output options turned out to be attractive. My scripts can write tables in txt, csv, bbcode, wikicode and html formats. I briefly considered LaTeX for an intermediate step in producing pdfs, but didn't do it. My scripts handle multiple output types by checking for parameters such as --html. They then set several variables controlling the output, such as $bbold and $ebold. For example under txt and csv those are empty strings, under bbcode they become \[b\] and \[\/b\], while wikicode uses ''' and '''. This way output method is abstracted from the rest of the script and for example
  print $bbold . "Size" . $ebold . " is in cubic centimeters." . $n; 
doesn't need to care if I'm printing html or bbcode or what. On the downside, this sometimes produces too many or too few empty lines in some output formats.

  The plain text output is there if you for some reason like plain text files. I made it synonymous with csv, because I don't really see much of a difference. Well, I guess I could count the length of each cell, then pad cells with spaces and tabs so that it looks nice, but I find html more convenient for looking at the data anyway.

  The CSV stands for comma separated values. The basic idea is that each line is a row of a table and the columns are separated by commas. At least in theory, because things like commas inside quoted strings are implementation dependent. On it's own, this format is just a variation on a plain text file, but it can be imported into a spreadsheet. Just save the script output into a file with .csv extension (this is important) and open it with a spreadsheet program, such as Open Office Calc. Import the data, using the comma as a separator and you now have a spreadsheet. You'll probably have to move some things around, resize columns and delete some text, but if you know how to use a spreadsheet, you should feel at home.

  Wikicode is for pasting tables in the magmawiki. I haven't tested it much and html works too, but someone suggested that option, so I added it.

  bbcode is what many forums use, including bay12.

  html turned out to be arguably the most useful. Just save the file with a .html extension, open it in a web browser and refresh it every time you re-run the script. On a wide screen this also seems to provide the most space to view data.

  LaTeX ouptut was dropped because html works well enough, but if someone really wants to make pdfs, I can see about adding it. I guess, I'd just emit the tables to be imported into another LaTeX document.


1) Plant script

  The plant script does two things. It prints a series of dfhack getplants commands and, more importantly, prints tables with crops. It also colour-codes good and bad crops and some of their properties.
Spoiler (click to show/hide)


2) Creature script

Intro

Spoiler (click to show/hide)


3) Weapon script

Highlights errors - use a search and replace on color tags to get rid of it.

Spoiler (click to show/hide)
« Last Edit: December 27, 2013, 07:11:49 pm by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Maklak

  • Bay Watcher
    • View Profile
Re: Crop table data script in perl that reads RAWs
« Reply #2 on: July 05, 2013, 04:18:16 pm »

Just a little progress report on my animal table data script. This is the first version that works and I plan to work on it for a few days. If you have any suggestions about it, I'm all ears. This is meant as a tool for modders to look over their creatures quickly or publish a nice table of them. I plan to add some options for what to print and not to print. These creatures are from FoE mod and don't even include all the columns I already read from the RAWs. I find it rather odd that I was asked to do this a while ago and now no one cares.


Table of animals:
 
Name
 ID
SizeSpeedValuePetTrainMilkYarnGrazerFreq.
balefire phoenix
 BALEFIRE_PHOENIX
800030010000Exotic--------3
balefire phoenix
 BALEFIRE_PHOENIX_SICK
8000100010000Exotic----------
ashes
 ASHES
1000100000------------
vulture
 BIRD_VULTURE
9000100030Exotic--------17
buzzard
 BIRD_BUZZARD
1400100030Exotic--------17
raven
 BIRD_RAVEN
120040025Exotic--------9
falcon
 BIRD_FALCON
110030025Exotic--------6
eagle
 BIRD_EAGLE
400030025Exotic--------3
albatross
 BIRD_ALBATROSS
800050010Exotic--------33
snowy owl
 BIRD_OWL_SNOWY
200060025Exotic--------3
great horned owl
 BIRD_OWL_GREAT_HORNED
200050025Exotic--------3
hellhound
 HELLHOUND
2200008303000----------3
hellhound
 HELLHOUND_SUBTERRANEAN
2200008303000----------9
nightstalker
 NIGHTSTALKER
40000780300ExoticYes------9
bale hound
 BALE_HOUND
40000830250----------9
bale hound
 BALE_HOUND_EVIL
40000830250----------17
feral dog
 DOG_FERAL
4000083010ExoticYes------33
coyote
 COYOTE
1500083050Exotic--------9
raccoon
 RACCOON
7000100025Exotic--------6
wolf
 WOLF
4000082050ExoticYes------3
yao guai
 YAO_GUAI
3000001000500----------9
groundhog
 GROUNDHOG
3000100050Exotic------200003
dog
 DOG
3000083030CommonYes--------
cat
 CAT
500082020Common----------
brahmin
 BRAHMIN
3500001000500Common--15000--400--
bighorner
 BIGHORNER
3000001000400Common--20000Yes5509
chicken
 BIRD_CHICKEN
3000100020Common----------
ghoul
 PONY_GHOUL_SUBTERRANEAN
70000860500----------33
ghoul reaver
 PONY_REAVER_SUBTERRANEAN
700008603000----------9
ghoul
 PONY_GHOUL_EVIL
70000860500----------66
ghoul reaver
 PONY_REAVER_EVIL
700008603000----------9
necromantic ghoul
 PONY_CANTERLOT
700008603000----------9
ghoul
 PONY_GHOUL_SAVAGE
70000860500----------33
ghoul reaver
 PONY_REAVER_SAVAGE
700008603000----------3
ghoul
 PONY_GHOUL
70000860100----------3
necromantic ghoul
 PONY_CANTERLOT_TRANSFORMED
700008603000------------
radhog
 RADHOG
1000001000250Exotic------60017
elk
 ELK
3000001000400Exotic------20017
muskox
 MUSKOX
2850001000500Exotic------2109
Taint abomination
 ABOMINATION
2000002000500----------3
Taint abomination
 ABOMINATION_SUBTERRANEAN
2000002000500----------9
floater
 FLOATER
1200001500250----------9
cave floater
 FLOATER_SUBTERRANEAN
1200001500250----------17
giant cave spider
 SPIDER_CAVE_GIANT
20000010001000----------3
bloatsprite
 BLOATSPRITE
10000100030Exotic--------33
parador
 PARADOR
300001000150----------33
radroach
 RADROACH
100001000100Exotic--------33
radscorpion
 RADSCORPION
150001000250----------33
large radscorpion
 RADSCORPION_LARGE
800001000500----------9
large radscorpion
 RADSCORPION_LARGE_SAVAGE
800001000500----------17
giant radscorpion
 RADSCORPION_GIANT
40000010001000----------9
octopus
 OCTOPUS
5000100010----------100
crab
 CRAB
800029000----------100
horseshoe crab
 HORSESHOE_CRAB
2000290010----------100
radwhale
 RADWHALE
2500000010001000----------3
walrus
 WALRUS
15000001000400Exotic--------50
sea lamprey
 FISH_LAMPREY_SEA
200001000200------------
radshark
 RADSHARK
20000001000500----------33
sturgeon
 FISH_STURGEON
15000001000300------------
cod
 FISH_COD
500001000200------------
halibut
 FISH_HALIBUT
2000001000200------------
bluefin tuna
 FISH_TUNA_BLUEFIN
6000001000200------------
narwhal
 NARWHAL
12000001000100----------20
gecko
 GECKO
4500090060Exotic--------17
golden gecko
 GECKO_GOLDEN
65000900250Exotic--------17
cave crocodile
 CROCODILE_CAVE
4000001000500----------9
rattlesnake
 RATTLESNAKE
7000100020Exotic--------9
radigator
 RADIGATOR
2000001000500----------9
desert tortoise
 DESERT_TORTOISE
5500290050Exotic--------9
gila monster
 GILA_MONSTER
2000100050Exotic--------9
monitor lizard
 MONITOR_LIZARD
1000001000400Exotic--------3
black mamba
 BLACK_MAMBA
5000100050Exotic--------3
python
 PYTHON
200000100050Exotic--------3
anaconda
 ANACONDA
1000001000200Exotic--------3
carp
 FISH_CARP
40000290050----------33
pike
 FISH_PIKE
350002900100----------17
mirelurk
 MIRELURK
1200001000250----------9
radrat
 RADRAT
20000100030Exotic--------33
armadillo
 ARMADILLO
7500100030Exotic--------3
radbit
 RADBIT
10000100030Exotic--------17
mole rat
 MOLE_RAT
70000100050Exotic--------17
mole rat
 MOLE_RAT_SUBTERRANEAN
70000100050Exotic--------33
bloodwing
 BLOODWING
100000830150----------9
bloodwing
 BLOODWING_SAVAGE
100000830150----------17
wagon
 EQUIPMENT_WAGON
1200010000Common----------
Talon mercenary
 GRIFFON
1750008000------------
stable citizen
 PONY_STABLE
700008200------------
raider
 PONY_RAIDER
700008200------------
raider
 PONY_MARAUDER
700008200------------
steel ranger
 PONY_RANGER
1000008200------------
slaver
 PONY_SLAVER
700008200------------
slave trader
 PONY_SLAVER_MERCHANT
700008200------------
slave pony
 PONY_SLAVE
700008201000Pet--------0
mutated pony
 PONY_MUTATED
7000010000------------
blank pony
 PONY_BLANK
70000820200Pet----------
blank griffon
 GRIFFON_BLANK
175000800600Pet----------
griffon
 GRIFFON_SPAWNER_BLANK
17500010000------------
crate
 SPAWN_CRATE_SLAVER
1000010000------------
crate
 SPAWN_CRATE_TALON
1000010000------------
crate
 SPAWN_CRATE_RANGER
1000010000------------
dragon
 DRAGON
25000000900100000----------5
feral minotaur reaver
 MINOTAUR_REAVER
22000010000------------
hydra
 HYDRA
80000001000100000----------5
star-spawn
 STAR_SPAWN
250000001000100000----------5
sea serpent
 SEA_SERPENT
9000000100010000------------
sea monster
 SEA_MONSTER
80000001000100000------------
infant abomination
 NEWBORN_ABOMINATION
2000010000------------
Unity
 UNITY
2000008200------------
wastelander
 PONY_WASTELANDER
700008200------------


« Last Edit: July 08, 2013, 04:57:01 pm by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Maklak

  • Bay Watcher
    • View Profile
Re: Crop table data script in perl that reads RAWs
« Reply #3 on: July 29, 2013, 01:27:49 pm »

I just released the creatures.pl script. It has lots of options for controlling the output, such as which columns to print. It divides creatures into animals, robots, vermin and fake, but there are some errors with it, so refer to known bugs section.

It can read and print this data, but putting it all in one table is not recommended. ID, Name, Size, Speed, Petvalue, Pet, Train, Milk, Yarn, Egg, Grazer, Freqency, Biome (Aboveground / Subterranean and Good / Evil / Savage), Natural Skills, Syndromes, Interactions, Various tokens, Description and Maxage.
 
If you have any feedback, suggestions and feature requests, please let me know.

Maybe the Misc tokens should contain something else? Or maybe it has a token that only makes it less clear (I want it to have just the important tokens, so things like NO_NAUSEA would just clutter it).

Maybe the order of columns should be changed? Or Milk, Yarn and Eggs merged into one column to preserve space? Maybe Pet and Train should be merged?

Maybe something in the "known bugs" sections bugs you and you want me to fix it? Note, that it may not be easy.

Maybe I should add an option to filter out anything that starts with GIANT_ or ends with _MAN? Those things clutter the animal list.

You should be able to find some errors in your mods with this script, such as missing creature sizes or typos in the descriptions, so it is useful for more than just compiling guides. 

Anyway, if you want me to change something, for example to add your mod's robots to the list of robots, I need to know which creature tokens to use. But then [CREATURE_CLASS:ROBOT] would work if you added it to your RAWs.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Crop table data script in perl that reads RAWs
« Reply #4 on: July 29, 2013, 09:44:26 pm »

Maklak, I didnt know that this thread included the creature table... we always talked with PMs and this thread is titled "Crop Table", so I assumed it was just that... and since you already did send me the script I did not check this thread again... otherwise I would have said something about the creature table.

Edit: The script could also fall under "utilities" category, maybe you can move the thread to the fitting board?
« Last Edit: July 29, 2013, 09:48:55 pm by Meph »
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution

Saddly I don't have pearl and wouldn't know how to use it, but I have a good idea on how to program my own in C# or Java. Really nifty for those that can use it, saddly I cannot.

Great work tho.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

Pearl is free and you dont need to know it to run this. Its just windows command prompt, and a readme exists. So to use this script all you have to do is: Download and Install Pearl, Run the script, enter the commands you want executed, just like any dfhack script would be run.

And then you'll find a nice .txt with your BBC or HTML code, ready for the forum or readme. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Maklak

  • Bay Watcher
    • View Profile

> I have a good idea on how to program my own in C# or Java.
Those scripts can be rewritten in any language that has regular expressions. Still, if anyone wants to do it, I guess looking how I did it would help.

Under windows, I use the version of perl that ships with MinSys, but people generally recommend Strawberry perl : http://strawberryperl.com/

Under Linux it is even easier; just run Synaptic, search for perl, select it for install and Synaptic will do the rest.

After you install it, you just run command prompt and type
$ perl -w <path to script> <options> <files>
It is rather straightforward and I recommend learning some command line tools to anyone anyway.

In other news, I uploaded v1.01 of creatures.pl Change-log:
* eval somehow fixed itself, so --expr should work now, I guess? Still, I'd need to write a manual on how to use it or anyone interested would have to look at the code.
* Added option to "compact" some columns to preserve space. "Pet" and "Train" as well as "Milk", "Yarn" and "Eggs" can be concatenated to single columns.
* Added option to filter out animal men
* Added option to filter out giant animals
* Changed Biome to display all biomes, not just aboveground / subterranean and good / evil / savage, which makes it rather verbose.

I believe the creatures.pl is done. I can't think of any new features and I fixed all the bugs that I found and was able to.
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

I had a go with the script you posted.

I used perl -w creatures.pl --syn --biome --skill --maxage --sepname -o=html creature_masterwork.txt >creature_pet_masterwork.html to get the lists, I hope this enables all features. I wanted as much info read out as possible. The html file is fine, it only looks a bit silly on creatures with a lot of castes or interactions. You get a single entry in the table that takes 2 pages or so. It does not recognize that these entries are for different castes. Example:
Quote
DODGING:5
BOW:10
SITUATIONAL_AWARENESS:5
MELEE_COMBAT:10
SWORD:10
DODGING:5
BOW:10
SITUATIONAL_AWARENESS:5
MELEE_COMBAT:10
HAMMER:10
DODGING:5
BOW:10
SITUATIONAL_AWARENESS:5
MELEE_COMBAT:10
SPEAR:10

Thats from the golem. 3 castes, hammer, spear and sword. Each have natural skills, but the table looks like the creature "golem" has all three combat skills, and several skills trice. Dont know how important that is overall, these dont appear that often and can be fixed manually.

Edit: Damn it, you already knew that. "* Natural skills are printed for all castes, so for some creatures there are repetitions" Sorry. ^^

Only problem I encountered is that *creature*.txt or *.txt or creature*.* dont work. I had to type every name manually. Thats not too bad, but of course it results in a lot of html files. I might have to put all creatures into one file, then run it again to get ONE nice table.

Feature Request: Printout in Alphabetical order, sorted by creature name. Or plant name, item name, whatever. Would make it a lot easier for the reader/user to find something, especially if the list is rather long.

Another problem, which is mod/lazyness-related: The syndrome/interaction information is rather basic and takes the syn_name, which is many cases does not exist or has a rather non-informative name. I wouldnt know how you could do it any better, I only know that modders can fix it themselves by writing better syn_names. Ha, never thought that I'd have to do that. ^^
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Maklak

  • Bay Watcher
    • View Profile

Thanks for the feedback.

> I wanted as much info read out as possible.
--all --noempty --verbose_size
Optionally --nodesc or --compact to fit everything.

> Thats from the golem. 3 castes, hammer, spear and sword. Each have natural skills, but the table looks like the creature "golem" has all three combat skills, and several skills trice.
I knew about the problem and didn't consider it serious, but I'm not averse to fixing it. I just though it would be obvious from looking at the repeating list, that this creature has castes. The simplest way of fixing it would be to store these in a hash table for each creature and only update it if the new value is bigger, so for said golem it would print (possibly not in this order): 

(Castes: Yes)  <- just an idea.
DODGING:5
BOW:10
SITUATIONAL_AWARENESS:5
MELEE_COMBAT:10
SWORD:10
HAMMER:10
SPEAR:10

Another cheap way to provide more information is to put a caste count somewhere, maybe in a separate column.

If this is not good enough, I would have to store caste-specific information and have a default for the creature. Doable, but more work and may be a bit tricky. Still, this would bring me a step closer to another goal: a script that reads a creature file and prints something like this: http://www.bay12forums.com/smf/index.php?topic=118893.msg3953300#msg3953300

Another place where there is sometimes doubled information is --verbose_size, but it barely ever comes up. I think I saw a falcon or something that had different size categories for male and female for a total of 6.



> Only problem I encountered is that *creature*.txt or *.txt or creature*.* dont work.
That's really bizarre. :o Shell should turn that globs into file names by itself. I can do it internally, but there shouldn't be a need. You could use the --debug and check the top part of the output - it should display the options and file names. If these commands work, so should my scripts:
$ ls *.txt
$ dir *.txt

I generally recommend keeping the script and the output file outside or the objects directory. That's why my examples have so many ../../.. in them.

> I might have to put all creatures into one file, then run it again to get ONE nice table.
That would work, but you really shouldn't have to. :( It worked for me just fine.

> Feature Request: Printout in Alphabetical order, sorted by creature name. Or plant name, item name, whatever. Would make it a lot easier for the reader/user to find something, especially if the list is rather long.
Hm, not that hard to do. I considered adding this http://www.kryogenix.org/code/browser/sorttable/ or adding an option to select which column to sort by, but a simple sort by ID or name should suffice. The downside of sorting and part of the reason I didn't do it in the first place is that now what is close in the table is close in the RAWs, so it's easier to find and similar creatures are grouped together. But that's non-issue with tools like grep.

> The syndrome/interaction information is rather basic and takes the syn_name, which is many cases does not exist or has a rather non-informative name. I wouldnt know how you could do it any better, I only know that modders can fix it themselves by writing better syn_names. Ha, never thought that I'd have to do that.
Yep, I don't have a lot to work with here and needed the info to be compact. These tools started out with the intention of automating the boring parts of making manuals, but ended up providing some error detection for modders. If / when I get around to writing reaction script, I plan to read item and material IDs too and check for ID errors in reactions.

Oh and if you want robots (golems, gargoryles, whatever) to be separated from the rest, you can put [CREATURE_CLASS:ROBOT] in them.



Masterwork mod is great for testing because it has a lot of fringe cases. For example I didn't expect creatures to have 0 Natural Skill, such as
[CREATURE:ANTMAN]
[NATURAL_SKILL:AXE:0]YESHARDERINVADER

I guess I can just safely ignore it rather than hide it. It will stand out to the modder that way. Hm... I think I can guess what it is. Masterwork Launcher probably has some last second editing to fill these in to something sensible depending on options. So, should I hide those 0 skills then? Add an option to hide it? Probably best leave them as they are.

EDIT: Uploaded creatures.pl v1.02. Changelog:
* For natural skills, the default behaviour is to just print the best skills for all castes of creature, as explained above. This can be changed back by --allskills.
* Creatures are now sorted by name by default and there are options to sort by a few other columns, such as ID or SIZE or not sort at all.
* You can now change "--" for empty cells to something else with --na=No or whatever.
* Added an option to print an extra column at the end of table where you can put notes or something.
« Last Edit: July 30, 2013, 09:24:13 am by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

Quote
Oh and if you want robots (golems, gargoryles, whatever) to be separated from the rest, you can put [CREATURE_CLASS:ROBOT] in them.
Not many mods have robots in them. Wouldnt "Not-living" be better? After all, that is what it implies. Non-Organic Creatures.

I really dont think the castes are a big issue. Creatures with complex caste system are usually very important to a mod, so modders probably gave this critical information already. The script would choke on my creature_standard.txt with the dwarves, but of course I already have a seperate readme about the caste system and mages.

Quote
> Only problem I encountered is that *creature*.txt or *.txt or creature*.* dont work.
That's really bizarre. :o Shell should turn that globs into file names by itself. I can do it internally, but there shouldn't be a need. You could use the --debug and check the top part of the output - it should display the options and file names. If these commands work, so should my scripts:
$ ls *.txt
$ dir *.txt
I'll try. I remember the same thing about the plant script. I also run the script without any "$" at the start, it results in an error message.

That sortable table looks amazing. I dont know about plants and creatures, but materials would benefit greatly from it. Want the best weapon-grade metal? Click. Want the most valuable metal? Click. I know the wiki already has it, I tried to copy the functionality into my html-manual, but failed miserably. Buts its a tiny thing, a small improvement, in comparison to having a list at all. ;) I still stand with the alphabetical order, because "easier to find and similar creatures are grouped together."  is NOT true for my raws... the creatures are sorted very erratic.

Quote
[CREATURE:ANTMAN]
[NATURAL_SKILL:AXE:0]YESHARDERINVADER
Yes, they can be improved with the UI, thats why you see the YESHARDERINVADER tag. People can ramp up the weapon and armor skills of invaders.

And your script is godsend for balancing creatures. I can finally see all clustersizes or all frequencies or all biomes right next to each other. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Maklak

  • Bay Watcher
    • View Profile

> Not many mods have robots in them. Wouldnt "Not-living" be better? After all, that is what it implies. Non-Organic Creatures.
It puts robots together with all kinds of ghouls, vampires and undead, so it doesn't work. But then, robots is just something I wanted for FoE. Maybe I should add an option to merge robot and animal tables and avoid the issue.

> I also run the script without any "$" at the start, it results in an error message.
Lol. Dollar sign is the prompt for unix shell and is widely used in howtos. It literally means "run the command after the dollar in a shell" and of course you aren't supposed to type in the dollar, just the thing after it. I thought it was common knowledge. If it isn't, I don't see how to fix it; the shell commands need to stand out somehow and dollar is the standard.

EDIT: Well, I didn't mean to be insulting. Allright, a tutorial (with things like how to get perl and what is $) is now on the TODO list, along with "hey, the engine I made works, so let me rewrite it closer to object based paradigm, with more functions, for the next script and see if that architecture is cleaner."

> That sortable table looks amazing. I dont know about plants and creatures, but materials would benefit greatly from it.
The price for it is including a javascript file, which would need to be in the same directory as the output file, increasing the general confusion on how to use the script. I'm guessing, it would also screw up sorting by columns that display several things, like name and ID. I tried to make the wiki output sortable, but didn't manage to do it. One way around it would be to export to txt/csv, then import that into a spreadsheet. I haven't tested that in a while, though.

OK, I tested output to txt/csv, importing to Open Office Calc and sorting. It works.
$ perl -w ../creatures.pl --nonotes --sepname --nocompact *creat*.* >../out.csv
You might want to use other options too, just make sure to include these three last.

You import the out.csv into a spreadsheet, using comma as a separator and may need to move some things to sub-spreadsheets or to change the width of some columns, but otherwise everything looks OK and is sortable. Well, except the eggs are somehow converted to dates, but the work-around it to import that column as text. Once I select a range of rows and open Menu->Data->Sort, I can sort those rows by whichever column(s) I want. Maybe I should include this in the manual somewhere.

EDIT: I uploaded creatures.pl v 1.03.
* The only change is adding a --norobot option which merges robots into the table of animals and other creatures. This makes sense because I wanted robots to stand out for FoE, but normally this division isn't that important. The vermin and fake categories remain separate.
« Last Edit: July 31, 2013, 06:38:52 am by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

No idea why the * wouldnt work... I use Win7, but I too am used to have a "*" for "any".

Quote
> I also run the script without any "$" at the start, it results in an error message.
Lol. Dollar sign is the prompt for unix shell and is widely used in howtos. It literally means "run the command after the dollar in a shell" and of course you aren't supposed to type in the dollar, just the thing after it. I thought it was common knowledge. If it isn't, I don't see how to fix it; the shell commands need to stand out somehow and dollar is the standard.
You know, sometimes I think people overestimate me. I have never writen or seen a Pearl code before. Or Python or C++. And prior to DF I never even heard of ruby or lua. Maybe its common knowledge with IT-Students and programmers, but not with outdoorspeople, which describes me a lot better. I just happen to like fancy PC games. ;)

I'll try the script again later, but all in all it looks very good. I can definetly fill in my creature page now.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Maklak

  • Bay Watcher
    • View Profile

I think I understand your problem with globs now. Shell does some substitutions on the fly, and changing *.txt into a list of files matching that pattern, is one of them. If instead you type "*.txt" (literally, with the quotation marks), no such substitution is made, and the scrip sees *.txt as a parameter. Since this is not a valid parameter and not a file, it informs you about it, assuming you made a typo and quits.

There is another mistake you can make with quotation marks --a --b and "--a --b" are not the same. The first is two separate parameters, the second is one and not matching anything useful at that. This is necessary for example for handling long file names with spaces in them, such as "G:\GRY\Dwarf Fortress\Mods".

I recommend that you read some tutorial on how to use shell commands. 

Allright, a tutorial (with things like how to get perl and what is $) is now on the TODO list, along with "hey, the engine I made works, so let me rewrite it closer to object based paradigm and with more functions for the next script and see if that architecture is cleaner."

> You know, sometimes I think people overestimate me. I have never writen or seen a Pearl code before. Or Python or C++.
You have a GUI that edits the RAWs, so I assumed you're better than me at programming. That's why I was so surprised.



Here is a (very early) preview of my next script.

Why the hay would you need so many attacks for each weapon? The wiki says they are chosen at random, with edged attacks being 100 times more likely. These attacks have a lot of modes with varying effectiveness, so in effect you're nerfing these weapons. I think.

The "--: -- C:-- P:-- V:--" is where I'll need to tweak the script to read your RAWs, so don't worry about them. The table is not even in it's final form. (That was a joke.)

I'm not surprised people ask which weapon is best. There are so many of them, with so many attacks each. Besides, the question should really be "what is a pretty good and reasonably affordable option when it comes to arms and armour" rather than "absolute best". I'll usually want to outfit 20 or so Dwarves and it is simply not feasible to make hundreds of masterwork adamantine items.

Read 251 weapons.
Table of weapons:
 
Name
 ID
SkillRangedSize1H2HBarsAttacks
pair of tomahawks
 ITEM_WEAPON_TOMAHAWKS
AXE--800500005095006left tomahawk hack: edge C:5000 P:4000 V:1
 right tomahawk hack: edge C:5000 P:4000 V:1
 bits of both furiously assault: edge C:8000 P:6000 V:2.00
 blunt ends of both weapons simultaneously bludgeon: blunt C:20 P:200 V:2.00
 --: -- C:-- P:-- V:--
 --: -- C:-- P:-- V:--
training axe
 ITEM_WEAPON_AXE_TRAINING
AXE--80042500475001hack: blunt C:30000 P:6000 V:1.25
 flat slap: blunt C:30000 P:6000 V:1.25
 pommel strike: blunt C:100 P:1000 V:1
cavebear berserker arms
 ITEM_WEAPON_CAVEBEAR_ARMS
AXE--1800425002000009axeblade hack: edge C:40000 P:6000 V:1.25
 axeblade relentlessly hew: edge C:40000 P:12000 V:2.00
 honed axeblade emphatically slice: edge C:40000 P:6000 V:1.80
 axeblade make an undercut swing at: edge C:50000 P:10000 V:2.00
 mattock point strike: edge C:1000 P:5000 V:1.50
 axeblade whirl around and cleave: edge C:15000 P:18000 V:2.50
 mattock follow a feint with piercing overhand blow: edge C:1000 P:18000 V:4.25
 mattock and axe assail furiously: edge C:25000 P:6000 V:6.00
axe of giants
 ITEM_WEAPON_AXE_GIANTS
AXE--140042500475004hack: edge C:200000 P:80000 V:10.00
 flat slap: blunt C:40000 P:1000 V:1.25
 pommel strike: blunt C:250 P:4000 V:1
fighting tomahawk
 ITEM_WEAPON_TOMAHAWKS_ORC
AXETHROW60020000350006blade hack: edge C:5000 P:3000 V:1.25
 blade slash: edge C:5000 P:1500 V:1
 awlspike drill: edge C:100 P:3000 V:1.25
 --: -- C:-- P:-- V:--
legendary battle axe
 ITEM_WEAPON_AXE_BATTLE_UPGRADE_TWO
AXE--120042500475009hack: edge C:40000 P:6000 V:2.50
 flat slap: blunt C:40000 P:6000 V:2.50
 pommel strike: blunt C:100 P:1000 V:2.00
 blade lacerate: edge C:5000 P:5000 V:2.50
 full force relentlessly hew: edge C:40000 P:12000 V:3.00
 honed axeblade emphatically slice: edge C:40000 P:6000 V:1.80
 power make an undercut swing at: edge C:50000 P:10000 V:3.00
 make a backhanded strike at: edge C:50000 P:10000 V:3.00
 heavy blade whirl around and cleave: edge C:15000 P:18000 V:3.00
 axe head whirl around with outstreched arms and cleave: edge C:20000 P:22000 V:3.00
 bloodthirst of khorne strike: edge C:90000 P:900000 V:15.00
 want for blood hit: edge C:90000 P:900000 V:15.00
battle axe
 ITEM_WEAPON_AXE_BATTLE
AXE--80042500475009hack: edge C:40000 P:6000 V:1.25
 flat slap: blunt C:40000 P:6000 V:1.25
 pommel strike: blunt C:100 P:1000 V:1
 blade lacerate: edge C:5000 P:5000 V:1.25
 full force relentlessly hew: edge C:40000 P:12000 V:2.00
 honed axeblade emphatically slice: edge C:40000 P:6000 V:1.80
 power make an undercut swing at: edge C:50000 P:10000 V:2.00
 make a backhanded strike at: edge C:50000 P:10000 V:2.00
 heavy blade whirl around and cleave: edge C:15000 P:18000 V:1.50
 axe head whirl around with outstretched arms and cleave: edge C:20000 P:22000 V:3.00
battle axe of armok
 ITEM_WEAPON_AXE_BATTLE_ARMOK
AXE--6004250047500900hack: edge C:40000 P:6000 V:1.25
 flat slap: blunt C:40000 P:6000 V:1.25
 pommel strike: blunt C:250 P:4000 V:1
heavy choppa
 ITEM_ORC_WEAPON_HALBERD
AXE--120082500775005slash: edge C:20000 P:8000 V:1.25
 stab: edge C:50 P:2000 V:1
 shaft bash: blunt C:20000 P:6000 V:1.25
petrified great axe
 ITEM_WEAPON_AXE_GREAT_FOSSIL
AXE--130052500775005hack: edge C:60000 P:8000 V:1.25
 flat slap: blunt C:60000 P:8000 V:1.25
 pommel strike: blunt C:100 P:1000 V:1
 blade lacerate: edge C:5000 P:5000 V:1.25
 full force relentlessly hew: edge C:60000 P:12000 V:2.00
 emphatically slice: edge C:40000 P:6000 V:1.80
 make an undercut swing at: edge C:50000 P:10000 V:2.00
 heavy blade whirl around and cleave: edge C:15000 P:18000 V:1.50
 axe head whirl around with outstretched arms and cleave: edge C:20000 P:22000 V:3.00
toothed axe
 ITEM_WEAPON_AXE_TOOTHED
AXE--80042500475004bladed edge hack: edge C:40000 P:6000 V:1.25
 toothed edge rake: edge C:50000 P:2000 V:1.25
 full force relentlessly hew: edge C:40000 P:12000 V:2.00
 pommel strike: blunt C:250 P:4000 V:1
legendary chopping axe
 ITEM_WEAPON_AXE_WOOD_UPGRADE_TWO
AXE--53042500475003hack: edge C:40000 P:600 V:2.50
 chop: edge C:40000 P:600 V:2.50
 cleave: edge C:40000 P:600 V:2.50
 flat slap: blunt C:40000 P:6000 V:2.50
 pommel strike: blunt C:100 P:1000 V:2.00
 curse of the djinn strike: edge C:90000 P:900000 V:15.00
 power released by the spell hit: edge C:90000 P:900000 V:15.00
hurlbat
 ITEM_WEAPON_HURLBAT
AXE--70042000555003slash: edge C:20000 P:7000 V:1.10
 hack: edge C:50000 P:7000 V:1.10
 slice: edge C:20000 P:7000 V:1.10
 point stab: edge C:200 P:100 V:1.20
 head whirl around and slash: edge C:20000 P:7000 V:1.50
bearded axe
 ITEM_WEAPON_AXE_BEARDED
AXE--70042500475004hack: edge C:40000 P:6000 V:1.25
 blade rake: edge C:40000 P:3000 V:1.20
 flat slap: blunt C:40000 P:6000 V:1.25
 pommel strike: blunt C:250 P:4000 V:1
 rive: edge C:40000 P:5000 V:1.10
mechanized axe thrower
 ITEM_WEAPON_AXE_THROWING
AXETHROW30020000320006hack: edge C:5000 P:1500 V:1.25
 flat slap: blunt C:6000 P:200 V:1.25
 pommel strike: blunt C:100 P:200 V:1
waaagh axe
 ITEM_ORC_WEAPON_AXE_GREAT
AXE--130085000775005hack: edge C:60000 P:8000 V:1.25
 flat slap: blunt C:60000 P:8000 V:1.25
 pommel strike: blunt C:250 P:4000 V:1
meat cleaver
 ITEM_TOOL_KNIFE_MEAT_CLEAVER
AXE--3005000275001hack: edge C:800 P:400 V:1.25
 flat slap: blunt C:800 P:400 V:1.25
 handle strike: blunt C:20 P:400 V:1
legendary great axe
 ITEM_WEAPON_AXE_GREAT_UPGRADE_TWO
AXE--1600525007750015hack: edge C:60000 P:8000 V:2.50
 flat slap: blunt C:60000 P:8000 V:2.50
 pommel strike: blunt C:100 P:1000 V:2.00
 blade lacerate: edge C:5000 P:5000 V:2.50
 full force relentlessly hew: edge C:60000 P:12000 V:4.00
 emphatically slice: edge C:40000 P:6000 V:3.00
 make an undercut swing at: edge C:50000 P:10000 V:4.00
 heavy blade whirl around and cleave: edge C:15000 P:18000 V:3.00
 axe head whirl around with outstreched arms and cleave: edge C:20000 P:22000 V:4.00
 blessing of tholtig cryptbrain strike: edge C:90000 P:900000 V:15.00
 far away sound of waves and thunder hit: edge C:90000 P:900000 V:15.00
training chopper
 ITEM_WEAPON_CHOPPER_TRAINING
AXE--2005000150001flat slap: blunt C:2000 P:3000 V:1.25
 pommel strike: blunt C:100 P:1000 V:1
chainaxe
 ITEM_WEAPON_CHAINAXE
AXE--120050000700009bladed edge hack: edge C:40000 P:6000 V:1.25
 toothed edge rake: edge C:50000 P:2000 V:1.25
 full force relentlessly hew: edge C:40000 P:12000 V:2.00
 steampowered blade hack and rip: edge C:60000 P:6000 V:1.88
 steampowered teeth rake and rip: edge C:75000 P:2000 V:1.88
 power assisted overhand swing relentlessly hew: edge C:60000 P:12000 V:5.00
 power assisted uppercut assault: edge C:60000 P:12000 V:3.00
 pommel strike: blunt C:250 P:4000 V:1
chopper
 ITEM_WEAPON_CHOPPER
AXE--50010000250002hack: edge C:20000 P:3000 V:1.25
 flat slap: blunt C:20000 P:3000 V:1.25
 pommel strike: blunt C:50 P:500 V:1
chopping axe
 ITEM_WEAPON_AXE_WOOD
AXE--40042500475003hack: edge C:40000 P:600 V:1.25
 chop: edge C:40000 P:600 V:1.25
 cleave: edge C:40000 P:600 V:1.25
 flat slap: blunt C:40000 P:6000 V:1.25
 pommel strike: blunt C:100 P:1000 V:1
superior great axe
 ITEM_WEAPON_AXE_GREAT_UPGRADE_ONE
AXE--1600525007750015hack: edge C:60000 P:8000 V:2.50
 flat slap: blunt C:60000 P:8000 V:2.50
 pommel strike: blunt C:100 P:1000 V:2.00
 blade lacerate: edge C:5000 P:5000 V:2.50
 full force relentlessly hew: edge C:60000 P:12000 V:4.00
 emphatically slice: edge C:40000 P:6000 V:3.00
 make an undercut swing at: edge C:50000 P:10000 V:4.00
 heavy blade whirl around and cleave: edge C:15000 P:18000 V:3.00
 axe head whirl around with outstreched arms and cleave: edge C:20000 P:22000 V:4.00
superior chopping axe
 ITEM_WEAPON_AXE_WOOD_UPGRADE_ONE
AXE--53042500475003hack: edge C:40000 P:600 V:2.50
 chop: edge C:40000 P:600 V:2.50
 cleave: edge C:40000 P:600 V:2.50
 flat slap: blunt C:40000 P:6000 V:2.50
 pommel strike: blunt C:100 P:1000 V:2.00
superior battle axe
 ITEM_WEAPON_AXE_BATTLE_UPGRADE_ONE
AXE--120042500475009hack: edge C:40000 P:6000 V:2.50
 flat slap: blunt C:40000 P:6000 V:2.50
 pommel strike: blunt C:100 P:1000 V:2.00
 blade lacerate: edge C:5000 P:5000 V:2.50
 full force relentlessly hew: edge C:40000 P:12000 V:3.00
 honed axeblade emphatically slice: edge C:40000 P:6000 V:1.80
 power make an undercut swing at: edge C:50000 P:10000 V:3.00
 make a backhanded strike at: edge C:50000 P:10000 V:3.00
 heavy blade whirl around and cleave: edge C:15000 P:18000 V:3.00
 axe head whirl around with outstreched arms and cleave: edge C:20000 P:22000 V:3.00
great axe
 ITEM_WEAPON_AXE_GREAT
AXE--1300525007750015hack: edge C:60000 P:8000 V:1.25
 flat slap: blunt C:60000 P:8000 V:1.25
 pommel strike: blunt C:100 P:1000 V:1
 blade lacerate: edge C:5000 P:5000 V:1.25
 full force relentlessly hew: edge C:60000 P:12000 V:2.00
 emphatically slice: edge C:40000 P:6000 V:1.80
 make an undercut swing at: edge C:50000 P:10000 V:2.00
 heavy blade whirl around and cleave: edge C:15000 P:18000 V:1.50
 axe head whirl around with outstretched arms and cleave: edge C:20000 P:22000 V:3.00
simple axe
 ITEM_TOOL_AXE_SIMPLE
AXE--2005000275001hack: edge C:800 P:400 V:1.25
 flat slap: blunt C:800 P:400 V:1.25
 handle strike: blunt C:20 P:400 V:1
doublesided axe
 ITEM_WEAPON_AXE_LABRYS
AXE--70047500575004first bit hack: edge C:40000 P:6000 V:1.25
 second bit hack: edge C:40000 P:6000 V:1.25
 cleave: edge C:40000 P:6000 V:1.55
 flat slap: blunt C:40000 P:6000 V:1.25
 pommel strike: blunt C:250 P:4000 V:1
serrated axe
 ITEM_WEAPON_AXE_SERRATED
AXE--80042500475004hack: edge C:40000 P:6000 V:1.25
 serrated edge rake: edge C:50000 P:2000 V:1.50
 flat slap: blunt C:40000 P:6000 V:1.25
 pommel strike: blunt C:250 P:4000 V:1
booby-trap
 ITEM_WEAPON_BOOBY_TRAP
CROSSBOWCROSSBOW500999999999999995bash: blunt C:10000 P:4000 V:1.25
 bayonet stab: edge C:500 P:4000 V:1
 bayonet slash: edge C:800 P:2000 V:1
totem-bomb sling
 ITEM_WEAPON_TOTEM_SLING
CROSSBOWCROSSBOW30050004000010lash: edge C:100 P:500 V:2.00

« Last Edit: August 01, 2013, 07:55:17 am by Maklak »
Logged
Quote from: Omnicega
Since you seem to criticize most things harsher than concentrated acid, I'll take that as a compliment.
On mining Organics
Military guide for FoE mod.
Research: Crossbow with axe and shield.
Dropbox referral

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist

Nice work on the weapons script, although the last entry might better omit the attack-verbs and only show numbers. I dont know how many people can read the raws in terms of attack values, or if a "bad", "good" "medium" + "blunt" and "edged" would make more sense as an output.

About the raw-editing UI: I had the LNP source code and based EVERYTHING on the "aquifer" button. I didnt knew how to add new elements (I discovered the toolbox of visual basics about a year later) so everything I made was a previous item that I copy pasted and then altered. Anyone who knows how to code will get a heartattack if he sees my source code. ^^ But it works, so I cant complain.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::
Pages: [1] 2 3 4