FIXBITS.BIN

From OHRRPGCE-Wiki
Jump to navigationJump to search

FIXBITS.BIN stores a series of bits that indicate whether or not various file format fixes have been applied to an RPG file. Due to the nature of files and the fact that the base unit of storage is the byte, the file size will be rounded up to the nearest byte.

Also note that the bits are stored in Little-Endian order (so, the 0th bit is, quite literally, the first bit in the file).

All bits default to 0/false, including those that are beyond the end of the file, and even if the file does not exist.

About Formal Specs

Bit Const Meaning
0 fixAttackitems Zeroed out item cost (ammunition) data in ATTACK.BIN
1 fixWeapPoints Fixed hero hand positions in DT0
2 fixStunCancelTarg Turned on "Cancel Target's Attack" bit in ATTACK.BIN for old attacks that damage the Stun register
3 fixDefaultDissolve Initialized genEnemyDissolve to default in GEN
4 fixDefaultDissolveEnemy Initialized Enemy dissolves to default in DT1
5 fixPushNPCBugCompat Turned on the Simulate pushable NPC obstruction bug bitset in GEN
6 fixDefaultMaxItem Stored default max item number from ITM in GEN
7 fixBlankDoorLinks Marked redundant blank doorlinks as unused in .D##
8 fixShopSounds Initialized all the sound effects from genItemLearnSFX to genCantSellSFX in GEN (to one of gen(genAcceptSFX) or gen(genCancelSFX))
9 fixExtendedNPCs Initialized all blank NPC data in the empty space at the end of .N## lumps
10 fixHeroPortrait Initialized Hero portrait data in DT0
11 fixTextBoxPortrait Initialized text box portrait data in SAY
12 fixNPCLocationFormat Converted NPC locations to new format (FIXME: not implemented yet)
13 fixInitDamageDisplay Initialized default values for damage display time and distance in GEN
14 fixDefaultLevelCap Set gen(genLevelCap) to 99 in GEN
15 fixHeroElementals Set the hero elemental data in DT0 from the old weak/strong/absorb bits
16 fixOldElementalFailBit Turned on the 'Simulate old fail vs. element resist bit' bitset in GEN
17 fixAttackElementFails Initialized elemental failure thresholds in DT6 from old 'fail vs. Element #' and 'fail vs. Enemytype #' bits
18 fixEnemyElementals Set the enemy elemental data in DT1 from the old weak/strong/absorb/enemytype bits
19 fixItemElementals Set the equipment elemental data in ITM from the old weak/strong/absorb bits
20 fixNumElements Set genNumElements in GEN to 16
21 fixRemoveDamageMP Change each attack's (DT6) target stat from HP to MP if the 'Damage MP' bit is set
22 fixDefaultMaxLevel Set gen(genMaxLevel) to 99 in GEN
23 fixUNUSED23 Don't use this fixbit for anything. It was wasted in a plan that did not go as intended, and was replaced with a general bitset
24 fixWipeGEN Zero out gen(199) to gen(499), inclusive.
25 fixSetOldAttackPosBit Turn on "Old attack positioning at bottom-left of target" backcompat bit
26 fixWrapCroppedMapsBit Turn on "Wrap map layers over edge of Crop maps" backcompat bit in games older than r6473
27 fixInitNonElementalSpawning Initialize non_elemental_for_spawning data in general.reld
28 fixInitDefaultVolumes Intialize genMusicVolume and genSFXVolume to 50, 80
29 fixAttackMultipliers Intialize the following in attack data:

.randomization (offset 337) to 20 or 0
Clear "Do not randomize" bit
.acc_mult (offset 325) to 1.0
.dog_mult (offset 327) to 1.0
.atk_mult (offset 329) to 1.0
.def_mult (offset 331) to 1.0
.absorb_rate (offset 335) to 1.0

30 fixCheckForBrokenTBChains Ran check_for_broken_textbox_after_chains() to warn about After chains broken by a bug (This is a WIP feature)