|
|
|
|
# 1
|
|
Lost in the Web...
Join Date: Jun 2003
Location: %HW2_ROOT%
|
Map Functions (currently v1.3)
==== Map Functions v1.3
==== Created: 10/07/04 by Mikail ==== Last updated: 09/09/05 ==== Homepage: http://www.geocities.com/Area51/Qua...4/homeworld.htm ==== Discussion: http://forums.relicnews.com/showthread.php?t=40779 ========================================================================== DESCRIPTION A collection of my custom map functions. These functions are used by all my maps. DOWNLOAD http://www.geocities.com/Area51/Qua...4/homeworld.htm INSTALLATION Extract this archive into your "Homeworld2\Data\leveldata\multiplayer\deathmatch\" directory. ========================================================================== CHANGE LOG v1.3 * Major change to how distribution tables are done. Distribution table entries are now indexed by class name. The first value is always the number of objects. All other values correspond to the normal function arguments for that class of object (see the included level file for an example distribution table). Note that class names are case-sensitive. Also note that positions are now stacked. I.E., an object's position, a shape's position, and any changes made to the position by a shape function are now all stacked (added to each other). * Most parameter names have been shortened to four letters to save space. * Added the "Paraboloid", "Hyperboloid", "Astroid", and "Funnel" shapes to the "shapeAdd" function. * The names of the "Helix" and "Torus" shapes have been changed to "Helicoid" and "Toroid". * Fixed some errors in the commenting of the code. * The "Ellipsoid" and "Cuboid" shapes in the "shapeAdd" function, as well as all the shapes in the "shapeAdd2D" function, have been rotated so that their normals now point "upward" instead of "forward". * Fixed a bug in the "branchAdd" function. * The density of branches in the "branchAdd" function now remains constant even if the branches are made hollow. * The parameters for most of the remaining functions have been collapsed into tables. * The beginning and ending values of "t" (time) can now be specified for the "spiralAdd" function. * Removed the array argument functions that were added in v1.13, and replaced them with the "literalAdd" function (see below). * Added the "literalAdd" function. Objects listed in distribution tables can now be placed on the map without any changes being made to their position. * The "Camera" object is no longer supported in distribution tables until I can find a better way of managing them. v1.2 * "Torus", "Cone" and "Cylinder" in the "shapeAdd" function can now be scaled along all three axes. * The length of the third axis has been doubled to its correct size for "Helix" in the "shapeAdd" function. * The "easyPatch" and "adjustPatch" functions have been merged, preserving their respective syntaxes. * The rotation matrices have been changed due to my having gotton the order of the Z and Y axes mixed up. This is an internal change, and should only affect the output of the "circumAdd" function. * The rotation matrices have been changed to follow the "roll-pitch-yaw" convention (i.e., rotations are done around the Z-axis ("roll") first, then the X-axis ("pitch"), and finally the Y-axis ("yaw")). This also means that objects can now be rotated around all three axes, instead of just two. * Many function arguments have been put into tables, requiring changes to how you call the functions. * More aspects of the "branchAdd" function are now randomized. * A thickness parameter has been added to the "branchAdd" function. Branches can now be made hollow. * The density of each branch produced by the "branchAdd" function now remains constant (unless it is hollow). * The "random" mode of the "branchAdd" function has been much improved cosmetically. * The name of the "mathRound" function has been changed to "round". * Added a bunch of vector functions. * Renamed the "sphereAdd" function to "globeAdd". * The "globeAdd" function now generates longitudinal lines, as well as latitudinal. * The "spiralAdd" function now has an additional height parameter that allows one to optionally spiral upward or downward. * Added the "splineAdd" function. It will connect any two points with a cubic spline, using two additional points as control points. * Added the "shapeAdd2D" function, which adds an assortment of 2D shapes. * Included an example map with the archive. v1.13 * Added a bunch of array argument functions. * Thickness was fixed for "Ellipsoid" and added for "Cuboid" in the "shapeAdd" function. You can now make hollow or flat balls or boxes. * The lengths of the axes have been doubled to their correct size for "Ellipsoid" and "Cuboid" in the "shapeAdd" function. * You can now enter a value of zero as an argument in a lot of places, where before you couldn't. I've since replaced the random number function with something else [see below...]. * Added the "random2" function. It can accept zero-length intervals as arguments. * You can now use custom backgrounds with the "randomBackground" function. * Fixed a bug in the "circumAdd" function. v1.12 * The "randomMusic" function can now read a custom list of tracks. v1.11 * Expanded the "randomMusic" function to include the Homeworld 1 and Homeworld Cataclysm music. [...these have to be modded-in in some way] * Changed thickness to height and width to thickness in the "ringAdd", "sphereAdd", "spiralAdd" and "shapeAdd" functions. * Changed how thickness is measured in the "ringAdd" and "sphereAdd" functions. [...still not sure I have it right] v1.1 * Added the "circumAdd" function. * Added the "randomBit" function. v1.0 * Initial release. ========================================================================== ISSUES * I would prefer that RUs were specified by density (or by relative amount, ala HW1), as well as by absolute amount. [See the "HW1 to HW2 Map Conversion" page at the wiki for an example.] * The elliptical rings are supposed to be widest where the curvature is the least greatest (as if formed of concentric ellipses sharing the same foci). I'm not sure if this is actually happening. * Some maps sometimes crash during online-multiplayer gameplay if less than 6 players are playing and a map function is used to generate the starting positions. This may have something to do with the "startNum" global variable and the "appendShape" function. [What, I don't know.] * The name of the table that coordinates are stored should be specifiable in the distribution tables when an item's class name equals "Coordinate". However, the "tinsert" function lies outside the ".level" scope. * The "shape2DAdd" function shoud be merged with the "ringAdd" and "spiralAdd" functions (though the latter have a lot of peculiarities). * Functions should optionally output shapes to tables, instead of adding them to the map, so that they can be iterated over other functions. * Should allow the user to input ranges of "t". * Not sure if the way I rotate shapes is compatible with how HW rotates objects. Last edited by Mikail : 9th Sep 05 at 12:45 PM. |
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|