Battlefield Modding Tutorials BFMODS

Battlefield Modding Tutorials
It is currently Mon Jun 25, 2018 9:33 am

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Fri May 08, 2009 10:25 am 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027
If anyone has tried to spawn a medic kit in desert combat (.7), they'd know that dedicated server gives you an error. The reason is because the medpack has the same name, but a new item index in DC (In 1942 its 5, in DC7 its 2). The problem is that you can only have one weapon per kit per item index.

I thought I had solved it by doing this:

Code:
ObjectTemplate.Active US_Medic
ObjectTemplate.removeTemplate 6
ObjectTemplate.addTemplate Landmine


I replaced the old medpack with the landmine (item index 5 in DC). I thought this would fix it...dedicated server no longer spits out an error message, but the client (me) gets a CTD when the map completes loading. I just tested with the removeTemplate, and not adding the landmine...and that didn't work either.


For reference... US_Medic from 1942:

Code:
ObjectTemplate.create Kit  US_Medic
ObjectTemplate.setType Medic
ObjectTemplate.setKitTeam 2
ObjectTemplate.geometry  Kit_Allies_Medic
ObjectTemplate.setHasCollisionPhysics 1
ObjectTemplate.networkableInfo KitInfo
ObjectTemplate.addTemplate Medic_helm_us
ObjectTemplate.addTemplate US_Medic_hippack
ObjectTemplate.addTemplate US_Britt_Bacpac

ObjectTemplate.setHealthBarIcon "Ingame/Healthbar_empty_medic_64x64.tga"
ObjectTemplate.setHealthBarFullIcon "Ingame/Healthbar_full_medic_64x64.tga"
ObjectTemplate.addWeaponIcon "Weapon/Icon_alliesKnife.tga"
ObjectTemplate.addWeaponIcon "Weapon/Icon_colt.tga"
ObjectTemplate.addWeaponIcon "Weapon/Icon_thompson.tga"
ObjectTemplate.addWeaponIcon "Weapon/Icon_grenadeallies.tga"
ObjectTemplate.addWeaponIcon "Weapon/Icon_medpack.tga"

ObjectTemplate.setKitIcon 3 "kits/Icon_medic_allies_selected.tga"
ObjectTemplate.setKitName 3 "RESPAWN_MEDIC"
ObjectTemplate.setKitActiveName 3 "RESPAWN_ACTIVE_MEDIC"

ObjectTemplate.addTemplate Thompson
ObjectTemplate.addTemplate Colt
ObjectTemplate.addTemplate KnifeAllies
ObjectTemplate.addTemplate MedPack

ObjectTemplate.addTemplate GrenadeAllies
ObjectTemplate.aitemplate Medic


I thought I would take a stab at this (I've been wanting to for a long long time), but ran into this unexpected problem. I may have missed something, as its really late...but hopefully not. :neutral:

Ideas?

_________________
Image


Top
 Profile Send private message E-mail  
 
PostPosted: Sat May 09, 2009 7:42 pm 
Offline
User avatar

Joined: Fri Oct 03, 2008 4:37 pm
Posts: 513
Location: Levelland, Texas
I don't think you can change kit load outs server side. What weapons you got on that kit is what you are stuck with when doing server side mods. Unless this is a CSM mod, otherwise you got a whole other problem.

_________________
ImageImage
I have cameras in your head!


Top
 Profile Send private message E-mail  
 
PostPosted: Sat May 09, 2009 7:50 pm 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027
Volt has done this before...so its possible.

I think instead of using the medic kit, I'll try adding the thompson to an assault kit. I'll post back with results...

_________________
Image


Top
 Profile Send private message E-mail  
 
PostPosted: Sat May 09, 2009 8:33 pm 
Offline

Joined: Thu Mar 15, 2007 2:22 pm
Posts: 1253
i think it will always be conflicts as soon there is networkableInfo involved, but i´, wondering if anyone had tried with just replace the DC medic altogether with the bf42 medic?


Top
 Profile Send private message E-mail  
 
PostPosted: Sat May 09, 2009 8:41 pm 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027
freddy wrote:
i think it will always be conflicts as soon there is networkableInfo involved, but i´, wondering if anyone had tried with just replace the DC medic altogether with the bf42 medic?


what do you mean freddy? the medpacks have different itemIndexes.

_________________
Image


Top
 Profile Send private message E-mail  
 
PostPosted: Sat May 09, 2009 8:51 pm 
Offline
User avatar

Joined: Fri Oct 03, 2008 4:37 pm
Posts: 513
Location: Levelland, Texas
He means, change the default kit in the map's init.con file to that of a vanilla kit. (something other then the US or Irag medic kits as only the US and Iraq teams have the DC stuff)

Most of the vanilla kits still work in DC. though I do know of a few that have index conflicts. (DC coders left in old versions of DC kits that replaced vanilla kits and they screwed them up by placing conflicting load outs on them. This never presented a problem in 0.7 of DC as the kits aren't used anywhere anymore)

Most of the vanilla kits are indeed accessible server side as the client always loads the vanilla stuff. DC doesn't run without BF1942 mod loaded in mod's init.con file, so every client will have them guaranteed.

_________________
ImageImage
I have cameras in your head!


Top
 Profile Send private message E-mail  
 
PostPosted: Sat May 09, 2009 9:42 pm 
Offline
User avatar

Joined: Sun Dec 31, 2006 12:13 am
Posts: 2027
OK...this is weird. Just for laughs, i removed the mod file from my "server" and started it. However..it STILL gave me an kit conflict error. I had dedicated server open at the time (but not running). I checked the map I was modding (berlin.rfa), and it had injected these lines of code in OST.con by itself:

Code:
ObjectTemplate.Active USMedic
ObjectTemplate.removeTemplate 6
ObjectTemplate.addTemplate ..\..\..\..\..\..\..\..\bf1942/Archives/Objects/HandWeapons/Medpack/Objects.con


So I thought that was interesting. :lol: If anyone was wondering how many times you have to go 'up' (..\..\), from DC levels folder to BF objects.rfa, BF found the answer for you! :lol:

At any rate...I thought I removed ALL (newly) modded files..but I still get this error. Dammit.


Oh, and why should it matter if you spawn a kit or put it in init.con? You're still going to get a medpack item index error, since "Medpack" was redefined in DC, its going to try to load the new one, not the old one.

HMM...I wonder though...with the line of code from above as an example...if you could specifically load the medpack from 1942, NOT dc for a certain kit.. :?

_________________
Image


Top
 Profile Send private message E-mail  
 
PostPosted: Sat May 09, 2009 10:33 pm 
Offline

Joined: Thu Mar 15, 2007 2:22 pm
Posts: 1253
Iced Earth wrote:
HMM...I wonder though...with the line of code from above as an example...if you could specifically load the medpack from 1942, NOT dc for a certain kit.. :?


what about the USMarine_Medic? is that kit name in DC to?


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 18 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group