Page 2 of 2

Re: Beginners programming help

Posted: Tue Feb 07, 2012 10:41 pm
by XZodia
but its always 0, as far as i could tell...

Re: Beginners programming help

Posted: Wed Feb 08, 2012 2:42 am
by JacksonCougar
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.

Re: Beginners programming help

Posted: Wed Feb 08, 2012 2:45 am
by OwnZ joO
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?

Re: Beginners programming help

Posted: Wed Feb 08, 2012 9:31 pm
by bumlove
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

Re: Beginners programming help

Posted: Thu Feb 09, 2012 12:41 am
by troymac1ure
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)

Re: Beginners programming help

Posted: Thu Feb 09, 2012 1:24 am
by Grimdoomer
XZodia wrote:but its always 0, as far as i could tell...
It could only ever be 0 once, going by the way Bungie computes them. So idk what the hell your looking at...

Re: Beginners programming help

Posted: Thu Feb 09, 2012 1:29 am
by Grimdoomer
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?
Yup, but idr in what topic I posted it. Was something like tag_index = (tag_id & 0xFFFF);

Re: Beginners programming help

Posted: Thu Feb 09, 2012 4:39 pm
by XZodia
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

Re: Beginners programming help

Posted: Fri Feb 10, 2012 1:19 am
by Grimdoomer
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
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:
0x000074E1
0x010075E1
0x020076E1
0x030078E1
0x040079E1

First short is the tag_index the second short is the salt.

Re: Beginners programming help

Posted: Fri Feb 10, 2012 1:59 am
by XZodia
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

Re: Beginners programming help

Posted: Fri Feb 10, 2012 3:52 am
by Grimdoomer
XZodia 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
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.png

Re: Beginners programming help

Posted: Fri Feb 10, 2012 10:15 am
by XZodia
I'm using 32bit visual studio debugger...

Re: Beginners programming help

Posted: Fri Feb 10, 2012 2:16 pm
by Grimdoomer
XZodia wrote:I'm using 32bit visual studio debugger...
Exactly, it byteflips shit to big endian.

Re: Beginners programming help

Posted: Fri Feb 17, 2012 6:26 pm
by troymac1ure
bumlove wrote:1 If the first short of an Ident = its index position, what does the second short stand for?
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, 000C
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...

Re: Beginners programming help

Posted: Sat Feb 18, 2012 2:45 pm
by XZodia
I expect there is something before machs in scnr that use uid's which is where your missing numbers would come from...

Re: Beginners programming help

Posted: Sat Feb 18, 2012 3:14 pm
by bumlove
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

Code: Select all

br.position = 20;
int aPossitionIWantToGoTo = br.readsingle;
br.position = aPossitionIWantToGoTo;
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.

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
Many thanks in advance


edit*
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...
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)