More Awesome Than You!

TS2: Burnination => The Podium => Topic started by: kutto on 2007 February 03, 18:11:38



Title: Expressions and Const - A SimPE query
Post by: kutto on 2007 February 03, 18:11:38
In every file I've looked at, these two words appear in a majority of the BHAVs. I've looked at them, and I've tried to crack their code, but I am at a loss. Could anyone who is more knowledgable than me explain what these terms and the subsequent numbers mean?

I have 3 hacks that I'd like to work on, and I have a feeling that I'm going to go nowhere until I understand what these mean.


Title: Re: Expressions and Const - A SimPE query
Post by: dizzy on 2007 February 03, 21:02:04
An "expression" is a singular, statically-typed, signed 16-bit variable assignment. A "const" is a Behavior Constant (or BCON in Edith lingo). It simply denotes a signed 16-bit value.

Expression is what Edith uses to move these values around, like a "statement" in most other languages (only a lot stupider).


Title: Re: Expressions and Const - A SimPE query
Post by: kutto on 2007 February 04, 05:52:07
So what do I make of these 16 digits? What is the significance of the zeroes, the x, and the singular letter?


Title: Re: Expressions and Const - A SimPE query
Post by: miros on 2007 February 04, 07:17:39
Sounds like the equivalent of a variable name, only in hex.


Title: Re: Expressions and Const - A SimPE query
Post by: J. M. Pescado on 2007 February 04, 07:20:44
So what do I make of these 16 digits? What is the significance of the zeroes, the x, and the singular letter?
Err, that's the notation of a hex number. If you're asking this question, then clearly, this is not a Kutto thing to be doing.

"Expressions" are basically your generic assignment/comparison statement. The "expression" opcode, 0x02, basically does the simple scutwork of variable and constant (both TS2 "constants" and literal constants) manipulation. Setting things equal to each other, comparing things, adding things, subtracting things, etc.


Title: Re: Expressions and Const - A SimPE query
Post by: syberspunk on 2007 February 04, 15:28:37
I highly suggest reading the basic tutorials at MTS2.  Echo and AdidasSG2 have some well written elementary tutorials that explain what these things are, and how the hex values correspond to examples of different kinds of expressions.  Some of the tutorials even have diagrams and figures.

Ste


Title: Re: Expressions and Const - A SimPE query
Post by: kutto on 2007 February 04, 18:29:31
Err, that's the notation of a hex number. If you're asking this question, then clearly, this is not a Kutto thing to be doing.

Yeah, it's probably way over my head. I thought I'd give it a try anyhow.

I highly suggest reading the basic tutorials at MTS2.  Echo and AdidasSG2 have some well written elementary tutorials that explain what these things are, and how the hex values correspond to examples of different kinds of expressions.  Some of the tutorials even have diagrams and figures.

I looked at those when I tried to do the zombie mod, but they didn't seem useful at the time. I'll have a look at them again and see what information I can absorb.