tModLoader Ruined Items - Items from world chests, loot drops, purchases, or crafting may now have a really bad prefix

hamstar

Terrarian
Note: Until further notice, this mod is now being worked on exclusively as part of my Adventure Mode set.



Ruined Items
v2.11.3



Note: Requires Mod Libs


Ruined Items makes all weapons and accessories from chests and loot drops (or crafted and bought, if configured) have a 'ruined' prefix that heavily nerfs their stats. This prefix may be removed with reforging, but at some expense. Items may also be outright locked from use instead of simply nerfed, if configured to do so. Other configuration options are also available.

Jffv17t.png

UtcDqfK.png



Source code available.



Installation

Requires tModLoader. Copy the above .tmod file to your 'Documents/My Games/Terraria/ModLoader/Mods' folder to play.



 
Last edited:
v2.11.3
  • (See github commit history.)
v2.7.0
  • Added chat message about successful repair
  • Improved repair mode mouse icon + label
  • Fixed repair mode inventory item hover indicator
  • Updated repair mode to use a better method
  • Clarified repair status of items before and after scrap repair attempt
v2.6.0
  • Set reforge to clear magitech repair flag
  • Added tooltip to indicate if item repair attempt made
  • Reduced ruined items default sale price
  • Increased reforge combo percent ruin chance
v2.4.0
  • Reduced ReforgeRuinPercentChance from 35% to 10%
  • Set PurchasedItemRuinPercentChance to 0%
  • Set WorldGenChestItemRuinPercentChance to 80%
  • Set NPCLootItemRuinPercentChance to 80%
  • Set MagitechScrapPrice to 50s
  • Fixed magitech prefix restore having chance to re-roll ruined
    Fixed magitech item hover bug
  • Fixed ruined item repairs
v2.3.0
  • Added MagitechScrapPrice (default 3g)
  • Added MagitechScrapSoldByWhom
  • Added MagitechScapItem
  • Set RuinedItemsLockedFromUse default to true
v2.2.3
  • Fixed some redundancy with GeneralRuinRollChance
  • Implemented bag opening loot checks
  • Set ruined items to pulse
  • Set only locked items to draw X overlay
  • Restructured item tooltip code files
v2.2.0
  • Added CraftRuinPercentChance
  • Fixed recipe create IL hook for ingredient ruin propagation
  • Renamed config settings for readability/accuracy
  • Refactored config code files
v2.1.1
  • Fixed a world gen error
v2.1.0
  • Set recipes using ruined ingredients to propagate ruined result
  • Added ReforgeComboRuinChance,changed ReforgeRuinChance
  • Added PurchasedItemRuinChance
v2.0.0
  • First public release.
 

Attachments

Last edited:
Hiya there. :) Questions about this one as well.

I don't really understand how to set the config to what I want it to be; the numbers confuse me a little.

1) I notice pretty much all instances of obtaining items - craft, reforge, chest, loot and purchases - have their own settings. So what does 'GeneralRuinRollChance' does? I notice it has a value of 0 to 10, with decimals up to ,99 for each number, but given how others work by percentages, I don't get it.

2) Do the other values act as a straight, direct percentage chance? For example, if ReforgeRuinPercentChance is left on its default value of 0,35 out of 1, does that mean a reforged item will come out ruined 35% of the time, or does it work differently (as GeneralRuinRollChance seem to imply)?

3) What is 'ReforgeComboRuinPercentChance'?

4) Is the chance roll for each determined upon obtaining the items (say, when I open a chest to get the loot inside) or instantly upon creation (say, when the chest is spawned into the world)? If the latter, what happens to the items in chests if I change the value in the options, are they re-rolled, or it's too late for that world to generate non-ruined items in chests?

I apologize if any of those questions seem noob level to you. I am a noob at this, so it's fair. XD
 
1) I notice pretty much all instances of obtaining items - craft, reforge, chest, loot and purchases - have their own settings. So what does 'GeneralRuinRollChance' does? I notice it has a value of 0 to 10, with decimals up to ,99 for each number, but given how others work by percentages, I don't get it.
It's a general % chance for all(?) contexts. The others are simply more specific. They successively stack.

2) Do the other values act as a straight, direct percentage chance? For example, if ReforgeRuinPercentChance is left on its default value of 0,35 out of 1, does that mean a reforged item will come out ruined 35% of the time, or does it work differently (as GeneralRuinRollChance seem to imply)?
35%

3) What is 'ReforgeComboRuinPercentChance'?
That means if an item is already ruined, there's a separate percent the mod uses to decide if reforging it will keep it ruined or not.

4) Is the chance roll for each determined upon obtaining the items (say, when I open a chest to get the loot inside) or instantly upon creation (say, when the chest is spawned into the world)? If the latter, what happens to the items in chests if I change the value in the options, are they re-rolled, or it's too late for that world to generate non-ruined items in chests?
Prefix rolls occur the same time as they do with vanilla. I try not to add new behavior for these sorts of things.
 
Ah, wonderful. Got it. Thanks a lot, I think I'll be able to set everything up properly now.
 
Note: Until further notice, this mod is now being worked on exclusively as part of my Adventure Mode set. I will not be doing any additional features, changes, or fixes beyond the context of its use within Adventure Mode. General PRs are welcome, though.
 
Back
Top Bottom