PDA

View Full Version : Battle map builings problems



caius britannicus
11-04-2006, 22:28
I'm trying to get a building to work in my mod. Its the only building I've tried to add so far. Heres what has beeen done so far. Created the model and texture and put them in the appropriate folders in teh BI folder. I edited the descr_items and descr_items.db using alpacas method. THat worked. I then made a file dbb_crusades_keep.txt which I added the following entry to:



crusades_stronghold_keep
{
stat_cat indestructable
localised_name none
level
{
min_health 0
battle_stats
item crusades_stronghold_keep
physical_info none
}
}


Then I added the line



Include dbb_crusades_keep.txt


to the descr_buldings_battle.txt right after the line for the BI dbb include. I then went to my settlement plan that I am using:



plan

{

floor underlay_egyptian_fort.cas overlay_egyptian_fort.cas

street_plan pathfinding_egyptian_fort.cas

borders
{
gateway, -96, 0, -90, 0
gateway, 96, 0, 90, 0
gateway, 0, -160, 0, 0

straight, 96, -128, 90, 0
straight, 96, 64, 90, 0
straight, -96, -128, -90, 0
straight, -96, 64, -90, 0
straight, 64, 96, -180, 0
straight, -64, 96, -180, 0

straight_link, -96, -96, -90, 0
straight_link, 96, -96, 90, 0
straight_link, 32, 96, 180, 0
straight_link, -32, 96, 180, 0

straight, 96, -64, 90, 0
straight, -96, -64, -90, 0
straight, 0, 96, 180, 0
straight, -64, -160, 0, 0
straight, 64, -160, 0, 0

tower_external_corner_link, -96, -160, 0, 0
tower_external_corner_link, 96, -160, 90, 0
tower_external_corner_link, 96, 96, -180, 0
tower_external_corner_link, -96, 96, -90, 0

}


; road joiners

; must be called one of the following..

;slot_road_joiner_no_road_into_roman_town
;slot_road_joiner_muddy_path_into_roman_town
;slot_road_joiner_paved_road_into_roman_town

gateway_slot_into_flat_town, 128, 0, 0, 0
gateway_slot_into_flat_town, -128, 0, 180, 0
gateway_slot_into_flat_town, 0, -192, -90, 0

egyptian_haystack, -26.01, -83.94, 0, 0
roman_tenamentE , -80.5012, -142.749, 0.670731, 0
roman_tenamentB , -62.5864, -49.625, 180.0, 0
roman_tenamentB , -30.5864, -35.625, -0, 0
roman_tenamentA , 45.5231, -90.972, 180, 0
roman_tenamentC , -45, 55, -180, 0
roman_tenamentE , -70.5012, -25, 0.670731, 0
crusades_stronghold_keep , 70.743195, 82.567169, 180, 0
roman_tenamentD , -86.6774, -93.7838, 180.0, 0
cavalry_barracks, -50.9395, -109.089, 270.367, 0
cart_B , -70.7613, -66.5733, 86.1286, 0
crates, -54.5447, -66.5891, 180.0, 0
cart_B, -54.5447, -30.5891, 180.0, 0

BI_barb_christian_academic_lvl_3, 45.5231, -30.972, -90, 0
tree_E_palm, 27, -45, 90, 0
tree_E_palm, 154, -45, 90, 0
tree_B, 150, -40, 90, 0
tree_A, 145, -35, 90, 0
bush_A_palm, 144, -33, 90, 0

}


And added the part in bold (note that the plan works fine without the bolded entry. However when I try to view the settlement with the bold entry included the game crashes on loading the battlemap view. If I leave that entry out and just change one of the roman_tenaments to the keep entry I get a crash. I figure it can't be the model/item as the game successfully generated a working item file that I can import into 3ds max no problem. Any help or information into what may be the problem is greatly appreciated.

Right now my base assumption is that I am doing something wrong with the settlement plan.

EDIT: as my post below indicates theres nothing wrong with the settlement plan.

alpaca
11-05-2006, 17:08
Did you try replacing an existing DBB entry with your new item?

caius britannicus
11-05-2006, 18:40
Hrm I just tried that and I get a CTD. I however am not sure what overlapping buildings do. As I replaced a building that, in the settlement plan was rather close to other buildings and so the new building (which is larger) would overlap other building models.

EDIT: To try and confirm if the settlement plan was an issue I added a building that I know works to the coordinates that I want to place my building at. It loaded the map fine and has placed the building were I want it to go.

EDIT: bringing the building away from the wall more hasn't stopped the CTD however before it would crash at 1/4 point on the load screen. Now it crashes at the 1/2 mark. I suppose thats progress.

alpaca
11-06-2006, 22:52
Did you describe the item correctly in your descr_items.txt?
For example for chivalry, it has to be like this:
type ctw_we_large_house_stone
lod
max_distance 4000.0
model_rigid ../../chivalry/data/models_building/ctw_we_large_house_stone.cas

So if you use a mod folder, you need to make relative pathnames from the data/models_building folder

Did you check if the item is generated and has a size that roughly corresponds to the cas size (not 1KB or so)?

caius britannicus
11-06-2006, 23:32
The item generate is 347KB in size this is the coding I use describe the item in my descr_items.txt



type crusades_stronghold_keep
lod
max_distance 4000.0
model_rigid crusades_keep.cas


Its being generated right out of the BI folder, using the BI descr_items.txt

alpaca
11-07-2006, 22:51
Out of the BI folder? The BI items are described like ../../bi/data/models_building

Overlapping buildings shouldn't present a problem I think, at least not if you don't supply physical info. But I think even when you do they won't do much harm.

Edit: I assume you exported the model properly?

caius britannicus
11-08-2006, 03:57
yep

I'll try doing it all again with the ../../bi/data/models_building

EDIT: I tried again, and once again a item file 373KB (around the same as the case file) was generated. However adding it to a settlement plan still causes a CTD upon loading the battle map view of the settlement.

alpaca
11-08-2006, 22:48
Then the problem is probably the model itself. Did you name your mesh/group LOD1? I'm not sure if that's needed, haven't done any of that stuff for some time

caius britannicus
11-09-2006, 01:24
no I didn't. Its just named crusades_stronghold_keep.cas

alpaca
11-09-2006, 20:06
I meant in max, not the file.
Actually i'm not sure whether it's LOD_1 or LOD1, import an existing item and check it out :)

caius britannicus
11-09-2006, 20:49
I checked, its LOD_1. So I renamed the model to LOD_1, attached it to the scene root. exported it as crusader_keep. Added my entry to the descr_items as:



type crusades_stronghold_keep
lod
max_distance 4000.0
model_rigid ../../bi/data/models_building/crusades_keep.cas


This generated a new descr_items.db and an item file. The item file is 373KB while the original exported cas file is 374KB. I then did my thing with the the descr_model_building.txt (same entry as above) added the name of the entry to my settlement plan and still a ctd.

alpaca
11-10-2006, 17:52
Did you add any other buildings to Crusader? If so, is there any difference between this one and the others?
Maybe you got some model bug or something.

caius britannicus
11-10-2006, 18:38
this is the only model I have tried to get working.

alpaca
11-10-2006, 20:50
To find out whether it's model related, link the entry in descr_items.txt to an existing (vanilla) item and see if that works. If it does, it's almost surely a problem with the model.

Teleklos Archelaou
11-11-2006, 08:53
shifty is the only guy EB is in touch with who might be able to give an answer. I'd drop him a PM to check this thread out - it can't hurt.