How do I give a jet trooper a sniper rifle? (solved!)

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

fat_walrus

RE: hmm...

Post by fat_walrus »

My game's crashing. I replaced the REP.lvl with MY rep.lvl. (LOTS OF PICS AHEAD!!)

Here's my LUA:

Code: Select all

  SetMemoryPoolSize ("Combo::Deflect",100)     -- should be ~1x #combo  
    
    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_jettrooper2",
                             "rep_hero_anakin")
    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")
                             
                             
    ReadDataFile("SIDE\\tur.lvl", 
    			"tur_bldg_laser",
    			"tur_bldg_tower")          
                             
	SetupTeams{
		rep = {
			team = REP,
			units = 20,
			reinforcements = 150,
			soldier  = { "rep_inf_ep3_rifleman",9, 25},
			assault  = { "rep_inf_ep3_rocketeer",1, 4},
			engineer = { "rep_inf_ep3_engineer",1, 4},
			sniper   = { "rep_inf_ep3_sniper",1, 4},
			officer = {"rep_inf_ep3_officer",1, 4},
			special = { "rep_inf_ep3_jettrooper2",1, 4},
	        
		},
		cis = {
			team = CIS,
			units = 20,
			reinforcements = 150,
			soldier  = { "cis_inf_rifleman",9, 25},
			assault  = { "cis_inf_rocketeer",1, 4},
			engineer = { "cis_inf_engineer",1, 4},
			sniper   = { "cis_inf_sniper",1, 4},
			officer = {"cis_inf_officer",1, 4},
			special = { "cis_inf_droideka",1, 4},
		}
	}
     
    SetHeroClass(CIS, "cis_hero_darthmaul")
    SetHeroClass(REP, "rep_hero_anakin")
   

    --  Level Stats
    --  ClearWalkers()

Here's some pics:

(PLEASE LOOK AT THESE CAREFULLY!!)

My odf files:

Image

part of my jettrooper2.odf

Image

My msh files:

Image

My jettrooper2 msh:

Image


My Sides\rep\repshell file:

Image


Is this where you place the .lvl files?

Image

Please look over these carefull and tell me if you see anything wrong. If you need anything eles I will gladly get more specific pics.
User avatar
PR-0927
Old School Staff
Posts: 844
Joined: Fri Dec 31, 2004 9:15 pm
Location: Kent, OH, U.S.A.

RE: hmm...

Post by PR-0927 »

You shouldn't have edited the .msh unless you really know how to. That may be the problem. You need a hex editor like UltraEdit32. Also, when hex editing, never add or remove the number of characters. You added a "2" instead of replacing a character and making it, say...REP_EP3JetTroope2. By the way, I just noticed, you shouldn't have edited that line at all. That isn't a .tga line at all!! THAT is what is most probably crashing it!!

- Majin Revan
fat_walrus

RE: hmm...

Post by fat_walrus »

So which line do I need to edit? *gets excited*



Please look at my msh folder:



Image



1) do I need these files?

2) do I need to change them in any way?
User avatar
PR-0927
Old School Staff
Posts: 844
Joined: Fri Dec 31, 2004 9:15 pm
Location: Kent, OH, U.S.A.

RE: hmm...

Post by PR-0927 »

Wow man, you messed that stuff up.

The .msh files should also contain the same number of characters. Try rep_inf_ep3jettroope2 for the .msh and its option file (and the low resolution ones). The .tga names should be rep_inf_ep3_jettroope2.tga and rep_inf_ep3jettroope2jetpack.tga. You will have to remove those .msh files (all of them for this model) and recopy them from the assets. Then, rename them as I have detailed. If you hex edit them, which I assume you will, find the .tga lines and edit their names to match your .tga file names (keeping in mind that the character amount must remain the same).

Load up everything, and it WILL work, considering that you do EVERYTHING correctly.

- Majin Revan
fat_walrus

RE: hmm...

Post by fat_walrus »

If you hex edit them, which I assume you will, find the .tga lines and edit their names to match your .tga file names (keeping in mind that the character amount must remain the same).
What is hexedit anyway? I've never ever known what that was.

Anyway, I'll try that then post my results here.

PS, that last line is a little confusing but I think I can get it :D
fat_walrus

Post by fat_walrus »

it crashed. I'll make some more pics if you need?
fat_walrus

heres some pics

Post by fat_walrus »

Why don't you take a look at these things:

My MSH folder


Image


My Trooper MSHs (there is one not included but its like really down far, but kinda the same)

Image


Here's the low thing

Image


My odfs


Image

My repshell.req (please look at this one)

Image

And last but not least my LUA:

Code: Select all

    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\\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_jettroope2",
                             "rep_hero_anakin")
    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")
                             
                             
    ReadDataFile("SIDE\\tur.lvl", 
    			"tur_bldg_laser",
    			"tur_bldg_tower")          
                             
	SetupTeams{
		rep = {
			team = REP,
			units = 20,
			reinforcements = 150,
			soldier  = { "rep_inf_ep3_rifleman",9, 25},
			assault  = { "rep_inf_ep3_rocketeer",1, 4},
			engineer = { "rep_inf_ep3_engineer",1, 4},
			sniper   = { "rep_inf_ep3_sniper",1, 4},
			officer = {"rep_inf_ep3_officer",1, 4},
			special = { "rep_inf_ep3_jettroope2",1, 4},
	        
		},
		cis = {
			team = CIS,
			units = 20,
			reinforcements = 150,
			soldier  = { "cis_inf_rifleman",9, 25},
			assault  = { "cis_inf_rocketeer",1, 4},
			engineer = { "cis_inf_engineer",1, 4},
			sniper   = { "cis_inf_sniper",1, 4},
			officer = {"cis_inf_officer",1, 4},
			special = { "cis_inf_droideka",1, 4},
		}
	}
     
    SetHeroClass(CIS, "cis_hero_darthmaul")
    SetHeroClass(REP, "rep_hero_anakin")
fat_walrus

RE: heres some pics

Post by fat_walrus »

Figured it out. Change my LUA a bit, and added a Common folder to the Sides and munged. FINALLY AFTER 2 DAYS OF LABOR!! >.<
busterkinkade

RE: heres some pics

Post by busterkinkade »

Just one question, why did you modify the .msh files? All you needed to do was edit the .odf files, nothing else, and if your just copying over the rep.lvl and the repshell.lvl and then running a game on any shipped map, then the changes to the lua will do nothing.
fat_walrus

RE: heres some pics

Post by fat_walrus »

I am not a serious game modder, I'm a serious-game-modder in training =P. I don't know much about mshs or hexediting(whatever that is) so that's why I thought I needed to edit the msh files.

I didn't end up copying the rep.lvl and repshell.lvl, I ended up just loading ("dc:SIDE\\rep") as a seperate side. Now I am experimenting with giving my unit a lightsabre
Post Reply