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

Add a table of drop rates for every item #68

Open
wants to merge 1,033 commits into
base: main
Choose a base branch
from

Conversation

Zollo757347
Copy link
Contributor

  • Added a table of drop rates for every item, as the following image shows
  • Because some crates may drop multiple loots, some items may have their calculated drop rates higher than the loot table

image

@kenos1 kenos1 requested a review from Compositr February 6, 2024 04:04
@kenos1
Copy link
Collaborator

kenos1 commented Feb 6, 2024

Please format your pull request with pnpm lint

@kenos1
Copy link
Collaborator

kenos1 commented Feb 6, 2024

It also appears that you added the same component for every article file. Try putting the table in all articles (page/layout.tsx).

@Zollo757347
Copy link
Contributor Author

I think I can't really do that, because the table is now located at the middle of the article, under "Obtaining" section. Unlike sidebars which can be conveniently placed at the end of every article. I can also put the table at the end of the page though, but that will make it separated with "Obtaining" section, and I think that is a little bit counterintuitive.

@kenos1
Copy link
Collaborator

kenos1 commented Feb 6, 2024

Fair point, I'm gonna ask @Compositr to review cuz idk how this API stuff works in NextJS

@Compositr
Copy link
Contributor

If you want to insert the table in the middle of the article we'd need to rework how articles are rendered unfortunately.

Also, the old way we used to do with layout.tsx is deprecated in favour of the new single-file page.tsx method (see https://github.com/HasangerGames/suroi-wiki/blob/main/app/(wiki)/buildings/%5Bitem%5D/page.tsx)

@kenos1
Copy link
Collaborator

kenos1 commented Feb 6, 2024

solidjs when

@Zollo757347
Copy link
Contributor Author

Manually adding a little component for each article isn't that bad in my opinion (that's why I chose to do it), but of course it's up to you to decide whether to keep this or not. If you don't like how this is implemented, feel free to close the PR. I will purpose the same PR if the rework is finished in the future.

@Zollo757347
Copy link
Contributor Author

I have an idea that we can move this functionality into a separate page. We can put a link to this page in the sidebars or in the loot table page, so it won't be isolated. If that's good, then I'll work on that asap.

@Compositr
Copy link
Contributor

I think we should just add a link to the loot tables where the item appears in the sidebar sort of how we have links to where buildings appear, etc.

You can link to loot tables by passing their string ID as a # to the url (like wiki.suroi.io/#id string here)

@Zollo757347
Copy link
Contributor Author

I agree with your point, but I may prefer adding links to the obstacles that drops the item, instead of the loot tables. If I click on toilet and it leads me to the loot table, I'll be really confused. Also I'll add another link to the loot table on the obstacle sidebar so people can still get there if they want.

@Zollo757347
Copy link
Contributor Author

Now it looks something like this. (Lewis Gun)
drawing
And this is how it looks like in obstacle sidebar.
drawing
I am planning to partially rewrite loot table page in another PR because some of the values are wrongly calculated, so I'll leave the api thing there.

Copy link
Contributor

@Compositr Compositr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "Obstacles" section of the sidebar should be made more clear that it is a chance (ie, it uses a loot table). Maybe reword it to be like "Found In" or something similar.

@Compositr
Copy link
Contributor

Thanks for your help by the way, we appreciate it. Are you in the Discord server? We could coordinate easier over there if you are willing.

And yes, the code for the loot tables is flawed in a few places although its such a mess I don't want to touch it lol. Its fairly accurate for smaller loot tables though.

@Zollo757347
Copy link
Contributor Author

Yes "location" is not the perfect frase, but English is not my first language so I couldn't come up with a suitable phrase for that lol.

And yes I am in the server. My username is @Zollo757347 as well.

Copy link
Contributor

@Compositr Compositr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@kenos1
Copy link
Collaborator

kenos1 commented Nov 27, 2024

,

@Arman-AIi
Copy link
Contributor

;

@1092384
Copy link
Collaborator

1092384 commented Nov 27, 2024

:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.