Fix bugs encountered (mostly in battles) in Ara Fell #897

Merged
merged 39 commits into from May 29, 2016

Projects

None yet

3 participants

@Ghabry
Member
Ghabry commented May 15, 2016 edited

This fixes lots of bugs I found while playing through Ara Fell and defeating the first boss. The biggest change was moving most Interpreter commands to the Interpreter (from map) because this breaks battle otherwise.
Many visual Problems were fixed in battle.
If I didn't fail in cut-paste the Interpreter should work as good as before.

The map is here but for some reason when starting the battle it crashes (works locally)
https://easy-rpg.org/play/?game=af_demo&start-map-id=223&start-party=1&test-play

I also fixed a buffer Overflow in vsnprintf which occured in Spanish Dragonball Z because the map tree was too deep.
And double clicking in the Finder on MacOS should work now...

Not ready yet. I need somebody to test it on a Mac ;)

Ghabry added some commits May 6, 2016
@Ghabry Ghabry Move most map interpreter code to interpreter because the battle inte…
…rpreter also needs these commands. Fix #788
ba9d8d3
@Ghabry Ghabry Animated battlers in RPG Maker 2k3 battles will stay on the last anim…
…ation frame of left/right hand until the attack animation is finished. Draw an empty sprite when an animation frame has no slots.

This fixes a problem in Ara Fell: The battler fades out and without this fade out it looked strange because the actor was visible twice on screen (once the battler, once in the animation)
f924c5a
@Ghabry Ghabry RPG 2k3 battle: Enemies use battle animation 1 for normal attacks 1e02383
@Ghabry Ghabry RPG2k3 battle: Respect Height and Width of the Battle animation when …
…used. Fixes the cursor placement.
48341dc
@Ghabry Ghabry Fix in-battle battle animations targetting an ally. (of-by-one error) 68d4cf9
@Ghabry Ghabry Reduce intensity of Flash in battle animations (adjusted to the inter…
…preter settings)
03e9d33
@Ghabry Ghabry commented on an outdated diff May 16, 2016
src/game_interpreter.cpp
+ // Enemy Attack
+ value = (*Main_Data::game_enemyparty)[com.parameters[5]].GetAtk();
+ break;
+ case 5:
+ // Enemy Defense
+ value = (*Main_Data::game_enemyparty)[com.parameters[5]].GetDef();
+ break;
+ case 6:
+ // Enemy Spirit
+ value = (*Main_Data::game_enemyparty)[com.parameters[5]].GetSpi();
+ break;
+ case 7:
+ // Enemy Agility
+ value = (*Main_Data::game_enemyparty)[com.parameters[5]].GetAgi();
+ break;
+ }
@Ghabry
Ghabry May 16, 2016 Member

Look what we forgot :o

@Ghabry
Member
Ghabry commented May 16, 2016 edited

Regression in EHR is fixed.

The only problem I'm aware of in Ara Fell now is that the "Scout" battle command is behaving totally wrong :/

@Zegeri Zegeri commented on an outdated diff May 16, 2016
src/graphics.cpp
@@ -227,6 +227,11 @@ void Graphics::Freeze() {
}
void Graphics::Transition(TransitionType type, int duration, bool erase) {
+ if (erase == screen_erased) {
+ // Don't allow another erase or non-erase
+ return;
+ }
+
@Zegeri
Zegeri May 16, 2016 edited Member

This doesn't reproduce the behaviour of RPG_RT when using Show Screen in a non-erased screen. For example, try using Show Screen with the transition type Scroll Right while the screen is non-erased.

@Ghabry Ghabry changed the title from Fix bugs encountered in "Key Room" in Ara Fell to Fix bugs encountered up to first boss battle in Ara Fell May 16, 2016
@Ghabry
Member
Ghabry commented May 16, 2016

Enough fixes for this PR. The next commits will fix regressions.

The first boss can be defeated now. That boss absorbs other enemies to generate a "shield". The Interpreter checked if all enemy HP was 0, then the real boss can be attacked. Due to different bugs the sum was never 0.

ForceFlee is not needed, see it as a bonus ;)

@fdelapena
Member
fdelapena commented May 17, 2016 edited

First regression found: battler sprites are the same for all allied in EHR:
The allied character is the same for all

Visible improvements are at least battle animations now looking more consistent (it was showing a frozen last frame for some animations before) and the allied target offset seems fixed 😄.

The force flee implementation sure will unbreak multiple games, nice bonus 👍.

@Ghabry
Member
Ghabry commented May 17, 2016

RPG2k3 supports many ways to do animations.

  1. The "right hand" animation fades out the battler and then it stays at an empty frame (old behaviour: it was looping or stuck at the last non-empty frame)
  2. The battle animation plays
  3. Not implemented: A "fade-out" animation is played (is an extra per-actor setting), not used by many games but Ara Fell does. This makes Lita's attacks look a bit strange.
  4. The idle (or state) animation plays for the battler
@Ghabry
Member
Ghabry commented May 21, 2016

Got confirmation that #705 is fixed

Ghabry added some commits May 9, 2016
@Ghabry Ghabry Correctly handle vsnprintf return value and don't rely on assert for …
…terminating when vsprintf overflows the buffer. Fixes #891
74add81
@Ghabry Ghabry Save/Restore through flag. Fix #890 03c0298
@Ghabry Ghabry Store battler_animation in savegame. Fix #876 e14a631
@Ghabry Ghabry Change working directory on MacOS to the application directory when r…
…un from Finder. Fix #705
dbb08a4
@Ghabry Ghabry Use the correct battler animation_id for skills 65d792f
@Ghabry Ghabry Work around a crash that sometimes happens when interpreting RPG Make…
…r 2k3 English versions. No idea how it exactly happens but seems to be related to the window focus.
bff3077
@Ghabry Ghabry Support MessageOptions in battle. Hide command window in victory stat…
…e of gauge mode.
3cd7a69
@Ghabry Ghabry Implement variable operations for battle related data 7da8fc8
@Ghabry Ghabry Battle: Support "Monster is target" condition d2b2021
@Ghabry Ghabry Battle: Fix offset calculation of battle animations when enemy attack…
…s and animation loop when actor is not using a battle animation for anims
83f9cd4
@Ghabry Ghabry Battle 2k3: Set the selected battle action after targeting the enemy.
Fixes the Scout command in Ara Fell
ebbc273
@Ghabry Ghabry Battle 2k3: Show enemy states in help window when in "target enemy" mode
Ara Fell uses this to display the enemy names
fbbf1d3
@Ghabry Ghabry Battle: Detect death of battlers after ChangeHP/ChangeCondition event…
… commands. Fix #380
3fa2bb4
@Ghabry Ghabry Battle algorithm was not clearing the conditions when targeting the n…
…ext enemy. Dead condition not added anymore when HP reach 0, ChangeHP already handles this.
06a0abd
@Ghabry Ghabry Z value of battle animations must be applied to the sprite ceda61a
@Ghabry Ghabry Battle: Implement ForceFlee command 48c25f1
@Ghabry Ghabry Change the comment about the "changed_class" command because we know …
…better now. This also fixes calculation of base values and the from battler animations being rendered.
75bbf2c
@Ghabry Ghabry Prevent further erase transition when the screen is already erased ad6dcaf
@Ghabry Ghabry Prevent crash in battle status window when amount of actors changed 0c6feae
@Ghabry Ghabry Prevent Airship from triggering events that are triggered by collisio…
…n and not on the "same" layer.

Bottom layer is triggered by airship, no idea why, RPG Maker logic.
This fixes entering of caves when in "fly mode" in Ara Fell.
9ef1c85
@Ghabry
Member
Ghabry commented May 21, 2016

Fixed the reported regressions and solved more (easy to resolve) issues I encoutered.

Ghabry added some commits May 22, 2016
@Ghabry Ghabry Fix calculation error in skill damage
The formula was evaluated first resulting in def being substracted from spi instead of both being substracted from effect
c2178e0
@Ghabry Ghabry RPG2k3: Implemenent EnemyAction condition "Party size" bd635a8
@Ghabry Ghabry Rpg2k3 battle: Fix Skill test when selecting valid enemy actions. Was…
… ignoring the condition types.
25c8858
@Ghabry Ghabry Don't update Gauge when the actor can not act d00d4b8
@Ghabry Ghabry Battle RPG2k3: Change update logic for idle state, this way events th…
…at alter states have a visible result immediately.
37a9541
@Ghabry Ghabry Battle: Support Switch on/off after finishing enemy actions 1624c63
@Ghabry Ghabry Battle: Change action picking logic of enemies. According to help fil…
…e the only considered actions are: Valid action with highest rating - 9
974377b
@Ghabry Ghabry Prevent race conditions when selecting targets in battle and the (ene…
…my) party size gets altered due to somebody getting killed or removed by an event script.
9657d30
@Ghabry Ghabry changed the title from Fix bugs encountered up to first boss battle in Ara Fell to Fix bugs encountered (mostly in battles) in Ara Fell May 22, 2016
@Ghabry Ghabry Battle: Implement Physical damage state heal, otherwise this deadlock…
…s some battles because the "CanAct" handling was fixed.
4d2b0a4
@Ghabry
Member
Ghabry commented May 22, 2016

pfew this is ready now 👍

Battle should be a bit better now, also in other games ;)

Ghabry added some commits May 22, 2016
@Ghabry Ghabry RPG2k3E: Fix terms spacing fe8065e
@Ghabry Ghabry Battle RPG2k: Fix a regression that prevents target-less skills (e.g.…
… Switch) from being used.

This fixes the battle against Doria in Unterwegs in Düsterburg.
28e35c3
@Ghabry Ghabry Fixed to map pictures did not scroll correctly when the difference be…
…tweeen old and new location was smaller then the tile size.

This happened when the Player movement speed was too slow (below default)
7542333
@Ghabry Ghabry Support setting "use map settings" for enemy encounter command
0a7d83f
@fdelapena fdelapena merged commit a16f258 into EasyRPG:master May 29, 2016

5 checks passed

Android Build finished.
Details
Linux Build finished.
Details
OSX Build finished.
Details
Windows Build finished.
Details
web Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment