Weapons Discussion Thread

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Weapons Discussion Thread

Post by Sky_216 »

Well I think it's time for this, mostly since I've seen a few threads by quite experienced modders about fairly simple weapon odf issues.

This thread is aimed at increasing people's understanding of how weapons in BF2 work, what you can do with them, and also pooling various modders knowledge. Personally I'll post some basic explanations of weapon/ordnance classes, some stuff on complex weapons and some general advice. If you're new to side modding, check out the various links in the "Everything You Need Thread."

Post anything you want - questions, advice, information - except weapon requests. We've got a requests thread for that kinda thing.
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Weapons Discussion Thread

Post by sampip »

Well, to start it off (:D), I have a question. I recently made a new weapon, using the award rifle mesh and texture and bullets and stuff, but giving it the same firing speed as a normal rifle. I called it Improved_Blaster_Rifle, as I CANNOT get localization to work on my custom sides... :(... It turns out, that when i equiped it on my clone commander, he never seems to use it ingame, just his blaster pistol, which is a bit rubbish.... Any help on this one?
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Weapons Discussion Thread

Post by MileHighGuy »

ive been wondering... does negative gravity work? (in ordances odf)
Ty294
Sergeant Major
Sergeant Major
Posts: 247
Joined: Thu Mar 12, 2009 10:28 pm
Projects :: Various
Location: Minnesota

Re: Weapons Discussion Thread

Post by Ty294 »

I wonder if there is a way to make it so that weapons can fire underwater. The vehicle cannons can. (At least in BF1) Perhaps changing the class label?
ryukaji
Major
Major
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Weapons Discussion Thread

Post by ryukaji »

I think its been said many a time that there is absolutely no way to make a units weapon fire underwater, although I think that the vehicles do
User avatar
Ping
Sith
Sith
Posts: 1398
Joined: Thu Sep 18, 2008 4:19 pm
Location: College

Re: Weapons Discussion Thread

Post by Ping »

ryukaji wrote:I think its been said many a time that there is absolutely no way to make a units weapon fire underwater, although I think that the vehicles do
Actually, I think it's possible...Well, sort of. You have to make the map appear as if it's underwater, and it can't literally be underwater. I think there were three "underwater" maps made for BF2, one of which was converted from BF1. You just have to mess around with the effects, sounds, lighting, etc.
obiboba3po
2008 Most Technically Challenging Avatar
Posts: 2376
Joined: Tue Feb 12, 2008 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: NJ, USA

Re: Weapons Discussion Thread

Post by obiboba3po »

i've tried this many times sky, somewhat using combinations of ur cluster bomb, but how could you make a rocket of sorts explode into mini rockets that then arc down and hit the ground after a certain amt. of seconds?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Weapons Discussion Thread

Post by Fiodis »

Eh...seems to me like we're losing track of the thread's point. When I read Sky's post it sounded like a request for basic ODF information to be complied in one thread, rather than a whole bunch of modders asking why their thing doesn't work. But that could just be my own interpretation of Sky's words.


That being said, I have something to add which isn't a question:
ClassLabel = "areaeffectweapon" is the only one which doesn't support effects in BF2, at least as far as I know. An example of this is force choke.
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Weapons Discussion Thread

Post by Sky_216 »

Sorry for the delays, people.


Answers:
Hidden/Spoiler:
@Obi: Sadly not possible....unless you want the rocket to either (1) be a bomb or (b) bounce of objects. If it was possible to use "StickProp" it'd be doable.


[quote="MileHighGuy"]ive been wondering... does negative gravity work? (in ordances odf)[/quote]

No.


[quote="sampip"]Well, to start it off (:D), I have a question. I recently made a new weapon, using the award rifle mesh and texture and bullets and stuff, but giving it the same firing speed as a normal rifle. I called it Improved_Blaster_Rifle, as I CANNOT get localization to work on my custom sides... ... It turns out, that when i equiped it on my clone commander, he never seems to use it ingame, just his blaster pistol, which is a bit rubbish.... Any help on this one?[/quote]

try to give the weapon itself these values:

AITargetPerson = "1"
AITargetAnimal = "1"
AITargetDroid = "1"
AITargetVehicle = "0"
AITargetBuilding = "0"




@Ping: Well yes, because it's not actually underwater.
More Stuff
Underwater infantry weapons: Melee Class. I'm going to do a little experiment to see if I can't get an underwater laser....got a hunch there's a certain work around....unless it's the infantry class rather than weaponclass that causes the problem.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: Weapons Discussion Thread

Post by kinetosimpetus »

sampip wrote:Well, to start it off (:D), I have a question. I recently made a new weapon, using the award rifle mesh and texture and bullets and stuff, but giving it the same firing speed as a normal rifle. I called it Improved_Blaster_Rifle, as I CANNOT get localization to work on my custom sides... :(... It turns out, that when i equipped it on my clone commander, he never seems to use it in game, just his blaster pistol, which is a bit rubbish.... Any help on this one?
Does it use the common award rifle as the classparent?
If it does, it must be unlocked by the. Player like the award rifle.
Unless you change ScoreForMedalsType and MedalsTypeToUnlock or something like that. Its in the common award rifle odf. Just copy the 2 lines from the common one to the custom one, but change the numbers to -1. Then improved rifle will not earn frenzy award, and should be available right away.

Hope this is useful

EDIT: more info about localization? what do you do and what does the computer tell you? :cpu:
Last edited by kinetosimpetus on Fri Mar 27, 2009 8:17 pm, edited 2 times in total.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Weapons Discussion Thread

Post by Fiodis »

Skyhammer_216 wrote:More Stuff
Underwater infantry weapons: Melee Class. I'm going to do a little experiment to see if I can't get an underwater laser....got a hunch there's a certain work around....unless it's the infantry class rather than weaponclass that causes the problem.
Melee underwater works, I fooled around with a "diving knife" for Tientia before.....but that was before I knew how to model, or combo edit. Still, a lightsaber does work underwater.

Now, I'm not as good with odfs as Sky, but I'm pretty sure it's not the weaponclass that causes the underwater problem. Fooled around with it briefly in Tientia 1, got a couple crashes. Droideka's blasters work underwater, but that's cause the droideka is a unique type of unit-vehicle....



Wait, idea. Not sre if it has anything to do with the problem, but it is a difference between infantry weapons and vehicle weapons. Might not be the difference, but still something to think about.

Maybe it's the fact that vehicle weapons are part of the vehicle's MSH, whereas unit weapons have their own, separate mesh. Not sure if that matters in the game at all, but it's a thought.


Oh wait....lightsabers have their own meshes as well.... Well, lightsabers are different that standard guns. They might be the exception.
ryukaji
Major
Major
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Weapons Discussion Thread

Post by ryukaji »

Is there a way to make a grenade spin/rotate in the air when you throw it?
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Weapons Discussion Thread

Post by Fiodis »

I believe so; take a look at the lightsaber toss odf. There are a few lines there pretaining to spin, but I think they are dependant on the classlabel, and that would mean that the grenade would return to you, which is undesirable.

Alternatively, you could set up the grenade to be an effect mesh, use it to create a rotating effect, and set it as the trail. Then just make the actual grenade a really small sphere.
ryukaji
Major
Major
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Weapons Discussion Thread

Post by ryukaji »

That could work but whenever I try to load a msh into particle editor it crashes.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Weapons Discussion Thread

Post by Fiodis »

Look in the XSI tuts for how to get custom effect meshes ingame.
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: Weapons Discussion Thread

Post by YaNkFaN »

these lines can be added so that a weapon does not go to the award weapon when certain number of kills are reached (ie if the weapon is upgraded already)


ScoreForMedalsType = -1
MedalsTypeToLock = -1
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Weapons Discussion Thread

Post by sampip »

EDIT: more info about localization? what do you do and what does the computer tell you?
Theres no error. I just don't know how to edit a custom side properly...! Nothing happens when I edit rep in the entity folder.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Weapons Discussion Thread

Post by Fiodis »

sampip wrote:
EDIT: more info about localization? what do you do and what does the computer tell you?
Theres no error. I just don't know how to edit a custom side properly...! Nothing happens when I edit rep in the entity folder.
That's because there is no "entity" folder.
User avatar
sampip
General
General
Posts: 792
Joined: Mon Mar 16, 2009 12:08 pm
Projects :: Something big. And exciting.
Games I'm Playing :: Battlefield 3
xbox live or psn: masowner66
Location: Zebra

Re: Weapons Discussion Thread

Post by sampip »

Sorry, I mean the entity key in editlocalize.bat.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Weapons Discussion Thread

Post by Fiodis »

"Localize" refers to names. Check out "how to set up a custom side" in the FAQ thread. Editlocalize.bat is only for changing names.
Post Reply