Changes between Version 21 and Version 22 of Rmgen_Library
- Timestamp:
- Apr 20, 2012, 12:53:45 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Rmgen_Library
v21 v22 152 152 == Placing walls == 153 153 154 The functions and data provided in wall_builder.js allow easy placements of multiple entities to shape walls. fist some concepts used:154 The functions and data provided in wall_builder.js allow easy placements of multiple entities to shape walls. Fist some concepts used: 155 155 * The 'wall style' is chosen by a wall style string for example like the civ strings ('cart' or 'celt') or other descriptive strings ('palisades' or 'romeSiege'). 156 156 * To provide easy placement of fortresses there are some predefined 'fortresses' commonly chosen by a string describing their size (like map sizes) for example 'tiny' or 'veryLarge'. … … 161 161 * 'placeLinearWall()': Places a wall from start X/Y to target X/Y with repeated usage of the given 'wall part'. 162 162 * 'placeCircularWall()': Places a wall circle centered at the given coordinates with a given radius and repeated usage of the given 'wall part'. 163 * 'placeWall()': Function to place a simple wall defined by a 'wall' array starting with the first wall element placed as coordinates and angle given.163 * 'placeWall()': Function to place a simple wall defined by a 'wall' array starting with the first wall element placed as given by coordinates and angle. 164 164 Other functions are in there helpful to generate custom walls and fortresses: 165 165 * 'WallElement()': Defines a wall element including its entity and a name string to easily access it. 166 166 * 'Fortress()': Defines a fortress mainly by its 'wall' and a name string to easily access it. 167 * 'wallStyles': An associative array that holds all default wall styles with the civ strings as keys (like 'cart' or 'celt') or other descriptive strings (like 168 'palisades' or 'romeSiege'). A wall style itself again is an associative array holding all the default wall elements with their name string as key (like 'wall' or 'tower'). 167 * 'wallStyles': An associative array that holds all default wall styles with the civ strings as keys (like 'cart' or 'celt') or other descriptive strings (like 'palisades' or 'romeSiege'). A wall style itself again is an associative array holding all the default wall elements with their name string as key (like 'wall' or 'tower'). 169 168 * 'fortressTypes': An associative array that holds all default fortress types by a key that is mainly chosen like the map sizes (like 'tiny' or 'veryLarge'). 170 169 * 'getWallAlignment()': A function to get a walls 'alignment' that mainly includes everything needed to place all the wall's elements. 171 170 * 'getWallCenter()': A function to get the 'center of mass' of a wall by giving its 'alignment' and returning the vector from the first element to the center. 172 To see examples for the common methods look at the demo random map 'Wall Demo' (wall_demo.js). 173 An example for placing a custom fortress can be found in 'Fortress' (fortress.js). 171 Examples: 172 - To see examples for the common methods look at the demo random map 'Wall Demo' (wall_demo.js). 173 - An example for placing a custom fortress can be found in 'Fortress' (fortress.js). 174 174 175 175 == Map Helpers ==