Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Unifying raw references to items  (Read 598 times)

Knight Otu

  • Bay Watcher
  • ☺4[
    • View Profile
Unifying raw references to items
« on: November 23, 2014, 04:14:50 pm »

There are several places in the raws where the game expects a reference to one or more items. However, as these raws are mostly only created to cover a certain feature, this results in these raws only being able to set the needed item qualities. For examples, in creature raws, only extra butchery objects can have a shape, only item corpses can have a quality, and so on.

As such, I would suggest that these raw references should be unified as much as possible. The main token would start an "item definition", and the following tokens define the item itself, so I'll call those I(tem)D(efinition) tokens here. Obviously, there would be several ID tokens that only make sense in certain contexts, such as for reagents, and some tokens have to act slightly differently depending on context. For a few examples, the bronze colossus could look like this:

Code: [Select]
[ITEMCORPSE:statue corpse]
[ID_TYPE:STATUE:NO_SUBTYPE]
[ID_MATERIAL:INORGANIC:BRONZE]
[ID_QUALITY:5]
[ID_SHAPE:SELF] *To make the statue be of the colossus itself

The ostrich might look like this:
Code: [Select]
[EXTRA_BUTCHER_OBJECT:gizzard stone:BY_CATEGORY:GIZZARD]
[ID_TYPE:SMALLGEM:NONE]
[ID_MATERIAL:ANY_HARD_STONE]
[ID_SHAPE:GIZZARD_STONE]

The honey bee may look like this:
Code: [Select]
[HIVE_PRODUCT:201600:honeycomb]
[ID_AMOUNT:1]
[ID_TYPE:TOOL:ITEM_TOOL_HONEYCOMB]
[ID_MATERIAL:LOCAL_CREATURE_MAT:WAX]
[HIVE_PRODUCT:201600:royal jelly}
[ID_AMOUNT:1]
[ID_TYPE:LIQUID_MISC:NONE]
[ID_MATERIAL:LOCAL_CREATURE_MAT:ROYAL_JELLY]

A creature with a maple leaf item breath might look like this:
Code: [Select]
[CDI:MATERIAL:TRAILING_ITEM_FLOW] *MATERIAL here would be replaced by a more fitting word
[ID_TYPE:PLANT_GROWTH:LEAVES]
[ID_MATERIAL:PLANT_MAT:MAPLE:LEAF]

A tree that grows anvils might look like this:
Code: [Select]
[GROWTH:ANVILS]
[GROWTH_NAME:anvil tree anvil:anvil tree anvil]
[GROWTH_ITEM:anvil]
[ID_TYPE:ANVIL:NONE]
[ID_MATERIAL:INORGANIC:IRON]
[ID_QUALITY:RANDOM:1:3]

Reactions could look like this:
Code: [Select]
[REACTION:MAKE_CLAY_JUG]
[NAME:make clay jug]
[BUILDING:KILN:CUSTOM_J]
[REAGENT:clay:1]
[ID_AMOUNT:1] * would only make sense in certain contexts,
[ID_TYPE:BOULDER:NONE]
[HAS_MATERIAL_REACTION_PRODUCT:FIRED_MAT]
[PRODUCT:clay jug:100]
[ID_AMOUNT:1]
[ID_TYPE:TOOL:ITEM_TOOL_JUG]
[ID_MATERIAL:GET_MATERIAL_FROM_REAGENT:clay:FIRED_MAT]
[ID_QUALITY:BY_REACTION_USER]
[FUEL]
[SKILL:POTTERY]

[REACTION:MAKE_WAX_CRAFTS]
[NAME:make wax crafts]
[BUILDING:CRAFTSMAN:CUSTOM_SHIFT_W]
[REAGENT:wax:150]
[ID_AMOUNT:150]
[ID_TYPE:GLOB:NONE]
[MATERIAL_CLASS:WAX]
[PRODUCT:wax crafts:100]
[ID_AMOUNT:RANDOM:1:3]
[ID_TYPE_LIST] * The equivalent of CRAFTS, but more flexible; CRAFTS could remain as an alias.
[FIGURINE:NONE]
[ID_TYPE:AMULET:NONE]
[ID_TYPE:SCEPTER:NONE]
[ID_TYPE:CROWN:NONE]
[ID_TYPE:RING:NONE]
[ID_TYPE:EARRING:NONE]
[ID_TYPE:BRACELET:NONE]
[ID_MATERIAL:GET_MATERIAL_FROM_REAGENT:wax:NONE]
[SKILL:WAX_WORKING]

A building's material requirements may look like this:
Code: [Select]
[BUILD_ITEM:1:bucket]
[ID_TYPE:BUCKET:NONE]
[EMPTY]
[CAN_USE_ARTIFACT]
[BUILD_ITEM:1:build material]
[ID_TYPE_LIST] *The equivalent of BUILDMAT, but more flexible; BUILDMAT could remain as an alias
[ID_TYPE:BAR:NONE]
[ID_TYPE:BLOCKS:NONE]
[ID_TYPE:BOULDER:NONE]
[ID_TYPE:WOOD:NONE]
[WORTHLESS_STONE_ONLY]
[CAN_USE_ARTIFACT]
Logged
Direforged Original
Random Raw Scripts - Randomly generated Beasts , Vermin, Hags, Vampires, and Civilizations
Castle Otu