Beginners programming help
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: Beginners programming help
but its always 0, as far as i could tell...
- JacksonCougar
- Huurcat
- Posts: 2460
- Joined: Thu Dec 06, 2007 11:30 pm
- Location: Somewhere in Canada
Re: Beginners programming help
For the most part you could find tags_ids by scanning for them (searching in hex for example) I think that's what he means.
- OwnZ joO
- Posts: 1197
- Joined: Sun Dec 09, 2007 4:46 pm
Re: Beginners programming help
I thought I remembered seeing Grim post some code a long time ago to get the tag number from the Identifier using bit manipulations, am I misremembering this Grim?
- bumlove
- Posts: 524
- Joined: Tue Dec 11, 2007 8:10 am
- Location: England I'm not British, I'm English
Re: Beginners programming help
I think I understand what grim said, short 1 = index position, short 2 = a game wide Identifier, I am only speculating but will check when home
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Beginners programming help
Looking at the code you posted it's actually based off of the index listing.
For a tag listing, it adds 0xE175 (although the code lists it as 0xE174) to the index to get the salted short.
Apparently, scripts salt it with 0xE173 instead.
Look at SCNR, 0xE1780003 => 0xE175 + 0x0003 = 0xE178
Just looking at pics right now, but I would assume MATG would be 0xE1750000 (or something close to that)
For a tag listing, it adds 0xE175 (although the code lists it as 0xE174) to the index to get the salted short.
Apparently, scripts salt it with 0xE173 instead.
Look at SCNR, 0xE1780003 => 0xE175 + 0x0003 = 0xE178
Just looking at pics right now, but I would assume MATG would be 0xE1750000 (or something close to that)
- Grimdoomer
- Admin
- Posts: 1835
- Joined: Sun Dec 09, 2007 9:09 pm
Re: Beginners programming help
It could only ever be 0 once, going by the way Bungie computes them. So idk what the hell your looking at...XZodia wrote:but its always 0, as far as i could tell...
Don't snort the magic, we need it for the network.
- Grimdoomer
- Admin
- Posts: 1835
- Joined: Sun Dec 09, 2007 9:09 pm
Re: Beginners programming help
Yup, but idr in what topic I posted it. Was something like tag_index = (tag_id & 0xFFFF);OwnZ joO wrote:I thought I remembered seeing Grim post some code a long time ago to get the tag number from the Identifier using bit manipulations, am I misremembering this Grim?
Don't snort the magic, we need it for the network.
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: Beginners programming help
In hex the numbers go like this:
0x00000000
0x00000001
0x00000002
0x00000003
...
0x0000000F
0x00000010
etc
Hence the first short, ie the salt value, is always 0
and the second short is the tag index
0x00000000
0x00000001
0x00000002
0x00000003
...
0x0000000F
0x00000010
etc
Hence the first short, ie the salt value, is always 0
and the second short is the tag index
- Grimdoomer
- Admin
- Posts: 1835
- Joined: Sun Dec 09, 2007 9:09 pm
Re: Beginners programming help
You better go get new maps because it will only ever be 0 once! There is never a case where the salt is always 0. Here are the first few ids from zanzibar.map:XZodia wrote:In hex the numbers go like this:
0x00000000
0x00000001
0x00000002
0x00000003
...
0x0000000F
0x00000010
etc
Hence the first short, ie the salt value, is always 0
and the second short is the tag index
0x000074E1
0x010075E1
0x020076E1
0x030078E1
0x040079E1
First short is the tag_index the second short is the salt.
Don't snort the magic, we need it for the network.
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: Beginners programming help
Just checked...oops was looking at the wrong values =P
But the values you posted are the wrong also...
0xE1740000
0xE1750001
0xE1760002
0xE1780003 - Not a typo, there is no E177...
0xE1790004
But the values you posted are the wrong also...
0xE1740000
0xE1750001
0xE1760002
0xE1780003 - Not a typo, there is no E177...
0xE1790004
- Grimdoomer
- Admin
- Posts: 1835
- Joined: Sun Dec 09, 2007 9:09 pm
Re: Beginners programming help
Those are all big endian, w/e you are using to view the map is byte flipping them. Trust me man: http://nvsx.net/i/ea694.pngXZodia wrote:Just checked...oops was looking at the wrong values =P
But the values you posted are the wrong also...
0xE1740000
0xE1750001
0xE1760002
0xE1780003 - Not a typo, there is no E177...
0xE1790004
Don't snort the magic, we need it for the network.
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: Beginners programming help
I'm using 32bit visual studio debugger...
- Grimdoomer
- Admin
- Posts: 1835
- Joined: Sun Dec 09, 2007 9:09 pm
Re: Beginners programming help
Exactly, it byteflips shit to big endian.XZodia wrote:I'm using 32bit visual studio debugger...
Don't snort the magic, we need it for the network.
- troymac1ure
- Keeper of Entity
- Posts: 1282
- Joined: Sat Aug 09, 2008 4:16 am
- Location: British Columbia, Canada, eh
- Contact:
Re: Beginners programming help
Was curious about Unique IDs if they used something like this as well. It seems like they too are almost numbered on their first short, although the top int seems all over. Maybe bit values or something? If you look at the MACHs in Triplicate's SCNR, the MACHs are numbered like so (hex values): 0003, 0007, 0008, 0009, 000A, 000B, 000Cbumlove wrote:1 If the first short of an Ident = its index position, what does the second short stand for?
It looks like maybe they had 6 bother MACHs originally that were removed from the map? I am assuming that as they added a new MACH it would just increment the counter.
I dunno, just was curious...
- XZodia
- Staff
- Posts: 2208
- Joined: Sun Dec 09, 2007 2:09 pm
- Location: UK
- Contact:
Re: Beginners programming help
I expect there is something before machs in scnr that use uid's which is where your missing numbers would come from...
- bumlove
- Posts: 524
- Joined: Tue Dec 11, 2007 8:10 am
- Location: England I'm not British, I'm English
Re: Beginners programming help
I've hit a bit of a snag on planning,
I figure all the constants like primary magic, index/object offsets should be in the code for the main form.
file strings, Meta start and the meta I want to edit of the linking Bloc to hlmt to coll mode phmo) should be in their own respective class.
I know I'm missing a ton of knowlage but I seem to be coding this quite alot
just going to a position, reading whats there and moving to what offset is listed, I'm guessing this could be more elegant?
also I'm questioning how to write to the map, I think I should read the map, write to form1, when X Y or Z are alterd (and a button event) it should write to the map, so I think If as I'm pinging the br to read meta to write to the form I should make the offsets as a object so I can just have something like.
Many thanks in advance
edit*
I figure all the constants like primary magic, index/object offsets should be in the code for the main form.
file strings, Meta start and the meta I want to edit of the linking Bloc to hlmt to coll mode phmo) should be in their own respective class.
I know I'm missing a ton of knowlage but I seem to be coding this quite alot
Code: Select all
br.position = 20;
int aPossitionIWantToGoTo = br.readsingle;
br.position = aPossitionIWantToGoTo;
also I'm questioning how to write to the map, I think I should read the map, write to form1, when X Y or Z are alterd (and a button event) it should write to the map, so I think If as I'm pinging the br to read meta to write to the form I should make the offsets as a object so I can just have something like.
Code: Select all
bw.position = meta1;
textBox1.parseInt.bw;
bw.position = meta2;
textBox2.parseInt.bw;
// I have a feeling that this is wrong but haven't done much reading a form and writing to a file
edit*
I asked this of kornman but he said it is 4bytes to a uID I really think Endieness plays a part, like why is there negitive planes in the bsp collision model ? I spent a short time hunting throught debug memory dumps for unique ids and I never found any (I was told this was prob a endieness thing too)troymac1ure wrote:Was curious about Unique IDs if they used something like this as well. It seems like they too are almost numbered on their first short, although the top int seems all over. Maybe bit values or something? I dunno, just was curious...