Page 1 of 1

Weapons Discussion Thread

Posted: Mon Mar 23, 2009 7:16 am
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.

Re: Weapons Discussion Thread

Posted: Mon Mar 23, 2009 12:13 pm
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?

Re: Weapons Discussion Thread

Posted: Mon Mar 23, 2009 5:46 pm
by MileHighGuy
ive been wondering... does negative gravity work? (in ordances odf)

Re: Weapons Discussion Thread

Posted: Mon Mar 23, 2009 6:30 pm
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?

Re: Weapons Discussion Thread

Posted: Mon Mar 23, 2009 8:14 pm
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

Re: Weapons Discussion Thread

Posted: Mon Mar 23, 2009 8:19 pm
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.

Re: Weapons Discussion Thread

Posted: Mon Mar 23, 2009 9:51 pm
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?

Re: Weapons Discussion Thread

Posted: Mon Mar 23, 2009 10:05 pm
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.

Re: Weapons Discussion Thread

Posted: Wed Mar 25, 2009 4:29 am
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.

Re: Weapons Discussion Thread

Posted: Fri Mar 27, 2009 2:58 am
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:

Re: Weapons Discussion Thread

Posted: Fri Mar 27, 2009 3:45 pm
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.

Re: Weapons Discussion Thread

Posted: Sun Mar 29, 2009 6:20 pm
by ryukaji
Is there a way to make a grenade spin/rotate in the air when you throw it?

Re: Weapons Discussion Thread

Posted: Sun Mar 29, 2009 6:39 pm
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.

Re: Weapons Discussion Thread

Posted: Sun Mar 29, 2009 6:52 pm
by ryukaji
That could work but whenever I try to load a msh into particle editor it crashes.

Re: Weapons Discussion Thread

Posted: Sun Mar 29, 2009 7:06 pm
by Fiodis
Look in the XSI tuts for how to get custom effect meshes ingame.

Re: Weapons Discussion Thread

Posted: Sun Mar 29, 2009 7:28 pm
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

Re: Weapons Discussion Thread

Posted: Mon Mar 30, 2009 3:00 am
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.

Re: Weapons Discussion Thread

Posted: Mon Mar 30, 2009 3:57 pm
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.

Re: Weapons Discussion Thread

Posted: Tue Mar 31, 2009 3:02 am
by sampip
Sorry, I mean the entity key in editlocalize.bat.

Re: Weapons Discussion Thread

Posted: Tue Mar 31, 2009 3:38 pm
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.