Comments (7)
RMMV recalculates the new stat value (after equipment change) to be as close to the previous percentage as possible
I tried testing the same situation.
However, after changing the equipment, HP/MP were simply clamped between 0 and the max value.
I'm sorry but I don't know what situations you are concerned about. 😖
from corescript.
Did you tried without yanfly plugins?
from corescript.
It has nothing to do with yanfly scripts. Its how the core script handles the data type.
If we simply round the value before displaying it, we should be able to keep the float for calculations, but still display the value we would like to display. The bad part is that it doesn't look like RMMV differentiates between calling the HP for a calculation and calling it for a display value, so we would have to write a new method .paramUnrounded that returns the unrounded version whenever a calculation is to be done, and then allow it to use the original rounding for display calls or we could do the opposite. It really depends on if there are more calls for calculation or display.
from corescript.
Clamp just keeps the HP value between 0 and Max which we obviously want to do. I assume it didn't round since most clamping functions don't. If a player has full health and unequips and then reequips they can lose or gain 1hp from the rounding error. I can show the problem in defualt/no plugin screenshots if it will help.
from corescript.
/**
- Returns a number whose value is limited to the given range.
- @method Number.prototype.clamp
- @param {Number} min The lower boundary
- @param {Number} max The upper boundary
- @return {Number} A number in the range (min, max)
*/
Number.prototype.clamp = function(min, max) {
return Math.min(Math.max(this, min), max);
};
Champ is not rounding
from corescript.
as I said stop assuming,
before claiming a bug you should be able to reproduce it without any plugins or with a newer projects.
if they have plugins in it this not the responsability of the oss to find why it's bug with the said plugins.
as I said try to reproduce it with a fresh project without ANY plugins.
if it's doesn't bug without plugins, then it's a plugin bug. if you can reproduce without the plugins the said bug. then OSS will fix it.
from corescript.
You are correct. I'll be more careful claiming a bug in the future. Thanks for checking into it.
The problem still exists in the original game, but equipping/unequipping hp items simply doesn't attempt to keep the same %. I had realized the original scripts use the same hprate function that Yanfly uses, but failed to realize you never use it for equipping. You only use it for 2 purposes: 1. confitional branch (is actor hp between x/y) and 2. to confirm if the actor is alive for combat conditions. I can't think of a possible issue with rounding in those two instances where we would need a float over an int.
from corescript.
Related Issues (20)
- Auto Save System HOT 1
- ShaderTilemap, very hard to manage, how add child in ZLayer or befor ? HOT 3
- Unable to preventDefault inside passive event listener due to target being treated as passive. HOT 1
- Performance reduction of Save / Load Scene when there are many save data
- Bitmap._requestImage discards _reuseImages & dropped Image object HOT 2
- Request to be added to RPV Maker MV CoreScript Slack HOT 2
- Refine the bug report and error message when error occurred HOT 1
- clean project ! HOT 1
- Error in master HOT 4
- Appropriateness on accessing `$gameSystem` from `Scene_Base` HOT 3
- BattleTest and EventTest can't start HOT 2
- BGM restarts every several seconds in Chrome HOT 1
- Progress bar is shown to a wrong position.
- Map and Battle scenes drawing delay of official corescript ver1.6.1 HOT 1
- "$this." or "$self." self reference for events. The current way is very counter intuitive even for programmers HOT 8
- plugin problem
- [CRITICAL] core script makes lots of cache textures HOT 5
- _hasError of WebAudio object is never set false
- Why not es6 class? HOT 4
- StorageManager has a name conflict with WebAPI's StorageManager
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corescript.