V1.06.J818

## Documented Changes

### General Fixes

* deals a lot more contact damage, before it was dealing much less than intended
* Hostile enemies spawned by glitch items no longer deal instant damage, so the player gets a small amount of time to get away from them
* Fixed  being able to turn into Dark Esau
* Fixed  +  being able to damage the player when spawned by
* Fixed a bug that caused the first two floors of the alternate path to always share the same variant, making it impossible to see both Downpour and Dross in the same run

### General Modding Changes

* Mods are now stored in a `mods` folder in the same directory as the rest of the game files
* This directory can be easily accessed by right-clicking The Binding of Isaac: Rebirth in the Steam library, then clicking on "Properties", "Local Files", and finally "Browse..."
* Mod save data is now stored separately in a `data` folder, meaning that updating or unsubscribing from a mod will no longer cause its save data to be wiped
* The name of the subfolder used to store save data is determined by the `directory` property in `metadata.xml`
* Added a loading screen that appears when installing or updating mods from Steam Workshop

### XML changes

* Players (`players.xml`) Added the following properties:
	+ `broken`: Number of broken hearts this player begins with
	+ `pocketActive`: Gives this player the specified starting active item in the pocket item slot
	+ `birthright`: The unique description that should be displayed when this character picks up Birthright
	+ `bSkinParent`: If present, marks this character as the "tainted" version of the regular character that bears the specified name. Usually, this should be set to the same name as the character, unless the tainted and regular version of this character bear different names. If there is no regular character to attach to, this character will not be available in the character selection menu
	+ `hidden`: If set to "true", hides this character from the character selection menu
	+ Custom coop selection graphics can be set for all modded characters by supplying the following animation file (non-tainted characters only):
		- `content/Coop Menu.anm2`: Must contain one animation per character, each animation must bear the same name as the character it was made for
	+ Custom menu graphics can be set for tainted characters by supplying the following animation files:
		- `content/CharacterMenuAlt.anm2`
		- `content/CharacterPortraitsAlt.anm2`
		- `content/Death Screen Alt.anm2`
		- `content/Coop Menu Alt.anm2`
		- `content/CharacterMenu.anm2` and `content/CharacterMenuAlt.anm2` no longer require a "Background" layer as the game now renders the paper background automatically
* Items (`items.xml`) Added the following properties:
	+ `shopprice`: Sets a custom shop price for this item
	+ `initcharge`: Overrides the initial charge for this item (this can be used for active items that do not start with a full charge)
	+ `chargetype`: Can be set one of the following 3 values: `normal` (recharges on room clear), `timed` (recharges over time), `special` (never recharges automatically, cannot be recharged by batteries or item effects)
	+ `passivecache`: If set to true on an active item, evaluates the player's stats on pickup like a passive item rather than when using the item
	+ `hidden`: If set to true, cannot be obtained in game unless explicitly spawned or given to the player
	+ `persistent`: If set to true, temporary effects tied to this item persist between rooms
	+ `quality`: Sets the quality of this item (0 to 4, where 0 is the lowest quality and 4 is the highest)
	+ `tags`: Adds one or more tags to this item (see `items_metadata.xml` for reference)

### Lua Changes

* Added a new `include()` function which acts like a "raw" version of `require()` and will always load the specified file even if it was loaded before
* Fixed the spelling of `EntityPlayer:GetMaxPocketItems()` and `EntityPlayer:DropPocketItem()`. Previous spellings are still present for backwards compatibility but should no longer be used
* `Sprite:SetFrame()` can now be called with only an int argument, this will adjust the current frame for the current animation without stopping it
* Vector multiplication is now commutative (number \* vector is a valid operation) and supports element-wise vector by vector multiplication
* `Color(R, G, B, A, RO, GO, BO)` has been updated:
	+ Only the first three arguments (`R, G, B`) are required, `A` defaults to `1` when omitted
	+ The offset parameters (`RO, GO, BO`) default to 0 when omitted and are now in the 0-1 range instead of 0-255 for consistency
	+ Mods that use this feature will need to be updated
* Added constants `Vector.Zero`, `Vector.One` and `Color.Default` for convenience purposes
* Updated `Isaac.GetPlayerTypeByName(string Name, boolean Tainted = false)`
	+ If `Tainted` is omitted or set to false, only matches non-tainted characters
	+ If `Tainted` is set to true, only matches tainted characters
* Tear flags are now represented by the `BitSet128` data type, this was a necessary change due to 64 bits no longer being enough to hold every tear effect in the game
* Most AB+ mods should be backwards compatible, however due to a limitation from Lua, expressions such as `Tear.TearFlags` & `TearFlags.TEAR_POISON == 0` no longer work correctly
	+ This can be quickly fixed by either replacing "==" with "<=", replacing 0 with `TearFlags.TEAR_NORMAL`, or using the convenience functions below
* The following convenience functions have been added:
	+ `void Entity_Tear:AddTearFlags(BitSet128 Flags)`
	+ `void Entity_Tear:ClearTearFlags(BitSet128 Flags)`
	+ `boolean Entity_Tear:HasTearFlags(BitSet128 Flags)`
	+ `void Entity_Bomb:AddTearFlags(BitSet128 Flags)`
	+ `void Entity_Bomb:ClearTearFlags(BitSet128 Flags)`
	+ `boolean Entity_Bomb:HasTearFlags(BitSet128 Flags)`
	+ `void Entity_Laser:AddTearFlags(BitSet128 Flags)`
	+ `void Entity_Laser:ClearTearFlags(BitSet128 Flags)`
	+ `boolean Entity_Laser:HasTearFlags(BitSet128 Flags)`
	+ `void Entity_Knife:AddTearFlags(BitSet128 Flags)`
	+ `void Entity_Knife:ClearTearFlags(BitSet128 Flags)`
	+ `boolean Entity_Knife:HasTearFlags(BitSet128 Flags)`
* Updated `EntityProjectile`. Added:
	+ `void ClearProjectileFlags(int Flags)`
	+ `boolean HasProjectileFlags(int Flags)`
* `MC_PRE_SPAWN_CLEAN_AWARD, MC_PRE_NPC_UPDATE` and all `MC_PRE_xxx_COLLISION` callbacks will now only skip remaining callbacks when returning a non-nil value
* `MC_GET_SHADER_PARAMS` will now only skip remaining callbacks when returning a table
* Updated arguments passed to `MC_USE_CARD (int CardId, EntityPlayer Player, int UseFlags)`
* Updated arguments passed to `MC_USE_PILL (int PillId, EntityPlayer Player, int UseFlags)`
* Updated arguments passed to `MC_PRE_USE_ITEM (int ItemId, RNG ItemRng, EntityPlayer Player, int UseFlags, int ActiveSlot, int CustomVarData)`
* Updated arguments passed to `MC_USE_ITEM (int ItemId, RNG ItemRng, EntityPlayer Player, int UseFlags, int ActiveSlot, int CustomVarData)`
* If a table is returned instead of a boolean, the following fields can be set to a non-nil value for extra functionality:
	+ `Discharge`: Determines whether the item should be discharged or not after being used
	+ `Remove`: Determines whether the item should be removed from the player or not after being used
	+ `ShowAnim`: Plays the default use animation if set to true (equivalent to simply returning true in AB+)
* Updated `PlayerTypes.ActiveItemDesc`.
	+ Added:
		- `int TimedRechargeCooldown`: Number of frames before an item with a timed cooldown can recharge again (used by  to pause its recharge after fully discharging it)
		- `float PartialCharge`: How close the item is to gaining another charge (0-1 range, used by )
		- `int VarData`: Holds extra information for some active items (such as the number of uses for )
	+ Removed:
		- `boolean Lock`
		- `int OptionsPickupIndex`: Any non-zero value causes the item to form an option group with any other item with the same `OptionsPickupIndex` value. When an item belonging to an option group is picked up, all other items belonging to the same group disappear. 0 is the default value and means the item doesn't belong to any group.
	+ Removed:
		- `boolean TheresOptionsPickup`: see above
		- `RNG GetRNG()` (The object returned from this function is now a reference rather than a copy)
		- `Sprite GetSprite()` (Same as above)
	+ Removed:
		- `RNG RNG`
		- `Sprite Sprite`
		- `string GetAnimation()`
		- `string GetOverlayAnimation()`
		- `void ChangePlayerType(PlayerType Type)`
		- `void AddBrokenHearts(int Num)`
		- `int GetBrokenHearts()`
		- `void AddRottenHearts(int Num)`
		- `int GetRottenHearts()`
		- `boolean CanPickRottenHearts()`
		- `void AddSoulCharge(int Num)`
		- `void SetSoulCharge(int Num)`
		- `int GetSoulCharge()`
		- `int GetEffectiveSoulCharge()`
		- `void AddBloodCharge(int Num)`
		- `void SetBloodCharge(int Num)`
		- `int GetBloodCharge()`
		- `int GetEffectiveBloodCharge()`
		- `EntityPlayer GetMainTwin()`
		- `EntityPlayer GetOtherTwin()`
		- `boolean TryHoldEntity(Entity Ent)`
		- `Entity ThrowHeldEntity(Vector Velocity)`
		- `EntityFamiliar AddFriendlyDip(int Subtype, Vector Position)`
		- `EntityFamiliar ThrowFriendlyDip(int Subtype, Vector Position, Vector Target = Vector.Zero)`
		- `EntityFamiliar AddWisp(int Subtype, Vector Position, boolean AdjustOrbitLayer = false, boolean DontUpdate = false)`
		- `EntityFamiliar AddItemWisp(int Subtype, Vector Position, boolean AdjustOrbitLayer = false)`
		- `void TriggerBookOfVirtues(CollectibleType Type = CollectibleType.COLLECTIBLE_NULL)`
		- `EntityFamiliar AddSwarmFlyOrbital(Vector Position)`
		- `int GetNumGigaBombs()`
		- `void AddGigaBombs(int Num)`
		- `CollectibleType GetModelingClayEffect()`
		- `void AddCurseMistEffect()`
		- `void RemoveCurseMistEffect()`
		- `boolean HasCurseMistEffect()`
		- `boolean IsCoopGhost()`
		- `EntityFamiliar AddMinisaac(Vector Position, boolean PlayAnim = true)`
		- `void SetPocketActiveItem(CollectibleType Type, ActiveSlot Slot = ActiveSlot.SLOT_POCKET, boolean KeepInPools = false)`
* Updated all enums (see `enums.lua`)
* Many more additions and changes to existing functions, the full list of changes can be found here: https://pastebin.com/748vEEdR