In-Code Basic Stairwell Creator: Difference between revisions

From Skyscraper Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{legit}}
'''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 ==
Line 4: Line 5:
<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.
<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.


    <nowiki>#</nowiki>Horizontal (x) Coordinate<br>
<nowiki>#</nowiki>Horizontal (x) Coordinate<br>
    <code>Set 50 = 0</code>
<code>Set 50 = 0</code>


    <nowiki>#</nowiki>Vertical (z) Coordinate<br>
<nowiki>#</nowiki>Vertical (z) Coordinate<br>
    <code>Set 51 = 0</code>
<code>Set 51 = 0</code>


<nowiki>#</nowiki>===========================================================================================
<nowiki>#</nowiki>===========================================================================================


    <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.
<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.


    <nowiki>#</nowiki>Length (x)<br>
<nowiki>#</nowiki>Length (x)<br>
    <code>Set 48 = 18</code>
<code>Set 48 = 18</code>


    <nowiki>#</nowiki>Width (z)<br>
<nowiki>#</nowiki>Width (z)<br>
    <code>Set 49 = 9</code>
<code>Set 49 = 9</code>


<nowiki>#</nowiki>===========================================================================================
<nowiki>#</nowiki>===========================================================================================


    <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.
<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.
   
    <nowiki>#</nowiki>Lowest Floor<br>
    </code>Set 54 = -21</code>


    <nowiki>#</nowiki>Highest Floor<br>
<nowiki>#</nowiki>Lowest Floor<br>
    <code>Set 55 = 1</code>
<code>Set 54 = -21</code>
 
<nowiki>#</nowiki>Highest Floor<br>
<code>Set 55 = 1</code>


<nowiki>#</nowiki>===========================================================================================
<nowiki>#</nowiki>===========================================================================================


    <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.
<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.


    <nowiki>#</nowiki>Number of Steps<br>
<nowiki>#</nowiki>Number of Steps<br>
    <nowiki>#</nowiki>This hasn't been tested yet, so changing this may cause errors.<br>
<nowiki>#</nowiki>This hasn't been tested yet, so changing this may cause errors.<br>
    <code>Set 56 = 20</code>
<code>Set 56 = 20</code>




<nowiki>#</nowiki>===========================================================================================
<nowiki>#</nowiki>===========================================================================================


    <nowiki>#</nowiki>Do not change this code.
<nowiki>#</nowiki>Do not change this code.
   
 
    <code>Set 52 = %48% / 2<br>
<code>Set 52 = %48% / 2<br>
    Set 53 = %49% / 2<br>
Set 53 = %49% / 2<br>
    Set 58 = %56% / 2
Set 58 = %56% / 2


<nowiki>#</nowiki>stairs 1<br>
<nowiki>#</nowiki>stairs 1<br>
Line 53: Line 54:
<nowiki>#</nowiki>===========================================================================================
<nowiki>#</nowiki>===========================================================================================


    <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.
<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.


    <nowiki>#</nowiki>Terminal Floors<br>
<nowiki>#</nowiki>Terminal Floors<br>
    <code><Floors -21 to 1></code>
<code><Floors -21 to 1></code>


<nowiki>#</nowiki>===========================================================================================
<nowiki>#</nowiki>===========================================================================================


    <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.
<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.


    <nowiki>#</nowiki>Landing/Floor Texture<br>
<nowiki>#</nowiki>Landing/Floor Texture<br>
    <code>Set 43 = Brick</code>
<code>Set 43 = Brick</code>


    <nowiki>#</nowiki>Wall Texture<br>
<nowiki>#</nowiki>Wall Texture<br>
    <code>Set 44 = StairsWall</code>
<code>Set 44 = StairsWall</code>


    <nowiki>#</nowiki>Ceiling (very top of stairwell) Texture<br>
<nowiki>#</nowiki>Ceiling (very top of stairwell) Texture<br>
    <code>Set 45 = Ceiling1</code>
<code>Set 45 = Ceiling1</code>


    <nowiki>#</nowiki>Stairs Texture<br>
<nowiki>#</nowiki>Stairs Texture<br>
    <code>Set 46 = Stairs</code>
<code>Set 46 = Stairs</code>


    <nowiki>#</nowiki>Door Texture<br>
<nowiki>#</nowiki>Door Texture<br>
    <code>Set 47 = StairsDoor</code>
<code>Set 47 = StairsDoor</code>




<nowiki>#</nowiki>===========================================================================================
<nowiki>#</nowiki>===========================================================================================


    <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>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>===========================================================================================
<nowiki>#</nowiki>===========================================================================================


    <nowiki>#</nowiki>Do not change this code.
<nowiki>#</nowiki>Do not change this code.
 
<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<br>
if[%floor% < %55%] AddStairs 1, StairsUpper, %46%, right, 0, %53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, %57% * %58%, 0, 0<br>
FloorOrientation = top
 
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<br>
if[%floor% < %55%] AddStairsFloor 1, LandingUpper, %43%, 0.5, %56% / 4, -%53%, %52%, %53%, %57% * %58%, %57% * %58%, 1, 1
 
<nowiki>#</nowiki>Ceiling<br>
FloorOrientation = bottom<br>
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
 
DrawWalls = false, true, false, false, false, false<br>
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<br>
DrawWalls = true, false, false, false, false, false<br>
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<br>
DrawWalls = true, true, false, false, false, false


    <br>Set 57 = (%height% + Floor(%floor% + 1).InterfloorHeight) / %56%
SetAutoSize = true, false<br>
   
WallOrientation = right<br>
    if[%floor% < %55%] AddStairs 1, StairsLower, %46%, left, 0, -%53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, 0, 0, 0<br>
AddStairsWall 1, LeftWall, %44%, 0.3, -%52%, -%53%, -%52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3<br>
    if[%floor% < %55%] AddStairs 1, StairsUpper, %46%, right, 0, %53% / 2, %53%, %57%, %58% / (%58% - 1), %58%, %57% * %58%, 0, 0<br>
AddStairsWall 1, FrontWall, %44%, 0.3, -%52%, -%53%, %52%, -%53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3<br>
    FloorOrientation = top
WallOrientation = left<br>
   
AddStairsWall 1, BackWall, %44%, 0.3, -%52%, %53%, %52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3<br>
    if[%floor% > %54%] AddStairsFloor 1, LandingLower, %43%, 0.5, -%52%, -%53%, -%56% / 4, %53%, 0, 0, 1, 1<br>
AddStairsWall 1, RightWall, %44%, 0.3, %52%, -%53%, %52%, %53%, %fullheight%, %fullheight%, -%interfloorheight%, -%interfloorheight%, 0, 3<br>
    if[%floor% = %54%] AddStairsFloor 1, LandingLower, %43%, 0.5, -%52%, -%53%, %52%, %53%, 0, 0, 1, 1<br>
SetAutoSize = true, true
    if[%floor% < %55%] AddStairsFloor 1, LandingUpper, %43%, 0.5, %56% / 4, -%53%, %52%, %53%, %57% * %58%, %57% * %58%, 1, 1
   
    <nowiki>#</nowiki>Ceiling<br>
    FloorOrientation = bottom<br>
    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


    DrawWalls = false, true, false, false, false, false<br>
AddStairsDoor 1, %47%, 0.2, 1, -%52%, 0, 3.5, 8, 0, 1, 1 </br>
    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<br>
    DrawWalls = true, false, false, false, false, false<br>
    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<br>
    DrawWalls = true, true, false, false, false, false
   
    SetAutoSize = true, false<br>
    WallOrientation = right<br>
    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<br>
    WallOrientation = left<br>
    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<br>
    SetAutoSize = true, true
   
    AddStairsDoor 1, %47%, 0.2, 1, -%52%, 0, 3.5, 8, 0, 1, 1 </br>
<EndFloors></code>
<EndFloors></code>


<nowiki>#</nowiki>===========================================================================================
<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>
<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.


== See also ==
== See also ==
* [[Escalator2011]]
* [[Escalator2011]]
* [[Skyscraper Random Object Creator]]
[[Category:Scripts]]
[[Category:Scripts]]

Latest revision as of 10:42, 11 May 2024

This article is legitimate.
It contains good-faith information, such as an existing building or content.

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[edit | edit source]

#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.

See also[edit | edit source]