Oblivion Mod talk:Mod File Format/NPC

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

UInt Size[edit]

I do a bit of testing too and have a question now: How long is an uint?

it's not in the convention and from the flag tables for ACBS and AIDT it seems to be 3 byte cause of: 0x000001 || Female or 0x000001 || Weapons

From Daves page and my own testing I know the ACBS subrecord is 16 bytes long, the AIDT 12: thats is one byte more than the addition of their parts. That means now an uint is 4 bytes long whats more logical and that the flags have to be 0x00000100

ok i have no idea what this byte does, or if the flags are just 3 bytes long and then there is something other, i was just wondering where that byte is.. and of course how long an uint is ^^ --Mavoss 05:44, 16 June 2006 (EDT)

oh and also i'm sure they are read the other way round: weapons 0x000001(00) has to be 0x010000(00) but i'm new with this, so maybe someone can comment on it, befor i change wyre's mighty words ;-) --Mavoss 08:55, 16 June 2006 (EDT)

Uints (unsigned integers) are 4 bytes long. Yes, if you supplied all the leading zeros, there would be two more -- but I only supplied enough so that all the digits lined up on the page. Byte storage on Windows is indeed little-endian, but that's not relevant since the flags number is the number you would use while writing code. I.e., read the flags variable as a uint, then use your bitwise operator with another a uint constant set to the flag of interest (e.g., 0x200 for no low level processing), then write result as uint. Obviously on read/write you have to correctly handle the endian-ness, but other than that you can forget about it. And it's wRYe not wyre. Cheers, and welcome to the team... --Wrye 18:09, 16 June 2006 (EDT)
Ah. Thanks Wrye. Learned something again :) 0x(00)000201 big-endian, the way you noted it, 0x010200(00) little-endian, the way it's stored in my esp. Noting it the first way is easier for writing code (know at first view to use 0x200) vice versa it's easier when having a hex view in an esp (ah there is 0x00020000 means 'no level processing'). Huh that was complicated... damned now it's trivial...--Mavoss 14:23, 17 June 2006 (EDT)