BWE:Break-down of each Command
From PBnWModdingWIKI
Thanks to EyeOnBenT for the C Syntax of each command and for all the additional infomation. Also a big thank you to Kalev (Lionhead Studios Dev) that helped fill in the blanks Kalev's Post
Quick syntax note: The file does not seem to heed any statement sepparator(;), in the stock files the statements are sepparated by line breaks
Breakdown of Each Command
Includes an example of how the command is used.
(Below is a trimmed version of the Land1.bwe file):
VERSION(3.100000) SET_LAND_NUMBER(1) LOAD_LANDSCAPE("data\landscape\bw2\Land1.ter") SET_DEFAULT_SOUND_SURFACE(14) START_CAMERA_POS(1041.910645, 128.266327, 883.260254, 1042.020264, 128.023911, 884.224182) SET_DAY_LENGTH(10.000000, 10.000000) CREATE_TOWN(0, "884.05,1492.74", "NEUTRAL", "GREEK") SET_TOWN_NAME(0, "BW2T_PLACENAMES_AZTECCITY_1") SET_TOWN_TECH_LEVEL(0, 0) CREATE_BUILDING(0, "884.05,1492.74", "GREEK_ABODE_A", 2844, 1000, 0, 0, 0, 0.010000, 0) CREATE_BUILDING(0, "895.08,1489.82", "GREEK_ABODE_A", 2844, 1000, 0, 0, 0, 1.000000, 0) CREATE_TOWN(1, "1056.12,2026.44", "NEUTRAL", "GREEK") SET_TOWN_NAME(1, "BW2T_PLACENAMES_AZTECCITY_2") SET_TOWN_TECH_LEVEL(1, 0) CREATE_BUILDING(1, "1056.12,2026.44", "GREEK_ABODE_CREATURE_PEN", 4886, 1000, 0, 0, 0, 1.000000, 0) CREATE_BUILDING(1, "1146.30,1974.88", "GREEK_ABODE_B", 5619, 1000, 0, 0, 0, 1.000000, 0) CREATE_FOREST(0, "1237.58,1469.51") CREATE_TREE(0, "820.96,1435.56", "Palm Tree", 0, 0.000000, 1.000000, 1.000000) CREATE_TREE(0, "1366.89,1834.04", "Palm Tree", 0, 2.003248, 0.791513, 1.000000) CREATE_TREE(0, "1374.34,1848.45", "Palm Tree", 0, 2.003248, 0.791513, 1.000000)
The following is a list of commands that can be used in a .BWE file along with what each command does.
VERSION(3.100000) VERSION(float)
Currently it is speculated that the VERSION line information comes from the Developers World Editor Tools.
SET_LAND_NUMBER(1) SET_LAND_NUMBER(int)
Defines what chl to load from scripts\bw2\. Defaults to 0.
LOAD_LANDSCAPE("data\landscape\bw2\Land1.ter") LOAD_LANDSCAPE(string)
Tells the B&W2 Engine what Landscape file (.ter) is to be loaded with this .BWE file.
SET_DEFAULT_SOUND_SURFACE(14) SET_DEFAULT_SOUND_SURFACE(int)
This appears to offer the sound of the default landscape set by the index of an internal game array. (**Needs testing.)
START_CAMERA_POS(1041.910645, 128.266327, 883.260254, 1042.020264, 128.023911, 884.224182) START_CAMERA_POS(float, float, float, float, float, float)
This is both the Position and Focus of the Camera at the start of the mission. (X, Z, Y / X, Z, Y) (Y is considered the UP Value)
SET_DAY_LENGTH(10.000000, 10.000000) SET_DAY_LENGTH(float, float)
The Day and Night Length in Minutes.
CREATE_TOWN(0, "884.05,1492.74", "NEUTRAL", "GREEK") CREATE_TOWN(int, string, string, string)
Command Format: (Group Number, "X,Z", "Alignment", "Race Name")
Alignments: (NEUTRAL, PLAYER_ONE, PLAYER_TWO, PLAYER_THREE)
Race Names: (GREEK, JAPANESE, AZTEC, INDIGENOUS, NORSE)(I'm not actually sure if indigenous works)
Edit - INDIGENOUS works for the villagers, not for the buildings or town type. They are effectively the Egyptians you see on the first island - Uzi
SET_TOWN_NAME(0, "BW2T_PLACENAMES_AZTECCITY_1") SET_TOWN_NAME(int, string)
(Currently Unknown as to where BW2T_PLACENAMES_AZTECCITY_1 is picked from)
SET_TOWN_TECH_LEVEL(0, 0) SET_TOWN_TECH_LEVEL(int, int)
Command Format: (Group Number, Tech Level) Tech Level (0 through 2)
CREATE_BUILDING(0, "884.05,1492.74", "GREEK_ABODE_A", 2844, 1000, 0, 0, 0, 0.010000, 0) CREATE_BUILDING(int, string, string, int, int, int, int, int)
Command Format: (Group Number, "X,Z", "Building Type / Model to use", Angle, Scale, Food, Wood, Ore, Status of Building as far as being built, Level (deprecated, now always 0))
CREATE_FOREST(0, "1237.58,1469.51") CREATE_FOREST(int, string) CREATE_FOREST(Group Number, "X,Z")
Command Format: (Group Number, "X,Z") Notes: Following the Create Forest Command you should create each tree within the forest with the CREATE_TREE Command.
CREATE_TREE(0, "820.96,1435.56", "Palm Tree", 0, 0.000000, 1.000000, 1.000000) CREATE_TREE(int, string, string, float, float, float, float)
Command Format: (Group Number, "X,Z", "Tree Type / Model to use", Whether or not this is a 'scenic' tree, Angle, Scale, Final Scale (not sure what this does)
CREATE_FLOCK(0, "1091.13,1368.40", "Rabbit", 15, 0, -1, 0.000000, 1.000000, 122.730003, 0.000000) CREATE_FLOCK(int, string, string, int, int, int, float, float, float)
Command Format: (Grouping Number, "X,Z", "Model to use", Number of Animals in the Flock, Whether or not there is a flock 'leader', Town ID (town's grouping number the flock belongs to), Angle, Scale, Radius, Altitude)
CREATE_MICROCLIMATE("1249.85,1662.60", 2, 190.000000, 20.000000, 190.000000, 5, 16.340942, 20.000000, 0.000000, 24.000000, 0.300000, 0.000000) CREATE_MICROCLIMATE(string, int, float, float, float, int, float, float, float, float, float ,float, float)
Command Format: ("X,Z", Weather Type, X radius, Y radius, Z radius, Point Count, Height, Reposition Rate, Time On, Time Off, Follow, Scale Variation)
LOAD_WALLS("data\landscape\bw2\Land8.wal") LOAD_WALLS(string)
Loads a the Wall Layout file. Wall Layout files are .wal files.
CREATE_WALL_CONTAINER(0, 0) CREATE_WALL_CONTAINER(int, int)
Creates a wall 'container' object for the wall buildings. (Seems to use indexes in the .wal file.)
CREATE_WALL_BUILDING(0, 0, "1759.71,879.18", "GREEK_ABODE_WALLTOWER", 0, 2000) CREATE_WALL_BUILDING(int, int, string, string, int, int)
The first integer relates to the last value in CREATE_WALL_CONTAINER, the second refers to some sequential wall mapping - maybe ID, then coordinate string, then the wall building id e.g. "GREEK_ADOBE_GATEHOUSE", last two ints unknown.
CREATE_WALL_SEGMENT(0, 0, 1, 1.000000) CREATE_WALL_SEGMENT(int, int, int, float)
1st int is the index of the wall segment from CREATE_WALL_CONTAINER, 2nd is the relation to relation of the segment to some CREATE_WALL_BUILDING id (I think), the 3rd would be the second CREATE_WALL_BUILDING id it connects to and the float is probably the thickness
LOAD_PATHS("data\landscape\bw2\Land3.pat") LOAD_PATHS(string)
loads a villager walk path (?) file extension .pat, start file directory in the b&w2 directory
(All the LOAD_ functinos should be tested with multiple landscapes/walkpaths/walls for posterity though they probably won't work)
CREATE_TOWN_CENTRE(0, "1088.24,1616.50", "GREEK_ABODE_TOWN_CENTRE", 3839, 1000, 0) CREATE_TOWN_CENTRE(int, string, string, int, int, int)
id, coordinate string, town centre type e.g. ("GREEK_ABODE_TOWN_CENTRE"). the last three integer values need testing.
CREATE_PATH_FROM_FILE(0, 0, 1.000000) CREATE_PATH_FROM_FILE(int, int, float)
the town id, the index in the file and the thickness, presumably
CREATE_VILLAGER_POS("1103.14,1241.35", "1103.14,1241.35", "NORSE_FORESTER", 22) CREATE_VILLAGER_POS(string, string, string, int)
the first two strings are the coordinates the villager is generated within, the third is a vi lager id e.g. "GREEK_FORESTER" the int is (I believe) age of the villager
CREATE_EMBELLISHMENT(1, "1732.73,1670.64", "ABODE_EMBELLISH_NORSE_STATUE", 593, 1000, 0, 0, 0) CREATE_EMBELLISHMENT(int, string, string, int, int, int, int, int)
the town id, the coordinate string, the id of the embellishment (pretty town decoration thing for atmosphere) e.g. "ADOBE_EMBELLISHMENT_NORSE_STATUE"
CREATE_PLANNED_BUILDING(3, "1432.08,1725.58", "NORSE_ABODE_A", 4737, 1000, 0, 0, 0, 0) CREATE_PLANNED_BUILDING(int, string, string, int, int, int, int, int)
works like create building except it's just a blueprint (show me all the blueprints)
CREATE_MOBILE_STATIC("915.30,527.96", "Ore Rock Medium", 0.000000, 0.000000, 0.000000, 0.000000, 1.000000) CREATE_MOBILE_STATIC(string, string, float, float, float, float) CREATE_MOBILE_STATIC(cords, model, ?, ?, ?, ?)
the coordinates of the object (like a rock), the id of the object e.g. "Greek Urn 4" then something like elevations and xyz rotation
CREATE_NAMED_FEATURE("2220.30,1668.81", "m_landmark_norsegrave", 5794, 1000, 0) CREATE_NAMED_FEATURE(string, string, int, int, int)
coordinate string, feature id e.g. "m_landmark_norsegrave", last three ints unkown
CREATE_PLANNED_BUILDING_IN_GROUP(1, "1534.16,866.40", "NORSE_ABODE_STORAGE_PIT", 0, 1000, 0, 0, 0, 0, 1) CREATE_PLANNED_BUILDING_IN_GROUP( town id, "pos", "building name / type", scale?, growth?,int,int,int,int, group id)
this is NOT in the stock land 1 but should still be mentioned. the group id is used in scripting when you want to trigger the building of somthing in group X
Categories: Formats | Island | BWE