Current version is 0.66Fully compatible with any existing version.If an update adds additional tags or removes tags, tags.txt will need modification, I'll keep an up-to-date version here.
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.
WARNING if you encounter any bugs/errors/anomalies, please report them here.
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 replacement/editing.
Get it HERETo all who are interested in what you can do with rawscript, take a look. HEREThe .raw file is the input, the .txt file 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]
Functionally, this results in an axe that has the exact same stats as the huge sword, you can use another Edged_Attack_Multiply macro to change stats for the axe.
Another Example :This showcases how you can simplify definitions of large amounts of tags with small variations using macros.
Be aware that you can have macros within macros within macros and so on.
#define [STANDARD_IRIS_MACRO:COLOR]
{[COLOR_PATTERN:IRIS_EYE_COLOR]
[PATTERN:IRIS_EYE]
[CP_COLOR:WHITE]
[CP_COLOR:BLACK]
[CP_COLOR:COLOR]}
STANDARD_IRIS_MACRO:AMBER]
[STANDARD_IRIS_MACRO:AMETHYST]
...
Suggestions are very much welcome.