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

Increment SaveInventory::steps and fix state damage algo #1472

Merged
merged 3 commits into from
Nov 4, 2018

Conversation

mateofio
Copy link
Contributor

@mateofio mateofio commented Nov 2, 2018

  • Ticks when player moves with keyboard
  • Ticks when plyaer moves with keyboard in a vehicle
  • Does not tick for events forcing player movement
  • Does not tick for moving once space to embark/disembark
  • Tested and matches RPG_RT behavior

This counter ticks in RPG_RT and is stored in the save data, but outside of that it appears completely unused.

@CherryDT Is there anything we should be doing in the interpreter that depends on this?

* Ticks when player moves with keyboard
* Ticks when plyaer moves with keyboard in a vehicle
* Does not tick for events forcing player movement
* Does not tick for moving once space to embark/disembark
* Tested and matches RPG_RT behavior
@CherryDT
Copy link

CherryDT commented Nov 2, 2018

No I think it's only for use in "change variable"

@mateofio
Copy link
Contributor Author

mateofio commented Nov 2, 2018

In steam rm2k there is no option to set a variable to steps from the ChangeVariable dialog. It appears impossible to get at this value within a game. Maybe a bug in rm2k?

EDIT: Steam rm2k3 also does not support this feature in ChangeVariable.

@CherryDT
Copy link

CherryDT commented Nov 2, 2018

You are right. That was my mistake. I confused it with RMXP which had this option.
RM2k(3) uses this value for the terrain poison feature.

EDIT: I'm talking only nonsense today. I meant the conditions which have field HP/MP reduction every X steps. Not terrains. X.x

@mateofio
Copy link
Contributor Author

mateofio commented Nov 2, 2018

I see it now. RPG_RT has a very simple algorithm for computing damage steps related to states like Poison. It just does a modulus of the step count by the number of steps in the effect.

It has the benefit of making the start of the effect more random and the effect steps persist after a save game.

Right now in Player if you have a poison effect that triggers on every 4th step, you can save the game every 3 steps and never take poison damage.

* Matches RPG_RT
* Prevents save scumming to avoid state damage
* Fixes a bug there Player would trigger damage on every step if
  the hp modifier was > 0 but the steps modifier was 0. It should be
  disable if steps is 0.
@mateofio mateofio changed the title Implement SaveInventory::steps Increment SaveInventory::steps and fix state damage algo Nov 2, 2018
@mateofio
Copy link
Contributor Author

mateofio commented Nov 3, 2018

Tested this against RPG_RT and behavior matches. Ready to be reviewed and merged.

@Ghabry
Copy link
Member

Ghabry commented Nov 4, 2018

great, when I was discussing this with Sormat weeks ago we tried to figure out how RPG_RT saves this

@Ghabry Ghabry added this to the 0.5.5 (or 0.6.0) -> we will see milestone Nov 4, 2018
Co-Authored-By: fmatthew5876 <[email protected]>
@carstene1ns carstene1ns merged commit c71d914 into EasyRPG:master Nov 4, 2018
@mateofio mateofio deleted the steps branch November 15, 2018 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants