First attempt @ custom sides, need help

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

Post Reply
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

First attempt @ custom sides, need help

Post by Tears2Roses »

Hello again. I was attempting to make custom sides using this http://www.gametoast.com/forums/viewtop ... t=12729%20 tutorial as far as I know, I did everything right, aside from odf/msh/tga etc. What I don't know is which ODF goes with which set of TGA's, mesh, and option files. Also, im not sure which are MANDATORY ( you need these for the character to show up and run ) and OPTIONAL ( things that I can change, maybe like weapons? im not entirely sure. ) So in the tutorial I go to bf2_modtools\data_ABC\sides\ABC\ and make the mesh, tga, etc folders. I only put a few things in the these folders and that is:
- in the ODF folder: imp_inf_rifleman.odf, imp_inf_sniper_rifle.odf, imp_inf_sniper_rifle.ord
-in the mesh folder: imp_sniper_rifle.tga
in the req folder I put abc_inf_supr_troopr.req as a text file and in it I put

Code: Select all

ufct
{   
    REQN
   {
        "class"
        "imp_inf_rifleman"
   }
}
then back in the data_ABC\sides\ABC I made a new text file called abc.req and whats inside:

Code: Select all

ucft
{
    REQN
   {
        "lvl"
        "abc_inf_supr_tropr"
   }
}
           

I finish doing the tutorial, I munge, then get this error log:

Code: Select all

C:\BF2_ModTools\data_HTW\_BUILD\Common\..\..\..\ToolsFL\Bin\luac.exe: ..\..\common\scripts\HTW\HTWg_con.lua:88: `)' expected (to close `(' at line 85) near `ReadDataFile'
ERROR[scriptmunge scripts\HTW\HTWg_con.lua]:Could not read input file.ERROR[scriptmunge scripts\HTW\HTWg_con.lua]:Could not read input file. [continuing]
   2 Errors    0 Warnings

ERROR[levelpack mission\HTWg_con.req]:Expecting bracket, but none was found.
File : munged\pc\htwg_con.script.req(1)...

ucft <--
ERROR[levelpack mission\HTWg_con.req]:Expecting bracket, but none was found.
File : munged\pc\htwg_con.script.req(1)...

ucft <--

   2 Errors    0 Warnings

HTW is my 3 letter map name, htwg_con is the script I modified durring the tutorial. If the script is usefull, let me know I will get it posted. Also, if someone can help me with my side ( im thinking of a green storm trooper, with the default assult rifle, a sniper, grenades, and health to start) anything is much apreciated :mrgreen:
User avatar
Firefang
Major
Major
Posts: 518
Joined: Mon Nov 15, 2010 8:55 pm
Location: California

Re: First attempt @ custom sides, need help

Post by Firefang »

Could you post the lua? Since that error is lua related.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: First attempt @ custom sides, need help

Post by Tears2Roses »

Im having troubles posting the LUA, but as soon as I can I will let you know.

EDIT: this is the LUA. The parts I changed are: ReadDataFile("dc:SIDE\\htw.lvl", "htw_inf_supr_tropr and AddUnitClass(IMP, "htw_inf_supr_tropr",1,4) in the log. I can't highlight or bold the parts because of a scroll bar problem ( if thats what its called.)I made a topic found in the misc section of the forums, please help me fix it. Same forum as the " happy birthday thread" if you don't know what I mean.

Anyways, the LUA:

Code: Select all

--This sets up the actual objective.  This needs to happen after cp's are defined
    conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, 
                                     textATT = "game.modes.con", 
                                     textDEF = "game.modes.con2",
                                     multiplayerRules = true}
    
    --This adds the CPs to the objective.  This needs to happen after the objective is set up
    conquest:AddCommandPost(cp1)
    conquest:AddCommandPost(cp2)
    conquest:AddCommandPost(cp3)
    conquest:AddCommandPost(cp4)    
    conquest:AddCommandPost(cp5)
    conquest:Start()

    EnableSPHeroRules()
    
 end


---------------------------------------------------------------------------
-- FUNCTION:    ScriptInit
-- PURPOSE:     This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES:       The name, 'ScriptInit' is a chosen convention, and each
--              mission script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptInit()
    
    ReadDataFile("ingame.lvl")



    SetMaxFlyHeight(40)
	SetMaxPlayerFlyHeight(40)


	SetMemoryPoolSize ("ClothData",20)
    SetMemoryPoolSize ("Combo",50)              -- should be ~ 2x number of jedi classes
    SetMemoryPoolSize ("Combo::State",650)      -- should be ~12x #Combo
    SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
    SetMemoryPoolSize ("Combo::Condition",650)  -- should be a bit bigger than #Combo::State
    SetMemoryPoolSize ("Combo::Attack",550)     -- should be ~8-12x #Combo
    SetMemoryPoolSize ("Combo::DamageSample",6000)  -- should be ~8-12x #Combo::Attack
    SetMemoryPoolSize ("Combo::Deflect",100)     -- should be ~1x #combo  
    
    
    ReadDataFile("sound\\tat.lvl;tat2gcw")
    ReadDataFile("SIDE\\all.lvl",
                    "all_inf_rifleman",
                    "all_inf_rocketeer",
                    "all_inf_sniper",
                    "all_inf_engineer",
                    "all_inf_officer",
                    "all_inf_wookiee",
                    "all_hero_hansolo_tat")
                    
    ReadDataFile("dc:SIDE\\htw.lvl",
                    "htw_inf_supr_tropr"
    
    ReadDataFile("SIDE\\imp.lvl",
                    "imp_inf_rifleman",
                    "imp_inf_rocketeer",
                    "imp_inf_engineer",
                    "imp_inf_sniper",
                    "imp_inf_officer",
                    "imp_inf_dark_trooper",
                    "imp_hero_bobafett",
                    "imp_fly_destroyer_dome" )

	ReadDataFile("SIDE\\tur.lvl",
						"tur_bldg_tat_barge",	
						"tur_bldg_laser")	
 
	SetupTeams{
		all = {
			team = ALL,
			units = 20,
			reinforcements = 150,
			soldier	= { "all_inf_rifleman",9, 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},

		},
		imp = {
			team = IMP,
			units = 20,
			reinforcements = 150,
			soldier	= { "imp_inf_rifleman",9, 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},
		},
	}
    
    SetHeroClass(ALL, "all_hero_hansolo_tat")
    SetHeroClass(IMP, "imp_hero_bobafett")
    
    AddUnitClass(IMP, "htw_inf_supr_tropr",1,4)
    --  Level Stats
    ClearWalkers()
    AddWalkerType(0, 0) -- special -> droidekas
    AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
    AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
    AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
    
    local weaponCnt = 1024
    SetMemoryPoolSize("Aimer", 75)
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: First attempt @ custom sides, need help

Post by CressAlbane »

Code: Select all

 ReadDataFile("dc:SIDE\\htw.lvl",
                    "htw_inf_supr_tropr"
SHOULD be

Code: Select all

 ReadDataFile("dc:SIDE\\htw.lvl",
                    "htw_inf_supr_tropr")
modmaster13
General
General
Posts: 777
Joined: Wed Aug 18, 2010 4:23 pm
Games I'm Playing :: COD SWBF
xbox live or psn: KrypticcElementt
Location: Twitter @_KrypticElement
Contact:

Re: First attempt @ custom sides, need help

Post by modmaster13 »

ERROR[levelpack mission\HTWg_con.req]:Expecting bracket, but none was found.
File : munged\pc\htwg_con.script.req(1)...
Usually if there is an error like this, there is a missing bracket in the following file shaded in yellow.
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: First attempt @ custom sides, need help

Post by Tears2Roses »

CressAlbane wrote:

Code: Select all

 ReadDataFile("dc:SIDE\\htw.lvl",
                    "htw_inf_supr_tropr"
SHOULD be

Code: Select all

 ReadDataFile("dc:SIDE\\htw.lvl",
                    "htw_inf_supr_tropr")
Thanks.

Now as far as the correct ODF/mesh/textures, etc. go, can anyone help me with that? Also I'm going to download gimp so I can change the paint on my character. But, if I wanted to make him human, or nemodian, etc. How would I do that?
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: First attempt @ custom sides, need help

Post by CressAlbane »

To change the SHAPE of the player, you need a model (msh file)
To change the COLOR of the player, you need a skin (tga file)
To change the PROPERTIES of the player, you need an (odf file)

Have you read gettingstarted in the modtools documentation? If not, I suggest doing so.
nmycon
Private Recruit
Posts: 20
Joined: Mon Apr 13, 2009 2:57 pm
Projects :: Star Wars Movie Mods
Games I'm Playing :: LA Noire MLB 11 BF2
Location: Toronto, ON

Re: First attempt @ custom sides, need help

Post by nmycon »

Tears2Roses wrote:Now as far as the correct ODF/mesh/textures, etc. go, can anyone help me with that? Also I'm going to download gimp so I can change the paint on my character. But, if I wanted to make him human, or nemodian, etc. How would I do that?
Start off in the soldier's ODF file, it will tell you all the names of the other ODF, MSH and TGA files you need.

- Every unit has a parent ODF file (imp_inf_default_rifleman for example) that sets weapons for that unit.
- You will need to copy all of the weapon ODFs, MSHs and TGAs required in the class' "default" ODF
- Look for the geometry names in the soldier's ODF to find out what MSH file you need for the model.
- Open the MSH file with a text editor (I use PSPad), search for TGA to find all of the textures.
- If the character uses grenades, you also need the explosion and ordinance ODFs. (_exp.odf, _ord.odf)

It's tricky at first, but you'll get the hang of it. Just copy every single file referenced within the soldier's ODF, then go through those files and copy every file referenced within them and so on.

A single unit (e.g. sniper) usually requires around 30-40 files (including animations, textures, models and ODFs for both the model itself, the weapons and their ordinances and explosions).

And as CressAlbane mentioned, to change your unit model to something that isn't included in the assets, you will need to create the model yourself using a 3D modeling program, such as XSI. Not something I'd recommend looking right now, as your just learning how to create your own sides with the game's assets, it gets all the more confusing making your own animations, weapons and whatnot.
User avatar
acryptozoo
Master Bounty Hunter
Master Bounty Hunter
Posts: 1642
Joined: Wed Jun 03, 2009 3:14 pm
Projects :: Yavin Mappack
Games I'm Playing :: Homeworld 2
xbox live or psn: acryptozoo
Location: in the jungles of Yavin IV
Contact:

Re: First attempt @ custom sides, need help

Post by acryptozoo »

Tears2Roses wrote: Now as far as the correct ODF/mesh/textures, etc. go, can anyone help me with that? Also I'm going to download gimp so I can change the paint on my character. But, if I wanted to make him human, or nemodian, etc. How would I do that?
you could make him a nemodian by painting his face and ..etc (its been done)
or download icemembers nemodian otherwise you would have to use XSI
User avatar
Tears2Roses
Chief Warrant Officer
Chief Warrant Officer
Posts: 336
Joined: Thu Jul 07, 2011 9:20 am
Projects :: Oh some random stuff who knows
Games I'm Playing :: SWBF2
xbox live or psn: PC beats xbox.

Re: First attempt @ custom sides, need help

Post by Tears2Roses »

Thanks guys. Now, I have a mesh viewer, but how do I get my character to show up in the viewer? That way I can take a good look at it to see what it will look like ingame/post on GT.

Also, if I wanted to edit my sniper, I would find the snipers TGA, then edit it with gimp save, and do the LUA/etc. ( I can do the LUA/etc w/ a tut. ) right?
User avatar
acryptozoo
Master Bounty Hunter
Master Bounty Hunter
Posts: 1642
Joined: Wed Jun 03, 2009 3:14 pm
Projects :: Yavin Mappack
Games I'm Playing :: Homeworld 2
xbox live or psn: acryptozoo
Location: in the jungles of Yavin IV
Contact:

Re: First attempt @ custom sides, need help

Post by acryptozoo »

Tears2Roses wrote:Thanks guys. Now, I have a mesh viewer, but how do I get my character to show up in the viewer? That way I can take a good look at it to see what it will look like ingame/post on GT.
Just drag the units .msh into the viewer

Also, if I wanted to edit my sniper, I would find the snipers TGA, then edit it with gimp save, and do the LUA/etc. ( I can do the LUA/etc w/ a tut. ) right?
yes and for the LUA stuff if you already have the sniper ingame (with a custom side) you wouldnt have to do any lua stuff
Post Reply