Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modding question  (Read 512 times)

PrivateNomad

  • Bay Watcher
  • Certified Time Traveler
    • View Profile
Modding question
« on: December 01, 2012, 01:31:49 am »

I am having trouble. I decided to create a new creature. Basically, it will be a small turret that shoots out fireballs. It will be made of iron. I took the tissue from the bronze colossus and replaced the bronze with iron, and I took the fireball interaction from the fire imp.
Code: [Select]
[CREATURE:FIRE_MECHA]
[DESCRIPTION: A small iron turret with a barrel attached for shooting fire at unsupecting visitors.]
[NAME:fire mecha:fire mechas:fire mecha]
[CREATURE_TILE:147][COLOR:6:0:1]
[NOT_LIVING]
[NOPAIN]
[NOT_BUTCHERABLE]
[NOBONES]
[IMMOBILE]
[NO_EAT]
[NO_DRINK]
[NO_SLEEP]
[FIREIMMUNE]
[NO_GENDER]
[NOBREATHE]
[NONAUSEA]
[ITEMCORPSE:BAR:IRON]
[NOTHOUGHT]
[PREFSTRING:iron hull and destruction]
[ALL_ACTIVE]
[LIKES_FIGHTING]
[EXTRAVISION]
[CLUSTER_NUMBER:1:1]
[BIOME:ANY_LAND]
[CAN_DO_INTERACTION:MATERIAL_EMISSION]
[CDI:ADV_NAME:Shoot fireball]
[CDI:USAGE_HINT:ATTACK]
[CDI:FLOW:FIREBALL]
                [CDI:BP_REQUIRED:BY_CATEGORY:HAND]
[CDI:TARGET:C:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:C:15]
[CDI:MAX_TARGET_NUMBER:C:1]
[CDI:WAIT_PERIOD:15]
[BODY:HEAD:1:ARM:1:HAND:1]
[TISSUE:IRON]
   [TISSUE_NAME:iron:iron]
   [TISSUE_MATERIAL:INORGANIC:IRON]
   [FUNCTIONAL]
   [MUSCULAR]
   [STRUCTURAL]
   [RELATIVE_THICKNESS:1]
   [CONNECTS]
   [TISSUE_SHAPE:LAYER]
[TISSUE_LAYER:BY_CATEGORY:ALL:IRON]
[HEATDAM_POINT:NONE]
[BODYGLOSS:HEAD:head:base:heads:bases]
[BODYGLOSS:ARM:arm:barrel:arm:barrels]
[BODYGLOSS:HAND:hand:mechanism:hands:mechanisms]


But, when I load it in arena mode, the game crashes. Help?

ArKFallen

  • Bay Watcher
  • Bohandean Desserter
    • View Profile
Re: Modding question
« Reply #1 on: December 01, 2012, 01:56:51 am »

I am having trouble. I decided to create a new creature. Basically, it will be a small turret that shoots out fireballs. It will be made of iron. I took the tissue from the bronze colossus and replaced the bronze with iron, and I took the fireball interaction from the fire imp.

-SNIPPED-

But, when I load it in arena mode, the game crashes. Help?
[BODY:HEAD:1:ARM:1:HAND:1] is not proper syntax or usage and is probably what is causing the crashes. You can check out the body_default file for some proper [BODY:X] values and their associated parts. In the future I suggest you check the errorlog.txt which is created in the DF folder once errors are encountered.
Logged
Hm, have you considered murder?  It's either that or letting it go.
SigText
I logged back on ;_;

PrivateNomad

  • Bay Watcher
  • Certified Time Traveler
    • View Profile
Re: Modding question
« Reply #2 on: December 01, 2012, 02:08:03 am »

I fixed it, but it still won't work.
Code: [Select]
[CREATURE:FIRE_MECHA]
[DESCRIPTION: A small copper turret with a barrel attached for shooting fire at unsupecting visitors.]
[NAME:fire mecha:fire mechas:fire mecha]
[CREATURE_TILE:147][COLOR:6:0:1]
[NOT_LIVING]
[NOPAIN]
[NOT_BUTCHERABLE]
[NOBONES]
[IMMOBILE]
[NO_EAT]
[NO_DRINK]
[NO_SLEEP]
[FIREIMMUNE]
[NO_GENDER]
[NOBREATHE]
[NONAUSEA]
[ITEMCORPSE:BAR:IRON]
[NOTHOUGHT]
[PREFSTRING:iron hull and destruction]
[ALL_ACTIVE]
[LIKES_FIGHTING]
[EXTRAVISION]
[CLUSTER_NUMBER:1:1]
[BIOME:ANY_LAND]
[CAN_DO_INTERACTION:MATERIAL_EMISSION]
[CDI:ADV_NAME:Shoot fireball]
[CDI:USAGE_HINT:ATTACK]
[CDI:FLOW:FIREBALL]
[CDI:TARGET:C:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:C:15]
[CDI:MAX_TARGET_NUMBER:C:1]
[CDI:WAIT_PERIOD:15]
[BODY:BASIC_1PARTBODY]
Categories are user-defined strings that can be used elsewhere to refer to groups of bodyparts for other commands.
[BP:UB:body:bodies][UPPERBODY][LOWERBODY][CATEGORY:BODY]
This command establishes the relative size of body parts within a creature.  The numbers have no absolute meaning or units.
[DEFAULT_RELSIZE:2000]
[TISSUE:IRON]
   [TISSUE_NAME:iron:iron]
   [TISSUE_MATERIAL:INORGANIC:IRON]
   [FUNCTIONAL]
   [MUSCULAR]
   [STRUCTURAL]
   [RELATIVE_THICKNESS:1]
   [CONNECTS]
   [TISSUE_SHAPE:LAYER]
[TISSUE_LAYER:BY_CATEGORY:ALL:IRON]

Here is the error log.
Code: [Select]
*** Error(s) found in the file "raw/objects/creature_standard.txt"
FIRE_MECHA:Unrecognized Creature Token: BP
FIRE_MECHA:Unrecognized Creature Token: UPPERBODY
FIRE_MECHA:Unrecognized Creature Token: LOWERBODY
FIRE_MECHA:Unrecognized Creature Token: CATEGORY
FIRE_MECHA:Unrecognized Creature Token: DEFAULT_RELSIZE

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Modding question
« Reply #3 on: December 01, 2012, 02:37:53 am »

You didn't fix it. You literally copy+pasted a body entry into a creature.

[BODY:HUMANOID:2EYES:2EARS:NOSE:HUMANOID_JOINTS:5FINGERS:5TOES] is an example of a correct one. All of those are body parts. You can find them in body_default.