Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Kittah_Khan

Pages: [1]
1
DF Modding / Rawscript 0.66
« on: December 20, 2010, 06:59:03 am »
Current version is 0.66

Fully 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 HERE

To all who are interested in what you can do with rawscript, take a look. HERE
The .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.

2
DF Bug Reports / [40d]Aquatic Biome Creatures not spawning
« on: April 25, 2009, 04:51:12 pm »
Tested in 40d on various embark locations, none produced non-vermin aquatic creatures.

I've also tested previous versions to make sure I wasn't just getting unlucky.
40c and everything prior has non-vermin aquatic creatures spawning correctly.

One exception is cave river creatures.

Possibly related to http://www.bay12games.com/forum/index.php?topic=29960.0

Pages: [1]