Reinforcement/Enemy Unit Range Bug Help (army memory not being cleared?)


#1

I am running into a strange issue with enemy unit reinforcements. It seems that whenever I try and load the 51st unit enemy on a map, even if there aren’t the max 50 enemy units on the map, the 51st enemy unit will not load. I’m not sure what could be causing this issue, and to my recollection the max unit cap for enemy units should only be 50 units on the map at a time yes? (I believe this issue may also be occurring for NPCs.)

If anyone can help me figure out what is causing this issue, that would be appreciated. The following link contains two .ups patches, an event file, and a .sav file: https://www.dropbox.com/s/8h0dvy6il6kx51x/reinforce_bug.zip?dl=0

The two UPS patches are for what the rom is like before I apply my build file and what it is like after. The .sav file should be used to access chapter 14 (the accompanying event file) where the reinforcement issue should appear on player phase turn 4 where 5 units will be loaded instead of the 6 that should as the 6th will be the 51st unit, regardless of the current amount of units on the map.

If I need to provide more details in explaining this issue, I will be happy to do so, and any assistance in this issue will be greatly appreciated.


#2

The cap isn’t 50 units initially loaded, it’s 50 units period. If you have 50 on the map Reinforcements aren’t going to load in.

Wait I misunderstood this one. I’ll look into it, but it’d be better to see your events.


#3

Yeah, it’s not the initial issue you’d think it is when it comes to the max unit cap.

I provided an event file in the link that is relevant to the .sav file where the issue appears. If you do not believe that is enough info, I can provide more.


#4

This sounds like an issue when clearing out the units, units that die are probably not having their ram data erased and the game things they are still on the map.

You are probably installing something to a bad spot, or installing some engine hack that is borked.


#5

I agree that is likely the issue and am hoping that’s all there is to it, but if it is one of the engine hacks in the skill system package for example causing the bug, I have no idea which one it could be or where I would start to look to see that the enemy unit RAM is getting emptied properly.


#6

I doubt it’s the skill system because I have never seen anybody else complain about this.

If you don’t have some sort of version control then I recommend you comment out things (possibly on a copy of your folder) until this stops happening.


#7

Testing with a clean rom, using the below .event code with the current build of the skill patch as available on github, the bug seems to still occur. Based on my initial testing, the current release of the skills patch seems to be related to the issue.

[details=Summary]
////////////////////////////////////////////////////
// //
// Disassembled with Nintenlord’s Event Assembler //
// Version: 11.0.0.0 //
// Game: FE8 //
// File: FE8_clean.gba //
// Offset: $9EC66C //
// //
////////////////////////////////////////////////////

EventPointerTable(0x7, PointerList)

VeinEffect(0, FreezeAllEnemies)

PointerList:
POIN TurnBasedEvents
POIN CharacterBasedEvents
POIN LocationBasedEvents
POIN MiscBasedEvents
POIN Dunno1 Dunno2 Dunno3 Tutorial
POIN Traps1 Traps2
POIN Units1 Units1 //This unit group determines the number and position of deployment slots when there is a prep screen
POIN $0 $0 $0
POIN $0 $0 $0
POIN BeginningScene EndingScene

TurnBasedEvents:
TurnEventPlayer(0x00,reinEvent,2)
END_MAIN

CharacterBasedEvents:
CharacterEventBothWays(0x10,TalkEvent, Eirika, Ephraim)
END_MAIN

LocationBasedEvents:
Vendor(ShopItems,2,7)
Armory(ArmoryItems,10,26)
Village(0x8,VillageEvent,18,27)
House(0,HouseEvent,6,24)
Seize(10,2)
END_MAIN

MiscBasedEvents:
CauseGameOverIfLordDies
END_MAIN

Dunno1:
END_MAIN

Dunno2:
END_MAIN

Dunno3:
END_MAIN

Tutorial:
END_MAIN

Units1:
UNIT Eirika 0x2 0x1 0xA1 [9,24] 0b 0x0 0x0 0x0 [0x1,0x98,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Ephraim 0x1 0x1 0xA1 [7,24] 0b 0x0 0x0 0x0 [0x14,0x99,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Seth 0x7 0x1 0xA1 [11,24] 0b 0x0 0x0 0x0 [0x1,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Gilliam 0x9 0x1 0xA1 [8,25] 0b 0x0 0x0 0x0 [0x14,0x65,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Franz 0x5 0x1 0xA1 [10,25] 0b 0x0 0x0 0x0 [0x1,0x65,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Moulder Bishop 0x1 0xA1 [12,25] 0b 0x0 0x0 0x0 [Heal,Lightning,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Vanessa 0x48 0x1 0xA1 [11,26] 0b 0x0 0x0 0x0 [0x14,0x67,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Ross Pirate 0x1 0xA1 [7,26] 0b 0x0 0x0 0x0 [0x1F,0x64,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Neimi Ranger_F 0x1 0xA1 [9,26] 0b 0x0 0x0 0x0 [0x2D,0x66,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Colm Rogue 0x1 0xA1 [10,27] 0b 0x0 0x0 0x0 [0x1,0,0,0x0] [0x0,0x0,0x0,0x0]
UNIT Garcia Fighter 0x1 0xA1 [12,27] 0b 0x0 0x0 0x0 [0x1F,0x64,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Innes 0x1B 0x1 0xA1 [13,26] 0b 0x0 0x0 0x0 [0x2D,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Lute Sage_F 0x1 0xA1 [6,27] 0b 0x0 0x0 0x0 [0x38,0,0,0x0] [0x0,0x0,0x0,0x0]
UNIT Natasha 0x4A 0x1 0xA1 [14,27] 0b 0x0 0x0 0x0 [Heal,Lightning,0,0x0] [0x0,0x0,0x0,0x0]
UNIT Cormag 0x1F 0x1 0xA1 [14,25] 0b 0x0 0x0 0x0 [0x14,0x67,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Forde 0x5 0x1 0xA1 [6,25] 0b 0x0 0x0 0x0 [0x14,0x65,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Kyle 0x5 0x1 0xA1 [5,26] 0b 0x0 0x0 0x0 [0x14,0x65,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT

Units2:
UNIT Amelia Cavalier_F 0x1 0xA1 [11,26] 0b 0x0 0x0 0x0 [0x14,0x65,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Artur Monk 0x1 0xA1 [12,26] 0b 0x0 0x0 0x0 [0x3F,0x68,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Gerik Hero 0x1 0xA1 [13,26] 0b 0x0 0x0 0x0 [0x1,0x64,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Tethys 0x4D 0x1 0xA1 [14,26] 0b 0x0 0x0 0x0 [0x0,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Marisa Swordmaster_F 0x1 0xA1 [15,27] 0b 0x0 0x0 0x0 [0x1,0,0,0x0] [0x0,0x0,0x0,0x0]
UNIT Saleh 0x27 0x1 0xA1 [14,27] 0b 0x0 0x0 0x0 [0x38,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Ewan Mage 0x1 0xA1 [13,27] 0b 0x0 0x0 0x0 [0x38,0x68,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT LArachel 0x4B 0x1 0xA1 [12,27] 0b 0x0 0x0 0x0 [0x68,0x88,Mend,0x0] [0x0,0x0,0x0,0x0]
UNIT Dozla 0x43 0x1 0xA1 [11,27] 0b 0x0 0x0 0x0 [0x1F,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Rennac 0x33 0x1 0xA1 [10,27] 0b 0x0 0x0 0x0 [0x1,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Duessel 0x35 0x1 0xA1 [9,27] 0b 0x0 0x0 0x0 [0x1,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Myrrh 0x3C 0x1 0xA1 [7,27] 0b 0x0 0x0 0x0 [0xAA,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Knoll 0x2D 0x1 0xA1 [6,27] 0b 0x0 0x0 0x0 [0x45,0x68,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Joshua 0x13 0x1 0xA1 [9,28] 0b 0x0 0x0 0x0 [0x1,0x64,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT Syrene 0x49 0x1 0xA1 [13,28] 0b 0x0 0x0 0x0 [0x14,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT Tana 0x48 0x1 0xA1 [14,28] 0b 0x0 0x0 0x0 [0x14,0x67,0x88,0x0] [0x0,0x0,0x0,0x0]
// UNIT Orson_Ch5x 0x7 0x1 0xA1 [9,5] 0b 0x0 0x0 0x0 [0x14,0x0,0x0,0x0] [0x0,0x0,0x0,0x0]
UNIT

MoreUnits:
UNIT CaellachCC 0x11 0x1 0xA1 [18,28] 0b 0x0 0x0 0x0 [0x21,0x29,0x7C,0x0] [0x0,0x0,0x0,0x0]
UNIT GlenCC 0x21 0x1 0xA1 [17,29] 0b 0x0 0x0 0x0 [0x17,0x4,0x75,0x0] [0x0,0x0,0x0,0x0]
UNIT OrsonCC 0x07 0x1 0xA1 [19,29] 0b 0x0 0x0 0x0 [0x11,0x17,0x76,0x0] [0x0,0x0,0x0,0x0]
UNIT ValterCC 0x23 0x1 0xA1 [16,30] 0b 0x0 0x0 0x0 [0x17,0x1D,0x71,0x0] [0x0,0x0,0x0,0x0]
UNIT RievCC 0x2B 0x1 0xA1 [18,30] 0b 0x0 0x0 0x0 [0x43,0x42,0x75,0x0] [0x0,0x0,0x0,0x0]
UNIT HaydenCC 0x1D 0x1 0xA1 [15,31] 0b 0x0 0x0 0x0 [0x4,0x2F,0x74,0x0] [0x0,0x0,0x0,0x0]
UNIT FadoCC 0x0B 0x1 0xA1 [17,31] 0b 0x0 0x0 0x0 [0x4,0x17,0x21,0x88] [0x0,0x0,0x0,0x0]
UNIT IsmaireCC 0x16 0x1 0xA1 [19,31] 0b 0x0 0x0 0x0 [0xC,0xA1,0x88,0x0] [0x0,0x0,0x0,0x0]
UNIT SelenaCC 0x2A 0x1 0xA1 [16,28] 0b 0x0 0x0 0x0 [0x3B,0x3A,0x4D,0x0] [0x0,0x0,0x0,0x0]
UNIT LyonCC 0x4F 0x1 0xA1 [18,32] 0b 0x0 0x0 0x0 [0x8F,0x4E,0x57,0x0] [0x0,0x0,0x0,0x0]
UNIT

EnemyUnits:
UNIT Morva_Ch20 0x3B 0x40 0xA5 [15,2] 0b 0x0 0x0 0x0 [WretchedAir,0x0,0x0,0x0] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [8,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT Breguet Knight 0x40 0xA5 [5,18] 0 0 0 0 [SteelLance, Javelin] AttackInRangeAI
UNIT Bone Brigand 0x40 0xA5 [11,17] 0 0 0 0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT Bazba Brigand 0x40 0xA5 [16,18] 0 0 0 0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT Saar Knight 0x40 0xA5 [8,15] 0 0 0 0 [SteelLance, Javelin] AttackInRangeAI
UNIT Novala Shaman 0x40 0xA5 [12,13] 0 0 0 0 [Nosferatu] AttackInRangeAI
UNIT Murray Cavalier 0x40 0xA5 [3,13] 0 0 0 0 [SteelSword, Javelin] AttackInRangeAI
UNIT Tirado General 0x40 0xA5 [16,9] 0 0 0 0 [SilverLance, Javelin] AttackInRangeAI
UNIT Binks Warrior 0x40 0xA5 [1,10] 0 0 0 0 [SteelAxe, SteelBow] AttackInRangeAI
UNIT Pablo Sage 0x40 0xA5 [5,11] 0 0 0 0 [Elfire, Purge] AttackInRangeAI
UNIT

EnemyUnits2:
UNIT Vigarde General 0x40 0xA5 [10,2] 0 0 0 0 [Spear, SilverBlade, Tomahawk] NeverMoveAI
UNIT Cyclops_boss Cyclops 0x40 0xA5 [9,4] 0 0 0 0 [BattleAxe, Tomahawk] AttackInRangeAI
UNIT Cyclops_boss Cyclops 0x40 0xA5 [11,4] 0 0 0 0 [BattleAxe, Tomahawk] AttackInRangeAI
UNIT Aias GreatKnight 0x40 0xA5 [7,11] 0 0 0 0 [ShortSpear, SilverBlade, SilverAxe] AttackInRangeAI
UNIT Carlyle Swordmaster 0x40 0xA5 [10,9] 0 0 0 0 [WindSword] AttackInRangeAI
UNIT Gheb Warrior 0x40 0xA5 [2,4] 0 0 0 0 [KillerAxe, KillerBow] NeverMoveAI
UNIT Beran Ranger 0x40 0xA5 [17,14] 0 0 0 0 [Lancereaver, KillerBow, Longbow] AttackInRangeAI
UNIT

EnemyUnits4:
UNIT ONeill Fighter 0x40 0xA5 [0,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [1,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [2,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [3,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [4,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [5,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [6,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [7,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [9,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [10,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [11,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT

EnemyUnits5:
UNIT ONeill Fighter 0x40 0xA5 [12,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [13,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [14,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [15,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [16,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [17,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [18,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [19,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [20,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [21,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [22,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT

EnemyUnits6:
UNIT ONeill Fighter 0x40 0xA5 [23,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [24,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [25,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [26,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [27,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [28,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [29,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [30,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [31,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [0,18] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [1,18] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT

EnemyUnits7:
UNIT ONeill Fighter 0x40 0xA5 [0,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [1,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [2,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [3,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [4,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [5,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [6,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [7,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [9,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [10,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [11,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT

EnemyUnits8:
UNIT ONeill Fighter 0x40 0xA5 [0,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [1,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [2,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [3,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [4,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [5,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [6,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [7,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [9,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [10,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT ONeill Fighter 0x40 0xA5 [11,19] 0b 0x0 0x0 0x0 [SteelAxe, HandAxe] AttackInRangeAI
UNIT

Traps1:
Vein(9,23,0x0,DV1Desc) //freeze enemies
ENDTRAP
ALIGN 4

Traps2:
ENDTRAP
ALIGN 4

BeginningScene:
ENUT 0x1 //no more boss quotes
ENUT 0x2 //no more death quotes
LOAD1 0x1 EnemyUnits
ENUN
LOAD1 0x1 EnemyUnits2
ENUN
LOAD1 0x1 EnemyUnits4
ENUN
LOAD1 0x1 EnemyUnits5
ENUN
LOAD1 0x1 EnemyUnits6
ENUN
LOAD1 0x1 EnemyUnits7
ENUN
LOAD1 0x0 Units1 //0x0 instead of 0x1 seems to be for allies on maps with prep screens
ENUN
LOAD1 0x0 Units2
ENUN
LOAD1 0x0 MoreUnits
ENUN
// FADI 10
// MOVE 0 Carlyle [7,10]
// ENUN
// StartBattle //scripted fight setup
// MissedAttack(0,0) //Seth misses
// NormalDamage(1,0) //Valter hits
// EndAttack
// FIG1 Carlyle Aias 0
// STAL 60
// FADU 10
GotoPrepScreen

EndingScene:
ASMC 0x85C71 0x381F5 0x37CF9 //show records screen
STAL 120
EVBIT_F 0x2
MNTS 0x1 //return to title screen
NoFade
ENDA

VillageEvent:
VillageEventItem(VillageText, Village, Boots)

HouseEvent:
// Set parameters
SVAL r1 NiceThighsID
SVAL r2 (-1) // (-1) is active unit

// Check if unit has skill
// If they have, goto label #0 (end)
ASMC (ASMC_HasSkill+1)
BNE 0 rC r0

// Learn skill to unit
ASMC (ASMC_LearnNewSkill+1)

LABEL 0
// end

Text(HouseText)

NoFade
ENDA

// HouseEvent(HouseText, HouseBG)

FreezeAllEnemies:
VeinActivation
ASMC FreezeAllASMC|1
NoFade
ENDA

TalkEvent:
Text(0xc0a)
NoFade
ENDA

reinEvent:
LOAD1 0x1 EnemyUnits8
ENUN
LOAD1 0x1 MoreUnits
ENUN
ENDA

ShopItems:
SHLI Thunder Elfire Nosferatu Divine Mend Physic PureWater Elixir
ALIGN 4

ArmoryItems:
SHLI SteelAxe SteelLance SteelBow SteelSword HandAxe Javelin
ALIGN 4[/details]


#8

Okay so just to make clear this is the issue you are having: You load in 50 enemy units, kill them, then load in new ones and they refuse to load, yes?


#9

Correct. It is not the typical max 50 on map at a time issue.


#10

This might be relevant, but I’m having a strangely similar issue about enemy units not really dying.

The danger zone works fine until…

I kill some units. I supposed that this was an issue with enemy character structs not getting cleared. Note the bottom right corner how those tiles would be unreachable by those enemy units I killed if they were alive.


#11

Oh, I ran into this issue before too. I don’t have a picture of when it happened the first time I sort of noticed it, but the whole map was considered a danger zone which I thought was odd.

The issue is exactly as you say it is:


#12

I think this is a problem with SkillSystems.
Normally, when an enemy unit dies, 0x00 is assigned to RAM_Unit-> Unit_Pointer of addr + 0 of RAM data.
That part is recycled as free space.
However, if you adapt SkillSystems, dead units will have their death and hide flags set, and Unit Pointer will not be cleared.

This process is similar to the process for Player Unit.
GBAFE does not erase the data from the Unit RAM structure, even if it dies, since it is necessary to record the death to the Player Unit.
For Player Unit, set the death and hide flags.

However, SkillSystems does this for enemy units as well.
Therefore, the RAM area of ​​the deceased enemy unit is not erased and it is not reused.

Vanilla


#13

That’s concerning, if we could get more data on when this started happening that would help, I will open an issue on github.


#15

Sorry, I made a mistake in saying as far back as April. The bug is NOT present in the April 24 2018 release.


#16

Per a comment on github, a temporary solution to this issue until the fixed solution (which apparently exists but is not yet public?) is to disable the capture skill in the skill system. To do this I believe requires you to only edit three files:

  1. The skill installer - Comment out the capture skill
  2. _Common.event - Comment out or set the prHalveIfCapturing block/pointer to be the same as prHalveIfRescuing
  3. UnitMenu.event - Comment out the line dealing with capturing

Please note that this post is not the ideal fixed solution and as such I do not accept it as the answer to this request at this time.


#17

Worked like a charm for me. I wasn’t planning on using Capture anyway (Sorry, Teq), but this would be troubling if someone would want to use it.


#18

I hope this bug will be fixed.
How about reporting the details of the bug in the comment field of SkillSystems?


#19

Oops. Should be fixed.


#20

As someone planning to use capture it’d be nice to be updated on the issue


#21

The issue has been fixed.