Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Troubleshoot my stupid.  (Read 1268 times)

zubb2

  • Bay Watcher
    • View Profile
Troubleshoot my stupid.
« on: October 03, 2014, 08:24:59 pm »

Hi guys I have slapped together a sawmill a reaction and a plank material.

It dosen't quite work.

The building works the reaction starts, but nothing is made and it dosen't require a log like I want it to.

The building is also really ugly, but I can fix that later.

Spoiler (click to show/hide)

Spoiler (click to show/hide)

Spoiler (click to show/hide)


For the workshop I didn't post the look modifiers because they aren't important here.

I don't use the first tag in each thing because that is already there in each category.
Example "OBJECT REACTION". See these things are already in the vanillia its just there to help me remember.

Thanks in advance.
Logged
(Anyone else have any stories that can compare to a man being beaten to death with his own trousers by a giant gopher?)
(when goblins showed up, I mumbled "Smithers! Release the hounds!" and had the lever pulled.)

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Troubleshoot my stupid.
« Reply #1 on: October 03, 2014, 08:29:59 pm »

You defined a material called PLANKS, not an item type called PLANKS.

Also, you can add your own raw files using the same naming convention as the vanilla raws and including the internal name and OBJECT tag.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

scamtank

  • Bay Watcher
    • View Profile
Re: Troubleshoot my stupid.
« Reply #2 on: October 03, 2014, 08:37:27 pm »

You do know you can use the [BLOCK_NAME:xxx] token to rename blocks into planks, right? No need to fuck around with inorganics, just slip that one line into the wood template and you're good.
Logged

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Troubleshoot my stupid.
« Reply #3 on: October 03, 2014, 08:51:46 pm »

http://dwarffortresswiki.org/index.php/v0.34:Reactions#Reagents

template
[REAGENT:<name>:<quantity>:<item token>:<material token>]

My reactions that take arbitrary wood log use
[REAGENT:A:1:WOOD:NONE:NONE:NONE]

The part of that that is the item token is "WOOD:NONE".  WOOD:LOG isn't a thing, as far as I know. 

See for example,
http://dwarffortresswiki.org/index.php/v0.34:Item_token

zubb2

  • Bay Watcher
    • View Profile
Re: Troubleshoot my stupid.
« Reply #4 on: October 04, 2014, 06:44:27 pm »

Spoiler (click to show/hide)

Spoiler (click to show/hide)


I cannot for the love of crud get the workshop to be built with and EDGED weapon ONLY.

The reaction WILL NOT BE WOOD it just won't.

Can I have some help?
Logged
(Anyone else have any stories that can compare to a man being beaten to death with his own trousers by a giant gopher?)
(when goblins showed up, I mumbled "Smithers! Release the hounds!" and had the lever pulled.)

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Troubleshoot my stupid.
« Reply #5 on: October 04, 2014, 08:21:52 pm »

[PRODUCT:100:4:BLOCKS:NONE:WOOD:NONE]
is wrong because WOOD isn't a material token.

try
[PRODUCT:100:4:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]


please describe how it's failing or post what's in your errorlog.txt if anything

ArKFallen

  • Bay Watcher
  • Bohandean Desserter
    • View Profile
Re: Troubleshoot my stupid.
« Reply #6 on: October 05, 2014, 07:48:05 am »

Your building is accepting anything for the axe space because WEAPON_AXE_BATTLE is supposed to go in the second slot.
Code: [Select]
[BUILDING_WORKSHOP:SAW_MILL]
         [NAME:Saw Mill]
         [NAME_COLOR:7:0:1]
         [WORK_LOCATION:1:3]
         [BUILD_LABOUR:CARPENTER]
         [BUILD_ITEM:1:WEAPON:WEAPON_AXE_BATTLE:NONE:NONE][CAN_USE_ARTIFACT]
         [BUILD_ITEM:1:CHAIN:NONE:NONE:NONE]
         [BUILD_ITEM:1:TRAPPARTS:NONE:NONE:NONE]
         [BUILD_ITEM:1:NONE:NONE:NONE:NONE][BUILDMAT]
Like so. WEAPON_AXE_BATTLE is the item's raw ID, its item type is WEAPON.
Logged
Hm, have you considered murder?  It's either that or letting it go.
SigText
I logged back on ;_;

zubb2

  • Bay Watcher
    • View Profile
Re: Troubleshoot my stupid.
« Reply #7 on: October 05, 2014, 08:36:59 am »

Oh sorry my "it won't be wood" was very clear to myself at the time, but not as much now.

My reaction only makes generic blocks made of an unknown material that is counted as a masonry.
I have used the get material from reagent, but mabey it was in the wrong "NONE" slot.

Those slots confuse me as it seems they change order from buildings to items and all.
It is probably just me though.

For the battle axe part.
Is there anyway I can get it to accept only edged weapons such as anything sharp. I tried [HAS_EDGE] in the [CAN_USE_ARTIFACT] slot, but it didn't work.



EDIT: I thought for sure I saw a [HAS_EDGE] token before, but I can only find [NO_EDGE_ALLOWED]. ???
« Last Edit: October 05, 2014, 08:45:21 am by zubb2 »
Logged
(Anyone else have any stories that can compare to a man being beaten to death with his own trousers by a giant gopher?)
(when goblins showed up, I mumbled "Smithers! Release the hounds!" and had the lever pulled.)

ArKFallen

  • Bay Watcher
  • Bohandean Desserter
    • View Profile
Re: Troubleshoot my stupid.
« Reply #8 on: October 05, 2014, 09:31:06 am »

EDIT: I thought for sure I saw a [HAS_EDGE] token before, but I can only find [NO_EDGE_ALLOWED]. ???
FORCE_EDGE is a reaction token. Don't know if that is the source of your confusion.

My reaction only makes generic blocks made of an unknown material that is counted as a masonry.
I have used the get material from reagent, but mabey it was in the wrong "NONE" slot.

Those slots confuse me as it seems they change order from buildings to items and all.
It is probably just me though.
There are four constant "slots" when defining an item for reagents/products/buildings.
Code: [Select]
{ITEM_TYPE}:{ITEM_SUBTYPE}:{MATERIAL_TYPE}:{MATERIAL_SUBTYPE}The first three are always, always 1 string long. It gets confusing when you use a multi-string material_subtype.
Code: [Select]
[PRODUCT:100:4:{BLOCKS}:{NONE}:{GET_MATERIAL_FROM_REAGENT}:{A:NONE}]The above is an example (notice far right brackets). What you put in the MATERIAL_TYPE slot determines what format your material_subtype will take.
INORGANIC makes the material_subtype 1 string, PLANT/CREATURE_MAT requires a format of PLANT/CREATURE:MATERIAL, and GET_MATERIAL_FROM_REAGENT requires REAGENT:MATERIAL_REACTION_PRODUCT.

You should only use NONE in one of the slots if that slot isn't applicable or required.
Spoiler: Example of this (click to show/hide)
This is why many custom buildings' build_items (and reaction reagents) are full of NONE slots.
« Last Edit: October 05, 2014, 09:33:13 am by ArKFallen »
Logged
Hm, have you considered murder?  It's either that or letting it go.
SigText
I logged back on ;_;

zubb2

  • Bay Watcher
    • View Profile
Re: Troubleshoot my stupid.
« Reply #9 on: October 05, 2014, 08:37:56 pm »

Quote
Code: [Select]

{ITEM_TYPE}:{ITEM_SUBTYPE}:{MATERIAL_TYPE}:{MATERIAL_SUBTYPE}

The first three are always, always 1 string long. It gets confusing when you use a multi-string material_subtype.


So according to the above, my reagent is incomplete, as far as the GET MATERIAL FROM REAGENT tags are concerned?

[REACTION:MILL_A_LOG]
       [NAME:mill a log]
       [BUILDING:SAW_MILL:CUSTOM_T]
      [REAGENT:A:1:WOOD:NONE:(((NONE))):NONE]  See the wood is not in the "material" hole. The building knows to get wood, but not to pass the "WOOD" along?
     
[PRODUCT:100:4:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]
Logged
(Anyone else have any stories that can compare to a man being beaten to death with his own trousers by a giant gopher?)
(when goblins showed up, I mumbled "Smithers! Release the hounds!" and had the lever pulled.)

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Troubleshoot my stupid.
« Reply #10 on: October 05, 2014, 09:38:05 pm »

[REACTION:MILL_WOOD]
[NAME:Mill some wood]
[BUILDING:SAW_MILL:NONE]  // NONE means there is no hotkey assigned for this reaction
[REAGENT:A:1:WOOD:NONE:NONE:NONE] // WOOD:NONE means only accept item type "Wood".  NONE:NONE means you aren't restricting material to a specific type of wood
[PRODUCT:100:4:BLOCKS:NONE:GET_MATERIAL_FROM_REAGENT:A:NONE]  // Means whatever material reagent A was, make 4 blocks out of it
[SKILL:CARPENTRY]

that's it

kiwiphoenix

  • Bay Watcher
    • View Profile
Re: Troubleshoot my stupid.
« Reply #11 on: October 05, 2014, 09:39:51 pm »

Did something virtually identical earlier. Feel free modify if it helps.

BUILDING:
Spoiler (click to show/hide)
REACTION:
Spoiler (click to show/hide)

And in the WOOD_TEMPLATE material entry:
   [BLOCK_NAME:plank:planks]

EDIT: Actually, Smakemupagus put it far better.
« Last Edit: October 05, 2014, 09:42:02 pm by kiwiphoenix »
Logged

zubb2

  • Bay Watcher
    • View Profile
Re: Troubleshoot my stupid.
« Reply #12 on: October 06, 2014, 04:49:10 pm »

Spoiler (click to show/hide)

Spoiler (click to show/hide)

Yay It finaly works.
There it is if you guys want another saw mill.
It is kind of ugly though, I need to take it back to the little viewer software thing.

Thanks guys I got some good notes and mabey learned half a thing.
Logged
(Anyone else have any stories that can compare to a man being beaten to death with his own trousers by a giant gopher?)
(when goblins showed up, I mumbled "Smithers! Release the hounds!" and had the lever pulled.)