In-Code Basic Stairwell Creator: Difference between revisions
Elevator1512 (talk | contribs) No edit summary |
Elevator1512 (talk | contribs) (→Steps) |
||
Line 1: | Line 1: | ||
'''In-Code Basic Stairwell Creator''' is a script allowing users to create a stairwell in seconds rather than spending time doing it manually. It was made by escalatorgeek881 as part of the [[EG881 Integration Project]]. There are a couple limitations with this, such as the door being positioned in front of the stairs, floors having to be the same or similar height, and recommended for basic stairwells and not advanced ones. | '''In-Code Basic Stairwell Creator''' is a script allowing users to create a stairwell in seconds rather than spending time doing it manually. It was made by escalatorgeek881 as part of the [[EG881 Integration Project]]. There are a couple limitations with this, such as the door being positioned in front of the stairs, floors having to be the same or similar height, and recommended for basic stairwells and not advanced ones. | ||
== Steps == | == Steps == | ||
<! --- All of the below steps were created by EG881 ---> | <!--- All of the below steps were created by EG881 ---> | ||
<nowiki>#Step 1: Lets start by determining our stairwell coordinates. | <nowiki>#</nowiki>Step 1: Lets start by determining our stairwell coordinates. These two values will determine the stairwell's position in your building. To change these values, change the number after the equal sign to your desired value. | ||
#Horizontal (x) Coordinate | <nowiki>#</nowiki>Horizontal (x) Coordinate<br> | ||
Set 50 = 0 | <code>Set 50 = 0</code> | ||
#Vertical (z) Coordinate | <nowiki>#</nowiki>Vertical (z) Coordinate<br> | ||
Set 51 = 0 | <code>Set 51 = 0</code> | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
#Step 2: Now we will determine our stairwell's size. The longest side will be the | <nowiki>#</nowiki>Step 2: Now we will determine our stairwell's size. The longest side will be the length, and the corresponding axis will be in parenthesis. | ||
#Length (x) | <nowiki>#</nowiki>Length (x)<br> | ||
Set 48 = 18 | <code>Set 48 = 18</code> | ||
#Width (z) | <nowiki>#</nowiki>Width (z)<br> | ||
Set 49 = 9 | <code>Set 49 = 9</code> | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
#Step 3: Now we must determine our start floor and end floor (or terminal floors). | <nowiki>#</nowiki>Step 3: Now we must determine our start floor and end floor (or terminal floors). The terminal floors are inclusive. Before you set your terminal floors, make sure you have already created all of the floors that the stairwell will serve in the above code. Otherwise you will have an error. | ||
#Lowest Floor | <nowiki>#</nowiki>Lowest Floor<br> | ||
Set 54 = -21 | </code>Set 54 = -21</code> | ||
#Highest Floor | <nowiki>#</nowiki>Highest Floor<br> | ||
Set 55 = 1 | <code>Set 55 = 1</code> | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
#Step 4: Now we must determine the number of total steps we will have. Please | <nowiki>#</nowiki>Step 4: Now we must determine the number of total steps we will have. Please notethat the resulting stairwell will have two sets of stairs for each floor. This means the number of steps each stair will have is half of this value you set. | ||
#Number of Steps | <nowiki>#</nowiki>Number of Steps<br> | ||
#This hasn't been tested yet, so changing this may cause errors. | <nowiki>#</nowiki>This hasn't been tested yet, so changing this may cause errors.<br> | ||
Set 56 = 20 | <code>Set 56 = 20</code> | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
#Do not change this code. | <nowiki>#</nowiki>Do not change this code. | ||
Set 52 = %48% / 2 | <code>Set 52 = %48% / 2<br> | ||
Set 53 = %49% / 2 | Set 53 = %49% / 2<br> | ||
Set 58 = %56% / 2 | Set 58 = %56% / 2 | ||
#stairs 1 | <nowiki>#</nowiki>stairs 1<br> | ||
CreateStairwell 1, %50%, %51%, %54%, %55% | CreateStairwell 1, %50%, %51%, %54%, %55%<br> | ||
CutStairwell 1, -%52%, -%53%, %52%, %53%, 0, 5 | CutStairwell 1, -%52%, -%53%, %52%, %53%, 0, 5</code> | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
#Step 5: Because these values cannot be set automatically from above, the terminal floors | <nowiki>#</nowiki>Step 5: Because these values cannot be set automatically from above, the terminal floors need to also be typed here. These must be the same as you set above. | ||
#Terminal Floors | <nowiki>#</nowiki>Terminal Floors<br> | ||
<Floors -21 to 1> | <code><Floors -21 to 1></code> | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
#Step 6: Now its time to set our textures. Before changing the texture, make sure it has | <nowiki>#</nowiki>Step 6: Now its time to set our textures. Before changing the texture, make sure it has already been loaded in the texture section. The settings below are defaults. | ||
#Landing/Floor Texture | <nowiki>#</nowiki>Landing/Floor Texture<br> | ||
Set 43 = Brick | <code>Set 43 = Brick</code> | ||
#Wall Texture | <nowiki>#</nowiki>Wall Texture<br> | ||
Set 44 = StairsWall | <code>Set 44 = StairsWall</code> | ||
#Ceiling (very top of stairwell) Texture | <nowiki>#</nowiki>Ceiling (very top of stairwell) Texture<br> | ||
Set 45 = Ceiling1 | <code>Set 45 = Ceiling1</code> | ||
#Stairs Texture | <nowiki>#</nowiki>Stairs Texture<br> | ||
Set 46 = Stairs | <code>Set 46 = Stairs</code> | ||
#Door Texture | <nowiki>#</nowiki>Door Texture<br> | ||
Set 47 = StairsDoor | <code>Set 47 = StairsDoor</code> | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
#Step 7: Now copy everything above and below and paste it into your building file. | <nowiki>#</nowiki>Step 7: Now copy everything above and below and paste it into your building file. I recommend you place this at the end of your building code. | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
#Do not change this code. | <nowiki>#</nowiki>Do not change this code. | ||
Set 57 = (%height% + Floor(%floor% + 1).InterfloorHeight) / %56% | <br>Set 57 = (%height% + Floor(%floor% + 1).InterfloorHeight) / %56% | ||
if[%floor% < %55%] AddStairs 1, StairsLower, %46%, left, 0, -%53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, 0, 0, 0 | if[%floor% < %55%] AddStairs 1, StairsLower, %46%, left, 0, -%53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, 0, 0, 0<br> | ||
if[%floor% < %55%] AddStairs 1, StairsUpper, %46%, right, 0, %53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, %57% * %58%, 0, 0 | if[%floor% < %55%] AddStairs 1, StairsUpper, %46%, right, 0, %53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, %57% * %58%, 0, 0<br> | ||
FloorOrientation = top | FloorOrientation = top | ||
if[%floor% > %54%] AddStairsFloor 1, LandingLower, %43%, 0.5, -%52%, -%53%, -%56% / 4, %53%, 0, 0, 1, 1 | if[%floor% > %54%] AddStairsFloor 1, LandingLower, %43%, 0.5, -%52%, -%53%, -%56% / 4, %53%, 0, 0, 1, 1<br> | ||
if[%floor% = %54%] AddStairsFloor 1, LandingLower, %43%, 0.5, -%52%, -%53%, %52%, %53%, 0, 0, 1, 1 | if[%floor% = %54%] AddStairsFloor 1, LandingLower, %43%, 0.5, -%52%, -%53%, %52%, %53%, 0, 0, 1, 1<br> | ||
if[%floor% < %55%] AddStairsFloor 1, LandingUpper, %43%, 0.5, %56% / 4, -%53%, %52%, %53%, %57% * %58%, %57% * %58%, 1, 1 | if[%floor% < %55%] AddStairsFloor 1, LandingUpper, %43%, 0.5, %56% / 4, -%53%, %52%, %53%, %57% * %58%, %57% * %58%, 1, 1 | ||
#Ceiling | <nowiki>#</nowiki>Ceiling<br> | ||
FloorOrientation = bottom | FloorOrientation = bottom<br> | ||
DrawWalls = true, false, false, false, false, false | DrawWalls = true, false, false, false, false, false<br> | ||
if[%floor% = %55%] AddStairsFloor 1, StairsCeiling, %45%, 0.5, -%52%, -%53%, %52%, %53%, %height% - 0.4, %height% - 0.4, 1, 1 | if[%floor% = %55%] AddStairsFloor 1, StairsCeiling, %45%, 0.5, -%52%, -%53%, %52%, %53%, %height% - 0.4, %height% - 0.4, 1, 1 | ||
DrawWalls = false, true, false, false, false, false | DrawWalls = false, true, false, false, false, false<br> | ||
WallOrientation = right | WallOrientation = right<br> | ||
AddStairsWall 1, LandingLowerCover, %43%, 0.1, -%56% / 4, -%53%, -%56% / 4, 0, 0.5, 0.5, -0.5, -0.5, 0, 1 | AddStairsWall 1, LandingLowerCover, %43%, 0.1, -%56% / 4, -%53%, -%56% / 4, 0, 0.5, 0.5, -0.5, -0.5, 0, 1<br> | ||
DrawWalls = true, false, false, false, false, false | DrawWalls = true, false, false, false, false, false<br> | ||
WallOrientation = left | WallOrientation = left<br> | ||
if[%floor% < %55%] AddStairsWall 1, LandingUpperCover, %43%, 0.1, %56% / 4, 0, %56% / 4, %53%, 0.5, 0.5, (%57% * %58%) - 0.5, (%57% * %58%) - 0.5, 0, 1 | if[%floor% < %55%] AddStairsWall 1, LandingUpperCover, %43%, 0.1, %56% / 4, 0, %56% / 4, %53%, 0.5, 0.5, (%57% * %58%) - 0.5, (%57% * %58%) - 0.5, 0, 1<br> | ||
DrawWalls = true, true, false, false, false, false | DrawWalls = true, true, false, false, false, false | ||
SetAutoSize = true, false | SetAutoSize = true, false<br> | ||
WallOrientation = right | WallOrientation = right<br> | ||
AddStairsWall 1, LeftWall, %44%, 0.3, -%52%, -%53%, -%52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3 | AddStairsWall 1, LeftWall, %44%, 0.3, -%52%, -%53%, -%52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3<br> | ||
AddStairsWall 1, FrontWall, %44%, 0.3, -%52%, -%53%, %52%, -%53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3 | AddStairsWall 1, FrontWall, %44%, 0.3, -%52%, -%53%, %52%, -%53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3<br> | ||
WallOrientation = left | WallOrientation = left<br> | ||
AddStairsWall 1, BackWall, %44%, 0.3, -%52%, %53%, %52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3 | AddStairsWall 1, BackWall, %44%, 0.3, -%52%, %53%, %52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3<br> | ||
AddStairsWall 1, RightWall, %44%, 0.3, %52%, -%53%, %52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3 | AddStairsWall 1, RightWall, %44%, 0.3, %52%, -%53%, %52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3<br> | ||
SetAutoSize = true, true | SetAutoSize = true, true | ||
AddStairsDoor 1, %47%, 0.2, 1, -%52%, 0, 3.5, 8, 0, 1, 1 | AddStairsDoor 1, %47%, 0.2, 1, -%52%, 0, 3.5, 8, 0, 1, 1 </br> | ||
<EndFloors> | <EndFloors></code> | ||
#=========================================================================================== | <nowiki>#</nowiki>=========================================================================================== | ||
<nowiki>#</nowiki>Congratulations. You have finished making your basic stairwell. Open your building and see the results. If the results are not what you desired you can change any of the values you set in the building code and test it until you get your desired results.</nowiki> | |||
== See also == | == See also == | ||
* [[Escalator2011]] | * [[Escalator2011]] | ||
[[Category:Scripts]] | [[Category:Scripts]] |
Revision as of 19:57, 22 April 2024
In-Code Basic Stairwell Creator is a script allowing users to create a stairwell in seconds rather than spending time doing it manually. It was made by escalatorgeek881 as part of the EG881 Integration Project. There are a couple limitations with this, such as the door being positioned in front of the stairs, floors having to be the same or similar height, and recommended for basic stairwells and not advanced ones.
Steps
#Step 1: Lets start by determining our stairwell coordinates. These two values will determine the stairwell's position in your building. To change these values, change the number after the equal sign to your desired value.
#Horizontal (x) Coordinate
Set 50 = 0
#Vertical (z) Coordinate
Set 51 = 0
#===========================================================================================
#Step 2: Now we will determine our stairwell's size. The longest side will be the length, and the corresponding axis will be in parenthesis.
#Length (x)
Set 48 = 18
#Width (z)
Set 49 = 9
#===========================================================================================
#Step 3: Now we must determine our start floor and end floor (or terminal floors). The terminal floors are inclusive. Before you set your terminal floors, make sure you have already created all of the floors that the stairwell will serve in the above code. Otherwise you will have an error. #Lowest Floor
Set 54 = -21
#Highest Floor
Set 55 = 1
#===========================================================================================
#Step 4: Now we must determine the number of total steps we will have. Please notethat the resulting stairwell will have two sets of stairs for each floor. This means the number of steps each stair will have is half of this value you set.
#Number of Steps
#This hasn't been tested yet, so changing this may cause errors.
Set 56 = 20
#===========================================================================================
#Do not change this code.
Set 52 = %48% / 2
Set 53 = %49% / 2
Set 58 = %56% / 2
#stairs 1
CreateStairwell 1, %50%, %51%, %54%, %55%
CutStairwell 1, -%52%, -%53%, %52%, %53%, 0, 5
#===========================================================================================
#Step 5: Because these values cannot be set automatically from above, the terminal floors need to also be typed here. These must be the same as you set above.
#Terminal Floors
<Floors -21 to 1>
#===========================================================================================
#Step 6: Now its time to set our textures. Before changing the texture, make sure it has already been loaded in the texture section. The settings below are defaults.
#Landing/Floor Texture
Set 43 = Brick
#Wall Texture
Set 44 = StairsWall
#Ceiling (very top of stairwell) Texture
Set 45 = Ceiling1
#Stairs Texture
Set 46 = Stairs
#Door Texture
Set 47 = StairsDoor
#===========================================================================================
#Step 7: Now copy everything above and below and paste it into your building file. I recommend you place this at the end of your building code.
#===========================================================================================
#Do not change this code.
Set 57 = (%height% + Floor(%floor% + 1).InterfloorHeight) / %56% if[%floor% < %55%] AddStairs 1, StairsLower, %46%, left, 0, -%53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, 0, 0, 0
if[%floor% < %55%] AddStairs 1, StairsUpper, %46%, right, 0, %53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, %57% * %58%, 0, 0
FloorOrientation = top if[%floor% > %54%] AddStairsFloor 1, LandingLower, %43%, 0.5, -%52%, -%53%, -%56% / 4, %53%, 0, 0, 1, 1
if[%floor% = %54%] AddStairsFloor 1, LandingLower, %43%, 0.5, -%52%, -%53%, %52%, %53%, 0, 0, 1, 1
if[%floor% < %55%] AddStairsFloor 1, LandingUpper, %43%, 0.5, %56% / 4, -%53%, %52%, %53%, %57% * %58%, %57% * %58%, 1, 1 #Ceiling
FloorOrientation = bottom
DrawWalls = true, false, false, false, false, false
if[%floor% = %55%] AddStairsFloor 1, StairsCeiling, %45%, 0.5, -%52%, -%53%, %52%, %53%, %height% - 0.4, %height% - 0.4, 1, 1
DrawWalls = false, true, false, false, false, false
WallOrientation = right
AddStairsWall 1, LandingLowerCover, %43%, 0.1, -%56% / 4, -%53%, -%56% / 4, 0, 0.5, 0.5, -0.5, -0.5, 0, 1
DrawWalls = true, false, false, false, false, false
WallOrientation = left
if[%floor% < %55%] AddStairsWall 1, LandingUpperCover, %43%, 0.1, %56% / 4, 0, %56% / 4, %53%, 0.5, 0.5, (%57% * %58%) - 0.5, (%57% * %58%) - 0.5, 0, 1
DrawWalls = true, true, false, false, false, false SetAutoSize = true, false
WallOrientation = right
AddStairsWall 1, LeftWall, %44%, 0.3, -%52%, -%53%, -%52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3
AddStairsWall 1, FrontWall, %44%, 0.3, -%52%, -%53%, %52%, -%53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3
WallOrientation = left
AddStairsWall 1, BackWall, %44%, 0.3, -%52%, %53%, %52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3
AddStairsWall 1, RightWall, %44%, 0.3, %52%, -%53%, %52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3
SetAutoSize = true, true AddStairsDoor 1, %47%, 0.2, 1, -%52%, 0, 3.5, 8, 0, 1, 1
<EndFloors>
#===========================================================================================
#Congratulations. You have finished making your basic stairwell. Open your building and see the results. If the results are not what you desired you can change any of the values you set in the building code and test it until you get your desired results.</nowiki>