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

Server setting to enable substituting legendary key rewards emotes #3944

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gordian3
Copy link
Contributor

This PR provides a server setting "award_wcid_for_legendary" that allows for substitution of legendary keys with the provided WCID. For instance, a server offering legendary keys for sale on a vendor for 1 MMD per pull may set this to 20630. This allows players to not have to deal with large numbers of unstackable legendary keys from Kill Tasks and other quests. Another option would be Promissory Notes (43901). The server operator can provide any WCID but generally it would be something stackable.

This change only impacts emote based giving. It does not change any looting of legendary keys from corpses or chests such as at the casinos.

The default option is "0" which is interpreted as disabled so there is no substitution.

The actual rewards to users depend a bit on how the quest emotes are configured. If they offer 5 rewards, each of 1 Aged Legendary Key, then the player would get 5 different of the substituted item. You can see this in the Tou Tou KTs. For Frozen Valley Gurog, it is a singe reward of multiple keys. In this case the new items (promissory notes in this case) are stacked. At Hoshino's the Durable keys become stacks of 10 of the item.

AgedLegendaries_grp_5
AgedLegendaries_grp_5_log

DurableKey_subst_reward
DurableKey_subst_reward_log

// Static map for quick comparisons
static Dictionary<uint, int> _LegendaryKeyUses = new Dictionary<uint, int>()
{
{48746, 1 }, // Aged Legendary Key
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there is something I can use other than the literal values, please provide an example if that is preferred.

Copy link
Collaborator

Choose a reason for hiding this comment

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

WeenieClassName

Copy link
Member

@LtRipley36706 LtRipley36706 left a comment

Choose a reason for hiding this comment

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

This kind of thing should be managed at the content level and not in code and applied globally really

@Gordian3
Copy link
Contributor Author

This kind of thing should be managed at the content level and not in code and applied globally really

It's a server option. Controlling it at the content level would require a large number of changes and would not be as dynamic. Additionally, it would cause more merge conflicts for custom servers.

@LtRipley36706
Copy link
Member

This kind of thing should be managed at the content level and not in code and applied globally really

It's a server option. Controlling it at the content level would require a large number of changes and would not be as dynamic. Additionally, it would cause more merge conflicts for custom servers.

I understand its goal, however its application is simultaneously too broad and too specific. This just ends up adding complexity to the code thats better handled in content

@Gordian3
Copy link
Contributor Author

To make it more generic, I could switch this to a string property that contains the name of a file. The file could be CSV or perhaps JSON list of WCID substitutions. Once the property is set, the list is loaded (or reloaded). This sets a dictionary/map of original and substituted WCIDs. Then when an emote award is given, the list is searched to see if it has the WCID and if so then it substitutes the new value.

Also, during server startup it would also check if this value is set and if so, will load the file.

To undo the substitutions, simply specify an empty file.

Thoughts @LtRipley36706 ? Would this be generic enough of a utility?

@gmriggs
Copy link
Collaborator

gmriggs commented Jul 15, 2023

Something like this seems like it would be a perfect use of the new mod system:

https://github.com/ACEmulator/ACE/wiki/Modding

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.

None yet

3 participants