PDA

View Full Version : W40k\Data\attrib\formations



SvK
14th Sep 04, 12:58 AM
Here's something simple: formations.
The LUA files in W40k\Data\attrib\formations represent different formations. Here's a sample


----------------------------------------
-- File: 'block'
-- Created by: AttributeEditor v2.0
-- Note: Do NOT edit by hand!
-- (c) 2001 Relic Entertainment Inc.

GameData = Inherit("formations")

GameData["scale"] = 3.100
GameData["spots"]["spot_01"]["priority"] = 100.000
GameData["spots"]["spot_02"]["pos_x"] = 1.000
GameData["spots"]["spot_02"]["priority"] = 90.000
GameData["spots"]["spot_03"]["pos_x"] = -1.000
GameData["spots"]["spot_03"]["priority"] = 90.000
GameData["spots"]["spot_04"]["pos_y"] = 1.000
GameData["spots"]["spot_04"]["priority"] = 90.000
GameData["spots"]["spot_05"]["pos_y"] = -1.000
GameData["spots"]["spot_05"]["priority"] = 90.000
GameData["spots"]["spot_06"]["pos_x"] = 1.000
GameData["spots"]["spot_06"]["pos_y"] = 1.000
GameData["spots"]["spot_06"]["priority"] = 70.000
GameData["spots"]["spot_07"]["pos_x"] = 1.000
GameData["spots"]["spot_07"]["pos_y"] = -1.000
GameData["spots"]["spot_07"]["priority"] = 70.000
GameData["spots"]["spot_08"]["pos_x"] = -1.000
GameData["spots"]["spot_08"]["pos_y"] = -1.000
GameData["spots"]["spot_08"]["priority"] = 70.000
GameData["spots"]["spot_09"]["pos_x"] = -1.000
GameData["spots"]["spot_09"]["pos_y"] = 1.000
GameData["spots"]["spot_09"]["priority"] = 70.000
GameData["spots"]["spot_10"]["pos_x"] = 2.000
GameData["spots"]["spot_10"]["priority"] = 50.000
GameData["spots"]["spot_11"]["pos_x"] = 2.000
GameData["spots"]["spot_11"]["pos_y"] = 1.000
GameData["spots"]["spot_11"]["priority"] = 50.000
GameData["spots"]["spot_12"]["pos_x"] = 2.000
GameData["spots"]["spot_12"]["pos_y"] = -1.000
GameData["spots"]["spot_12"]["priority"] = 50.000
GameData["spots"]["spot_13"]["pos_x"] = -2.000
GameData["spots"]["spot_13"]["pos_y"] = 1.000
GameData["spots"]["spot_13"]["priority"] = 50.000
GameData["spots"]["spot_14"]["pos_x"] = -2.000
GameData["spots"]["spot_14"]["priority"] = 50.000
GameData["spots"]["spot_15"]["pos_x"] = -2.000
GameData["spots"]["spot_15"]["pos_y"] = -1.000
GameData["spots"]["spot_15"]["priority"] = 50.000
GameData["spots"]["spot_16"]["pos_y"] = -2.000
GameData["spots"]["spot_16"]["priority"] = 50.000
GameData["spots"]["spot_17"]["pos_y"] = 2.000
GameData["spots"]["spot_17"]["priority"] = 50.000


Each spot (spot_01 through spot_17) has a priority, and optional x and y positions. If you leave out a position, it is assumed to be zero. See spot_01 through spot_05 for examples. I'm not sure what the priority value does, but squad leaders use spot_01, and guys with upgraded weapons get spot near the head of the list. Positive Y is towards the upper-right edge of the minimap, and positive X is towards the lower-right edge. Formations do not depend on which way the squad is facing or moving.

You can use this format to create your own formations. Call them whatever you like, as long as you use a .LUA extension and put it in the same directory as all the other formations, and the game will use it with no complaints.

You can assign a squad to use a formation by editing the squad's blueprint in W40k\Data\attrib\sbps\races\racename\racename_squad_squadname.lua (racename and squadname are placeholders.)

Find or create a line like this:
GameData["squad_formation_ext"]["idle_formation"] = "your_favourite_formation"

(your_favourite_formation should be replaced by the name of a file, sans extension, from W40k\Data\attrib\formations

TheBladeRoden
15th Sep 04, 10:25 AM
bookmarked too!