Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Used pressure crystals: credit value scaling with explosion power #15933
Used pressure crystals: credit value scaling with explosion power #15933
Changes from 12 commits
8f5b551
b9a344a
116f272
f807b42
b3fe106
6bc210b
dd6ee53
03aeba9
fb153fe
a59b40a
04b7853
53cdb59
4c61541
593d9d6
a785494
6a59b34
9af781f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 power either side is very hard to get right, it'd make more sense to scale it by proximity rather than have a sharp cutoff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure what this index system is supposed to be doing, but it's it doesn't seem like it's going to prevent slightly diluting the mix a few times to get different enough values to trick the system. I suggest making it gradually scale by proximity instead, so a lot of similar values will all dilute any more sales in the approximate area.
Shitty MSPaint drawing to illustrate:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The index takes a measured pressure and converts it into an integer, which represents a range. e.g. pressure of 27.4 gets fit into the range of 25-30. Then if it gets sold, the index of the 25-30 range gets an entry in the sales list as a key, with its value as a multiplier (rand 0.3 to 0.6)
After that, credit value for pressures in that range receives that multiplier. Which stacks multiplicatively with further sales.
It's not perfect: has a hard cutoff, like you say. But I don't have the knowledge to make the system you're describing.
edit: I should mention, this does have an upside! Concrete ranges w/ values that are visible to players is pretty user-friendly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a kiloblast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A nonexistent unit (just like joules in _units.dm) :)
Anyway I looked into explosion power unit -> Joule conversion, but it is not worth it. So kiloblast is just 1:1 with an explosion's power value instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know these didn't have them before but they probably should have style classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
planning to atomize the bulk of the pressure sensor stuff into another pr