Page 1 of 2

How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Wed Dec 31, 2008 2:08 pm
by impspy
I am trying to make a new unit, the Stormtrooper Commander from the Force unleashed.
Image

I would like the unit to

(a) have the advanced rifle,

(b) require 8 points to unlock.


however, I don't have the slightest clue about how to mod. which file(s) do I edit?


help please.


I do have the modding tools and a hex editor.

p.s. this is for battlefront 2

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Wed Dec 31, 2008 2:26 pm
by [RDH]Zerted
You need to follow the mod tool's getting started doc. Also read the jedi creation guide. It talks about how to create custom sides (and those are needed for custom units)

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Tue Jan 06, 2009 3:37 pm
by impspy
when i start up the mod toll application i get a binkw32.dll error.

And yes i did put the exe in the game data folder and run it, but all that did was start the game with a really small screen...

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Tue Jan 06, 2009 3:38 pm
by DarthD.U.C.K.
[RDH]Zerted wrote:You need to follow the mod tool's getting started doc. Also read the jedi creation guide. It talks about how to create custom sides (and those are needed for custom units)

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Tue Jan 06, 2009 7:31 pm
by impspy
DUH :oops:

thanks guys :thumbs:

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Tue Jan 06, 2009 8:11 pm
by Taivyx
If you ever do get confused by the jedi creation doc, you can always follow this alternative, detailed, IMO better tutorial.

Custom Sides: How To

And just for future reference, you can find more tutorials and helpful hints like this in the FAQ/Everything You Need To Know, a repository of tutorials and tricks for modding Battlefront 2 found throughout the years.

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Tue Jan 06, 2009 8:12 pm
by Fiodis
I'm not sure if the getting started doc mentions it, but that "small screen" thing is supposed to happen. That's not the modtool, that's the debugger....or whatever people call it around here. You use that if your map isn't working and you want to know why.


And yes, the FAQ thread is golden.

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Thu Jan 08, 2009 11:42 am
by impspy
Okay i followed all the instructions, added the unit to the coruscant conquest, but the change doesn't show up.

ReadDataFile("SIDE\\imp.lvl",
--Insert "imp_bldg_defensegridturret", once the odf has been set up
"imp_inf_rifleman",
"imp_com_stormtrooper",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_emperor")

-- set up teams
SetupTeams{
imp = {
team = IMP,
units = 32,
reinforcements = 150,
turret = "all_bldg_defensegridturret", --change this to imp_bldg_defensegridturret once the odf has been set up
soldier = { "imp_inf_rifleman",7, 25},
assault = { "imp_inf_rocketeer",1, 4},
engineer = { "imp_inf_engineer",1, 4},
sniper = { "imp_inf_sniper",1, 4},
officer = {"imp_inf_officer",1, 4},
special = { "imp_inf_dark_trooper",1, 4},

},
all = {
team = ALL,
units = 32,
reinforcements = 150,
turret = "all_bldg_defensegridturret",
soldier = { "all_inf_rifleman",7, 25},
assault = { "all_inf_rocketeer",1, 4},
engineer = { "all_inf_engineer",1, 4},
sniper = { "all_inf_sniper",1, 4},
officer = {"all_inf_officer",1, 4},
special = { "all_inf_wookiee",1, 4},
}
}
SetHeroClass(ALL, "all_hero_luke_jedi")
SetHeroClass(IMP, "imp_hero_emperor")

AddUnitClass(IMP, "imp_com_stormtroopr",1,4)

ucft
{
REQN
{
"lvl"
"imp_droid_probe"
"imp_fly_destroyer_dome"
"imp_fly_tiebomber_sc"
"imp_fly_tiefighter_sc"
"imp_fly_tieinterceptor"
"imp_fly_trooptrans"
"imp_fly_ai_trooptrans"
"imp_hero_bobafett"
"imp_hero_darthvader"
"imp_hero_emperor"
"imp_hover_fightertank"
"imp_hover_speederbike"
"imp_inf_dark_trooper"
"imp_inf_dark_trooper_hunt"
"imp_inf_engineer"
"imp_inf_engineer_snow"
"imp_inf_marine"
"imp_inf_officer"
"imp_inf_officer_hunt"
"imp_inf_officer_snow"
"imp_inf_officer_gray"
"imp_inf_pilot"
"imp_inf_pilot_atat"
"imp_inf_pilot_atst"
"imp_inf_pilot_tie"
"imp_inf_rifleman"
"imp_com_stormtrooper"
"imp_inf_rifleman_desert"
"imp_inf_rifleman_snow"
"imp_inf_rocketeer"
"imp_inf_rocketeer_snow"
"imp_inf_sniper"
"imp_inf_sniper_snow"
"imp_veh_remote_terminal"
"imp_walk_atat"
"imp_walk_atst"
"imp_walk_atst_jungle"
"imp_walk_atst_snow"

}
}

What am i doing wrong?

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Thu Jan 08, 2009 1:10 pm
by ThePanda
AddUnitClass(IMP, "imp_com_stormtroopr",1,4) you missed out the 'e' in stormtrooper

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Thu Jan 08, 2009 1:30 pm
by impspy
okay, but the LVL file isn't showing the changes

when i munge the directory doesn't make a new lvl file

and i have 64bit vista

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Thu Jan 08, 2009 7:09 pm
by Fiodis
Could be just me, but I think you have to move that line up to the IMP section. Otherwise, if you have it under the SetHeroClass functions, I doubt the LUA knows where to put the new unit.

But I'm a newbie myself to LUA work.

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Thu Jan 08, 2009 7:38 pm
by computergeek
You have to add dc: infront of IMP.lvl in your lua
like this

Code: Select all

ReadDataFile("SIDE\\dc:imp.lvl",

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Fri Jan 09, 2009 8:00 am
by impspy
Nope, not working.

Can vista affect this?

Because it does affect the ability to mod other games.

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Fri Jan 09, 2009 11:52 am
by 666rulerofclones
impspy wrote:Okay i followed all the instructions, added the unit to the coruscant conquest, but the change doesn't show up.
Hidden/Spoiler:
ReadDataFile("SIDE\\imp.lvl",
--Insert "imp_bldg_defensegridturret", once the odf has been set up
"imp_inf_rifleman",
"imp_com_stormtrooper",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_emperor")

-- set up teams
SetupTeams{
imp = {
team = IMP,
units = 32,
reinforcements = 150,
turret = "all_bldg_defensegridturret", --change this to imp_bldg_defensegridturret once the odf has been set up
soldier = { "imp_inf_rifleman",7, 25},
assault = { "imp_inf_rocketeer",1, 4},
engineer = { "imp_inf_engineer",1, 4},
sniper = { "imp_inf_sniper",1, 4},
officer = {"imp_inf_officer",1, 4},
special = { "imp_inf_dark_trooper",1, 4},

},
all = {
team = ALL,
units = 32,
reinforcements = 150,
turret = "all_bldg_defensegridturret",
soldier = { "all_inf_rifleman",7, 25},
assault = { "all_inf_rocketeer",1, 4},
engineer = { "all_inf_engineer",1, 4},
sniper = { "all_inf_sniper",1, 4},
officer = {"all_inf_officer",1, 4},
special = { "all_inf_wookiee",1, 4},
}
}
SetHeroClass(ALL, "all_hero_luke_jedi")
SetHeroClass(IMP, "imp_hero_emperor")

AddUnitClass(IMP, "imp_com_stormtroopr",1,4)

ucft
{
REQN
{
"lvl"
"imp_droid_probe"
"imp_fly_destroyer_dome"
"imp_fly_tiebomber_sc"
"imp_fly_tiefighter_sc"
"imp_fly_tieinterceptor"
"imp_fly_trooptrans"
"imp_fly_ai_trooptrans"
"imp_hero_bobafett"
"imp_hero_darthvader"
"imp_hero_emperor"
"imp_hover_fightertank"
"imp_hover_speederbike"
"imp_inf_dark_trooper"
"imp_inf_dark_trooper_hunt"
"imp_inf_engineer"
"imp_inf_engineer_snow"
"imp_inf_marine"
"imp_inf_officer"
"imp_inf_officer_hunt"
"imp_inf_officer_snow"
"imp_inf_officer_gray"
"imp_inf_pilot"
"imp_inf_pilot_atat"
"imp_inf_pilot_atst"
"imp_inf_pilot_tie"
"imp_inf_rifleman"
"imp_com_stormtrooper"
"imp_inf_rifleman_desert"
"imp_inf_rifleman_snow"
"imp_inf_rocketeer"
"imp_inf_rocketeer_snow"
"imp_inf_sniper"
"imp_inf_sniper_snow"
"imp_veh_remote_terminal"
"imp_walk_atat"
"imp_walk_atst"
"imp_walk_atst_jungle"
"imp_walk_atst_snow"

}
}
What am i doing wrong?
maybe you should change the imp_com_stormtrooper to imp_inf_commander or something like that.

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Fri Jan 09, 2009 12:36 pm
by Aman/Pinguin
666rulerofclones wrote:maybe you should change the imp_com_stormtrooper to imp_inf_commander or something like that.

As long as the files have that name it doesn't matter. You can give them any name you want.

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Fri Jan 09, 2009 4:39 pm
by Fiodis
I spent weeks trying to get my own units in until I remembered that they didn't have a .req in the side's .req folder.


Check for imp_com_stormtrooper.req in Sides\imp\req. And I mean inside the req folder, not the file. If you don't have one, make one.

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Fri Jan 09, 2009 6:32 pm
by impspy
yeah i have an entry there.
Hidden/Spoiler:
ucft
{
REQN
{
"model"
"imp_1st_stormtrooper"
}
}

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Fri Jan 09, 2009 6:39 pm
by computergeek
No, the req should contain

Code: Select all

ucft
{
    REQN
    {
        "class"
        "imp_com_stormtrooper"
    }
}

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Fri Jan 09, 2009 8:12 pm
by impspy
thanks, but still no luck; the munge doesn't create the new files

Re: How do I make a new unit (TFU Stormtrooper Commander)?

Posted: Fri Jan 09, 2009 11:53 pm
by 666rulerofclones
what is the .odf name for the commander? it NEVER works if the .odf file and .req file have different names. is it in your imp.req file? wierd, what about the .odf file, this is probably a dumb queston, but does your sides folder contain the .odf/.msh/.tga/.option/.req necessary? check to make sure NOTHING is missing. also check to make sure there are NO spelling errors in ANY of the files. if there is even ONE spelling error, the whole thing wont work.