Say you are looking at an object, and wonder "What is this object's classifier so I can look up it's scripts ?"
Or the other way round ? What if you find an interesting script and wonder which object it governs?
I've found no easy way so far to answer those questions, and got tired pretty quick of trying to manually look up my targets each time.
Cross referencing the various online lists of classifiers didn't cut it either: many of them are at best incomplete when not downright wrong.And they are limited to the standard game items, with obviously no way to reference every single COB ever made.
Things don't have to be this way.
Read through this very quick article with me, and grab a tool that makes the job as simple as hovering the hand over an object to get the needed information.
Identifying things from a classifierAs I've already mentioned in previous articles , one CAOS command I like to use is a simple command to quickly identify an object by it's classifier is :
rtar X Y Z,sys: camt,sys: edit posl post posr posb
This is useful when you want to know what object a classifier corresponds to, but let's face it, the ability to obtain a given object's classifier by sight would be even more useful.
Identifying a classifier from an objectC2 offers the "ETCH,NEXT" command to help enumerate through all objects currently touching the owner of the script.
But to make our solution C1 compatible, we will need to only use commands present in both games.
We will be using the following script to achieve the expected effect:
enum 0 0 0,
doif touc targ pntr gt 0,
doif targ ne pntr,
sys: edit posl post posr posb,
dde: putv fmly,
dde: putv gnus,
dde: putv spcs,
What does it do ?
enum 0 0 0, # Iterate through all objects in the world
doif touc targ pntr gt 0, # Only enter this bloc if current object in loop does touch the mouse pointer
doif targ ne pntr, # Only enter this bloc if current object IS NOT the pointer itself.Because technically, yes, the pointer does touch itself.
sys: edit posl post posr posb, # Draw the edit box using objects edges
dde: putv fmly, # Print out objects Family
dde: putv gnus, # Print out objects Genus
dde: putv spcs, # Print out objects Specie
stop, # exit the loop once we found the first object, otherwise we would end up only circling the last object in the list of objects touching the pointer.
This command although slightly sub optimal is compatible with C1 & C2, and allows you to know at a glance the classifier of the object under the cursor.
Contrary to the preceding command, having to type this script in a CAOS console would make aiming the cursor highly impractical.
One could technically implement a CAOS only solution, but that would not be worth the trouble.
As we've already seen, sending CAOS commands to C1 and C2 games is easy from your favorite programming languages.
Then, it's just a matter of sticking this piece of code into a timer loop to get a pretty useful tool.
Initially, such a tool was part of the Creatures Kontrol Center app I was working on, but due to delayed development on it, and the immediate usefulness of a classifier identifier tool, I decided I would publish a small standalone version of it right now.
You can grab the tool here.( You will need to have the Visual Basic 6 runtime files for it to work, so grab those if you run into problems when running the exe.)