Editing
ObjectPlus
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{legit}} '''ObjectPlus''' is a script made by EG881 as a part of [[EG881 Integration Project]] Build 10. There are several functions available such as drawing, creating different lines, as well as escalators. Most of this was last updated by EG881 on January 16, 2017, and hasn't been updated since then. ''NOTE: This list below was originally made by EG881, so all credit goes to EG881.'' == Control Functions == '''OP_Draw''' – the specialized ObjectPlus equivalent of DrawWalls, this function sets which components or sides of an object are drawn. Generally, OP_Draw will follow the conventions used for DrawWalls. Syntax: <code>OP_Draw(''1, 2, 3, 4, 5, 6'')</code> Each of these parameters can be either ''true'' to enable the side/component or ''false'' to disable the side/component. All of these are initially set to ''true'' at startup, but if any are set to ''false'' it will apply to all subsequent functions in your building script until reset back to true when OP_Draw is called again. Each function in this guide lists which component or side the OP_Draw parameters will affect. Some functions will not use all six parameters. == Standard Shapes == *'''OP_Line''' – creates a floor using two points each with x, y, z, and width values drawn perpendicular to the line created by the two points. This is essentially an angled ''AddFloor''. Also, the function does not use OP_Draw. Syntax: <code>OP_Line(destobject, name, texture, aligntexturemap, x1, y1, z1, w1, x2, y2, z2, w2)</code> ''destobject'' specifies the destination object (floor, external, buildings, landscape, or elevator). name is the name of the object. ''texture'' is the texture of the object. ''aligntexturemap'' currently does nothing. ''x1, y1'', and ''z1'' correspond to the x, y, and z coordinates of the first point. ''w1'' is the width of the floor at the first point. Likewise, ''x2, y2, z2'', and ''w2'' correspond to the x, y, z, and width values at the second point. <!-- Figure 1 --> The width is always drawn to the right 90° from the direction of drawing. In other words, when travelling down the line from P<sub>1</sub> to P<sub>2</sub>, the width will always draw to your right. * from –z to the +z direction, width will draw towards the +x direction * from +z to the –z direction, width will draw towards the –x direction * from –x to the +x direction, width will draw towards the –z direction * from +x to the –x direction, width will draw towards the +z direction <!--You may use these non-trigonometric formulas to obtain the other two points of the floor. These were derived using similar triangle properties. x-coordinate of Qnx =Pnx + (w_n*(z2-z1))/√(〖(x2-x1)〗^2+〖(z2-z1)〗^2 ) z-coordinate of Qnz = Pnz – (w_n*(x2-x1))/√(〖(x2-x1)〗^2+〖(z2-z1)〗^2 ) --> '''OP_MultiLine''' – creates a path of connected floors using multiple points. This is useful in making curving 3D objects such as curved railings, roads, or track. Currently, MultiLine is limited to a '''maximum of 7 points'''. Like OP_Line, the function also does not use OP_Draw. Syntax: <code>OP_MultiLine(drawingmethod, destobject, name, texture, tilex, tilez, numberofpoints, x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3...)</code> ''drawingmethod'' does nothing. ''destobject'' specifies the destination object (floor, external, buildings, landscape, or elevator). name is the name of the object. ''texture'' is the texture of the object. ''tilex'' and ''tilez'' are the texture tiling values. ''numberofpoints'' specifies the number of points in the multiline (maximum is 7). ''xn, yn'', and ''zn'' correspond to the x, y, and z coordinates of point n. ''wn'' is the width or the line at point n. <!-- Figure 2 --> Similar to Line, the width is always drawn to the right 90° from the direction of drawing. In other words, when travelling down the line from P<sub>1</sub> to P<sub>2</sub>, the width will always draw to your right. * from –z to the +z direction, width will draw towards the +x direction * from +z to the –z direction, width will draw towards the –x direction * from –x to the +x direction, width will draw towards the –z direction * from +x to the –x direction, width will draw towards the +z direction MultiLine uses a set of special non-trigonometric formulas to calculate the points Q<sub>n</sub> in the '''Figure 2'''. These were mathematically derived using similar triangle and vector bisector properties. <!-- '''''Endpoints''''' x-coordinate of Qnx = xn + (w_n*(z2-z1))/√(〖(x2-x1)〗^2+〖(z2-z1)〗^2 ) z-coordinate of Qnz = zn – (w_n*(x2-x1))/√(〖(x2-x1)〗^2+〖(z2-z1)〗^2 ) '''''Intermediate Points''''' x-coordinate of Qnx = xn – (d_1*w_n*((x_n-x_(n-1))/(-d_1 )+(x_(n+1)-x_n)/d_2 ))/((x_n-x_(n-1))((z_n-z_(n-1))/(-d_1 )+(z_(n+1)-z_n)/d_2 )-(z_n-z_(n-1))((x_n-x_(n-1))/(-d_1 )+(x_(n+1)-x_n)/d_2 )) z-coordinate of Qnz = zn – (d_1*w_n*((z_n-z_(n-1))/(-d_1 )+(z_(n+1)-z_n)/d_2 ))/((x_n-x_(n-1))((z_n-z_(n-1))/(-d_1 )+(z_(n+1)-z_n)/d_2 )-(z_n-z_(n-1))((x_n-x_(n-1))/(-d_1 )+(x_(n+1)-x_n)/d_2 )) where d1 = √(〖(x_n-x_(n-1))〗^2+〖(z_n-z_(n-1))〗^2 ) and d2 = √(〖(x_(n+1)-x_n)〗^2+〖(z_(n+1)-z_n)〗^2 ) --> '''OP_Polygon''' – creates a regular polygon (equal side lengths) with an arbitrary number of sides. Current restrictions include a '''maximum of 10 sides'''. The polygons are drawn to be inscribed in a circle (see '''Figure 3'''). The function also doesn't use OP_Draw. Syntax: <code>OP_Polygon(drawingmethod, destobject, name, texture, numberofsides, centerx, centerz, radius, altitude)</code> ''drawingmethod'' was created to allow the polygon to be drawn as if it were circumscribed about a circle, however this function was discontinued for OP_AdvPolygon and was only programmed to do inscribed polygons. ''destobject'' specifies the destination object (floor, external, buildings, landscape, or elevator). ''name'' is the name of the polygon object. ''texture'' is the texture of the object. ''numberofsides'' specifies the number of sides the polygon will have (current maximum is 10). ''centerx'' and ''centerz'' are the respective x, and z coordinates of the center of the polygon. radius specifies the distance from the center to the vertices when inscribed or the distance from the center to the midpoint of each side when circumscribed. Currently, the polygon will always draw starting at the +x direction from the center (x = ''centerx'' + ''radius'', z = ''centerz''). A ''rotation'' parameter will be added later to allow rotating the polygon at an arbitrary angle counterclockwise from the +x axis. <!-- Figure 3 --> == Escalators == '''OP_Balustrades''' – sets the texturing and dimensions for the escalator’s left and right balustrades. This is applied to all escalators created until this function is called again with one or more settings changed. Syntax: <code>OP_EscBalustrades(texture, thickness, height, tw, th)</code> ''OP_Draw'' The Draw parameters are set for the escalator as a whole. See OP_Escalator. * ''texture'' is the texture of the balustrades on both the inner and outer sides. * ''thickness'' is the thickness of the balustrade. The midpoint between the inner and outer walls of the balustrades will run along the centerline of the truss * ''height'' specifies the height of the balustrade, including the extra height from the truss at each side of the steps * ''tw'' and ''th'' are the texture tiling parameters applied to the balustrades. '''OP_EscLanding''' – sets the texturing and depths for the lower and upper landings of the escalator. This is applied to all escalators created until this function is called again with one or more setting changed. Syntax: <code>OP_EscLanding(lowerlandingtexture, lowerlandingdepth, twl, thl, upperlandingtexture, upperlandingdepth, twu, thu)</code> ''OP_Draw'' The Draw parameters are set for the escalator as a whole. See OP_Escalator. * ''lowerlandingtexture'' is the texture of the lower landing, typically steel plates grooved perpendicular to escalator travel. * ''lowerlandingdepth'' is the distance from where the steps come out (up) or go in (down) to the opposite edge of the landing. The width of the lower landing is the full width of the escalator from outer edge to outer edge, or step width + 2 * truss width * ''twl'' and ''thl'' are the texture tiling parameters applied to the lower landing. * ''upperlandingtexture'' is the texture of the upper landing, typically the same as the lower landing. * ''upperlandingdepth'' is the distance from where the steps come out (down) or go in (up) to the opposite edge of the landing. The width of the upper landing is the full width of the escalator from outer edge to outer edge, or step width + 2 * truss width * ''twu'' and ''thu'' are the texture tiling parameters applied to the upper landing. '''OP_EscHandrails''' – sets the texturing and dimensions for the handrails running along the top of the balustrades. This is applied to all escalators created until this function is called again with one or more setting changed. Syntax: <code>OP_EscHandrails(texture, width, height, tw, th)</code> ''OP_Draw'' The Draw parameters are set for the escalator as a whole. See OP_Escalator. * ''texture'' is the texture of the handrail. * ''width'' is the width of the handrail. The centerline of the handrail will be aligned with the centerline of the truss and balustrades. * ''height'' is the height of the handrail. This is generally a very small number. The total height of the handrail from the steps is the handrail height + the balustrade height * ''tw'' and ''th'' are the texture tiling parameters applied to the handrails. * The tracks that the handrails run on are set to be ½ inch (0.0417 ft.) thick and one inch (0.083 ft.) wider than the handrails. The track texture is the same as the step siding texture. '''OP_EscTruss''' – sets the texturing and dimensions for the truss (step siding) and the texture of the underside covering the escalator’s structure and returning steps. This is applied to all escalators created until this function is called again with one or more setting changed. Syntax: <code>OP_EscTruss(trusstexture, outsidecoveringtexture, width, twt, tht, twoc, thoc)</code> ''OP_Draw'' The Draw parameters are set for the escalator as a whole. See OP_Escalator. * ''trusstexture'' is the texture of the step siding, generally a metallic texture. * ''outsidecoveringtexture'' is the texture of the escalator’s underside covering, generally metallic or a wall texture. * ''width'' is the width of the escalator step siding. A good range is 0.5 ft. - 1 ft. * ''twt'' and tht are the texture tiling parameters applied to the step siding. * ''twoc'' and ''thoc'' are the texture tiling parameters applied to the outside covering. '''OP_Escalator''' – creates a working escalator with its entire part assembly, including the truss, underside, handrails, landings, and ''balustrades''. Due to the limitations of the escalator script in Skyscraper Simulator, escalators are limited to the four cardinal directions orthogonal to the x- or z-axes and can only be added as a floor object. Syntax: <code>OP_Escalator(name, up/down, topfloor, speed, sound_file, risertexture, treadtexture, direction, CenterX, CenterZ, width, risersize, treadsize, num_steps, voffset, voffsettop, tw, th)</code> ''OP_Draw'' # balustrades, handrails, stairs, and truss # underside of escalator # left/front of escalator # right/back of escalator # bottom end of escalator # top end of escalator * ''name'' is the name of the escalator. * ''up/down'' determines the step movement direction (''up'' or ''1'' for up, ''0'' for stopped, or -''1'' or ''down'' for down). * ''topfloor'' specifies the floor where the upper landing sits. * ''speed'' is the speed of the escalator. * ''sound_file'' is the sound of the escalator while running. * ''risertexture'' is the texture of the risers and ''treadtexture'' is the texture of the treads. These two parameters are applied using a texture override on the escalator object. This prevents textures from being rotated incorrectly, however this won’t work for right and back facing escalators as texture override doesn’t work correctly for escalator and stair objects. This problem is masked in back facing escalators as the textures will already be rotated correctly, but is problematic in right facing escalators. When adding such escalators, it is recommended that a step texture without a painted stripe is used until the texture override problem is fixed. * ''direction'' is the direction in which the bottom landing sits and thus the direction the escalator faces (back (+z, north), front (-z, south), left (-x, west), right (+x, east)). * ''centerx'' and ''centerz'' are used to position the escalator. If the escalator faces back or front, ''centerx'' is the x-coordinate of the escalator’s centerline and ''centerz'' marks the "ledge" location at the upper landing where the escalator stops rising. Likewise, when the escalator faces left or right, ''centerz'' is the z-coordinate of the escalator’s centerline and ''centerx'' marks the "ledge" location. * ''width'' specifies the step width (in feet) of the escalator. The standard step widths are 24 inches (2 feet), 32 inches (2.67 feet), and 40 inches (3.33 feet). Use x/12 for x inches. * ''risersize'' determines the height of the step risers and ''treadsize'' specifies the length of the treads (both are in feet). Escalators in the real world have a 30 degree or 35 degree inclination above horizontal. Try to aim for a tread and riser size that approximately creates these inclination angles. * ''num_steps'' determines the number of rising steps from the bottom landing to the top landing. This number does not include the steps that are moving horizontally at the landings. When selecting a riser size, make sure that the riser size multiplied by the number of steps add up to the total height of the escalator, otherwise the balustrades and truss will not line up with the stairs. * ''voffset'' is the vertical offset in feet of the lower landing from the base of the bottom floor. * ''voffsettop'' is the vertical offset in feet of the upper landing from the base of the top floor specified in ''topfloor''. * ''tw'' and ''th'' are the texture tiling parameters applied to the steps == Todo List == * Prism function * Arc function * Add ''Tree'' function from [[SROC]] as a possible expansion * Add ''Sphere'' function, with starting and ending angles from the ''+x'' and ''+y'' axis, detail level == See also == * [[GooperWalk2012]] [[Category:Scripts]]
Summary:
Please note that all contributions to Skyscraper Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
Skyscraper Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Legit
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information