How do i change weapons? [Solved]
Moderator: Moderators
- rywar40
- Private Second Class
- Posts: 71
- Joined: Sun May 29, 2011 7:01 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Shili (home of togruta)
How do i change weapons? [Solved]
How to change the weapons. Like giving a clone trooper a lightsaber instead of a blaster :clone:
-
THEWULFMAN
- Space Ranger
- Posts: 5557
- Joined: Tue Aug 17, 2010 3:30 pm
- Projects :: Evolved 2
- Location: Columbus, Ohio
- Contact:
Re: how to change weapons
Welcome to Gametoast and Welcome to the wonderful world of modding.rywar40 wrote:How to change the weapons. Like giving a clone trooper a lightsaber instead of a blaster :clone:
In order to understand how custom units and sides work, you should look at the stock side assets, thats what I did to learn, I just spent several hours going over the different files, opening them and seeing how they are set up.
Units, weapons, props, vehicles all have ODF files associated with them. ODF stands for Object Defination File. These files are what you want to edit to give a clone a lightsaber. Go to Assets/sides/rep/odf and look through the ODFs there. I suggest copying the whole REP folder to your DATA_???/sides folder, but be sure to also copy over the assets/sides/common folder too, as you always need that when making custom sides. You should also visit the modding FAQ
- rywar40
- Private Second Class
- Posts: 71
- Joined: Sun May 29, 2011 7:01 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Shili (home of togruta)
Making A Side
thanx :greeny:
EDIT
Ok, I have been working on adding a unit to a side for example I tried to add a jedi padawan from the JED side to the REP side. I typed in The AddUnitClass thing and have dc: in republic side but it didn't pop up someone please help me. :clone:
EDIT
Ok, I have been working on adding a unit to a side for example I tried to add a jedi padawan from the JED side to the REP side. I typed in The AddUnitClass thing and have dc: in republic side but it didn't pop up someone please help me. :clone:
-
Marth8880
- Resistance Leader
- Posts: 5042
- Joined: Tue Feb 09, 2010 8:43 pm
- Projects :: DI2 + Psychosis
- xbox live or psn: Marth8880
- Location: Edinburgh, UK
- Contact:
Re: How do i change weapons?
Please post your LUA.
- rywar40
- Private Second Class
- Posts: 71
- Joined: Sun May 29, 2011 7:01 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Shili (home of togruta)
Re: How do i change weapons?
Hidden/Spoiler:
-
CalvaryCptMike
- Captain

- Posts: 476
- Joined: Sat Feb 19, 2011 3:10 pm
- Projects :: Nothing--absolutely nothing
- Location: Freed by alien robots, now living on Mars
- Contact:
Re: How do i change weapons?
AddUnitClass(REP, "jed_knight_01", 1, 4 )
Fixed
Fixed
- sim-al2
- 2nd Lieutenant

- Posts: 412
- Joined: Mon Jul 06, 2009 10:26 pm
- Projects :: Mapping on occasion
- Location: In the cockpit of some vehicle...
Re: How do i change weapons?
Code: Select all
ReadDataFile(dc:Side\\mod.lvl
"jed_knight_01")Code: Select all
ReadDataFile("dc:Side\\mod.lvl",
"jed_knight_01")- rywar40
- Private Second Class
- Posts: 71
- Joined: Sun May 29, 2011 7:01 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Shili (home of togruta)
Someone give me a tutorial on add a unit to a shipped side
Ok I Did the Following and it still didn't work. WHile Munging i got two errors :C:\BF2_ModTools\data_HFU\_BUILD\Common\..\..\..\ToolsFL\Bin\luac.exe: ..\..\common\scripts\HFU\HFUc_con.lua:85: unfinished string near `"'
ERROR[scriptmunge scripts\HFU\HFUc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\HFU\HFUc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
ERROR[levelpack mission\HFUc_con.req]:Expecting bracket, but none was found.
File : munged\pc\hfuc_con.script.req(1)...
ucft <--
ERROR[levelpack mission\HFUc_con.req]:Expecting bracket, but none was found.
File : munged\pc\hfuc_con.script.req(1)...
ucft <--
All Also Have the .msh files and the odf. and the sides req with just JED_KNIGHT_01 with ucft thing too. someone please help if you need a file posted let me know
EDIT
I'm edited a shipped side if you are wondering sorry if i didn't mention before
EDIT2
Ok I have been working on adding a jedi knight from jed side to the republic side for my map I have followed many tutorials but they never ever work can someone please teach me how to do this :atatpilot:
Double posting is against the RULES; please EDIT your post instead. And also, please do not post the same thing in two seperate threads. -Staff
ERROR[scriptmunge scripts\HFU\HFUc_con.lua]:Could not read input file.ERROR[scriptmunge scripts\HFU\HFUc_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
ERROR[levelpack mission\HFUc_con.req]:Expecting bracket, but none was found.
File : munged\pc\hfuc_con.script.req(1)...
ucft <--
ERROR[levelpack mission\HFUc_con.req]:Expecting bracket, but none was found.
File : munged\pc\hfuc_con.script.req(1)...
ucft <--
All Also Have the .msh files and the odf. and the sides req with just JED_KNIGHT_01 with ucft thing too. someone please help if you need a file posted let me know
EDIT
I'm edited a shipped side if you are wondering sorry if i didn't mention before
EDIT2
Ok I have been working on adding a jedi knight from jed side to the republic side for my map I have followed many tutorials but they never ever work can someone please teach me how to do this :atatpilot:
Double posting is against the RULES; please EDIT your post instead. And also, please do not post the same thing in two seperate threads. -Staff
-
CalvaryCptMike
- Captain

- Posts: 476
- Joined: Sat Feb 19, 2011 3:10 pm
- Projects :: Nothing--absolutely nothing
- Location: Freed by alien robots, now living on Mars
- Contact:
Re: How do i change weapons?
Be patient, it took me a week to get my first side working.
Take that quotation mark out.ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
"
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
- rywar40
- Private Second Class
- Posts: 71
- Joined: Sun May 29, 2011 7:01 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Shili (home of togruta)
Re: How do i change weapons?
I'm sorry I'm just frustrated 
It didn't work there must be something i missed
It didn't work there must be something i missed
-
CalvaryCptMike
- Captain

- Posts: 476
- Joined: Sat Feb 19, 2011 3:10 pm
- Projects :: Nothing--absolutely nothing
- Location: Freed by alien robots, now living on Mars
- Contact:
Re: How do i change weapons?
Okay, well the error you posted a bit ago was a script error, did that error go away? ( if you don't get what I mean here's it in uber-simple language: "Did-You-Get-An-Error-During-Munging-?" ) by saying it simply i'm not implying your stupid, it's just that sometimes the jargon for beginners is confusing and needs to be simply explained
Did you munge your side? Meaning munging with "Common" unchecked and the side dropdown box set to "JED"?
Does the level work and your guy not appear OR does it crash?
Did you munge your side? Meaning munging with "Common" unchecked and the side dropdown box set to "JED"?
Does the level work and your guy not appear OR does it crash?
- rywar40
- Private Second Class
- Posts: 71
- Joined: Sun May 29, 2011 7:01 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Shili (home of togruta)
Re: How do i change weapons?
I got it to work!!!
thanx :themoreyouknow:
