On SCNR spawn points

Moderator: Halo Moderators

User avatar
Altimit01
Eschaton Dev
Eschaton Dev
Posts: 2108
Joined: Sun Apr 15, 2007 7:43 pm

On SCNR spawn points

Post by Altimit01 » Mon Feb 11, 2008 5:31 pm

Ok, so I figured some of ya'll might be interested in this information on how the SCNR handles spawn points. To begin with you'll need a working knowledge of reflexives. Reflexives are a way to allow for flexible sized meta files while still having a definitive structure. Every meta has what's known as the main section. This can be thought of as a header. For reference, let's consider the vehi tag. Inside of the main section are things like speed, AI related items and what vehicle it is. Every vehicle only needs one instance of this data. However vehicles have seats, but they have a different amount of seats per vehicle. The way bungie chose to solve this issue was the reflexive system. Inside of the main section is the "reflexive proper". The first value in a reflexive is what's known as the chunk count. The chunk count is how many instances of the reflexive data there are. To keep with our vehicle reference, this would be how many seats there are in the vehicle. After that is the reflexive offset. It's a 32-bit integer (long) that when you subtract the map magic from it results in the address for the first chunk of the reflexive. In order to determine the address of later chunks, one must know the chunk size which is not listed in the halo map file but can be found with a little experience or by looking into plugin files. Here's a visual of what happens within the file to give you a better idea.

Image

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--->
-Thanks to conure for the second set of data
Disclaimer: I am no longer active. Any posts, PMs or other communication I use has no guarantee of accuracy or follow up.
Download Eschaton: Mediafire

User avatar
BRIMSTONE
Ranger
Posts: 724
Joined: Mon Aug 27, 2007 2:13 pm
Location: performing dark rituals on halo...

Post by BRIMSTONE » Mon Feb 11, 2008 5:35 pm

in other words.....what we have here. is the ability to spawn CE vehis normaly........cool....
"One Death Is An Anomaly. One Hundered
Thousand Deaths Is an statistic"

User avatar
Shodos
Veteran
Posts: 448
Joined: Thu Jun 28, 2007 6:46 pm
Location: Look there... above you
Contact:

Post by Shodos » Mon Feb 11, 2008 5:56 pm

and... more theoretical seats?

User avatar
Kayar
Delta Force
Posts: 4215
Joined: Mon Jul 16, 2007 11:59 am
Location: Elsewhere.
Contact:

Post by Kayar » Mon Feb 11, 2008 6:15 pm

Wow... interesting. You and Conure have really been doing a LOT of research, haven't you? Awesome, man. Now, thing is, I understand MOST of that. I understand what we'd have to do, what with cloning a vehicle_ref chunk and whatnot, but to duplicate a vehicle spawn chunk would require being able to select the one we want, right? Which would have to be done in hex? Correct me if I'm wrong though, I probably am...

Good job though, this is some pretty sweet info.
Image
~Kayar~
TaxiService wrote:You haven't seen like the 90% of the dicks i drew. Someday i'll make a website where people will be able to browse the contents of my old notebooks.
WilliamSub wrote:They flock with your hormones
MGM Sig

User avatar
Fuel
Green Beret
Posts: 3243
Joined: Sat Mar 31, 2007 3:27 pm
Location: o-o
Contact:

Post by Fuel » Mon Feb 11, 2008 6:21 pm

BRIMSTONE wrote:in other words.....what we have here. is the ability to spawn CE vehis normaly........cool....
:roll:
when you release your next mod and if it has Ce crap in it >_<
i will stop modding >_>
Image
Image

User avatar
BRIMSTONE
Ranger
Posts: 724
Joined: Mon Aug 27, 2007 2:13 pm
Location: performing dark rituals on halo...

Post by BRIMSTONE » Mon Feb 11, 2008 6:32 pm

Fu£L wrote:
BRIMSTONE wrote:in other words.....what we have here. is the ability to spawn CE vehis normaly........cool....
:roll:
when you release your next mod and if it has Ce crap in it >_<
i will stop modding >_>
:? i am tired of your assumptions of my future mods fuel. your prejudice against change is not only embarassing. but irritating. just because people can create bigger,better,and more complicate d mods than in the "olden days" where moding was more of an art, is no excuse to blatantly pine on and on bout it. if you truly hate it. then make mods that have no CE in it. show the newbs (not nOObs but NEWbs) that cool stuff can be done WITHOUT ce. but the thing is. CEs cool. cool stuff can be done with it. and can be done quickley. thus its attraction. while i do agree with you on the point that too much CE can be bad. in the end. are we realy doing anymore than what we could do if gearbox had given MAC a moding boost? not only are we on MAC looked down on as noobs. as far as moding is concerned. but we have barley scratched the surface as far as moding goes. we cant make cool looking models. we cant make phys for those models. we cant make antr. we cant make custom ligh and lens. easily any way on that last part. and. above ALL. we cant make new MAPS. and untill we do. MAC moding is in the kiddie camp of the moding playground. untill A. we get better tools or B. until we learn to convert all of CE to mac. there. i said it. but what i hate MOST fuel. is your F^#*$^*$) asumptions towards my mods. my next mod is 100% clean of all CE. cause.i.dont.LIKE IT!. but its the only way to do certain things. does halo demo have forerunner bases? no. does it have beam emitters? not just emitters but BEAM emitters? no. so heres my point. dont EVER assume you know what goes on in my head. and second. stop pining away at what you cant change. acept it. or move on. there. thats my opinion.
"One Death Is An Anomaly. One Hundered
Thousand Deaths Is an statistic"

User avatar
Fuel
Green Beret
Posts: 3243
Joined: Sat Mar 31, 2007 3:27 pm
Location: o-o
Contact:

Post by Fuel » Mon Feb 11, 2008 7:39 pm

we can make antrs >_> and new maps >_> :roll:
dont go emo on me <_<
and where not looked down on as noobs >_>
Image
Image

User avatar
BRIMSTONE
Ranger
Posts: 724
Joined: Mon Aug 27, 2007 2:13 pm
Location: performing dark rituals on halo...

Post by BRIMSTONE » Mon Feb 11, 2008 7:47 pm

ok i personally didnt know bout the antr. but cmon....new maps? o i see..........those pieces of scen set next to each other? yeah i guess...perhaps. but heres my point. can you make a brand new map. with cliffs and gullies. waterfalls. can you make a completely brand new MAP? can you give it detail? can you make so its not obvious its just a bunch of scen pieced together? can you make brand new custom BSP?/SBSP? i mean somthing NEW when i talk about a map. somthing grand. not a tiny decrepid map thats realy just a bunch of scenery.......times are changing is my point. but i apoligize for my outburst. i lost my temper somewhat. :?
"One Death Is An Anomaly. One Hundered
Thousand Deaths Is an statistic"

User avatar
Fuel
Green Beret
Posts: 3243
Joined: Sat Mar 31, 2007 3:27 pm
Location: o-o
Contact:

Post by Fuel » Mon Feb 11, 2008 7:50 pm

yea sorry i was kinda a nub >_>
i should have said lets keep ce at a minimum <_< (CE bitmaps own) >_>
Image
Image

User avatar
BRIMSTONE
Ranger
Posts: 724
Joined: Mon Aug 27, 2007 2:13 pm
Location: performing dark rituals on halo...

Post by BRIMSTONE » Mon Feb 11, 2008 7:52 pm

Fu£L wrote:yea sorry i was kinda a nub >_>
i should have said lets keep ce at a minimum <_< (CE bitmaps own) >_>
hehe yeah i shouldnt have lost my head to. and its true CE bits own...hey have you seen those cool looking cyclone bits from the CE map prime? WICKED cool. i piddeled around with em but couldnt get the pics to ever fit right. whether its my onw ineptness with bits or just my imager. i couldnt get em to work. but it would make kickass sky for someone if they did work.
"One Death Is An Anomaly. One Hundered
Thousand Deaths Is an statistic"

User avatar
Fuel
Green Beret
Posts: 3243
Joined: Sat Mar 31, 2007 3:27 pm
Location: o-o
Contact:

Post by Fuel » Mon Feb 11, 2008 8:00 pm

send it to me i can probably make it work
Image
Image

User avatar
BRIMSTONE
Ranger
Posts: 724
Joined: Mon Aug 27, 2007 2:13 pm
Location: performing dark rituals on halo...

Post by BRIMSTONE » Mon Feb 11, 2008 8:01 pm

Fu£L wrote:send it to me i can probably make it work
i will.
"One Death Is An Anomaly. One Hundered
Thousand Deaths Is an statistic"

User avatar
TaxiService
Night Stalker
Posts: 6887
Joined: Thu May 24, 2007 5:52 am
Location: 41.896198, 12.4165945
Contact:

Post by TaxiService » Mon Feb 11, 2008 10:14 pm

@ fuel & brim: [sarcasm] Now let's hug all toghether! [/sarcasm]


. . . i wish modding was still art.



PS: GJ, Altimit. thanks for your research. the world appreciates it.
  • TaxiService! Shitposting since 2007!
MGM Sig

User avatar
lewbylew
Veteran
Posts: 340
Joined: Sat Aug 11, 2007 10:35 pm
Location: Sydney/Australia
Contact:

Post by lewbylew » Tue Feb 12, 2008 2:59 am

Back on topic, Alt, does this have anything to do with creating a whole new spawn point, if so, would it be possible to make it into a program which is like Sparkedit, only you donnot Sparkedit anything, you just click on a place and it creates the item you want, presumably from a list of items such as trees and weapens?

One more point, this should be Stickied coz, if you bothered to read it, it is uefull for future mods (I didn't read the whole thing, I started and just became confuse, I will read it in detail when I have more time)

User avatar
Moxus
Delta Force
Posts: 4704
Joined: Sun Jun 24, 2007 9:01 am
Location: {_-({[]})-_}
Contact:

Post by Moxus » Tue Feb 12, 2008 3:21 am

Nice Altimit. Thank you very much for this valuable data (and I would read through it all if I have more time at the moment).

This should be a sticky.

-=Moxus=-
Image
Kayar wrote:The Collective: Spamming its way to a better tomorrow.
Many thanks to the people who have made my years on MGM and on Halo Demo so memorable.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests