Hi everybody, time to get configuring!
As mentioned before, now that all the bits and pieces have been imported, it's time to do the proper book-keeping. It's pretty easy
Appetite for Destruction.1. Get down to the following folder. If you can't find it, you'll have to extract it from the 'main.datapack' file.
Take note of 2 files to edit, builds.engcfg and brokens.engcfg, and create a new file, broken_saray1.engcfg. You may wonder why I keep referring to the barn as 'saray'. Simple reason, it makes it a lot easier to copy the existing config files
2. Open the builds.engcfg file, make a copy of the 'saray0' block and edit the new block as 'saray1':
saray1()
{
//object type
type = %OT_BUILDING%;
//name of the mesh
mesh = saray1;
//object name
name = txt_ob_saray1;
//Lod number of levels
mesh_lods= 3;
//weight
wei = -10;
//material
material = wood;
//shared mesh
shared = true;
//group collisions
flags = 0x10;
//resistance (momentum)
imp = 20000;
imp_dem = 15000;
//potential for fire
flame_p = 0.3;
//description of destruction
destr_desc = saray1_d;
//type of collision
col_type = 2;
//may become dynamic
dynamic = true;
//armor map
armor_map = armor_maps\objs\saray0_armor.tga;
//chunks of collisions
col_bounds()
{
//name, the accuracy of fragmentation, the number of levels of Lod
s_collision_01, 0, 0, true;
s_collision_02, 0, 0, true;
}
}
Rename all references to 'saray0' as 'saray1' except for the armor map, which we're borrowing together with the main texture
Note that there are 2 collision boxes instead of one, due to the L-shaped built-up area.
3. Open up the 'broken_saray0.engcfg' file and copy it as 'broken_saray1.engcfg'. Open the new file and go through every block, each block is supposed to represent one of your broken fragments (there should be 21 of them). Here's a sample:
roof01()
{
//òèï îáúåêòà
type = %OT_OBJECT%;
//èìÿ ñåòêè
mesh = roof01;
//êîëè÷åñòâî ëîä óðîâíåé
mesh_lods= 0;
//ìàòåðèàë
material = wood;
//ïðî÷íîñòü (èìïóëüñ)
imp = 1000;
//ìîæåò ñòàíîâèòüñÿ äèíàìè÷åñêèì
dynamic = true;
//çàøàðåííàÿ ñåòêà
shared = true;
//íå äîáàâëÿòü â êîëëèçèè
no_coll = false;
//ìàññà, êã
mass = 500;
//ìîìåíòû èíåðöèè x, y, z
j = 2000, 2000, 2000;
//÷àíê öåíòðà òÿæåñòè
center_mass = d_roof_01;
//êàðòà áðîíèðîâàíèÿ
armor_map = armor_maps\objs\saray0_armor.tga;
//÷àíêè êîëëèçèé
col_bounds()
{
//èìÿ, òî÷íîñòü äðîáëåíèÿ, êîëè÷åñòâî ëîä óðîâíåé
d_roof_01, 0, 0, false;
}
Make sure you name and label each block after one of your parts. The 'd_roof_01' mentioned above refers to the main chunk of the 'roof01.go' model. It also doubles up as the collision box for 'roof01'. Not all of the parts get away with just one collision box, for instance the foundation, 'found01':
col_bounds()
{
//èìÿ, òî÷íîñòü äðîáëåíèÿ, êîëè÷åñòâî ëîä óðîâíåé
s_collision01, 0, 0, true;
s_collision02, 0, 0, true;
s_collision03, 0, 0, true;
s_collision04, 0, 0, true;
s_collision05, 0, 0, true;
s_collision06, 0, 0, true; }
'Found01' has 6 collision boxes because of its odd shape, covering just the edges of an L-shaped floor area.
Just to emphasize again,
Go through all 21 of your fragments and make sure every one has its block in this file!3. Okay good work, now Open up 'brokens.engcfg' and add in a new line:
#include "broken_saray0.engcfg"
#include "broken_saray1.engcfg"
#include "broken_build0.engcfg"
#include "broken_bridge0.engcfg"
#include "broken_well0.engcfg"
#include "broken_misc.engcfg"
4. Remember all the coordinates and rotations for your 21 fragments? I hope you've still got them
You're supposed to compile them neatly as follows:
Here's what I understand about the various columns:
A - the destruction model name (referenced in the builds.engcfg file)
B - link to the object data
C - name of the fragment
D - the dust effect when things come crashing down
E - ? They're all '1'
F - X coordinate
G - Y coordinate
H - Z coordinate
I - X rotation in degrees
J - Y rotation
K - Z rotation
L - ? Only the roof parts seem to be marked as 'true'
Make sure every line ends with a ';'.
Okay, save it all as a .csv file. Next up, head over to this folder:
Open up your .csv file in Notepad. Copy the information and paste it to the 'or_agroups()' block in the common_res.engcfg file, like this:
saray1_d,obj_cfg\objs.engcfg,cross01,dust_br,1,-1.943,2.025,1.465,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,cross02,dust_br,1,1.968,2.025,-0.002,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,door01,dust_br,1,-1.242,1.037,-0.012,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,door02,dust_br,1,1.114,1.033,2.961,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,roof01,dust_br,1,1.005,2.827,2.366,-43,0,0,true;
saray1_d,obj_cfg\objs.engcfg,roof02,dust_br,1,-1.172,2.84,0.52,43,0,0,true;
saray1_d,obj_cfg\objs.engcfg,roof03,dust_br,1,1.001,2.84,-0.971,0,0,40,true;
saray1_d,obj_cfg\objs.engcfg,roof04,dust_br,1,2.906,2.818,-0.971,0,0,-40,true;
saray1_d,obj_cfg\objs.engcfg,roof05,dust_br,1,2.818,2.887,0.624,43,0,0,true;
saray1_d,obj_cfg\objs.engcfg,roof06,dust_br,1,-2.99,2.827,2.366,-43,0,0,true;
saray1_d,obj_cfg\objs.engcfg,roof08,dust_br,1,3.451,2.949,1.468,0,0,0,true;
saray1_d,obj_cfg\objs.engcfg,roof09,dust_br,1,1.973,2.676,-3.034,0,0,0,true;
saray1_d,obj_cfg\objs.engcfg,roof10,dust_br,1,-4.004,2.677,1.468,0,0,0,true;
saray1_d,obj_cfg\objs.engcfg,wall01,dust_br,1,-3.991,1.278,1.465,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,wall02,dust_br,1,-1.84,1.278,-0.094,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,wall03,dust_br,1,-1.676,1.276,3.028,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,wall04,dust_br,1,3.53,1.28,-0.122,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,wall05,dust_br,1,1.976,1.28,-3.034,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,wall06,dust_br,1,0.41,1.28,-1.627,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,wall07,dust_br,1,2.242,1.28,3.034,0,0,0,false;
saray1_d,obj_cfg\objs.engcfg,found01,dust_br,1,0,0,0,0,0,0,false;
That's all for today! We're done with the configuring. Next time, we'll be looking at getting the barn recognized in the Mission Editor! Bye now!