Jump to content

what the Hex?


Guest The_Swordalizer

Recommended Posts

Guest The_Swordalizer

I have never tried any kind of coding since using BASIC on the ZX Spectrum, but about a week ago I downloaded NI, IEEP, Cromwells Smithy, WeiDU and DLTCEP. After initally being slightly baffled I have now got to the stage where I can create items and creatures, code dialogue (Hurrah!), script (Double Hurrah!) and have created my very own NPC! however, I see plenty of references to hex values. I have seen them in NI and have a basic idea of what they are (They describe where in a file a certain piece of information is located), but adding, subtracting and finding them is a mystery. I have looked at the default Windows Calculator in hex mode but none of the sums seem to work (One example: A tutorial states "Add 0x0000008 to 0x1000000 in hex will give you 0x1000008". Not on the windows calculator in hex mode it doesn't! there isn't even an x button).

 

Can anyone point me to an Idiots Guide to counting in hex?

Link to comment

The regular calculator can do hex, but I much prefer the Powertoy Calculator for XP.

 

Hex notation simply means that rather than counting from 0-9 (base-10), you're counting from 0-f (base-16). So numbers are 0x1, 0x2, 0x3 ... 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10. You're probably better off Googling for a tutorial, as anything already out there will probably be in far greater depth and detail than something we could quickly pull together. :)

Link to comment

Just a note on something thats obvious when you know it, but just dumb when you dont... the 0x bit of a hex value means.. well... it's a hex value. It's show when a value is hex, to avoid confusion (e.g what base (and therefore number) is '10' ? If we write 0x10 we know it's hexadecimal, which is base 16, so we can work out the number). So, you don't need to write the 0x part when doing sums (though, some programs may require it, so the program knows it's a hex value...).

Alternatively, people may append a 'h' (for 'hex') on the end of the number instead, like so: 10h. Or, people may put a $ at the front, e.g. $10.

 

There are identifiers to denote other bases (e.g. octal, base 8) as well, but I don't recall what they are.

 

 

As Cam says, hex works the same as normal numbers (decimal), but is base 16 instead of base 10. Just think of the hundreds, tens and units columns, and remember that instead of moving to the next column when you reach 10, move when you reach 16.

Other than that, yeah, google for a tutorial, there are people around who can explain things much better than me :)

Still, if you haev any more questions, just ask.

Link to comment
Guest Guest

Okay heres one - can I simply export an existing area file (ARXXXX.ARE) using NI to my override file, rename it (Keeping within naming conventions), and assign this area a new script and replace the container contents and actors using NI? Can this area now be used in the game, or will I need additional files (WED and TIS I have heard used in reference to area's)? Can I simply copy the original ARE files WED, TIS etc aswell and rename them?

Link to comment

If you're not changing anything graphics-wise, there's no need to clone the WED or TIS files. You can just have your new ARE file use the same files as the original--many existing areas share these files already.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...