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.
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)
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,...
Re: Replacing weapons
Posted: Thu Jan 02, 2014 2:28 pm
by MidnightSpirit
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.
Re: Replacing weapons
Posted: Thu Jan 02, 2014 4:46 pm
by Anakin
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
Re: Replacing weapons
Posted: Thu Jan 02, 2014 7:16 pm
by MidnightSpirit
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.
Re: Replacing weapons
Posted: Thu Jan 02, 2014 8:43 pm
by Noobasaurus
Do you have "dc:" before the side data is loaded in your lua?
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.
Re: Replacing weapons
Posted: Fri Jan 03, 2014 11:14 pm
by MidnightSpirit
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?
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:
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:
[code] TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
Sorry for the backwards order my first intention was not to post all the steps but then I did haha
Re: Replacing weapons
Posted: Sat Jan 04, 2014 7:16 am
by Anakin
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.
Re: Replacing weapons
Posted: Sat Jan 04, 2014 3:46 pm
by MidnightSpirit
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.
notice the last few lines.
Yours needs to follow this format in order to work.
Re: Replacing weapons
Posted: Sat Jan 04, 2014 6:39 pm
by Anakin
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??
Re: Replacing weapons
Posted: Thu Jan 09, 2014 12:39 am
by MidnightSpirit
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.
Re: Replacing weapons
Posted: Thu Jan 09, 2014 5:33 am
by Anakin
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)