Replacing weapons [Solved]
Moderator: Moderators
-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Replacing weapons [Solved]
Does anyone know where to find a tutorial that explains how to replace weapons on a custom map?
Yes, I checked the FAQ under Custom Sides but I didn't find one that explains replacing the weapons all I found was completely making your own side.
I replaced all of the odfs and mshs for the weapons but it did not work.
Yes, I checked the FAQ under Custom Sides but I didn't find one that explains replacing the weapons all I found was completely making your own side.
I replaced all of the odfs and mshs for the weapons but it did not work.
Last edited by MidnightSpirit on Sat Jan 11, 2014 1:49 pm, edited 3 times in total.
-
JimmyAngler
- High General

- Posts: 837
- Joined: Mon Nov 04, 2013 10:37 am
- Projects :: Battlefront Halation
- xbox live or psn: none
- Location: Area 51
Re: Replacing weapons
you need to add the weapons odf(your_weapon_name) under you unit's odf (your_units_name)under you custom side odf folder. (lot's of odf
)
-
spearmint1934
- Private Recruit
- Posts: 15
- Joined: Mon Dec 30, 2013 7:15 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Re: Replacing weapons
I have Fierfek's tutorial and it says to replace the name just like Jimmy was saying.
I did try this and when the game loads the same old battle rifle appears which is why i tried keeping the names the same and changing the custom weapon's name.
Nothing has changed though.
Out of curiosity, I have no idea where to find the skin for the rep_weap_inf_rifle if someone would tell me where that is I would appreciate the help with that as well.
I did try this and when the game loads the same old battle rifle appears which is why i tried keeping the names the same and changing the custom weapon's name.
Nothing has changed though.
Out of curiosity, I have no idea where to find the skin for the rep_weap_inf_rifle if someone would tell me where that is I would appreciate the help with that as well.
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Replacing weapons
1st.: http://www.gametoast.com/forums/viewtop ... 27&t=13806
There is an own topic for odf files.
2nd.: http://www.gametoast.com/forums/search.php
3rd.: read Tutorials and the problems of other members. Even if they are not for your problem it helps you to understand how BF2 is working.
4th.: http://www.gametoast.com/forums/viewtop ... 90#p498090
When Jimmy started modding i wrote him this to understand in what order BF calls the files.
than look in your rep.req file is there your unit.req file. and in this should be your unit's odf file called. and there you should find the unit's default odf file, msh name, and weapon odf.
And in the weapon.odf you'll find again an default name of the weapon and it's msh, properties,...
There is an own topic for odf files.
2nd.: http://www.gametoast.com/forums/search.php
3rd.: read Tutorials and the problems of other members. Even if they are not for your problem it helps you to understand how BF2 is working.
4th.: http://www.gametoast.com/forums/viewtop ... 90#p498090
When Jimmy started modding i wrote him this to understand in what order BF calls the files.
So look in your mod lua and look if you use the dc. (<- if you are wondering what that is READ TUTORIALS Firefek's is really good and this is a really basic)lua > side.req > unit.req > unit.odf > unit_default.odf/msh/weapon.odf
than look in your rep.req file is there your unit.req file. and in this should be your unit's odf file called. and there you should find the unit's default odf file, msh name, and weapon odf.
And in the weapon.odf you'll find again an default name of the weapon and it's msh, properties,...
-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Re: Replacing weapons
Okay I will do that.
What I am not understanding is that I get the custom unit's odf and msh file and put them in the appropriate folders, edit the unit's odf to accept and load the weapon in game, but it doesnt load. I am assuming this is because the skin for the custom unit is not being loaded the problem is that I can't find a tga file for the weapon or any of the stock weapons. How do they have skins with no tga file?
I know this is the problem because when I use SWBFViewer0.03 in the origin file for the custom weapon is comes up skinned and everything but after I move the odfs and msh files into my map's files and try to view them they come up unskinned. When I replace a stock weapon with another stock weapon it works perfectly fine so that is why I think the skin is the problem.
What I am not understanding is that I get the custom unit's odf and msh file and put them in the appropriate folders, edit the unit's odf to accept and load the weapon in game, but it doesnt load. I am assuming this is because the skin for the custom unit is not being loaded the problem is that I can't find a tga file for the weapon or any of the stock weapons. How do they have skins with no tga file?
I know this is the problem because when I use SWBFViewer0.03 in the origin file for the custom weapon is comes up skinned and everything but after I move the odfs and msh files into my map's files and try to view them they come up unskinned. When I replace a stock weapon with another stock weapon it works perfectly fine so that is why I think the skin is the problem.
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Replacing weapons
If only the tga is missing you'd have an untexture or invisible weapon.
The tgas are in the pc folder for some weaüpns. Just copy them into your rep folder. You can see in the mah viewer what the name of the tgas are
The tgas are in the pc folder for some weaüpns. Just copy them into your rep folder. You can see in the mah viewer what the name of the tgas are
-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Re: Replacing weapons
You're right the TGA's are not the problem I found them and applied them and the problem still is not fixed.
I went and deleted all the original weapon files and placed the custom files in their appropriate folders including putting them in the PC folder. When I load the game the original weapons are still being loaded.
Is there any tutorial specifically about applying custom weapons? Fierfek's mapping tut only talked about swapping exsisting stock weapons.
I went and deleted all the original weapon files and placed the custom files in their appropriate folders including putting them in the PC folder. When I load the game the original weapons are still being loaded.
Is there any tutorial specifically about applying custom weapons? Fierfek's mapping tut only talked about swapping exsisting stock weapons.
-
Noobasaurus
- Droid Pilot Assassin

- Posts: 2006
- Joined: Tue Aug 17, 2010 5:56 pm
Re: Replacing weapons
Do you have "dc:" before the side data is loaded in your lua?
Example:
Example:
Code: Select all
ReadDataFile("dc:SIDE\\all.lvl"-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Re: Replacing weapons
Yeah I have custom skins loaded in and everything
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Replacing weapons
Ok.
So to make a new weapon you'll need these files:
weapon.odf
weapon_ord.odf
maybe weapon_exp.odf depending on what kind of weapon it is
weapon.msh
weapon.tga
the weapon.tga must fit to the weapon.msh you can check this in the swbfviewer.
the weapon.msh must be called under Geometry/highgeometry in the weapon.odf. the weapon_ord.odf is also called by the weapon.odf.
Than you go to your rep_inf_rifleman.odf and change the rep_weap_inf_rifle to weapon.
Please check if all files have the right name. And all files have the right extension. There are often things like .odf.txt windows did not show the .txt but under properties it says text file.
So to make a new weapon you'll need these files:
weapon.odf
weapon_ord.odf
maybe weapon_exp.odf depending on what kind of weapon it is
weapon.msh
weapon.tga
the weapon.tga must fit to the weapon.msh you can check this in the swbfviewer.
the weapon.msh must be called under Geometry/highgeometry in the weapon.odf. the weapon_ord.odf is also called by the weapon.odf.
Than you go to your rep_inf_rifleman.odf and change the rep_weap_inf_rifle to weapon.
Please check if all files have the right name. And all files have the right extension. There are often things like .odf.txt windows did not show the .txt but under properties it says text file.
-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Re: Replacing weapons
Ah the problem was in the weapon odf it was calling for the original msh instead of the new one. Thank you very much haha.
Edit:
With the weapon in game it does show the weapon icon in the middle of the screen though. ANy tutorials on how to fix that?
Edit:
With the weapon in game it does show the weapon icon in the middle of the screen though. ANy tutorials on how to fix that?
-
JimmyAngler
- High General

- Posts: 837
- Joined: Mon Nov 04, 2013 10:37 am
- Projects :: Battlefront Halation
- xbox live or psn: none
- Location: Area 51
Re: Replacing weapons [Solved]
As always, the FAQ is very useful.
Here it is specifically.
http://www.gametoast.com/forums/viewtop ... =64&t=9703
Here it is specifically.
http://www.gametoast.com/forums/viewtop ... =64&t=9703
-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Re: Replacing weapons [Solved]
Once again thanks
Edit:
Okay I did what the tutorial said but I'm still having troubles.
The weapon causing problems is a rifle so when positioning the weapon icon like the tut says I copied the rep_weap_inf_rifle info for it which is:
Position(-0.200247, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
I munge and the icon remains in the same position as before completely unchanged.
Regarding other parts of the tutorial where I might have messed up here is the work that I did.
Step 5:
Step 4:
Step 3:
Sorry for the backwards order my first intention was not to post all the steps but then I did haha
Edit:
Okay I did what the tutorial said but I'm still having troubles.
The weapon causing problems is a rifle so when positioning the weapon icon like the tut says I copied the rep_weap_inf_rifle info for it which is:
Position(-0.200247, 0.364485, 0.003263, "Viewport")
Rotation(1.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
I munge and the icon remains in the same position as before completely unchanged.
Regarding other parts of the tutorial where I might have messed up here is the work that I did.
Step 5:
Hidden/Spoiler:
Hidden/Spoiler:
Hidden/Spoiler:
Hidden/Spoiler:
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Replacing weapons
So than change the values, untill the weapon is at its right position. There is no value that's for all weapons. the dc15p for example was directly at the right position, where as the dc17 are not.
-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Re: Replacing weapons
The problem is that no matter how drastically I change the numbers and them munge the weapon icon stays in the same position.
I changed its rotation and hieght by a lot and nothing happened.
Position(2.400247, 7.364485, 0.003263, "Viewport")
Rotation(6.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
It remains aiming back at the player.
I changed its rotation and hieght by a lot and nothing happened.
Position(2.400247, 7.364485, 0.003263, "Viewport")
Rotation(6.538445, 95.690582, 4.455857)
Scale(0.800000, 0.800000, 0.800000)
It remains aiming back at the player.
-
JimmyAngler
- High General

- Posts: 837
- Joined: Mon Nov 04, 2013 10:37 am
- Projects :: Battlefront Halation
- xbox live or psn: none
- Location: Area 51
Re: Replacing weapons
this is my extraweapons.hud file for you to use as a reference.
my rep.req:
notice the last few lines.
Yours needs to follow this format in order to work.
Hidden/Spoiler:
Hidden/Spoiler:
Yours needs to follow this format in order to work.
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Replacing weapons
My idea: you moved your icon out of the view and the namemesh has an error. Please post the complete extra weapon. Do you have the com_inv_mesh in your rep msh folder??
-
MidnightSpirit
- Second Lance Corporal

- Posts: 100
- Joined: Mon Aug 15, 2011 1:29 pm
- xbox live or psn: ApocryphicDeath
Re: Replacing weapons
I haven't had time to test it out which is why I ask, but now that I can munge sides properly would moving the weapon icon off-screen mess anything up? It sounds easier than fitting it in perfectly (I have no problem doing that) just curious.
- Anakin
- Master of the Force

- Posts: 4817
- Joined: Sat Sep 19, 2009 11:37 am
- Projects :: RC Side Mod - Remastered - SWBF3 Legacy
- Location: Mos Espa (germany)
Re: Replacing weapons
i thought on removing the icons, too, but with it looked better
there are much other games with no weapon icon (SWRC for example). But i think this depends on how much weapon you have. if there are only 3 or 4 weapons you use, i think you wouldn't need any HUD icons. (you can remove the HUDTag = "my HUD Icon" line from the weapon odf, so you needn't make the extraweapon thing)
