Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Insane product output  (Read 929 times)

Jeremy66

  • Bay Watcher
    • View Profile
Insane product output
« on: March 11, 2012, 02:52:57 pm »

I apologize if it seems like I'm spamming the forum, but I have this crazy enthusiasm for modding now that I have a bit of an understanding for it. I'm modding adventure reactions that allow melting iron weapons (a longsword) into iron bars and then using them to make an iron sword. I have an overarching system in mind where there are a ton of different reactions that melt down items into their bars, and then a matching reaction that allows them to be shaped back into different items (so if I melted down a sword worth 3 bars and a helmet worth 2 bars, I could reforge them into a breastplate worth 4 bars).

My problem comes from a test reaction I did. I got the smelt sword reaction so only three bars are created:

Spoiler (click to show/hide)


But when I use the test reaction, something funny happens.
Spoiler (click to show/hide)

See, a sword is created. The problem is that about 40 iron longswords are created from using this reaction once. I have no idea why that is. Anyone know why?
Logged

Hugo_The_Dwarf

  • Bay Watcher
  • Modding Mentor
    • View Profile
    • Regeneration: Forced Evolution
Re: Insane product output
« Reply #1 on: March 11, 2012, 03:01:13 pm »

Bars acually = 150

you are using 1:BAR

which means you only need 1/150th of a bar to make teh product. So now your product instead of taking the assumed 3 bars to make one sword. It looks at it and goes "Well I got a 1/150th usage to make a 450 sword." and it goes all wonky. Just change 1:BAR to 150:BAR

same with the other product for turning swords into bars
450:BAR
Logged

trees

  • Bay Watcher
  • [MUNDANE]
    • View Profile
Re: Insane product output
« Reply #2 on: March 11, 2012, 03:37:43 pm »

Similarly, this line:

Code: [Select]
[PRODUCT:100:3:BAR:NO_SUBTYPE:METAL:IRON]

requires [PRODUCT_DIMENSION:150] right after it for the bars to be functional.
Logged
I am often bad at phrasing things - don't hesitate to ask for clarification if something I said doesn't make sense.

Jeremy66

  • Bay Watcher
    • View Profile
Re: Insane product output
« Reply #3 on: March 11, 2012, 09:05:00 pm »

Thanks a ton guys. Now the reaction gets in the ball park, but it still behaves a little differently than I expected. If I use (as a testing reaction)
Spoiler (click to show/hide)
Then it asks for one more bar then I think it should. So like I put in 1 bar, and it says "0 left," and the reaction doesn't take place, and then if I put in a second it makes two swords.
Logged