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

[BUG] Deadly modifier with reforging. #87

Open
MrWomanStealer opened this issue Aug 20, 2021 · 4 comments
Open

[BUG] Deadly modifier with reforging. #87

MrWomanStealer opened this issue Aug 20, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@MrWomanStealer
Copy link

MrWomanStealer commented Aug 20, 2021

The issue

This bug involves the .reforge command and being used with the deadly modifier.

Reproduction steps

Steps to reproduce the behavior:
Pick up a weapon that can support the deadly modifier (like a bow)
type .reforge deadly
You will now see 2 deadly's, and can't choose between them

Expected behavior

The deadly modifier being applied to a bow.

Comprehensive information

If you press enter it will give a random modifier or just remove the modifier fully.

Hardware & software information

  • OS: Windows
  • Version: Terraclient v0.0.1.0 alpha21w30a
@MrWomanStealer MrWomanStealer added the bug Something isn't working label Aug 20, 2021
@steviegt6
Copy link
Owner

This is probably an issue with duplicate reforges in the game's code (i.e. a scrapped earlier "Deadly" modifier). I'll take a look at this later.

@MarauderKnight3
Copy link
Collaborator

MarauderKnight3 commented Aug 24, 2021

(Steviegt6,) The reforge command takes valid input for a prefix and compares it to a list of prefixes that were hand-written and placed in an array static readonly string[] MystagogueCommand.Prefixes, getting the index of the matching name and applying that index as a prefix to the weapon. (Making my own list was the fastest, also a lazy option) IndexOf should return the first one the game finds when it recognizes you choose deadly. I'm going to also look at the command input digester later but it's got nothing to do with negative IDs, discard IDs or anything else of that sort, as the prefix list was handwritten from what's allowed in game

Edit: Also, a check for ids 20 and 43 is made where it checks for melee/ranged status on the weapon before it chooses what ID to use. Image
image

Edit 2: I think it has something to do with the big spaghetti storm that is Item.Prefix().

Edit 3: changes

@MarauderKnight3
Copy link
Collaborator

@GooUckd Can I ask what item you were trying to reforge?

@MrWomanStealer
Copy link
Author

@GooUckd Can I ask what item you were trying to reforge?

A silver bow. I tried another bow which I can't remember. Also, tried the clockwork assault rifle. Same issue.

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

3 participants