[Question] Bots and new weapons...
-
- Posts: 1753
- Joined: 2009-06-07 00:58
[Question] Bots and new weapons...
I have been using my PRSP as a testing platform for my NZDF faction of PR for a week now. Today i tried to load a map with an NZDF gun in one of the kits. This weapon is not a PR weapon. It has been tweaked for PR though.
The map CTD'd just after 100%
Is there anything that needs to be done to a weapon to make it work in PRSP? Anything to do with the AI?
Cheers,
HangMan
The map CTD'd just after 100%
Is there anything that needs to be done to a weapon to make it work in PRSP? Anything to do with the AI?
Cheers,
HangMan

PR Community Faction Team - "Getting Sh*t Done..."
-
- Retired PR Developer
- Posts: 1204
- Joined: 2007-05-30 22:47
Re: [Question] Bots and new weapons...
Without the new gun added the map loads fine and you can play?
Basically, are you sure it is the gun?
Basically, are you sure it is the gun?

-
- Posts: 1753
- Joined: 2009-06-07 00:58
Re: [Question] Bots and new weapons...
I'm sure its the gun. I removed it from the kit and it works fine. Map is Korengal if thats any help?? Currently also using custom kit and soldier skins.[R-DEV]ballard_44 wrote:Without the new gun added the map loads fine and you can play?
Basically, are you sure it is the gun?

PR Community Faction Team - "Getting Sh*t Done..."
-
- Retired PR Developer
- Posts: 1204
- Joined: 2007-05-30 22:47
Re: [Question] Bots and new weapons...
I assume the gun has worked in another bf2 mod?
And the custom kit and skins work fine without the new gun?
Could be a conflict in the index of the weapon?
Basically there could be another weapon in your kit that uses the same index number as the new gun.
Open the .tweak file of the gun and look for...
You need to check the other .tweak files of all the other things in the kit to see if one of the others already uses the same number.
EDIT- you don't get any error message that tells you what happened after the crash?
And the custom kit and skins work fine without the new gun?
Could be a conflict in the index of the weapon?
Basically there could be another weapon in your kit that uses the same index number as the new gun.
Open the .tweak file of the gun and look for...
There will be a number at the end of that code.ObjectTemplate.itemIndex
You need to check the other .tweak files of all the other things in the kit to see if one of the others already uses the same number.
EDIT- you don't get any error message that tells you what happened after the crash?

-
- Retired PR Developer
- Posts: 7016
- Joined: 2007-02-11 03:14
Re: [Question] Bots and new weapons...
Also run in windowed mode so the error message (most of the time) pops up.
-
- Posts: 1753
- Joined: 2009-06-07 00:58
Re: [Question] Bots and new weapons...
Its not the index, i checked that today. Custom skins work fine, as does the kit.
I'm going to run in windowed mode later today and see what error i get.
I'm going to run in windowed mode later today and see what error i get.

PR Community Faction Team - "Getting Sh*t Done..."
-
- Posts: 1753
- Joined: 2009-06-07 00:58
Re: [Question] Bots and new weapons...
Ok so i tried to run windowed and this error comes up...



PR Community Faction Team - "Getting Sh*t Done..."
-
- Posts: 261
- Joined: 2006-11-18 03:30
Re: [Question] Bots and new weapons...
Maybe some how your missing something thats why when you try to use that gun it crashes you might try and double checking all files relating to that gun to make sure their really their.
I don't know if this will help but I found this which seems to be similar
Battlefield 2: Special Forces problem [RESOLVED] - Tech Support Forum
The last post mentions something about extracting the Client_shaders.zip in C:\Program Files\EA GAMES\Battlefield 2\mods\bf2 to C:\Program Files\EA GAMES\Battlefield 2\mods\bf2\shaders don't really know what hes going on about.
I don't know if this will help but I found this which seems to be similar
Battlefield 2: Special Forces problem [RESOLVED] - Tech Support Forum
The last post mentions something about extracting the Client_shaders.zip in C:\Program Files\EA GAMES\Battlefield 2\mods\bf2 to C:\Program Files\EA GAMES\Battlefield 2\mods\bf2\shaders don't really know what hes going on about.

-
- Retired PR Developer
- Posts: 1204
- Joined: 2007-05-30 22:47
Re: [Question] Bots and new weapons...
Hmm...never seen that error before.XxX_HangMan_XxX wrote:Ok so i tried to run windowed and this error comes up...
Clear all your BF2 caches and see if it helps?
Code: Select all
My Documents\Battlefield 2\cache
Code: Select all
My Documents\Battlefield 2\mods\bf2\cache

-
- Posts: 1753
- Joined: 2009-06-07 00:58
Re: [Question] Bots and new weapons...
Ok i tested the weapon in a few other mods and it worked fine ingame. It still won't work for PRSP and i can't run windowed or debug because of that error 


PR Community Faction Team - "Getting Sh*t Done..."
-
- Retired PR Developer
- Posts: 1204
- Joined: 2007-05-30 22:47
Re: [Question] Bots and new weapons...
Well, see if a change in AI code will help.
Look for and open another weapons .tweak file that is an equivalent of the new gun.
Look for this code...
So if your new gun matches that 'style', copy the whole line to your weapon, replacing the code that the new gun has.
Most the ai code that the hand weapons use is in the objects_server.zip
Open it and goto the...
/Weapons/Handheld/weapon_ranges folder and you will see all the variations.
So if the new gun is not an assault rifle with scope pick the one that it matches in that folder.
Open up the Weapons.ai file and grab the correct code.
If it was a Light Machine Gun the code you would paste would be the lmg_ai part and so on.
Look for and open another weapons .tweak file that is an equivalent of the new gun.
Look for this code...
There will be some more code after the above like...ObjectTemplate.aiTemplate
All guns that are assault rifles with a scope use this code in PRSP.ObjectTemplate.aiTemplate ar_scope_ai
So if your new gun matches that 'style', copy the whole line to your weapon, replacing the code that the new gun has.
Most the ai code that the hand weapons use is in the objects_server.zip
Open it and goto the...
/Weapons/Handheld/weapon_ranges folder and you will see all the variations.
So if the new gun is not an assault rifle with scope pick the one that it matches in that folder.
Open up the Weapons.ai file and grab the correct code.
If it was a Light Machine Gun the code you would paste would be the lmg_ai part and so on.
