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

Constant: Wrapper Not able to emulate values between -1 and 1 #665

Open
quicktinker opened this issue Feb 7, 2021 · 2 comments
Open

Constant: Wrapper Not able to emulate values between -1 and 1 #665

quicktinker opened this issue Feb 7, 2021 · 2 comments
Assignees
Labels
enhancement A feature request.

Comments

@quicktinker
Copy link

Version Information

Forge version:35.1.37
Psi version:1.16-91

Further Information

Steps to reproduce:

  1. First step: Create a shifting variable that will shift between -1 and 1
  2. Second step: use a wrapper with the target set on the variable and a constant of 1 or -1
  3. Third step: Output the result of the wrapper.

What I expected to happen:
I expected the wrapper to shift between -1 and 1 depending upon the target

What happened instead:
the wrapper only shifted from 0 to 1 (if the constant was 1) or -1 to 0 (if the constant was -1)
there was no way to feed in a range from -1 to 1 and have the wrapper output that range.

@gdavid04
Copy link
Contributor

gdavid04 commented May 1, 2021

Fixing this would require changing the return type of SpellPiece.evaluate to account for both minimum and maximum values as the metadata calculation of some pieces could be dependent on the sign of a constant parameter.

@Dudblockman
Copy link
Member

To properly support this without making assumptions on spell costs that could be violated by an addon introducing tricks with nonstandard inputs that could vary between positive and negative values, it would require an overhaul of the underlying system to allow pieces to output a range at compile time.

Such a change is possible, but I wouldn't do so immediately due to it causing incompatibilities with addons. This change is probably best saved for refactoring while porting to 1.17.

@Dudblockman Dudblockman added the enhancement A feature request. label Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature request.
Projects
None yet
Development

No branches or pull requests

3 participants