Page 1 of 1

Detpack explosion file causing crash? [Solved]

Posted: Sat Jan 27, 2007 9:45 pm
by authraw
My map is crashing whenever I play the Clone Wars era conquest. The BFront2.log gives me the following error:

Code: Select all

Message Severity: 3
.\Source\Explosion.cpp(171)
Explosion base class "com_weap_inf_detpack_dispenser_exp" not found
I'm not really sure what this is. I did a search in the BF2_modtools/assets folder for "com_weap_inf_detpack_dispenser_exp", but it doesn't find anything. What's causing this error? How do I fix it? I'm honestly not sure where to look next.

Posted: Sun Jan 28, 2007 12:05 am
by authraw
That's what I thought, too. I found a file called "rep_weap_inf_detpack_dispenser_exp.odf" that used it as a class parent, so I removed the file. I still got the same error after cleaning and remunging.
For some reason, it seems to me that this is a problem with my "rep" folder. It's just a modified version of the rep folder in the assets, but I never touched the detpack files. I'm not sure what's causing this error.

Posted: Sun Jan 28, 2007 12:50 am
by -_-
Are you sure you copied the Common assets as well?

Posted: Sun Jan 28, 2007 3:58 pm
by authraw
-_- wrote:Are you sure you copied the Common assets as well?
Into the sides folder? Yes, I did. I didn't change them at all.

Just to see if it would work, I copied one of the explosion files in the common folder and renamed it com_weap_inf_detpack_dispenser_exp and remunged. I still get the same error message--it can't find it. Where does it want the file? If I at least knew that I could try to make the file from scratch.

None of this really makes any sense, though. The Clone Wars era worked fine on my map for the longest time. I didn't start to see this problem until after I started messing with the assault mode (but that shouldn't affect CW conquest.) The one change I made to the CW era was that I moved the hero (and all associated files) from my "rep" folder to my "jed" folder and pointed the lua to the new .lvl file. My hero's not the problem, though, because I still get the error if I take him out of the map entirely.

I would hate to have to bag the clone wars era completely, but I don't have the slightest clue what else to try.

Posted: Sun Jan 28, 2007 4:28 pm
by -_-
Try starting a new project and doing it again. I've been modding sides for quite a while and never had this problem even once.

Posted: Sun Jan 28, 2007 4:30 pm
by Xavious
I had this problem once or twice. Try taking out your custom sides and then munging to see if it works. Then, try putting the sides back in one at a time and isolate the problem area. (just take out the "dc:" in the lua.)

The search for missing classparents

Posted: Sun Jan 28, 2007 4:54 pm
by AceMastermind
There are 3 files located in:
BF2_ModTools\assets\sides\rep\odf
that do not exist in any other "side" directory, named:
rep_weap_inf_detpack_dispenser
rep_weap_inf_detpack_dispenser_exp
rep_weap_inf_detpack_dispenser_ord

that call for a "ClassParent" that doesn't exist or is possibly misspelled in the ODF:
com_weap_inf_detpack_dispenser
com_weap_inf_detpack_dispenser_exp
com_weap_inf_detpack_dispenser_ord

These "ClassParents" are not found in either:
BF2_ModTools\assets\sides\Common
or your:
BF2_ModTools\data_ABC\Common\odfs

My advice is to either create these missing "classparent" files or replace the weapon with one that has files that do exist.

Posted: Sun Jan 28, 2007 10:43 pm
by authraw
psych0fred wrote:com_weap_inf_detpack_dispenser_exp is in C:\BF2_ModTools\assets\sides\Common\odf so if you want to use parent classes you will have to create them in your mod. Otherwise just consolidate all the parent class contents into your side odfs and get rid of the parent class line. Parentclass lines just tell it to compile all the linked odfs into one file during the munge. If it can't find the file it can't collect it's contents. The only reason parent classes were used to change the properties of many objects at the same time (so they all inherit the changes). If you instead put all the data in the file in your side you won't have a problem.

In case that isn't clear, for BF2 a single odf was broken up into several, where the parentclass odf can be inherited by other odfs so all of their contents is pooled into a single ODF during the munge. That way when you want to change the properties of something that more than one unit uses you change one file instead of a couple dozen.
I checked in F:\BF2_ModTools\assets\sides\Common\odf, but there is no file named "com_weap_inf_detpack_dispenser_exp" there. Does someone else have this file? Could someone post its contents so I can move on?

I'm going to try taking out the detpacks entirely tomorrow and see if that works. I'm a little wary, though, because the map crashes while loading--it doesn't even get to a point that the player or an AI could use a detpack. We'll see if it works tomorrow.

detpack related "com_weap_inf" files

Posted: Sun Jan 28, 2007 10:53 pm
by AceMastermind
The only detpack related "com_weap_inf" files that I have in: BF2_ModTools\assets\sides\Common\odf

are:
com_weap_inf_detpack
com_weap_inf_detpack_destroyed_exp
com_weap_inf_detpack_exp
com_weap_inf_detpack_ord

...and unless it somehow was deleted or mysteriously disappeared, it doesn't exist.
Use a different weapon.

Posted: Mon Jan 29, 2007 7:12 pm
by authraw
I figured it out! I removed and replaced each side one by one to find out what the problem was (as Darth_Maul had suggested.) As it turns out, the problem was not with "rep" as I had suspected, but with one of my heroes in "jed" that used some of the "rep" weapons. I changed the detpacks to mines (which are more fun, anyway) and the map works fine. Thanks a lot to everyone who helped!