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

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

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

Post 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
Last edited by impspy on Wed Dec 31, 2008 4:00 pm, edited 2 times in total.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

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

Post 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)
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

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

Post 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...
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

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

Post 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)
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

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

Post by impspy »

DUH :oops:

thanks guys :thumbs:
Taivyx
2008 Best Games Related Avatar
Posts: 1706
Joined: Thu Jun 07, 2007 3:34 pm
Projects :: Terra Strife - discontinued
Games I'm Playing :: none
xbox live or psn: No gamertag set
Contact:

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

Post 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.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

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

Post 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.
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

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

Post 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?
User avatar
ThePanda
Private Second Class
Posts: 74
Joined: Sat Dec 20, 2008 4:22 pm

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

Post by ThePanda »

AddUnitClass(IMP, "imp_com_stormtroopr",1,4) you missed out the 'e' in stormtrooper
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

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

Post 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
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

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

Post 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.
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

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

Post by computergeek »

You have to add dc: infront of IMP.lvl in your lua
like this

Code: Select all

ReadDataFile("SIDE\\dc:imp.lvl",
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

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

Post by impspy »

Nope, not working.

Can vista affect this?

Because it does affect the ability to mod other games.
User avatar
666rulerofclones
Command Sergeant Major
Command Sergeant Major
Posts: 281
Joined: Fri Aug 08, 2008 1:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Badger State!

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

Post 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.
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

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

Post 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.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

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

Post 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.
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

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

Post by impspy »

yeah i have an entry there.
Hidden/Spoiler:
ucft
{
REQN
{
"model"
"imp_1st_stormtrooper"
}
}
computergeek
General
General
Posts: 770
Joined: Thu Jun 07, 2007 6:26 pm
Projects :: Halo Warthog vehicle for SWBF2
Games I'm Playing :: Bioware RPGs - Halo
xbox live or psn: No gamertag set
Location: Far Far away....

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

Post by computergeek »

No, the req should contain

Code: Select all

ucft
{
    REQN
    {
        "class"
        "imp_com_stormtrooper"
    }
}
User avatar
impspy
Captain
Captain
Posts: 493
Joined: Wed Dec 31, 2008 1:54 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Pax Empiricae; check WIP

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

Post by impspy »

thanks, but still no luck; the munge doesn't create the new files
User avatar
666rulerofclones
Command Sergeant Major
Command Sergeant Major
Posts: 281
Joined: Fri Aug 08, 2008 1:30 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The Badger State!

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

Post 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.
Post Reply