preload button hover image:
HomeSearchRankingsStatisticsAboutContact
Current Time: Nov 23, 2024, 06:53:58 am
 Dwarf Fortress File Depot » Utilities » Rawscript
      
Registration is not required to download. However, it will allow you to vote, comment, and upload. Forgot your password?
File Listing: Rawscript
Last Updated: Dec 25, 2010, 03:51:38 pm
First Created: Dec 20, 2010, 05:56:54 am
File version: 0.66 beta
For DF version: Multiple
Downloads: 60 (65) Size: 297.2 KB
Views: 448 (538) Type: ZIP
Rating (0 votes): Unrated
Description
Rawscript is an extension for the RAW text format, the aim is to cut down on repetitions inside of the raws and to facilitate easier editing.
It is more complex than standard raw editing, but I hope you will find it well worth it, the best comparison is to the creature variation system currently present.

Rawscript reads .raw files and outputs .txt files that can be used by DF itself.

Features
    C-style Macros
    Mass editing
    Import

Commands
    [RAW_IMPORT]
    [RAW_NEW]
    [RAW_INSERT]
    [RAW_REPLACE]
    [RAW_ADD]
    [RAW_MULT]
    [RAW_GRAV]
    [RAW_REMOVE]
    [RAW_NEW_TAG]
    [RAW_COPY_TAG]
    [RAW_INSERT_TAG]
    [RAW_INSERT_COPY_TAG]
    [RAW_REPLACE_TAG]
    [RAW_REPLACE_COPY_TAG]
    [RAW_REMOVE_TAG]

Be aware, Rawscript does not deal with SELECT_CASTE and other such constructions, it only recognizes the relations between tags.
The only thing it does is text editing.

material_template example : https://dffd.bay12games.com/file.php?id=3589
.raw is the input, .txt is the output.

Example :
Prototype, macro and RAW_MULT :
#define [SIZE_MULTIPLY_MACRO:size]{[RAW_MULT:SIZE:size:TWO_HANDED:size:MINIMUM_SIZE:size]}
#define [EDGED_MULTIPLY_MACRO:size:depth:power]{[RAW_MULT:ATTACK|EDGE:size|depth||||power]}

[PROTO ITEM_WEAPON:SWORD_PROTOTYPE]
[SIZE:900]
[SKILL:SWORD]
[TWO_HANDED:77500]
[MINIMUM_SIZE:62500]
[ATTACK:EDGE:100000:8000:slash:slashes:NO_SUB:1250]
[ATTACK:EDGE:50:4000:stab:stabs:NO_SUB:1000]
[ATTACK:BLUNT:100000:8000:slap:slaps:flat:1250]
[ATTACK:BLUNT:100:1000:strike:strikes:pommel:1000]

[ITEM_WEAPON:SWORD_GREAT]
[NAME:great sword:great swords]
[MATERIAL_SIZE:7]
[RAW_IMPORT:ITEM_WEAPON|SWORD_PROTOTYPE]
[SIZE_MULTIPLY_MACRO:1.25]
[EDGED_MULTIPLY_MACRO:2:1.5:2]

[ITEM_WEAPON:SWORD_HUGE]
[NAME:huge sword:huge swords]
[MATERIAL_SIZE:9]
[RAW_IMPORT:ITEM_WEAPON|SWORD_PROTOTYPE]
[SIZE_MULTIPLY_MACRO:1.5]
[EDGED_MULTIPLY_MACRO:3:2:2.5]

[ITEM_WEAPON:AXE_HUGE]
[RAW_IMPORT:ITEM_WEAPON|SWORD_HUGE]
[RAW_REPLACE_TAG:NAME:NAME|huge axe|huge axes]
[RAW_REPLACE:ATTACK:slash:hack:ATTACK:slashes:hacks]
[RAW_REPLACE:SKILL:SWORD:AXE]
Raw Data: JSON / Text
Checksum / Hash
SHA-256: b5f46b4205d7af09ddb5dfbdf7bd92c32f6f0c1a5dd68d4ec19f7140b1c1754d
IP: logged
Commands
More From This Author
Comments
No comments have been posted for this file yet.
HomeSearchRankingsStatisticsAboutContact

Website by Brett Flannigan. The core site script is PHCDownload (© 2005-2024).
Hosted by Linode.