Never Say Never Again	version 0.10	9:26 PM 5/3/2009
+-+-+-+-+-+-+-+-+-+-+

  The latest demo of the randomizer patch.  Here's what this version does:
1)  Random bodies and heads usable in below; use 0xFF as body or head code for either
	Multiplayer select menu
	Character introductions
	Actions BD and BE in setup action block
	Object 09 in setup file
2)  Multiplayer character select revisions:
	Players can choose the same character slot
	Adds Random to character menu, pushing default # to 9
	Upon game completion allows all characters multi; number dynamically set, so no need to update the value
	MP character select entries are half the size, allowing up to 128 entries
3)  Accounts for player perspective, in solo and multiplayer!
4)  Eliminates need for the watch arm entry in body/head table
5)  Ammo collection:
	Revision of ammo obtained from clips and weapon pickups: TLB pointers replaced with table
	Revised weapon and ammo collection text.  All types are accepted and english should use the proper articles.	
	Ammo box revisions:
		Ammo boxes can hold types 1-1A, up to 255 rounds each
		Optional model overrides for ammo boxes based on available ammo type
	Ammo Clip revisions:
		Revision of ammo clip sound effect block: up to 15 sounds allowed, and all types are indexed.  Indices are 1 nibble each

Main Menus:
6)  Revised legal screen format.  You can tack in a few lines, like patch ID
7)  Implemented selectable Bonds on main folder
	Press either d-up, c-up, d-right, c-right, or R for next entry
	Press either d-down, c-down, d-left, c-left, or L for previous entry
	You'll need to either complete a stage or set a setting in the watch menu to make the change permanent
	Note: Bond suits and heads have not yet been implemented, but this does affect the 'selected Bond' cuff setting and F2 action command
8)  Character intro revisions:
	Halves the size of the intro block at 0xA870
	Intro animation block reduced to half the size
	Eliminates five TLB pointers from 21990 tied to Bond in intro
	Revision of random weapons in intro; see 21990 below
9)  Revision to cheat menu:
	Cheat menu availability testing now generic (note: location not finalized)
	Incorporated Dr. No (No Body Armor) - finish Mission 1 on any difficulty (->Surface I)
	Incorporated Line Mode - finish Mission 7 on any difficulty (->Jungle)	
	Menu can now accept four times as many cheats, although these are not all selectable yet...

Text Files:
10) Text Table Updates:
	All stage numbers now load a valid text bank - no more endless loops!
	Reconfigured single-region text table allows one more text bank entry
	Set 0x27740 to 1 to trigger full japanese text support
	!NEW in version 10! Text lookup table uses only one string for all regions; Automatically changes E to J when japanese text flag set
11) Text file updates:
	!NEW in Version 10! All updates made to both english and japanese script
	propobj.txt revision
		Entries 20-37 removed
		A420	" charge"
		A421	"film"
		A422	"tank shell"
	mpweapons.txt update:
		A800	"Casino Royale!"
		A80E	"Knives"
	misc.txt update:
		Entries 30-36 removed
		B030	"Never Say Never Again vX.Y\n"
		B034	"Dr. No (No Armor)"
		B035	"Maximum Ammo"
		B036	"Extra Weapons"
		B044	"One minute left" added to NGEE; all regions use this text value instead of pointer to text in 21990

Background File:
12) !NEW in version 10! Clipping can now parse stan tiles with up to 15 points and fewer than 3. (well, probably)

Setup File:
13) Setup Intro block updates:
	!NEW in version 10! 03 rotating intro cameras now work in multiplayer; note 06 cameras can't be used just yet (fading issue)
	Stage intro animations reduced to half the size
	Revised format for head/body/cuff sets for solo stages - no TLB pointers
		Use FE in any slot to use the corresponding selected Bond's data
		Use value FF for random bodies or heads.
		Customizable cuff slot FF - set and use the body, head, and cuff for a custom solo player.
	!NEW in version 10! 06 intro cameras no longer require a text entry
14) Action block command updates:
	!NEW in version 10! Size lookup now uses table of values instead of TLB pointers.
	Following action block commands are now toggles; This will remain as such unless it is verified these break the original solo stages.
	  EA	Toggle Stage Time
	  EC	Toggle Player Pickups
	  F6	Toggle Explosions
	  F9	Toggle Automatic Stage Failure
15)  2710+ preset support for characters:
	You can use 2710+ presets in object 09 characters
	Player spawns can use 2710+ presets; spawns may exceed 15
16) Setup file objects:
	Now XORing respawn flag for objects in setup file.
		That means you can disable an object from respawning MP if you set the respawn flag in the setup file.
	Monitor animations:
		Invalid types stop animation to prevent infinite looping.
		New types added:
		  !NEW in version 10! 10 - branch if rand < x
		  11 - jump to subroutine
		  12 - branch and link
		  13 - branch
		  14 - loop
		  !NEW in version 10! 15 - zoom proportionally

Multiplayer:
17) MP weapon set revision
	Random weapon set added
	"Casino Royale!" - completely random set of 8 unique weapons
	Up to 100 weapon sets
	Body armor allowed in weapon set
	Up to 16 different weapons in a set
	Ammo clips can be used in place of boxes	
	Tank ammo reallocated to type 2 ammo to fit in ammo box
	Selectable gadgets in multiplayer.  Note 'all guns' only makes items 1-20 available.
18) Revision to multiplayer handicaps
	Up to 128 handicaps supported (although there isn't room for that many)
	Set default handicap entry
	License to Kill added to index - must always be the first entry (0)
19) Random multiplayer death table is half the size; half the size = x2 entries
20) Minor multiplayer stage revisions:
	All stages recompiled to eliminate unused presets
	Temple: moved weapon and ammo box collection points to sensible places.  Both the weapons and their ammo are located in the same room now ;*)
	Bunker II: Moved one spawn, locked doors, and added one more.  A lock glitch was occuring when the outdoors were rendered simulataneous with certain other rooms when 16 weapons in play.
	Cradle: set death elevation.  Not in playable list yet.
21) Weapon tweaks:
	Timed mine MP timer set to 1 1/2 seconds (half original time)
	Blast increase for briefcase bomb - maximum of 3

Multiplayer Scenario Updates:
22) Man w/ the Golden X - MwtGX now uses whatever weapon is assigned to F7 in the weapon set
	That means you can now play MwtGX with custom weapon sets; For correct operation, weapon F7 should be unique - one pickup - or bad stuff will happen
	Also, you should be able to play the scenario with the 'all guns' cheat active.  It tests for actual item ownership, not availability.
	Squashed bug when owner of golden weapon dies.  They immediately lose ownership now.
23) The Living Daylights
	You can now switch to weapons while you have the flag, although you only gain time while the flag is drawn.

Various:
24) Integrated Patches:
	Reduced image format.  Up to 4094 images can be loaded into ROM.
	SubDrag's Co-Op kill fix.
	"Detecto": if you forget to plug in controller one, you do not have to reset the game after doing so.
	"Intelliwatch": the solo watch menu now remembers more settings and returns to the page you were last on.
	"SmartSpawns": selectively disable spawn points, weapons, or ammo depending on #players or difficulty.
	"Tank!" patch allows you to select the weapon, speed, and sounds for 2D tank objects.

+-+-+-+-+-+-+

  Here's changes to the 21990:
1) Revised intro weapon block:	block is revised if 0xACE4 != 000000D0
  New format:
0xACE4	1	# models when unarmed; max of 3
0xACE5	1	# pistol models; max of 15 (0xF)
0xACE6	1	# rifle models; max of 12 (0xC)

0xACA8-0xACC0	rifle models; each entry 2 byte model #
0xACC0-0xACDE	pistol models; each entry 2 byte model #
0xACDE-0xACE4	unarmed models; each entry 2 byte model #

  Feel free to set these to any valid object ID.  Remember to alter the number of entries if you add or remove anything.
  This patch lists almost every weapon in the game.  You can reduce this to the original number if you wish.

2) Random Body/Head Table:	block is revised if BF78 != 0
  New format:
0xBF70	RESERVED for number of entries (filled at runtime)
BF74	RESERVED for current entries (filled at runtime)
BF78-C0B0	table of bodies/heads

  Table consists of a list of body values ending with FF, followed by male heads ending with FF, followed by female heads ending with FF.
  The table is fully dynamic so the number of entries and offsets to each are computed at runtime.

3) Added "Random" to character select table at 0xA408

4) 0x30D5C - 0x30D70 set to zero.  TLB pointers no longer needed

5) Intro Character List:	block is revised if 0xA870 != 00000005
  Block may span from 0xA870-0xAB2C.  Each entry now 10 (0xA) bytes each.  70 (0x46) entries maximum.
  Intros end at an entry with +0x9 set nonzero.  That character is not used.  Leave the body set to 00 on the last entry to ensure proper function.
  New format:
0x0	1	body.  0xFF for random
0x1	1	head.  0xFF (or any negative number) for random
0x2	2	text 1
0x4	2	text 2
0x6	2	text 3
0x8	1	1= credits only
0x9	1	nonzero ends the list

6) MP Character List:	block is revised if the byte at 0xA704 is set to -1 (0xFF)
  Block may span from 0xA408-0xA708.  Each entry now 6 bytes each.  128 (0x80) entries maximum.
  The list size is deterimined dynamically.  The last entry must have the flag set to function properly.  0xA704 should ALWAYS be set to 0xFF to ensure the table ends at some point and to mark a revised binary.
  New format:
0x0	2	text ID
0x2	1	end flag; normally 0, -1 (FF) marks last entry
0x3	1	portrait
0x4	1	body.	0xFF for random
0x5	1	head.	0xFF for random

  Perspective and gender are drawn from the body entries in the Body/Head Table.

7) Max MP Character Register:
  The value at 0xA404 is no longer necessary with a revised list.  It is dynamically set at runtime.  It is highly advised to set it to zero (00000000)
  The value is now read as a halfword at 0xA404 and 0xA407 is a register to indicate if the 'all MP characters' code has been triggered.
  Setting 0xA407 nonzero is now the trigger for all MP characters available.
  Completing Cradle activates the full list of multiplayer characters, however many there happen to be.

8) Text String Lookup	block is revised if 0x27744 is != 0
  The table spanning 0x27744-0x278AC is reduced to only entries for one region game.
  Offsetting is in use, so the first entry (LameX) starts at 0x27744.
  If japanese text support is enabled, only one additional entry (B4XX) is allowed.  More can be added if wide character support is disabled.

9) Assigned Stage Text Banks	block is revised if 0x3ADD0 != 7F0C
  The table of TLB pointers from 0x3ADD0-0x3AE88 has been replaced with the data they recover.
  Each value is the first byte of the textID# >> 2.  First entry corresponds to stage 9.  Invalid stages (>0x37) default to stage 9's entry.
  This corrects a lookup issue that can cause an infinite loop for stages with unassigned text IDs.  

10) Intro Animation Table	block is revised if 0xAB2C != 0000003F
  Block may span from 0xAB2C-0xAC9C. Each entry is now 0x8 bytes each.  45 (0x2D) plus terminating entry maximum.
  Table ends with a negative animation value (usually FFFF).
  New Format:
0x0	2	animation value
0x2	2	start point
0x4	2	rate, multiplied by 10000 (0x2710)
0x6	2	applicable weapon set; 0-unarmed, 1-pistols, 2-rifles

  The format now corresponds roughly to that of the 0A animation command.  0A doesn't specify a rate, but 2710 (100%) or 1388 (50%) work well.
  Intro animations are set to run until complete.


11) Stage Intro Animation Table	block is revised if 0x15788 != 00005744
  Block may span from 0x15788-0x15818.  Each entry now 0x8 bytes each.  18 (0x12) entries maximum.
  New Format:
0x0	2	animation value
0x2	2	start point
0x4	2	end point; -1 runs for duration
0x6	2	rate, multiplied by 10000 (0x2710)

  An additional nine entries can be added to the list.
  The format corresponds roughly with that of the 0A animation command.  0A doesn't specify a particular rate, but 1388 or 2710 work well for most animations.
  A sample entry would be:
0069 001D FFFF 1840
  When used, bond fixes his tie and cufflinks.  If you only wish to see him fix the cufflinks, move the start point:
0069 0040 FFFF 1840
  Likewise, you can use an endpoint so he only fixes the tie:
0069 001D 0040 1840

12) Body and Head Index 	revised if 0x1D088 != 3F800000
  Block may span from 0x1D088-1D6D4.  Each entry now 0xC bytes each.  Currently only entries 00-7F are supported, though this may change.
  As a special note, an entry is no longer required for the left hand model.
  New Format:
0x0	4	pointer to object header data
0x4	4	pointer to recall lookup string
0x8	2	perspective * 10000 (0x2710)
0xA	1	gender flag; 0-female: 1-male
0xB	1	head flag; 1 indicates a head model is present

  Perspective and y-offset are merged into one value.  It is saved as an unsigned integer multiplied by 10000 (0x2710).  A value of 1.0 would be 0x2710, a value of 0.5 0x1388, etc.

13) Monitor Animations	editted if 0xFDE4 does not equal 00000007
  Block may span from 0xFDE4-11240.
  Unhacked binary:
  Only types 00-0F are available in an uneditted ROM.  Each command is 4 bytes long.  Command start positions are defined via ASM.

  Hacked binary:
  The first 0x36 short values cite the number of shorts from the start of the block to the microcode for that block.  More entries can be cited by moving the data further in the block.  So that the start of the data segment is always clearly defined, the first entry should always point to the start of the microcode segment.  Doing so accepts an unlimitted number of entries.
  An editted rom additionally allow types 10-15.  Invalid types defer to type 0C, which stops the animation.
  Refer to the monitor microcode documents for more information.

14) Multiplayer Weapon Sets	editted if 0x28364 is not a pointer and 0x283D0 is not 0
  More information available soon

15) Handicap Menu editted if short at 0xA70A is not 0000
  Block may span from 0xA708-0xA760.
  Unhacked binary:
  Only 0xA entries available.  Each command is 0x8 long, consisting of text code, 2 bytes filler, and 4 byte floating point value.
  
  New Format:
0xA708	1	total number of entries
0xA709	1	default handicap value
0xA70A	4 each	table of entries
  Entries:
0x0	2	text code
0x2	2	upper two bytes of floating point value; lower two assumed zero
  Hacked binary:
  Byte at 0xA708 registers the number of entries appearing in the table.  The byte at 0xA709 indicates which entry is the default value, usually 1.0.
  Each entry is 0x4 each, giving a text code and the upper half of a floating-point number.  The first entry should always be 'License to Kill'; if the scenario is in use this entry will be set, and when changing scenarios LTK is replaced with the default setting.
  (Note this behaviour is planned but not yet implemented.  All scenarios will be revised simultaneously in a future release.)

16) Legal Screen editted if 0x9C3C does not equal 000000DC

 New Format:
0x0	2	x pos
0x2	2	y pos
0x4	1	alignment
	0-left align
	1-center
	2-right align
0x5	1	final entry if !=0
0x6	2	textID#

17) Cheat availability testing	editted if +0x30B10 does not equal 7F009874
  TLB pointers have been replaced by 1-byte entries determining the requirements to unlock the given cheat.  

Note: location not yet finalized.  As of 0.8, 0x48 entries at 0x30B10

  Format:	1-byte, bitflags given below
C0	type of entry
	0	stage# complete on any difficulty
	1	stage# complete on secret agent or 00 agent
	2	stage# complete on 00 agent
	3	cheat bitflag number 0-1F
3F	stage# or eeprom cheat bitflag#

18) Image bank reduction	editted if 0x28574 != 0
  Format for image offsets in ROM image bank has been reduced in half.  This edit has already been incorporated into the Goldeneye Editor.
  
  Format:	4 bytes each
0x0	1	impact sound effects
	Fx	sound
	xF	image
0x1	1	reserved
0x2	2	size of file or -1 if EOL

19) Multiplayer Death Animations	editted if 0x15748 != 000030B8
  Format has been reduced to animation numbers, 2 bytes each.  A maximum of 32 entries (0x20) allowed.
  Animations play from start to end without interruption.  When the animation completes, the player fades away and can respawn.
  The table must end with an entry of 0000 to properly determine the number of entries at runtime.
  
  Animation values are 2byte values although only entries 1-BA are valid animations.

20) Solo Model and Cuff settings	editted if 0x34254 != 7F079EA4
  TLB pointers have been replaced with a head/body/cuff table
  Up to 13 (0xD) more entries can be added.
  An additional table of four entries at 0xB784 are used by selected Bond entries.
  0x34254 must equal the number of entries in the table.  Entries start at 0x34258.  0x34255-57 are reserved for runtime.

  FE as an entry value uses the value for the currently selected Bond.  FF for a body or head value is random.
  If the cuff value is not -1 (FF), the cuff value in the table overrides the currently selected value.  This allows you to reuse cuffs 0-8 without replicating their data.
  To handle invalid entry numbers, the first entry in the list should cite its cuff value.

  Entry Format:
0x0	1	body code
0x1	1	head code
0x2	1	cuff override or -1

  The 05 intro command format has changed as well:
0x0	4	command ID# (5)
0x4	1	body for entry -1 (default 0)
0x5	1	head for entry -1 (default 0)
0x6	1	cuff for entry -1 (default 0)
0x7	1	selected entry

  Values at +4, +5, and +6 set the values for the special entry -1 (FF).  These have no effect on other entry types.
  Entry -1 has no default values.  If used, you must cite the values that will appear in the command.
  Note that using this feature on unpatched ROMs will always display the default blue suit and cuff.

21) Weapon and Ammo Collection Text	revised if 0x32180 != 7F04F31C
  Revised to remove these table pointers:
  32180-321F4	TLB	append "some", "a", "an", or "the" when ammo is collected
  321F4-3225C	TLB	append name of ammo type collected
  
  This has been replaced with four tables.
  32180-32188	article on ammo collection
  32188-3219E	article on weapon collection
  3219E-321D8	text displayed on ammo collection (types 1-1D)
  321D8-321DC	pluralization flags for ammo
  
  Articles are english-specific.  Each uses 2 bits.
  0	blank
  1	"a "
  2	"an "
  3	"the "
  This diagram shows how each entry's bits align in each byte:
  33221100 77665544 ...
  
  The text bank uses standard 2-byte text values.  If no text is to be displayed, use the value 0000.
  
  Pluralization flags specify if the ammo type's name should be followed by an "s" when more than one ammo of that type is collected.  Each type's entry is one bit.
  0	blank
  1	"s"
  This diagram shows how each entry's bits align in each byte:
  76543210 FEDCBA98 ...

  Note this feature also removes several banks of text resident in the 21990:
  31C40	0x0A	\r - appended to japanese " picked up." ammo collection text
  31C44	2E0A	.\r - appended to english ammo collection text
  31C48-31CAC	NULL field to initialize ammo collection string
  31CAC	NULL	japanese: NULL starting weapon collection text
  31CB0	0x0A	\r - appended to japanese " picked up." weapon collection text

22) Action block length lookups	revised if 0x31374 !=7F
  TLB pointers have been replaced with a table of lengths starting at 0x31374.  Each value is one byte.
  AD is a special case not covered in this table.  The NULL value ending the string determines the end of the command.  For that reason, AD must always be at least two bytes: the command followed by a terminator.
  All invalid commands presume a length of 1.

+-+-+-+-+-+-+

SmartSpawns v.3 Usage:
  SmartSpawns is a special feature that allows spawn points to selectively be 'turned off' depending on the number of players in the stage.  By using set values, it ensures that roms that do not allow smart spawns simply ignore the feature.
  This is done by setting flags in the spawn's "set" value.  When a flag is set, it disables the spawn for the given number of players.
0080	do not allow 1 player
0100	do not allow 2 player
0200	do not allow 3 player
0400	do not allow 4 player
0800	do not allow multiplayer
1000	do not allow agent
2000	do not allow secret agent
4000	do not allow 00 agent
8000	do not allow 007

  Flags can be combined to disable soemthing in more than one mode or difficulty setting.  For instance, 300 would disable the spawn in both 2 and 3 player, but allow it in solo and 4 player.
  Another use would be to set different spawn locations for a solo stage.  Flag one spawn E000 and it will only be used in agent, D000 on secret agent, and 3000 on both 00 and 007.  Combined co-op and solo stages might use both player and difficulty masks simulataneously.
  Version 3 now allows you to also selectively give players weapons and ammo at the start, so you can disable more powerful weapons on higher difficulties or give gadgets only on difficulties in which they will be used.

+_+

Tank! Usage:
  Tank! is a standalone patch that has been incorporated into rand++.  It allows a stage developer to select the weapon, speed, and sound effects of 2D tank objects.  The patch is fully backward-compatible, so tanks written before the patch work fine, and players that don't have the patch will still be able to play the stage, albiet without the new features.

Top Speed Override:
  This value sets how fast the player can move when riding the object at top speed.  The default value is 15, and for comparison, the default for the 'Fast Bond' cheat is 10.  You can also set the object so it is immovable, which may be useful to create a 'turret' or fixed artillery piece.

Acceleration Override:
  This is how fast the vehicle steps up and down in speed.  Normally, this value is 0.5.  If set high enough, the vehicle can immediately hit its top speed.

Lower Sight Limit:
  When aiming from in a tank, the lower sight limit sets how far down you are able to look.  Normally this value is set to -20.  At zero you will no longer be able to look down.  Note, you can't use this value to look beyond a player's own lower sight limit.

Item:
  Use this to set the item added to inventory when riding in the object.  When in the vehicle the player has this in inventory, and when they leave the vehicle it is stripped from their possetion unless they own their own copy of it.  You can also disable the weapon field so no item is added.

Ignition and Idling Sound Effect:
  When you first enter the vehicle this sound effect is played.  If the sound effect loops, then it will continue playing as long as the player is in the vehicle.  Otherwise, the idling sound effect below is used.

Idling Sound Effect:
  If the ignition sound effect doesn't loop, this sound is played repeatedly so long as the player is in the vehicle.  By default, the idling sound is set to the ignition sound.  Note, that if the ignition sound does loop, this sound effect is not used.

Motion Sound Effect:
  While the vehicle moves forward, back, or rotates, this sound effect is played.  Often, its volume is proportional to how fast you are moving.

Crush Sound Effect:
  If the vehicle runs over a character, this sound effect is played in addition to the screaming sound normally used.  By default, this sound is 0D5, which is a nasty crushing noise under treads.  For other forms of transportation it would make more sense to use a thud or bang.


  To set Tank! data manually in a setup file object, use these offsets:
	0xB6	2	[float - upper short only!] acceleration override
	0xB8	1	top speed override	0 defaults to 15, -1 sets to immovable
	0xB9	1	lower sight limit override	0 defaults to -20
	0xBA	1	item type when riding: 0 defaults to tank, -1 no item
	0xBB	1	reserved.  used at runtime to determine if the item was already in inventory
	0xBC	2	SE ignition.	0 defaults to 042
	0xBE	2	SE idle.	0 defaults to ignition effect
	0xC0	2	SE motion.	0 defaults to 03E
	0xC2	2	SE crush.	0 defaults to 0D5

-------------
Known issues:
+  The GoldenEye Setup Editor does not support most of the features in this patch.  In particular, the 21990 file is incompatible.
+  4-player matches in certain stages with randomly-generated characters can overload memory and cause the game to crash.  Then again, selecting the same characters under the same conditions would also do so.  A necessary evil.
+  Selecting a random body but using a fixed head does not check the head's gender, and special characters supercede the head selection.
+  The terminating entry for the intro block can not use character bodies 0C-0F, 27, or 28.  It is recommended to set all data in this final entry to 00 to ensure the best possible compression.
+  Using a 2328 preset as a player spawn location is not supported and may cause locking
+  Casino Royale can generate random sets that place ammo-only items in slot F7.  In a MwtGX game, this can be an issue because more than one player may have the item.  I'll address this in a future revision.
+  Project 64 may erroneously believe the Casino Royale created an infinite loop and break out of it, so you may have duplicate weapons in weapon sets.  This does not occur on console so no fix is planned.
+  The image list patch may cause occational corruption of Complex, Caves, and Library's stage select images.  The cause of this is unknown.  It corrects itself after playing a stage and reloading the table.

-------------
To-do list:
  Diminish movement animation tables - at least kill NULL entries
  Revise MP scoring system
  Use bitflags for scenarios, allowing most to layer (ie. LTK + YOLT)
  Scenario menu hack - select more than one option, use bitflags, etc.
  MP menu hack - create options page, lump player attribs into page etc.
  Revision for cheat menu folder
  kills made w/ MwtGX stay with weapon
  Set a default string to appear when invalid text codes are used

-Zoinkity
