Getting maximum and current budgets properly

Discussion about modding Halo 3.
Post Reply
Nuklear





Posts: 24
Joined: Tue Mar 04, 2008 3:24 pm

Getting maximum and current budgets properly

Post by Nuklear »

I've been having problems getting the correct budget value from an usermap.

Shade45's usermap says it's a floating point number, so I tried to read it, but it's wrong. The numbers are too big to be a budget. I've tried changing it to integer too and same problem.

Does anyone know how to correctly get the budget value or tell me more info about budgets.
User avatar
SPARTAN-OMEGA





Posts: 497
Joined: Sun Dec 24, 2006 10:09 am
Location: stuck on delta halo...
Contact:

Post by SPARTAN-OMEGA »

Shades right, try a bit harder
Image
Join Halo 2.5 at http://halo25pro.yourfreebb.com/index.php
dont delete its not over the 5 line max in rules
Nuklear





Posts: 24
Joined: Tue Mar 04, 2008 3:24 pm

Post by Nuklear »

I'll try looking at sandbox source again.

Edit, I didn't know there was a ReadSingle method. =P

But, it doesn't get the budgets correctly, just the coordinates.

Why would budget need to be a floating point number when it never have decimal numbers.
User avatar
SPARTAN-OMEGA





Posts: 497
Joined: Sun Dec 24, 2006 10:09 am
Location: stuck on delta halo...
Contact:

Post by SPARTAN-OMEGA »

Im not sure, Ive only found it not edited it
Image
Join Halo 2.5 at http://halo25pro.yourfreebb.com/index.php
dont delete its not over the 5 line max in rules
User avatar
shade45




Translator Artisan Enthraller Logistician
Stylist Wave Firestorm New Age

Posts: 2270
Joined: Fri Apr 01, 2005 1:04 pm

Post by shade45 »

Are you reading it in Big Endian because it seems to be correct in every usermap I've seen??
Patrickssj6




Pi Collaborator

Posts: 5426
Joined: Sat Jul 24, 2004 12:12 pm
Location: I'm a Paranoid
Contact:

Post by Patrickssj6 »

He's probably not since normally it's Small Endian by default.
...left for good
Nuklear





Posts: 24
Joined: Tue Mar 04, 2008 3:24 pm

Post by Nuklear »

shade45 wrote:Are you reading it in Big Endian because it seems to be correct in every usermap I've seen??
I am reading it in Big Endian yes.

Here's my code:

Code: Select all

            PlacementBlock.Block.Maximum_Budget = io.In.ReadSingle(EndianType.BigEndian);
            PlacementBlock.Block.Current_Budget = io.In.ReadSingle(EndianType.BigEndian);
Can you tell me the offset for budgets. Maybe I got it wrong.
User avatar
SPARTAN-OMEGA





Posts: 497
Joined: Sun Dec 24, 2006 10:09 am
Location: stuck on delta halo...
Contact:

Post by SPARTAN-OMEGA »

Ya thats not what I found for budget
Image
Join Halo 2.5 at http://halo25pro.yourfreebb.com/index.php
dont delete its not over the 5 line max in rules
Nuklear





Posts: 24
Joined: Tue Mar 04, 2008 3:24 pm

Post by Nuklear »

So, can you tell me the offsets for budget from the beginning of _blf please?
User avatar
shade45




Translator Artisan Enthraller Logistician
Stylist Wave Firestorm New Age

Posts: 2270
Joined: Fri Apr 01, 2005 1:04 pm

Post by shade45 »

Yeah,

Maximum Budget is 0x268 and Current Budget is 0x26C.
Nuklear





Posts: 24
Joined: Tue Mar 04, 2008 3:24 pm

Post by Nuklear »

shade45 wrote:Yeah,

Maximum Budget is 0x268 and Current Budget is 0x26C.
Thank you very much. I finally got it right this time!
User avatar
shade45




Translator Artisan Enthraller Logistician
Stylist Wave Firestorm New Age

Posts: 2270
Joined: Fri Apr 01, 2005 1:04 pm

Post by shade45 »

No problem :D
User avatar
SPARTAN-OMEGA





Posts: 497
Joined: Sun Dec 24, 2006 10:09 am
Location: stuck on delta halo...
Contact:

Post by SPARTAN-OMEGA »

Thank you, I never could find current budget :P
Image
Join Halo 2.5 at http://halo25pro.yourfreebb.com/index.php
dont delete its not over the 5 line max in rules
Post Reply