Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrades placeholders & lore messages are incorrect (or works not as it expected to) #668

Closed
VladOliinyk opened this issue Feb 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@VladOliinyk
Copy link

VladOliinyk commented Feb 12, 2023

Describe the bug

In a localisation file (f.e. messages_en.yml) the upgrades-upgrade-lore-forge-tier-1 placeholders are set in the incorrect places, AND the placeholders logic there is not quite perfect.

First of all, the {cost} and {currency} placeholders should be on the level of the tier that you are buying.
upgrades-upgrade-lore-forge-tier-1 - correct
upgrades-upgrade-lore-forge-tier- 2nd, 3rd and 4th - incorrect

But the main thing: the cost of upgrades is hardcoded right now.

Mr. Ceasar once said:

Maybe I can try and make it all sync from the config with some new placeholders like: {tier_1_color}, {tier_1_cost}, {tier_1_currency} making it easier to update new prices and also automatically sync them across different languages
Because it looks like that with the current method you would have to change each and every language file if a price is changed.

*in discord

Screenshots
https://cdn.discordapp.com/attachments/348088106546757653/1074349862302265465/image.png

Plugin version: v23.1.1

@VladOliinyk VladOliinyk added the bug Something isn't working label Feb 12, 2023
@bandaohana
Copy link

I had this problem initially, but I don't really remember if it was the price, or the fact that it shows the wrong level, or like, I buy the last upgrade, and there's still one more in there (being that there are only 4)

A solution I did for this was to turn the level 1 into 0, 2 into 1, 3 into 2, and 4 into 3, but only in the lang, I also removed the {cost} leaving only the value there. It can be a bit of work if you intend to use multi langs

@andrei1058
Copy link
Owner

@tomkeuper is working on it

@andrei1058 andrei1058 mentioned this issue Feb 26, 2023
andrei1058 added a commit that referenced this issue Feb 26, 2023
New features:
- Added {prefix} support to all messages
- Added unformatted player names for kill and bed destroy message
- Added unbreakable to mellee weapons #245
- Addded Elytra auto equip #663
- add toggle for halloween special (#632)
- Added Placeholders to upgrade message #668

For developers:
- add sidebar init event
- exposed sidebar to the API

- fix team identifier length (Sidebar kick issue (#682, #666 )
- Fix Moneys reward team-support on Solo & update variables names
- Bug fixes and placeholder adjustments (#685)
- Fixed command error when lobby location is not set
- Fixed spanish translation error #599
- Fixed spanish translation error #599
- Netherite armor support in 1.16+ #657
- Wins placeholder not in lobby sidebar #658
- Sidebar Title animation not working #660
- Player levels showing numbers #661
- Fixed In-game arena Scoreboard lines in the wrong spot #662
- NPE when clicking outside of shop inventory #664
- Added Placeholders to upgrade message #668
- Fixed players can collect drops during respawn #669

---------

Co-authored-by: Tom Keuper <[email protected]>
Co-authored-by: Yuri <[email protected]>
@tomkeuper
Copy link
Collaborator

Closed as implented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants