Added OW_USE_FAKE_RTC and OW_ALTERED_TIME_RATIO #4910
Merged
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.
Description
OW_USE_FAKE_RTC
, which allows users to control the flow of time using frames instead of the RTC.OW_ALTERED_TIME_RATIO
, which allows users to control the speed at which time flows within the game.Usage
OW_USE_FAKE_RTC
In
include/config/overworld.h
, developers must define ifOW_USE_FAKE_RTC
isTRUE
orFALSE
.==
TRUE
The time within the game is determined by the number of frames that has passed since the clock was initalized. Every 60 frames, time increments by X seconds, as defined in
OW_ALTERED_TIME_RATIO
.==
FALSE
The time within the game is determined by the reading of the RTC.
OW_ALTERED_TIME_RATIO
In
include/config/overworld.h
, developers must define which generationOW_ALTERED_TIME_RATIO
should use.This only works in conjuction with
OW_USE_FAKE_RTC
.==
GEN_8_PLA
For every 60 frames, time in game moves forward 60 seconds.
==
GEN_9
For every 60 frames, time in game moves forward 20 seconds.
!=
GEN_8_PLA
&& !=GEN_9
For every 60 frames, time in game moves forward 1 second.
Testing
Clean Branch
You can recreate this branch by applying a patch or pulling the repo. From a clean version of expansion's upcoming, you can either:
Patch
wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/fakeRTC.patch -O fakeRTC.patch ; git apply fakeRTC.patch ; rm fakeRTC.patch
Repo
git remote add psf-expansion https://github.com/PokemonSanFran/pokeemerald-expansion/ ; git pull psf-expansion fakeRTC
Manual Tests
After replicating the branch, to recreate my testing environment, you can either directly download the debug script and config file, or manually create the changes.
Download
OW_USE_FAKE_RTC
OW_ALTERED_TIME_RATIO
FALSE
GEN_3
wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/include/config/f3.h -O include/config/overworld.h && wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/data/scripts/debug.inc -O data/scripts/debug.inc
TRUE
GEN_3
wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/include/config/t3.h -O include/config/overworld.h && wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/data/scripts/debug.inc -O data/scripts/debug.inc
TRUE
GEN_8_PLA
wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/include/config/t8.h -O include/config/overworld.h && wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/data/scripts/debug.inc -O data/scripts/debug.inc
TRUE
GEN_9
wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/include/config/t9.h -O include/config/overworld.h && wget https://raw.githubusercontent.com/PokemonSanFran/pokeemerald-expansion/fakeRTC_testing/data/scripts/debug.inc -O data/scripts/debug.inc
Manual Testing
OW_USE_FAKE_RTC
andOW_ALTERED_TIME_RATIO
to their desired values.Verified Scenarios
All videos show:
TRAINER_RONALD
and wins in 6 turns.OW_USE_FAKE_RTC
==FALSE
f3.mp4
OW_USE_FAKE_RTC
==TRUE
&&OW_ALTERED_TIME_RATIO ==
GEN_3`t3.mp4
OW_USE_FAKE_RTC
==TRUE
&&OW_ALTERED_TIME_RATIO ==
GEN_8_PLA`t8.mp4
OW_USE_FAKE_RTC
==TRUE
&&OW_ALTERED_TIME_RATIO ==
GEN_9`t9.mp4
People who collaborated with me in this PR
All of this code was written by Anon822.
Features this PR does NOT handle:
#4909
Discord Contact Info
I am
pkmnsnfrn
on Discord.