
So now that you under reflexives I'll skip to the important part. The SCNR handles spawn points in one of two different ways. The first way is straight forward and what we call simple spawns. In the scenario main section are reflexives for these kind of spawn points. Each chunk is an individual spawn with data for that spawn like x,y,z coordinates, maybe an index for what game types it uses. The second kind of spawn points are what we call palette spawns. These are used to save on space in the mapfile. There are two reflexives involved in palette spawns. What we call <spawn name>_ref reflexives contain only a dependency. Then there's the spawn point reflexive that contains spawn location data and 16-bit integer (short) that indicates which of the _ref chunks to use. Or in other words, which dependency to use. So for vehicles, there would be a vehicle_ref reflexive that for it's chunks might have:
[chunk1: warthog, chunk2: banshee, chunk3: ghost]
Then in the vehicle reflexive there would be x,y,z information and a short for which vehicle to use. So maybe we have:
[chunk1: x=10,y=10,z=0,index=1, chunk2: x=-5,y=15,z=0,index=1, chunk3: x=4,y=-10,z=0.5,index=3, chunk4: x=0,y=0,z=0,index=2]
What this would mean is that at x=10, y=10, z=10 there would be a warthog, at x=-5, y=16, z=0 there would be another warthog, at x=4, y=-10, z=0.5 there would be a ghost and at x=0, y=0, z=0 there would be a banshee.
So with conure's chunk cloner we have the ability to add not only more spawn points of existing vehicles, but in the case of rebuilt maps new vehicles as well without sacrificing scenery spawns. What would be necessary would first be to add a new vehicle_ref chunk with the cloner. Next, we'd have to change the dependency of our new chunk from the original vehicle to one of our imported vehicles. Next, we just have to duplicate a vehicle spawn chunk, change it's index to that of our imported vehicle and move it to where we want it.
Now here's the part where I spam you with all kinds of raw data which when combined with the information above should give an idea as to what goes on inside of the SCNR tag.
Code: Select all
scenario header abridged
reflexive: offset (in decimal)
biped: 552
biped ref: 564
equip: 600
equip ref: 612
MP equip: 900
MP flags: 888
player spawn: 852
scenery: 528
scenery ref: 540
vehicle: 576
vehicle ref: 588
weap: 624
weap ref: 636
Code: Select all
<----player spawn information--->
chunk size = 52 bytes
how many chunks locations = 0x354
0x0 - float - position - x
0x4 - float - position - y
0x8 - float - position - z
0xc - float - facing (in degrees)
0x10 - short - Team index
0x12 - short - BSP index
0x14 - enum16 - type 1 (determines what types player spawns on)
0 - none
1 - ctf
2 - slayer
3 - oddball
4 - king of hill
5 - race
6 - terminator
7 - stub
8 - ignored1
9 - ignored2
10 - ignored3
11 - ignored4
12 - all games
13 - all except CTF
14 - all except CTF & race
0x16 - enum16 - type 2 (determines what types player spawns on)
0 - none
1 - ctf
2 - slayer
3 - oddball
4 - king of hill
5 - race
6 - terminator
7 - stub
8 - ignored1
9 - ignored2
10 - ignored3
11 - ignored4
12 - all games
13 - all except CTF
14 - all except CTF & race
0x18 - enum16 - type 3 (determines what types player spawns on)
0 - none
1 - ctf
2 - slayer
3 - oddball
4 - king of hill
5 - race
6 - terminator
7 - stub
8 - ignored1
9 - ignored2
10 - ignored3
11 - ignored4
12 - all games
13 - all except CTF
14 - all except CTF & race
0x1a - enum16 - type 4 (determines what types player spawns on)
0 - none
1 - ctf
2 - slayer
3 - oddball
4 - king of hill
5 - race
6 - terminator
7 - stub
8 - ignored1
9 - ignored2
10 - ignored3
11 - ignored4
12 - all games
13 - all except CTF
14 - all except CTF & race
</----player spawn information--->
<---scenery--->
chunk size = 72 bytes
count offset = 0x228
type - index - 0x0
name - index - 0x2
not placed - bitmask32 - 0x4
automatically - 31
on east - 30
on normal - 29
on hard - 28
desired permutation - short - 0x6
position
x - float - 0x8
y - float - 0xc
z - float - 0x10
rotation
y - float - 0x14
p - float - 0x18
r - float - 0x1c
</---scenery--->
<---weapons--->
chunk size = 92 bytes
count offset = 0x228
type - index - 0x0
name - index - 0x2
not placed - bitmask32 - 0x4
automatically - 31
on east - 30
on normal - 29
on hard - 28
desired permutation - short - 0x6
position
x - float - 0x8
y - float - 0xc
z - float - 0x10
rotation
y - float - 0x14
p - float - 0x18
r - float - 0x1c
rounds left - short - 0x48
rounds louded - short - 0x4a
flags - bitmask32 - 0x4c
initally at rest(doesnt fall) - 31
obsolete - 30
initally at rest(doesnt fall) - 29
</---weapons--->
<---bipeds--->
chunk size = 120 bytes
count offset = 0x228
type - index - 0x0
name - index - 0x2
not placed - bitmask32 - 0x4
automatically - 31
on east - 30
on normal - 29
on hard - 28
desired permutation - short - 0x6
position
x - float - 0x8
y - float - 0xc
z - float - 0x10
rotation
y - float - 0x14
p - float - 0x18
r - float - 0x1c
body vitality [0, 1] - float - 0x48
flags - bitmask32 - 0x4e (0x4c, if its long bitmask)
dead - 31
<---bipeds--->
<---vehicles--->
chunk size = 144 bytes (1664 - 1520)
count offset = 0x240
type - index - 0x0
name - index - 0x2
not placed - bitmask32 - 0x4
automatically - 31
on east - 30
on normal - 29
on hard - 28
desired permutation - short - 0x6
position
x - float - 0x8
y - float - 0xc
z - float - 0x10
rotation
y - float - 0x14
p - float - 0x18
r - float - 0x1c
body vitality [0, 1] - float - 0x48
flags - bitmask32 - 0x4e (0x4c, if its long bitmask)
dead - 31
multiplayer team index - char - 0x58 (0x59, 0x57 [both are possible if litle edian changes chars odd, i would start with 0x59])
multiplayer spawn flags - bitmask32 - 0x5a
slayer default - 31
ctf default - 30
king default - 29
oddball default - 28
unused - 27
unused - 26
unused - 25
unused - 24
slayer allowed - 23
ctf allowed - 22
king allowed - 21
oddball allowed - 20
unused - 19
unused - 18
unused - 17
unused - 16
</---vehicles--->
<---netgame flags--->
chunk size = 148 bytes (1668 - 1520)
count offset = 0x378
position
x = - float - 0x0
y = - float - 0x4
z = - float - 0x8
facing - float - 0xc
type - enum16 - 0x10
ctf - flag - 0
ctf - vehicle - 1
oddbal - ball spawn - 2
race - track - 3
race - vehicle - 4
vegas - bank - 5
teleporter from - 6
teleporter to - 7
hill - flag - 8
team index - short - 0x12
weapon group - dependency - 0x14
</---netgame flags--->
<---netgame equipment--->
chunk size = 144 bytes (1664 - 1520)
count offset = 0x384
flags - bitmask32 - 0x0, or 0x2
levitate - 31
type 0 - enum16 - 0x4
none - 0
ctf - 1
slayer - 2
oddball - 3
king of hell - 4
race - 5
terminator - 6
stub - 7
ignored1 - 8
ignored2 - 9
ignored3 - 10
ignored4 - 11
all games - 12
all except ctf - 13
all except race & ctf - 14
type 1 - enum16 - 0x6
none - 0
ctf - 1
slayer - 2
oddball - 3
king of hell - 4
race - 5
terminator - 6
stub - 7
ignored1 - 8
ignored2 - 9
ignored3 - 10
ignored4 - 11
all games - 12
all except ctf - 13
all except race & ctf - 14
type 2 - enum16 - 0x8
none - 0
ctf - 1
slayer - 2
oddball - 3
king of hell - 4
race - 5
terminator - 6
stub - 7
ignored1 - 8
ignored2 - 9
ignored3 - 10
ignored4 - 11
all games - 12
all except ctf - 13
all except race & ctf - 14
type 3 - enum16 - 0xa
none - 0
ctf - 1
slayer - 2
oddball - 3
king of hell - 4
race - 5
terminator - 6
stub - 7
ignored1 - 8
ignored2 - 9
ignored3 - 10
ignored4 - 11
all games - 12
all except ctf - 13
all except race & ctf - 14
team index - short - 0xc
spawn time (in seconds, 0 = default) - short - 0xe
position
x - float -0x40
y - float -0x44
z - float -0x48
facing - float -0x4c
item collection - dependency -0x50
</---netgame equipment--->