Page 1 of 1

Johnson Import Error

Posted: Sun Nov 14, 2010 11:16 pm
by code red
For a mod i have been working on imported the Johnson LMG from retail to the SWD but for some reason I get this error:
Image

I assumed I had miss named something somewhere but everything seems to be correct.

This is my Code for the Kit:

Code: Select all

rem ***** SuperBritAssault****

ObjectTemplate.create Kit SuperBrit_Assault
ObjectTemplate.setType Assault
ObjectTemplate.setKitTeam 2

ObjectTemplate.setHealthBarIcon \"Ingame/Healthbar_empty_assault_64x64.tga\"
ObjectTemplate.setHealthBarFullIcon \"Ingame/Healthbar_full_assault_64x64.tga\"
ObjectTemplate.addWeaponIcon \"Weapon/Icon_alliesKnife.tga\"
ObjectTemplate.addWeaponIcon \"Weapon/Icon_colt.tga\"
ObjectTemplate.addWeaponIcon \"Weapon/Icon_BrenLmg.tga\"
ObjectTemplate.addWeaponIcon \"Weapon/Icon_grenadeallies.tga\"

ObjectTemplate.setKitIcon 1 \"kits/Kit_AlliesAssault_Bren.dds\"
ObjectTemplate.setKitName 1 \"RESPAWN_ASSAULT\"
ObjectTemplate.setKitActiveName 1 \"RESPAWN_ACTIVE_ASSAULT\"	

ObjectTemplate.geometry Kit_AlliesC_Assault
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.networkableInfo KitInfo
ObjectTemplate.addTemplate BritCommando_Helmet
ObjectTemplate.addTemplate BritCommando_BackPack
ObjectTemplate.addTemplate BritCommando_Hip_Pack


ObjectTemplate.addTemplate JohnsonLMG
ObjectTemplate.addTemplate Colt
ObjectTemplate.addTemplate CommandoKnife

ObjectTemplate.addTemplate GrenadeAllies
ObjectTemplate.aitemplate Assault


rem **** SuperBritAssaultEnd ****
In Init.con I do have the objects/objects, and My regular importing works because I have around 10 objects imported in this mod already.

I do not know what more I could have messed up? As I have checked and double checked my coding. I was hoping maybe you guys could help because of experience and maybe knowing of a similar problem and how to solve.

Posted: Mon Nov 15, 2010 10:48 am
by freddy
very hard to say whats wrong, could it be a typo somewhere perhaps?

Re: Johnson Import Error

Posted: Mon Nov 15, 2010 1:49 pm
by code red
That was my original thoughts but I have looked though the code numerous times and can not find any typo's, I will continue scanning the coding but I believe it is some other problem

Re: Johnson Import Error

Posted: Mon Nov 15, 2010 4:46 pm
by mrhowdoimodClassic
Did you accidentally put a space after either of the names? I did this once with a custom weapon and it took me ages to figure it out.

Re: Johnson Import Error

Posted: Mon Nov 15, 2010 10:42 pm
by code red
hum, I tried it and no go. But I was wondering if it is possible that bf1942 will simply not run the file for some reason? I have had custom vehicals that when I tried to import it simply would not run the object no matter what did and could this apply to the weapon? i'm not sure if it has any relevance, but it may have been a personal coding error although i doubt it. I have this idea because I have imported many vehicals and weapons in the past from retail and I have checked my coding numerous times but can not find any faults with it. Please let me know of any ideas you guys may have

Posted: Tue Nov 16, 2010 11:23 am
by freddy
perhaps try it map based

Re: Johnson Import Error

Posted: Tue Nov 16, 2010 11:30 pm
by code red
I had been trying it map based. but I found my error as some how one of the animations was miss named so the weapon couldn't load. Although even with correct animations the gun was extremely glitchy. Thanks for all the help though

Re: Johnson Import Error

Posted: Tue Nov 16, 2010 11:33 pm
by mrhowdoimodClassic
Isn't that kind of thing so frustrating? just that small thing. But this fact helps us remember the importance of the order things are loaded. Because of not remembering that the objects.rfa was loaded before the map.rfa obviously, none of us assumed to think the object just didn't load, so the map had nothing to load. gotcha, interesting concept and a good thing to remember. Also, in what ways it it being glitchy, if you ported it over there should be no problems, maybe we can help.

Re: Johnson Import Error

Posted: Wed Nov 17, 2010 11:16 pm
by code red
thanks, and the main glitch I experience on porting guns is never ending sound. Their are animation glitches with one or two weapons but the main thing is when you fire the gun the firing sound will simply loop forever until you 1. die or 2. reload the weapon (but it starts again once you start to fire)
btw all of this is done in the map file.

Posted: Thu Nov 18, 2010 12:02 am
by freddy
code red wrote:thanks, and the main glitch I experience on porting guns is never ending sound. Their are animation glitches with one or two weapons but the main thing is when you fire the gun the firing sound will simply loop forever until you 1. die or 2. reload the weapon (but it starts again once you start to fire)
btw all of this is done in the map file.
this can happen in orig old bf42 to, there is an old thread about it somewhere, i think there was a solution posted to

edit: http://battlefieldmodding.com/ssm/phpBB ... f=3&t=4713