Log in

View Full Version : Placing Objects


neiv2
12-15-2009, 01:39 AM
RE: this thread (http://www.eqemulator.net/forums/showthread.php?t=28790):

I'm still a little unclear on the syntax for adding an object. The instructions are as follows:
2. #object Add - Spawns a new object at your present location

Usage:
Static Object: #object Add [ObjectID] 0 Model [SizePercent] [SolidType] [Incline]
Tradeskill Object: #object Add [ObjectID] TypeNum Model Icon

Examples:
- #object Add 0 CHEST1 50
- #object Add 17 IT66_ACTORDEF 1115
- #object Add 161001 0 FELBED 125 1 0

The examples are so disparate that I can't seem to grasp what the pattern is. For instance, the usage syntax is #object Add [ObjectID] 0 Model [SizePercent] [SolidType] [Incline]. But the corresponding example (the "chest," I assume?) doesn't exactly map to that syntax. Why is there a space between the 0 and CHEST1? Does this represent the 0 before "Model" in the usage syntax? Why then does that 0 come after the ObjectID--or is that 0 in fact the ObjectID? Why does the example have only three variable after "Add," but the syntax indicates there should be six variables? What exactly is "0 Model" in the syntax? Is Model a variable? If so, why are there no square brackets around it as in the other variables?

I also have questions about how the model inventory works, but I may be able to figure that out myself after I get clarification on these issues. Thanks.

Wesell
12-15-2009, 03:09 PM
Square brackets typically indicate optional parameters.

neiv2
12-15-2009, 04:05 PM
In this case I can't imagine [ObjectiID] would be optional.

neiv2
12-17-2009, 08:58 PM
I've been experimenting a bit with this. Following the syntax given for a static object (namely):

#object Add [ObjectID] 0 Model [SizePercent] [SolidType] [Incline]

I entered the following text to create a tent:

#object add 16000 0 obj_ctent 200 31 0

The object created just fine, though with inconsistent results. Sometimes the object spawns as a miniature version of the object, while other times it spawns as a cloth bag, changing to the specified object only upon saving. When you try to edit the object, it won't let you edit it immediately, but produces a message that tells you it is unlocking the object so that you can edit it, but that you'll have to zone out and zone back in to make changes. If you do that, and attempt to edit it again, it tells you you cannot edit it because it is not a static object. It then instructs you to do an "#object edit" to edit what you want. But when you do that, it just gives you the same message as before (zone out and back in). To complicate things, there doesn't appear to be anywhere in the newly created record (in the Objects table) to make the edit adjustments for size, etc. After manually changing all the 0s to 300 (trying to find a size field among the "unknown" fields), and zoning out and back in, nothing seemed to work.

I then tried the move and rotate features, both of which work fine. Afterward I tried to edit it again, and this time it allowed me to resize the object--though I should note, although the instructions specify the variable as "size" it is actually "resize" ("size" does not work).

Another idiosyncrasy to note. Even though I added the corresponding zone reference (from the SoF Modeling Inventory) to the zone_assets.txt file for each object I wanted, I was able to get only a few of them to work. The fact that I am using Titanium instead of SoF could be a contributing factor, but it seems odd there would be that many differences. Is there a corresponding inventory for Titanium? Or is this a problem even with SoF?

Wesell
12-18-2009, 06:43 PM
In this case I can't imagine [ObjectiID] would be optional.

I was curious so I checked the code. ObjectID is an optional parameter. If it's not specified highest id + 1 will be used automatically.