Post by MultiplayerX on Aug 27, 2008 12:12:53 GMT -8
There are a few life-saving addresses to know, and
the one with setup pointers is most important for
editting stages.
The setup pointers are always at 80075D00. If you
jump there while a stage is loaded you will see 11
pointers. Each one is to a different part of setup
data.
Loaded object addresses start at 80069C30. Each
object has a different kind of designator, telling
what type it is. Characters always use 06040000 or
06060000 when it is reading them. Characters are
always last on the list.
I'm only going to list a few of them here - the ones
for spawns, objects, and the two type of presets. The
others are single player only and are for complex
things like paths, enemy spawning, and certain
objectives. (changing them, even when you know how
they work, can be a really bad idea)
setup pointers. Anything with an - don't worry about.
- - spawn points objects
- - 0xxx presets 2xxx presets
- - start of preset file (these offsets!)
_____________________
so you aren't confused, a byte is a set of two
numbers, like this:
FF
four bytes would look like this:
3F 80 00 00
a byte is a number from 0(00) to 255(FF)
Everything you see is in hexadecimal. When you count
in hexadecimal, you count like so:
0 1 2 3 4 5 6 7 8 9 A B C D E F
So, if you're adding remember:
9 + 1 = A
and
F + 1 = 10
You'll get used to it soon.
_____________________
there are two kinds of preset positions. Type 0xxx
start counting at 0000. If you see any object with a
preset 0000, 0001, 0002, etc THAT ISN'T A DOOR that
uses one of these. They are 44 bytes long and follow
this format:
x position
y position (not needed)
z position
x offset (don't mess with it)
y offset (don't mess with it)
z offset (don't mess with it)
x rotation
y rotation
z rotation
p--- pointer (points at a value like p123a, but isn't
useful for this stuff)
room pointer (pointer to the tile the object should
stand on - very important)
The only things you need to set are the x position, z
position, and room pointer. That's 4 codes per
preset.
These use a very special kind of number called a float
or IEEE number. These are fractions, like 3.14157.
Thankfully, you don't have to convert them to place
things if you can find bond's coordinates. Bond's
coordinates are the last listing in a table starting
at 80069C00 (don't fire though, because that adds
things on the end of the table and makes everything
much more difficult). Each one starts with a number;
You want one that starts 00000608. When you move, it
changes, so if you can't figure it out try that
method.
An example would be:
00000608 -------- 3E000000 3F800000 40000000 8014234C
In the example, the x position is 3E000000, the z
position is 40000000, and the room pointer is
8014234C.
If you stick these into a preset, that will change
whatever point you had into this position.
_____________________
2xxx presets are far more complicated. They are used
by doors, glass, etc. 2710 is the first entry on the
chart, then 2711, 2712, 2713, etc. Doors, though,
start counting at 0000, which is bloody annoying.
They are 68 bytes long. They store all the same stuff
as the 0xxx types as well as stuff to tell the object
how wide, tall, and long to be. They also appear at
exactly the height you set them to, unlike 0xxx where
gravity pull sthem to the floor.
You don't really want to try to set these, as they
take a lot of code and are touchy at best. However,
you probably do want to set objects to them, and
that's in the next section.
_____________________
Object list
These are the objects loaded into the stage. I should
probably send you the full object doc Sub and I have
worked on, but the most important things are all in
the first 8 bytes
ss ss -- tt MM MM pp pp
[t]ype of object: there's a slew of types, listed
below
[M]odel: the object used. I attached Krijy's object
chart there. stick in a new model number and boom!
different object
reset: you can use either kinds of presets. 0xxx
starts at 0000 and 2xxx starts at 2710. Not all
stages have 2xxx types, so watch out.
some common kinds of objects are:
01 doors. 0x100 bytes.
03 normal objects, such as crates, etc. 0x80 bytes
long
08 weapon pickups. 0x88 large. If you set the value
at 0x80 you can change the weapon you get on pickup.
What it looks like is set by the [m]odel though, so
don't forget to change one and not the other.
weapon digits are:
weapon model name
02 BA Hunting Knife
03 D1 Throwing Knife
04 BF PP7
05 CC PP7 (Silenced)
06 CD DD44 Dostovei
07 C1 Klobb
08 B8 KF7 Soviet
09 C3 ZMG 9mm
0A BD D5k Deutsche
0B CE D5k (Silenced)
0C C2 Phantom
0D BC AR33 Assault Rifle
0E C5 RC-P90
0F C0 Shotgun
10 CF Automatic Shotgun
11 D2 Sniper Rifle
12 BE Cougar Magnum
13 D0 Golden Gun
14 BF Silver PP7
15 BF Gold PP7
16 BB Moonraker Laser
17 C6 Watch Laser
18 B9 Grenade Launcher
19 D3 Rocket Launcher
1A C4 Hand Grenade
1B C9 Timed Mine
1C C8 Proximity Mine
1D C7 Remote Mine
1F C6 Tazer Boy
20 CA Tank Weapon
14 ammo boxes. 0xB4 large. You see the FFFF stuff?
If you set the 0000s after it to a number you pick up
that amount of ammo. The ammo types go in order, so
first FFFF0000 is type 1 ammo.
ammo types are:
1 9mm Ammo
2 (beta) also 9mm Ammo
3 Rifle Ammo
4 Shotgun Cartridges
5 Hand Grenades
6 Rockets
7 Remote Mines
8 Proximity Mines
9 Timed Mines
A Throwing Knives
B Grenade Launcher Rounds
C Magnum Rounds
D Golden Bullets
15 body armour. 0x88. the value at 0x80 is the
amount of health you get. Its a percentage, so if you
change the 0100 to 0200 you get double. It is really
easy to change body armour into a weapon. Just change
the type and set 0x80 to the weapon type.
2A normal glass
2F tinted glass, but setting the tint is kinda silly
30 ends the object list. you can stop the object list
early if you set an object type to this.
_____________________
The spawn points are the preset values characters
spawn at. Its different in solo, but in multiplayer
each one is listed like this:
0000 0xxx 0000
the xxx's are a 0xxx type preset. For instance, if
you wanted to start at the second preset you would
type in:
0000 0001 0000
(that's the second preset. They start counting at 0)
You really don't want to mess with the code after it.
It tells the spawn list to stop, and if you don't have
it the whole game crashes.
Naturally this should utterly confuse you long enough
to put together something more helpful. The master of
delay tactics strikes again. You feel strange.
-Zoinkity