April 30, 2017, 05:51:59 AM

Author Topic: [v1.0 RC 5]Bug with modding smelter relating to blueprints  (Read 992 times)

Tacyn

  • Full Member
  • ***
  • Posts: 223
    • View Profile
[v1.0 RC 5]Bug with modding smelter relating to blueprints
« on: November 16, 2015, 03:10:28 PM »
Hi,

I've tried to add a new metal item and have it be smeltable into metal slivers.
However, when I open the smelter and select 'Worn scrap' the component is spring instead of WornScrap.
I've noticed that springs would be the next item in the list if its blueprint was unlocked.
It seems there is some kind of overlap between items with and without blueprints.
The following are the files I've created as an included mod in a blank main mod.

Code: [Select]
<Items> <Item>
    <ID>WornScrap</ID>
    <Prefix>worn</Prefix>
    <Name>scrap</Name>
    <Description>Metal scrap. Can be smelted into metal slivers</Description>
<HasQuality>false</HasQuality>
    <SpriteID>
      <SpriteID>Fiber</SpriteID>
    </SpriteID>
  </Item></Items>

Code: [Select]
<ItemSettings><WornEquipment>
    <Item>
      <ItemID>WornScrap</ItemID>
      <SmeltAmount>5</SmeltAmount>
    </Item>
  </WornEquipment></ItemSettings>

Code: [Select]
<Workshops>
<Workshops>
 <!--Smelter-->
  <Item>
    <ID>Smelter</ID>
    <CraftableItem>
      <ItemID>WornScrap</ItemID>
      <SkillUsed>Smelting</SkillUsed>
      <AttributeUsed>Focus</AttributeUsed>
      <Component>
        <ItemID>WornScrap</ItemID>
      </Component>
      <Component>
        <ItemID>RawCoal</ItemID>
      </Component>
    </CraftableItem>
  </Item>
 
</Workshops>

Code: [Select]
<NewGameSettings> <ItemToGenerate>
        <Item>
          <ItemID>WornScrap</ItemID>
        </Item>
<MaterialID>Copper</MaterialID>
        <Quantity>1</Quantity>
<Offset>-2 2</Offset>
   </ItemToGenerate>
    <ItemToGenerate>
        <Item>
          <ItemID>Bellows</ItemID>
        </Item>
        <Quantity>1</Quantity>
<Offset>-1 1</Offset>
   </ItemToGenerate>
    <ItemToGenerate>
        <Item>
          <ItemID>Mold</ItemID>
        </Item>
        <Quantity>1</Quantity>
<Offset>-1 1</Offset>
   </ItemToGenerate>
    <ItemToGenerate>
        <Item>
          <ItemID>Hearth</ItemID>
        </Item>
        <Quantity>1</Quantity>
<Offset>-1 1</Offset>
   </ItemToGenerate>
  <Container>
    <Item>
      <ItemID>Crate</ItemID>
    </Item>
    <Offset>-1 1</Offset>
    <Contents>
 
  <Item>
        <Item>
          <ItemID>RawCoal</ItemID>
        </Item>
      </Item>
    </Contents>
  </Container>
 
</NewGameSettings>

Also, here is a generated save file demonstrating the problem https://www.dropbox.com/s/op4tapmodb807jp/smelt.sav?dl=1
« Last Edit: November 18, 2015, 08:07:53 AM by Tacyn »

Tacyn

  • Full Member
  • ***
  • Posts: 223
    • View Profile
Re: Bug with modding smelter
« Reply #1 on: November 17, 2015, 11:31:56 AM »
So, I've experimented a bit more.

When I copied the entry for the spring to the start of the craftable list in the smelter,
now all the smelting jobs are shifted by one starting with the spring replacing anvil and the wrench being pushed off the list.

I tried the same with the Blacksmith, but there the bug didn't occur.
It seems to be specifically about the smelter and items hidden by blueprints.