GithubHelp home page GithubHelp logo

merchantsplus's People

Contributors

valkyrienyanko avatar

Watchers

 avatar  avatar

merchantsplus's Issues

Nurse's shop menu won't open

Describe the bug
I talk to the nurse to open her shop menu but whenever I do an action that would bring up the shop icon, it would show up for a short moment then disappear.

To Reproduce
Steps to reproduce the behavior:

  1. Speak to the Nurse.
  2. Click to bring up the icon that shows "Healing Cycle Shop"
  3. See error

Expected behavior
I expected to see the shop menu like every other NPC but the nurse's shop won't show up long enough for it to open up.

Merchant Ore Revision

Describe the bug
The merchant sells copper and iron ore for 1 gold each.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the merchant.
  2. Open his shop.
  3. Cycle over to ores.'
  4. Open up ores.
  5. Both copper and iron ore cost 1 gold coin each.

Expected behavior
I expected a much cheaper price.

Map Draw Conflict

Describe the bug
The vanilla Terraria minimap does not update and crashes the game on pressing 'M'.

To Reproduce
Possibly after fighting the EoC

Screenshots
MapImage

Wiki + Readme

Mod could use a descriptive readme and wiki underling everything about the mod.

Needs Refactoring

Please talk to me on discord (valk#3277) before attempting to modify the mod to how you see fit.

Mod needs changes to prices, NPC lore, NPC attacks as well as other things I can't think off hand right now.

Mod is completely broken in 1.4.4

If you want to get a better idea of how this mod functions, switch to 1.4.3 version of Terraria and download the "MerchantsPlus" mod from the workshop while you still can before August 1st (as that is when 1.4.3 is no more). Once in game, right click the guide and you will notice a custom UI on the left of your screen with 2 buttons. Click on the button on the left to open the custom shop for the guide.

Shops have been entirely changed in 1.4.4. This has completely broken this mod. Please switch over to the 1.4.4 branch when trying to solve this issue.

Note that all shops are opened from this part of the code.
https://github.com/Valks-Terraria-Mods/MerchantsPlus/blob/5735ab2a07e45f22947665f5e3a4b0b75883c7c5/UI/ShopUI.cs#L112C86-L137

How are we suppose to create a new custom shop when in order to open this shop we need to override from ModNPC::OnChatButtonClicked(bool firstButton, ref string shop) and set shop equal to the shop we want to open. ModNPC is for custom NPCs but we are trying to add custom shops to existing vanilla NPCs like the merchant, guide, nurse and dyrad.

Or more simply put how do we make custom shop(s) appear when pressing a custom made button in 1.4.4.

Errors from 1.4.3 Code

The following line has been commented out because of a out of index bounds error that freezes the game. To reproduce this error, uncomment the line, notice the error in-game. Client.log can be found in C:\Program Files (x86)\Steam\steamapps\common\tModLoader\tModLoader-Logs

//Main.SetNPCShopIndex(20);

This line of code also gives an error and thus the reason it has been commented out.

//Inv.SetupShop(0);

Useful Links

Migration Guide (Shop Changes): https://github.com/tModLoader/tModLoader/wiki/Update-Migration-Guide#shop-changes-aka-declarative-shops
Declarative Shops PR: tModLoader/tModLoader#3219

The new way of creating custom shops: https://github.com/tModLoader/tModLoader/blob/e6caaaf678efd2a69deece4d72fdaecc4391bd26/ExampleMod/Content/NPCs/ExamplePerson.cs#L281-L309

How to open custom shops: https://github.com/tModLoader/tModLoader/blob/e6caaaf678efd2a69deece4d72fdaecc4391bd26/ExampleMod/Content/NPCs/ExamplePerson.cs#L276

How to modify existing shops: (although not very helpful because this mod adds shops to NPCs that originally did not have shops in the first place like the Guide and Nurse) https://github.com/tModLoader/tModLoader/blob/1.4.4/ExampleMod/Common/GlobalNPCs/ExampleNPCShop.cs

Wiki Contributors Needed!

Have a quick look at the following page on the wiki. https://github.com/valkyrienyanko/MerchantsPlus/wiki/Angler

The Angler's items, prices, conditions and slots were found in the following code. https://github.com/valkyrienyanko/MerchantsPlus/blob/master/Shops/ShopAngler.cs

The Angler's projectiles and loot were found in the following code.
https://github.com/valkyrienyanko/MerchantsPlus/blob/master/NPCs/Angler.cs

This is what needs to be done for the other merchants eventually.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.