tModLoader AlchemistNPC v9.0

@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?
 
@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.
 
Last edited:
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.

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?

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.
 
Last edited:
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.
 
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.

Cool. Check out my suggestion for the Brewer sprite, what do you think?

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...
Edit: Found sprite.

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?
 
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?
Brewer.png

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.".
 

Attachments

  • Brewer.png
    Brewer.png
    4 KB · Views: 368
Last edited:
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.".

That line should probably read as: "Can you please ask (Brewer Name) to stop mocking me? I know my potions can't make you stronger, but at least they aren't so dangerous to drink."

That Brewer sprite looks OK. Maybe not as "unique" as I had envisioned but it should work.
 
Finally I got way to change value of item in shop so I can do reasonable prices... Special thanks to Nopezal, raydeejay and Trivaxy.
Now the prices are:
Lesser tier - 10 silver except Lesser Restoration Potion (35 silver)
Normal tier - 50 silver except Restoration Potion (75 silver)
Greater tier - 1 gold.
Super tier - 2 gold.
Strange Brew - 1 gold.

What to do with prices of buff potions? And the ones which didn't go to both categories as Recall and "Gender"? Also what to do with prices of usable ingredients?
Brewer's new phrase: "That silly goose (Alchemist Name) is too afraid of using occult powers in Alchemy. And so his potions are just an useless(a powerless..?) water."

Edit: Done. All buff potions except listed down have price = 50 silver.
Magic Power - 1 gold
Gender Change - 75 silver
Lifeforce - 1 gold
Inferno - 75 silver
Rage/Wrath - 1 gold
Teleportation - 75 silver
Changed prices of ingredients:
Mushroom - 5 silver
Glowing Mushroom - 10 silver
Recall & Wormhole potions was sent to Alchemist cuz of instant use.
All fishing potions avaible after 10 Angler quests.
Will update mod soon. Edit: Updated. New version is already in Mod Manager.
v1.2 DL link: http://www.mediafire.com/file/62nt539ybkdfb5b/AlchemistNPC+v1.2.rar
alchemist's shop.png
brewer's shop.png

Alchemist full condition shop (with imkSushi's Base summoning potion and Empty Seed Bag & Brewer's buff store with full condition
 
Last edited:
Some kind of minor fix
v1.3
-Changed prices of Base Summoning Potion from imkSushi's Potions Addon (10 silver) and Empty Seed Bag from Thorium Mod (10 gold).
 
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?
 
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.
 
Last edited:
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.

Probably what it is, is that I do not have imkSushi's potions mod installed. Nor do I really plan to. Is there a way for you to access that mod conditionally? Like, detect if the player has it first before calling that code?

As for why the error is showing your path, I have no idea. I checked my folders and I do not have a MAESTRO folder, so not sure what's going on there.

EDIT: I think if you're going to include items from another mod, you have to create a separate mod as an add-on pack.

Alternatively, and this is probably a very poor way of doing this, but a code snippet like this might work:

// attempt to find My Documents path
string imksushimodpath = GetFolderPath(Environment.SpecialFolder.MyDocuments);

// if path == "", My Documents was not found for some reason, and do not process code
if (imsushimodpath != "")
{
string imksushimodpath = "whatever the path to imksushi's folder is "supposed" to be";

if (Directory.Exists (imksushimodpath))
{
do imksushi potion code;
}
}

But again this is probably very bad form for a number of reasons..
 
Last edited:
Well... I think I will just delete changed prices of modded items.
So v1.4:
-Deleted changed prices from v1.3 due to their's crashability.

2 orangepecan:
As I get the problem... When I try to change price of modded item I somehow broke setDefaults of mod items (as I think first at alphabetic sort). Even when I add mod check part to GItem.cs file Terraria continue to crash.
So I think I will let at least working mod version now.
 
Last edited:
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++;
            }
 
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++;
            }
I want to cry so hard right now... This is so much easier. Thank you, Cheezegami.
How can this be that I didn't find this anywhere?
Updated to v1.5. Restore changes from v1.3.
 
Last edited:
Back
Top Bottom