CleverAdvisor
Terrarian
Theres a mod on the mod brower (the potion merchant) that has custom prices, maybe you can look at his code for an idea.
Sadly, code is partially blocked. I can get sprites but not code.Theres a mod on the mod brower (the potion merchant) that has custom prices, maybe you can look at his code for an idea.
I already separate potions between 2 NPC. One (Alchemist) sells Health/Mana Potions and some basic materials. He sells them in some kind of progression. After beating EoW/BoC appears normal potions. In Hardmode - Greater potions appear. Super Potions... Mana is avaible after all mech bosses, Health after beating Moon Lord.@VVV101 To be clear, what we were asking for earlier was to have two NPCs.
One NPC would sell the buff potions, and the other NPC would sell the healing/mana potions, and the potion materials (currently Mushroom, Glowing Mushroom, Fallen Star, Empty Bottle, Water Bottle). Another poster made the point that some of the lower tier potions are still used in other crafting recipes, so it would be worth it to keep the lower tier potions with the materials NPC.
Does that make sense?
I already separate potions between 2 NPC. One (Alchemist) sells Health/Mana Potions and some basic materials. He sells them in some kind of progression. After beating EoW/BoC appears normal potions. In Hardmode - Greater potions appear. Super Potions... Mana is avaible after all mech bosses, Health after beating Moon Lord.
Other (Brewer) sells buff potions. Fishing potions are avaible after beating 10 quests. Damage boosting potions such as Rage, Wrath and Inferno are avaible after entering Hardmode.
Now I am stuck with changing price of the vanilla potions cuz their prices are too small. Also I am thinking about sprite for Brewer.
Edit: Can't write anything to discord right now... 2 hour timer is not expired yet.
I didn't upload it yet... Trying to set price in shop. But if you want I will upload updated version. But textures of NPCs and spawn conditions is the same.Wow, thanks for all the work! I haven't updated the mod yet so I haven't seen everything you've done.
Quick question, can you please add Battle Potions as well?
I didn't upload it yet... Trying to set price in shop. But if you want I will upload updated version. But textures of NPCs and spawn conditions is the same.
I will add Battle Potion to Brewer. Will be avaible as NPC spawns.
Also, for the sprite of the Brewer, maybe base it off the Witch Doctor? You could even make the Brewer NPC female and have some kind of lore going on between the Witch Doctor and Brewer, kind of like between the Druid and Dryad.
Not bad idea... But I will need to get base sprites of Witch Doctor then... Or I will break animations...Cool. Check out my suggestion for the Brewer sprite, what do you think?
Not bad idea... But I will need to get base sprites of Witch Doctor then... Or I will break animations...
Edit: Found sprite.
I think that Alchemist should do "healing" part of potions when Brewer doing "occult/buff part". Now Brewer have some reskinned sprite with other colors.Cool. For the "lore" part of it, it could be something like.. in the past, the Witch Doctor and Brewer were in a relationship, but the Brewer wanted to pursue more traditional alchemy while the Witch Doctor was much more interested in the occult. This caused a divide between them and they parted ways.
Maybe even call the Brewer, the Alchemist. Seems more appropriate for the type of items that are sold. Although I see you already chose to call the other one the Alchemist. Up to you I suppose. I would suggest going with Alchemist for the buff potion NPC, and Apothecary for the healing/mana potion NPC.
And because I can't help myself when it comes to lore.. maybe the Nurse and Apothecary worked together at some point in the past, but some mysterious circumstances caused them to part ways?
I think that Alchemist should do "healing" part of potions when Brewer doing "occult/buff part". Now Brewer have some reskinned sprite with other colors.
I will try to make some custom dialogue where they said something about each other. What about this sprite now?View attachment 152272
Edit: Now I know how to make custom dialogues. First is Alchemist says: "Can you please tell (Brewer Name) to stop mocking on me? I know my potions can't make you stronger but they at least not dangerous to drink.".
Of course I tested it.I have a crash.
Object reference not set to an instance of an object.
at AlchemistNPC.Items.GItem.SetDefaults(Item item) in c:\Users\MAESTRO\Documents\My Games\Terraria\ModLoader\Mod Sources\AlchemistNPC\Items\GItem.cs:line 199
at Terraria.ModLoader.ItemLoader.SetupItem(Item item)
at Terraria.Item.SetDefaults(Int32 Type, Boolean noMatCheck)
at Terraria.Item.CloneDefaults(Int32 TypeToClone)
at ThoriumMod.Items.ArcaneArmor.Aerial.SetDefaults()
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
Are you testing the mod to make sure it loads and everything before you publish?
Of course I tested it.
I don't know... I rebuilded it right now and everything works just fine. Try to install mod from mediafire link. And restart the game. Sometimes this somehow helps.
Strange... Why you have my path? c:\Users\MAESTRO\Documents\My Games\Terraria\ModLoader\Mod Sources\AlchemistNPC\Items\GItem.cs
Edit: I downloaded version from Mod Manager and tested... Everything works just fine.
If problem didn't solve then say this to me and I will do version without hooks to Thorium and imkSushi's Potions addon.
if (ModLoader.GetLoadedMods().Contains("ThoriumMod"))
{
shop.item[nextSlot].SetDefaults(ModLoader.GetMod("ThoriumMod").ItemType("ThoriumBrick"));
shop.item[nextSlot].shopCustomPrice = 200;
nextSlot++;
}
I want to cry so hard right now... This is so much easier. Thank you, Cheezegami.I you want to change the prices of the shop the "clean" way, the best way to do it is by using the shop.item[nextSlot].shopCustomPrice = int_price; variable.
Also, modded items would be done like this:
Code:if (ModLoader.GetLoadedMods().Contains("ThoriumMod")) { shop.item[nextSlot].SetDefaults(ModLoader.GetMod("ThoriumMod").ItemType("ThoriumBrick")); shop.item[nextSlot].shopCustomPrice = 200; nextSlot++; }