Introduction I may have left some things out, I didn't write the code and only know what works through trail and error. Also, the syntax used can be a little complicated at times but the examples given are ways that I find work best for me. There are other ways to write the code as anyone who has looked at MML will tell you. Before any other code is to be written, you must tell Marathon that you are making multi floor polys and the like. Therefore all B&B code must be bound as such: <inserts world_units="true">...</inserts> The function is Boolean, yet not writing the line is just as good as writing false. I have separated the B&B functions into three parts: Constructing solid floors and ceilings Attaching textures to vertexes Combining the two to make full 3D cubes and prisms This is because the code seems to overlap and some commands look very similar to others but must be put into the correct structure to work as intended. Inserting Floors/Ceilings Initial element: These lines of code insert horizontal planes on a poly by poly basis. All edges of bridges coincide with preexisting vertexes in Forge meaning that you must draw a top down 'flattened' view before you build the bridges. To insert an extra floor/ceiling use the element: <polygon_insert.../> This will insert a floor/ceiling only (good for wafer thin floors, see-through wire grills, liquids, etc). If this section is thick and viewed from the side you will be able to see through it. This is because you have not specified any sides to the object. Use the <side_insert.../> commands explained later to fix this. Mandatory child elements: poly="x" Where x is the polygon's ID you wish to add extra floors to. The ID can be found in Forge or with the coordinates shown in-game. Adding multiple poly IDs separated with a comma "," will cause all those polys to share the attributes that follow. top_height="x" Where x equals the height of the top surface of the poly (the 'floor'. Measured in WUs. bottom_height="x" Where x equals the height of the bottom surface of the poly (the 'ceiling'). Measured in WUs. Unlike the attribute poly="x", these cannot have more than one value. If multiple floors are to be made, another <polygon_insert.../> command must be used. Optional child elements: top_texture="a:b" Where a is the texture collection to use, and b is the texture's ID found in Anvil. If no texture is designated, the texture ID of the floor below is used. bottom_texture="a:b" Where a is the texture collection to use, and b is the texture's ID found in Anvil. If no texture is designated, the texture ID of the ceiling above is used. Be sure that the texture collection used for a matches that of the rest of the map, or else that surface will not be visible. This however can probably be overcome by loading in those textures with Chisel or MML. top_light="x" Where x is the ID of the light to be applied to the top surface. If no value is designated, the default will be 0. These IDs are what you make them in Forge, of course. bottom_light="x" Where x is the ID of the light to be applied to the bottom surface. If no value is designated, the default will be 0. These IDs are what you make them in Forge, of course. top_transfer="x" Where x is the transfer mode of the texture on the top surface. If no value is designated, the normal transfer mode is used. bottom_transfer="x" Where x is the transfer mode of the texture on the bottom surface. If no value is designated, the normal transfer mode is used. It seems as though only 6 transfer modes are operational, maybe the others are yet to be implemented (?) Here are the IDs: 15 Horizontal slide (west) 16 Fast horizontal slide 17 Vertical slide (north) 18 Fast vertical slide 19 Wander 20 Fast wander Inserting Sides Initial element: These lines of code will attach a texture to a vertex, similar to shift-clicking one in Forge. It has benefits over this method because where the texture starts being drawn and ends is a variable. Be aware though, that attaching a texture to a line using this technique will not make that line solid. I cannot find any way to make this so. Also, each command textures one side of a vertex, not both as in Forge. The initial element is: <side_insert.../> This technique is useful for bounding gelatinous liquids and short waterfalls. Mandatory child elements: polys="x" Where x is the ID of the poly to which the line belongs. Only one poly ID may be entered here. lines="x" Where x is the ID of the line acting as the side of an object made with <polygon_insert...> or if standing alone, is the ID of the vertex you wish to attach textures to. Adding multiple line IDs separated with a comma "," will cause all those lines to share the attributes that follow. Also bear in mind that when used as a stand alone command, only one side of the line will be textured, the side shared by the polygon specified in poly="x". texture="a:b" Where a is the texture collection to use, and b is the texture's ID found in Anvil. Be sure that the texture collection used for a matches that of the rest of the map, or else that surface will not be visible. This however can probably be overcome by loading in those textures with Chisel or MML. Optional child elements: top="x" Where x is the height of where to start drawing the wall. Measured in WUs. bottom="x" Where x is the height of where to stop drawing the wall. Measured in WUs. You will only need to write these if you are using the stand alone technique. Using them in conjunction with <polygon_insert...> will disturb the auto height calculating process. That is not to say you cannot do it however. light="x" Where x is the ID of the light to be applied to the surface. If no value is designated, the default will be 0. These IDs are what you make them in Forge, of course. transfer="x" Where x is the transfer mode of the texture on the surface. If no value is designated, the normal transfer mode is used. offset="x,y" Where x is where the texture will begin being drawn from the left-hand edge, and y is where the texture will begin being drawn from the top edge. Measured in WUs. cut="x" Where x is Boolean. Absolutely no idea. Any suggestions? Inserting Sides with Floors You can use the two commands <polygon_insert> with <side_insert> to create fully 3D cubes and prisms. If you are planning on creating an object with floors and sides then the code should be written as such: <polygon_insert poly...> <side_insert lines...> <side_insert lines...> </polygon_insert> Note that you do not have to use the attribute "poly" for the <side_insert> command. Also as stated above, you do not have to use the attributes of "top" and "bottom". When <side_insert> is used these commands are precalculated. |