need help making corrupt like pod

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

Post Reply
kiugetski
Posts: 4
Joined: Sat Jan 26, 2013 5:25 pm

need help making corrupt like pod

Post by kiugetski » Fri Feb 07, 2020 6:27 pm

could someone explain to me how to add the corrupt feature into my mod ?

User avatar
Lady Isabelle
Hosted Forum Moderator
Champion of the Light
Posts: 285
Joined: Tue Jul 19, 2011 11:36 pm
United States of America

Re: need help making corrupt like pod

Post by Lady Isabelle » Fri Feb 07, 2020 8:26 pm

Make a new stat called Corrupted. Set it's priority so that it's either all the way at the top or bottom of the affix list, depending on your preference.
Make a new stat called Corruption tracker. This will be a hidden stat that is used to determine the result of your corrupted item.

Now open up the cubemain.txt file guide because you will be referring to it a lot and it can be a bit tricky to get right. There a few different ways of doing it but here is how I did it:

Order is important, cubemain.txt reads from top to bottom.

The first thing you want is to check is if your item does not have the Corruption Tracker, if it doesen't, add a random value. That would be OP 18 on your Corruption Tracker stat. For mine I did 1-100, but you can go further beyond than that. For all of these checks, you will have to do it for each item type and rarity. You can have different item types and rarities have different effects and values. As a result of all of this, you unfortunately have to use the input item twice for the full effect, so be sure you provide your Vaal Orb equivalent returned in the 2nd output.

The next check is if your item is corrupted, do nothing. From how I did it, I made it check for if the item has 101 or greater on the corruption tracker. After an item gets it's effects, I add +101 to the corruption tracker. This implies that the item was already corrupted, so that way you cannot repeatedly corrupt an item, or even block other cube recipes from affecting it! That would be OP 18 on your Corruption Tracker.

And now for the fun part: Determining what results you get. Like I said I scaled my Corruption tracker to be 1-100. 100 is the best result, 1 is the worst. For debugging id reccomend giving the tracker stat a string, then remove it when it's done.

My next set of checks is as follows;

If Corruption Tracker is 100, apply something strong. Op 15 Corruption Tracker Stat 100 value. I also add +101 to the corruption tracker for EVERY instance it applies the stat, as well as of course the Corrupted stat to inform the players.
If Corruption Tracker is 75-99, apply something good. Op 15 Corruption Tracker Stat 100 value. Order is IMPORTANT here, so that if you roll 100, it will be sure to get that first cube recipes and not the one after it. Highest ones must go first!
Keep going until you have completed the list. Now you can of course make 100+ different individual effects, with their own random rolls as well. But that of course is a ton of work.
If you want the nasty result of bricking an item into a rare, make the output "usetype,rar" and bam you have a ruined item!.

Lemme know if you have any other questions

Post Reply

Return to “General Mod Making”