Monday, April 9, 2012

How To: Rotate Items Around a Point

(Updated June 23, 2012 for use with layout editor version 1.7.2.14)

This tutorial is for use with version 1.7.2.14 of the layout editor. If you don't have this version, I highly suggest you download it now. Because this tutorial was written before 1.7.2.14, some of the details on the screenshots may be different than the windows you see. However, the important parts of the windows are the same (the parts boxed in red), so I have not updated the screenshots. If that ever changes, I will update the screenshots to match the most current editor.

Originally, I was going to write a tutorial on how to use the circle tool. However, I decided that rotating items around a point would be the logical step after duplicating and before the circle tool.

Why rotate items? Well, if you built a complex (or even a simple) object along one wall of a room, and then realized that you'd rather have it on a different wall, instead of tearing it all down and rebuilding, you can use rotate to spin the item and move it to its new location.

Or if you want to build a dome or some other complex circle , spherical, or hemispherical object, duplicate and rotate are your best friends.

Using the duplicate function along with rotating around a point is a very powerful tool set. For example, when I built the cathedral, the half dome over the altar was built with duplicate and rotate, not with the circle tool. The reason for this was simple--the pieces of the dome alone are very simple, but when combined together create a complex looking object. Figuring out the locations for each tier of the dome would have been difficult with the circle tool. Rotate made it much easier.

It's a lot simpler than it looks.
In this case, I built a single piece of the dome, rotated it around the center, then modified each section to create the alternating colors and the windows of different sizes.

At this point, I'm assuming you've had some experience with the layout editor (or you've at least read the other two tutorials). I'll be combining a few of the easier steps in one at times, to cut down on the number of screenshots.














So to begin with, we need something to rotate. To show off the power of rotate, I'm not going to use a single item. Instead, I'm going to rotate an entire setup around the point of my choice.

First, I find the items I want to rotate. I've chosen to rotate my desk around the rug in front of it (which you currently can't see). While they're out in the house, I hit my WITH macro. If you don't know what a WITH macro is, you probably want to look at my tutorial on how to use the Diff button. The very beginning goes over what macros you'll want to have set up to understand my tutorials.














Once that's done, we'll pack all of the items I want to rotate into the moving crate, then hit the WITHOUT macro.
















Moving on to the layout editor, we'll open the with layout file.













The layout editor should take us to the Main tab. We'll hit the Diff button in order to isolate the items we want to rotate. The layout file for Diff should be the without file. Click Run. Confused? Read over the Diff button tutorial.











If we've done everything correctly, the layout editor should create a group called "Diff group 1." In this group should be all of the items we packed into the moving crate after hitting the WITH macro. We're going to select all of the items in the "Diff group 1" group by clicking on the blank rectangle beside ItemID (sound familiar?). Next, we're going to right click and select Group Mod. (Note: The name of the group in the screenshot is incorrect, because this is a screenshot of an older version of the editor. Don't panic! Group name has no bearing on what we're about to do. The instructions are still valid.)











At first glance, the window that pops up looks extremely intimidating. There are a lot of empty boxes, demanding to be filled out. Luckily for us, we don't need to worry about all of the boxes. These are the three different Group Mod features, and they're combined into one window. The top window is the Group Point to Point movement box. It's a very simple, very elegant tool, but we don't have to worry about it. It isn't our focus right now.






















What we do want to look at is the Rotate Group Around Point section. Instead of six scary boxes demanding our attention, there are only three scary boxes demanding our attention. If you've been paying attention to the layout editor, you've noticed that along the top of the normal window, above the different columns, there are titles to those columns. One label is x(E/W). That's the column that tells the game how far to move an item in the East or West direction. Another label is y(N/S). Based on x(E/W), if you guessed that y(N/S) tells the game how far to move an item in the North or South direction, you'd be right.

Why am I pointing this out to you? Because the boxes we want to fill in have X and Y labels. The assumption then would be that the numbers I need to put in here are the X and Y (or East/West and North/South) numbers of the point I want to rotate around.

(The part that's crossed out is a feature that hasn't been perfected. You'll probably never need to use it ever, so there's no point in worrying about it. It might as well not exist as far as we're concerned!)

The numbers filled out in this screenshot are the default numbers the box appears with. We'll be changing those numbers to the ones we want shortly.













So the first thing to do is to find the point you want to rotate around. If you were smarter than I was, that would have really been the first thing you did, and you would have done that before packing your first item in the moving crate. Luckily, for our purposes, choosing our rotation spot right now doesn't hurt us. My personal favorite method is to go to the approximate spot I want, and to type /loc in the game. This will cause the game to print out my current location.

My location for E/W (also known as X) is -0.02. My location for Up/Down (also known as Z--don't worry, you didn't miss anything. I didn't cover Z before, because there is no Z box in the Rotate Group Around Point section) is -1.87. And my location for N/S (also known as Y) is -6.04. Those are the only three numbers I need to concern myself with. They will always display in the order of X, Z, Y. The layout editor also displays the columns in the same order.





Once I've done that, I can go back to the layout editor's Rotate Group Around Point. I can use the X and Y numbers to fill out the appropriate boxes for my center point. I also need to fill out the Angle to Rotate box. How am I going to figure that out? Well, think of the spot that you're rotating around as being the center of a circle. You may not remember from geometry, but a circle has 360 degrees. 90 is one quarter of 360, and will take you one fourth of the way around the circle.

If we imagine our circle is a compass, from North to West or North to East is 90 degrees. From East to North or East to South is 90 degrees. From South to East or South to West is 90 degrees. And from West to North or West to South is 90 degrees. One quarter of the circle is always 90 degrees. Half the circle (from North to South, or East to West) is 180 degrees. Makes sense, right? It's two quarters, or 90 + 90. And of course, one full circle is 360 degrees.






















Something to keep in mind--the distance from the Point to Rotate around and the items is the distance from your items to the point that you pick. If you want the circle that the items travel along to be smaller, pick a point closer to the original location of the items. If you want the circle that the items travel along to be bigger, pick a /location further away from the items. And if you want the items to spin (practically) in place, pick a point somewhere within the items you're rotating! In the case of my desk, if I used my desk's /loc as my point to rotate around, everything would spin with the desk. Then I could move it to where I wanted to.

With that in mind, let's rotate our item 90 degrees around the circle, so that you can see what I mean. I've rounded -0.02 to 0 and -6.04 to -6 for convenience's sake. Once I've filled out all of the boxes, I can then click the Rotate button. Make sure you still have all of the items you want to rotate selected before you click it! It is possible to deselect them.






















If we look at the X, Y, and Rotate boxes in the layout editor, we'll note that the numbers have changed from what they were before. That's exactly what we wanted, so let's click the Save Group button.











In the box that pops up, ensure that we're saving to our working layout file, and click Save.








In game, click the LOAD WORKING macro. Your items should reappear, but now they're in a different spot! In this case, they've rotated 90 degrees to the West along the invisible circle that's centered around my feet. Originally the items were to the North. Now they're to the West.

If you're wondering why they went West, it's pretty simple. A positive number in the Angle to Rotate box will send the items "around to the West" (also known as counter clockwise). A negative number in the Angle to Rotate box will send the items "around to the East" (also known as clockwise). If I'd put -90 into the Angle to Rotate box instead of 90, the items would have wound up on my right side (also known as my East side, since I'm facing North!). Because I put in a positive number, they wound up on my left side (my West side).

And would you look at that, everything's exactly how I had it originally, except now it's in a different spot, facing a different direction!















Here's an image to help you see what the items did. The empty circle is approximately where my items were originally. When I rotated them 90 degrees around me, they wound up to the West. The desk is still facing me. Imagine if you will that the item is on a track that goes in a circle around me. No matter how big or small I make the angle to rotate, the desk will always face me.















And there you have it, the simplest method of rotating items. You can combine this with duplicate, so instead of rotating the original items, you're rotating the copy, leaving the original in place, for some really neat effects.

Happy decorating!

Saturday, April 7, 2012

How To: Use the Duplicate Feature


(Updated June 23, 2012 for use with layout editor version 1.7.2.14)

This tutorial is for use with version 1.7.2.14 of the layout editor. If you don't have this version, I highly suggest you download it now. Because this tutorial was written before 1.7.2.14, some of the details on the screenshots may be different than the windows you see. However, the important parts of the windows are the same (the parts boxed in red), so I have not updated the screenshots. If that ever changes, I will update the screenshots to match the most current editor.


Another lovely feature of the layout editor is the duplicate feature. With this feature, I can exactly duplicate an item setup, then shift it to a new location, rather than having to rebuild it.

If you haven't read my How To: Use The Diff Button, I would pause and read that now (unless you already know how to use the Diff button. Note that this is the Diff button, not New From Diff. They do similar things, but in a dissimilar way, and we need the features of the Diff button to do this. Even if you do know how to use the Diff button, I would read over the introductory section, where I go over what settings you should have checked).

Imagine, if you will, that I am building a cathedral. I've built a single stained glass window, and I think it's perfect. However, I'm going to need at least 11 more stained glass windows in the exact same configuration, lined up along the wall. Building each one by hand will take a long time. Luckily, Jesdyr has given us the ability to duplicate sections of a layout! So since I don't feel like building 11 more stained glass windows by hand, I'll let the duplicate feature do it for me.

The important thing to remember is that I need to have the correct number of items in the moving crate. If I don't, the game will steal from other items of the same type elsewhere in the house when I load the layout in game. You'll see what I mean later.

Moving on!

So I'm building a cathedral. I have the perfect stained glass window. I want to duplicate it to create more of them. The first thing I'm going to do is to click my WITH macro.













Once I've done that, I can begin packing all of the items I wish to duplicate into the moving crate. Because I want to put my next window directly beside the first, and I'd like them to share the southernmost wall, I'm not going to pack the northernmost wall into the moving crate. I'm going to right click each item I wish to duplicate, and select Pack in Moving Crate.













Once I've packed away everything I want to duplicate, I click my WITHOUT macro. It makes sense, right? The house is now without the items you wish to duplicate, whereas before it was with the items.













Now go to the layout editor. Go to File, and Open the with layout.











 You should now be on the Main tab. Click the Diff button.











If you've followed the Diff button tutorial or used the Diff button before, the Diff button window should be filled out already. If it's not, navigate to your without layout file, and click Run.










The layout editor should automatically flip you to the Groups tab. You want to select everything you wish to duplicate. It could be a single item, it could be several, or it could be the entire group. In this case, we want to select the entire group. Select everything on the Groups tab the same way you selected everything on the Diff tab. Click the white box to the left of ItemID.











Right click and select Duplicate.











Once you've done that, the layout editor should duplicate everything you had selected. You'll notice that in the Notes column, half the items have "Added by Create" in their note.











If you look more closely, the very last item has a UID that doesn't look like the others. All other UIDs are large positive numbers. The final Narrow Divider of Adamantine has a four digit negative UID. Negative UIDs are UIDs that are created by the layout editor. If the layout editor creates a UID, it means that there were not enough items in the moving crate. If I had any other Narrow Dividers of Adamantine in the guild hall, when I loaded this layout as it is now, the line with the negative UID would cause the game to steal one of the other Narrow Divider of Adamantine from elsewhere in the hall.











Because I don't want that to happen, I'm going to remove that line from the layout. Part of my window will be missing, but that's fine. This is just a demonstration anyway! (I've already had confused questions asked in guild chat as to why there's part of the cathedral in the guild hall...) First, I select the line with the fake (negative) UID by clicking the blank rectangle to the left of the ItemID column. Then I right click and select Remove From Group.











Now the layout is fine, with all of the UIDs positive. So I'll hit Save Group.











If you've followed the Diff button tutorial, you shouldn't need to fill anything out, just click Save. If you haven't followed the tutorial, you'll need to click Select File and navigate to the working layout file. If you don't have a layout file called working, then you need to go back in game, type /save_layout working, and hit enter. Then navigate to your working layout file in the layout editor's Save Group.









When we go back in game and click the LOAD WORKING macro, we find that not much happened. At least, that's how it appears at first glance. If we look carefully at the window that has reappeared, a little over half of it is much lighter in color than the rest. That's because there are two windows stacked on top of each other. That isn't very useful to us.












We need to go back into the layout editor. We'll shift the duplicated items until they're beside the original items, forming the next portion of the wall. First, we'll need to select only the duplicated items. Then we'll change the number in the Move Amount box from 1 to 8. Next we'll click the South button once, to move all duplicated items 8 units to the South. Lastly, we'll click Save Group. Because we've saved the group once already, a window does not pop up. In fact, the only way we know it's worked is that the Save Group button winds up having a light blue border, and if we go back in game and load the working layout again, it will have changed.











Now that that's done, we can go back in game and click the LOAD WORKING macro again. Oops! It looks like 8 units was about 4 units too many. (If I'd done math, I could have figured out exactly how many units I needed to move the items. However, for the purpose of this tutorial, having it incorrect just means more examples of how to do things in the editor!)












Back to the layout editor to move the duplicated items 4 units to the North. First, we select all of the duplicated items. Then we change the number in the Move Amount box from 8 to 4. Next, we click the North button once. And finally, we click the Save Group button.











Back in game once more, we click the LOAD WORKING macro again. Yay, everything's where it should be (except for the missing divider that we removed earlier, and whose spot is circled in red.)












Now you know how to use the duplicate function, without it stealing items from random spots in your home! Congratulations!

How To: Use The Diff Button


(Updated June 23, 2012 for use with layout editor version 1.7.2.14)

This tutorial is for use with version 1.7.2.14 of the layout editor. If you don't have this version, I highly suggest you download it now. Because this tutorial was written before 1.7.2.14, some of the details on the screenshots may be different than the windows you see. However, the important parts of the windows are the same (the parts boxed in red), so I have not updated the screenshots. If that ever changes, I will update the screenshots to match the most current editor.


I've had several requests recently for instructions on how to use the Diff button. If you've used New From Diff, it's not too different, but it is different enough to need instructions.

First off, why should you use the Diff button? The Diff button allows you to isolate a single (or several, or many!) items from a layout, without completely removing them from the layout. Confused? Let me explain in more detail.

When you use New From Diff, you basically select the items you want, and delete the rest of the layout. The layout editor can only see the items you're working with from that point on. When you use the Diff button, the other items are still in the layout editor, you're just not working with them.

Think of it this way. You have a book. You only want to read pages 20-35. You rip out pages 20-35. Both the New From Diff and Diff buttons do this. However, with New From Diff, you burn the rest of the book. Bye bye book! Now you only have pages 20-35. With the Diff button, you rip out the pages you want, but you leave the rest of the book sitting nearby. So if you decide that you really need to add page 19 to your pile, you can rip out page 19 and add it to pages 20-35. Much more useful than burning the book, right?

With the horrifying thought of mutilating and burning books in mind, let's move on to how you use the Diff button.

First off, I'm going to assume you know how to locate layout files on your computer. We're going to skip right past finding layout files and straight on to using them.

I like to use three macros to decorate with-- "with," "without," and "working." You can call them whatever you want, but I'll be using those names.

In-game, type /save_layout working, then hit enter. This is a "prep step" that you'll never have to do again.



A few more steps you'll never have to do again:

Create a macro called WITH. Open your macro window (Hit the "o" key by default). Click an empty macro spot. The macro creation window will pop open. Name the macro WITH. Click the Add Step button. In the Command box that appears, type /save_layout with















Create a macro called WITHOUT. Click an empty macro spot. The macro creation window will pop open. Name the macro WITHOUT. Click the Add Step button. In the Command box that appears, type /save_layout without 
















Create a macro called LOAD WORKING. Click an empty macro spot. The macro creation window will pop open. Name the macro LOAD WORKING. Click the Add Step button. In the Command box that appears, type /load_layout working


    The following two prep steps won't be used in this "How To." However, they will be useful in future "How To" entries, or future use of the layout editor.

    Switch to the layout editor. Make sure that the UID column on the layout editor is visible. If it isn't, grab the righthand edge of the layout editor window and drag it to the right until the column is visible.











    Click File -> Settings. Ensure that Auto Replace UIDs is checked. It may also be a good idea to ensure that Save Program Size is checked.


















    Now, on to the real instructions!

    First, you want to find the item in your house you wish to isolate. In this case, we're going to use one of the verdant eucalyptus chairs. While that item is out in the house, click the WITH macro.

    Right click your chosen item(s) and select Pack in Moving Crate. At this point, you can pack a single item, a few items, or many items. Whatever items you pack will show up in the layout file.











    Once the item (or items) is in the moving crate, click your WITHOUT macro.












    In the layout editor, click File -> Open. Select the with layout file, and click the Open button.











    You should now be on the Main tab. Beside Main, it should list the number of items in your layout. Beneath that is a button called Diff. Click it.











    A window should pop open. Click Select File.









    Select the without file, and click Open.













    Once you hit Open, the window should look like this. Keep in mind that if your EQ2 is saved in a different location than mine, the text in your window will be different. The most common locations for EQ2 to be saved are C:\ProgramData\Sony Online Entertainment\Installed Games\Everquest II and C:\Users\Public\Sony Online Entertainment\Installed Games\Everquest II. That does not mean your EQ2 will be in one of those locations, just that those are the two most common locations.









    No matter what, the end text should look like this. Note that the final word is without. Select Run.










    You should now be on the Groups tab. Beside the word Groups there should be a number indicating how many items are in your group.











    Now that you have your item in a group, look at the lower right of the layout editor. There is a button that says Save Group. Click it.











    A window will pop up. Click Select File.








    Select your working file, then click Save.













    You will be warned that a file of that name already exists, and asked if you want to replace it. Click Yes.









    Now the window should look like this:







    Or like this if you scroll to the end. Note that the last word is working. Click Save.








    Back in game, click your LOAD WORKING macro. Taadaa! Your item has reappeared in game! You officially now know how to use the Diff button to isolate an item (or items) in the layout file!


    Want to see it all in action? Check out the video below to see how this works in-game!