Sims 2 Const

From SimsWiki
Jump to: navigation, search

There are many uses for constants, see BCON for more details.

Referring to constants when you don't have a wizard to make life easy is a little weird.

In a wizard you will see a constant as:

Const 0x1003:0x05

which means the BCON resource with instance number 0x1003, and then the entry within it that is number 0x05 (remembering that the first line is numbered 0x00).

Without a wizard, you will likely have three operands that allow you to refer to a constant, one that says it's a constant by containing the value '1A' and then two other operands which give you the low and high order byte respectively. What to put in these two operands?

Let's break the constant into parts:-

Const 0x10.....03:.....0x05

It is assumed that the constant being referred to is always going to start with 0x10..., so we can actually disregard that part. The second part is represented by, in the first of the two operands:

 '80' - odd number
 '00' - even number

and in the second

 '00' - for 0x1000 and 0x1001
 '01' - for 0x1002 and 0x1003
 '02' - for 0x1004 and 0x1005

and so on.

The third part is taken as it stands and added to the first operand.

So to get

Const 0x1003:0x05

you have the first operand containing '80' + '05' = '85' and the second operand containing '01'

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox