Page 1 of 2

msh files?

Posted: Thu Mar 05, 2009 7:28 pm
by jedigonebad
Hi, all, I'm new to the art of modding and was just following a tutorial to guide me through the process. I would like to make a jedi with luke's combo, mace's pound and obi's rush attack. However, I can't find the msh files pertaining to luke's (or mundi's in any case) attack. And I sure as heck don't know hex editing to get them from the lvl files haha...

Is there any way I can find them?

Thanks a bunch!

Re: msh files?

Posted: Thu Mar 05, 2009 8:26 pm
by Fiodis
...And now hello to GT! Did you check out the FAQ thread in this forum? There's loads of good info there on combo files. I believe a guy called MetalRancor made an excellent tutorial, form which I learned. I'll take a moment to see if I can find a link to it.


And you won't need to directly edit .lvl files.


EDIT - Aha!

Also, Luke's anims are the default saber anims. I believe if you are missing an anim, the game will borrow Luke's to fill the slot (although I'm not entirely sure, there were instances were a missing anim caused a CTD).

However, if you want to munge the Luke ones in along with the others just to be safe, I believe they are found in
Hidden/Spoiler:
C:\BF2_ModTools\assets\Animations\SoldierAnimationBank\human_sabre
Or at least so it is on my computer.

EDIT 2 - Off-topic: woah, 800 posts. That was fast.

Re: msh files?

Posted: Thu Mar 05, 2009 9:48 pm
by jedigonebad
I see, thanks for the link, it's very helpful indeed. I had another question, when I'm munging my msh's, the log says that:

"(animation) as a framerate <29.970030> that isn't 30fps. Framerate correction code has not been done yet"

Can I go on or do I have to fix this somehow?

Re: msh files?

Posted: Thu Mar 05, 2009 9:52 pm
by Fiodis
Woah, that's picky. It's looking for 30 fps and it complains about 29.97....

Not sure what to do here, I never saw something like that. Which log was it, ZenAsset or BinMunge? It sounds like a ZenAsset thing, but ZenAsset usually would have something like "WARNING" or "ERROR" in front of the message. You can safely ignore warnings, it's the errors that throw you off.

Or is it the Mungelog that complains? The mungelog is any log you get while running Visual Munge. ZenAsset and BinMunge are two error logs you get while running Munge.bat.

Your error sounds to me like it's a warning, if you don't get a CTD you can ignore it for now.

Re: msh files?

Posted: Thu Mar 05, 2009 9:56 pm
by jedimoose32
jedigonebad wrote: "(animation) as a framerate <29.970030> that isn't 30fps. Framerate correction code has not been done yet"

Can I go on or do I have to fix this somehow?
This happens to me a lot, too. Don't worry about it. Whenever I get this I just continue and everything works just fine. :wink:

Welcome to Gametoast.

Re: msh files?

Posted: Thu Mar 05, 2009 10:36 pm
by Fiodis
Eh, so I gues it is just a warning.

A small tip: you can attach effects to your custom combos, such as the Emperor's or Windu's jump attacks. Take a peek at their combos, at the part that talks about jump attacks. Or maybe it's in the ODF, I'm not sure. It should be a combo thing, though.

Re: msh files?

Posted: Thu Mar 05, 2009 10:57 pm
by jedigonebad
yeah, I just added (hopefully) mace's explosion. can someone take a quick peek to see if it's okay?


[ExplosionClass]
ClassLabel = "explosion"

[Properties]

// Important
HurtOwner = 0

Push = "8.0"
PushRadiusInner = "2.5"
PushRadiusOuter = "7.5"

Shake = "0.6"
ShakeLength = "0.60"
ShakeRadiusInner = "5.0"
ShakeRadiusOuter = "5.0"

LifeSpan = "0.3"
Damage = "400.0"
DamageRadiusInner = "0.0"
DamageRadiusOuter = "8.0"
Effect = "com_sfx_lukesmash"
ArmorScale = "1.0"
HealthScale = "1.0"
ShieldScale = "0.5"

VehicleScale = "3.0"

SoundProperty = "mace_quake_exp"


And also, How do I "activate" my add-on? I'm quite sure I have all the nitty-gritty file writing done (combos, otfs, reqs, etc) and the lvls are in my actual addon folder, but I'm told to edit the "scripts". I see a "script file ("addme.script"), but I can't open it...Is that the file that activates my new jedi? And another thing...I noticed I didn't need to make or apply skins and such. Will I still need to do that?

Re: msh files?

Posted: Thu Mar 05, 2009 11:09 pm
by Maveritchell
jedigonebad wrote:yeah, I just added (hopefully) mace's explosion. can someone take a quick peek to see if it's okay?

Hidden/Spoiler:
[ExplosionClass]
ClassLabel = "explosion"

[Properties]

// Important
HurtOwner = 0

Push = "8.0"
PushRadiusInner = "2.5"
PushRadiusOuter = "7.5"

Shake = "0.6"
ShakeLength = "0.60"
ShakeRadiusInner = "5.0"
ShakeRadiusOuter = "5.0"

LifeSpan = "0.3"
Damage = "400.0"
DamageRadiusInner = "0.0"
DamageRadiusOuter = "8.0"
Effect = "com_sfx_lukesmash"
ArmorScale = "1.0"
HealthScale = "1.0"
ShieldScale = "0.5"

VehicleScale = "3.0"

SoundProperty = "mace_quake_exp"

And also, How do I "activate" my add-on? I'm quite sure I have all the nitty-gritty file writing done (combos, otfs, reqs, etc) and the lvls are in my actual addon folder, but I'm told to edit the "scripts". I see a "script file ("addme.script"), but I can't open it...Is that the file that activates my new jedi? And another thing...I noticed I didn't need to make or apply skins and such. Will I still need to do that?
I think there's a good chance you're missing at least one or two steps in the whole process. You say that you've done all the "combos, odfs, reqs, etc" but you're still wondering about things like textures. You've mentioned that you're familiar with JKA editing - SWBF2 editing is not the same; you have to compile your assets into (usually) self-sufficient .lvl files. As a result of this, you need to (again, for the most part) have every file you need in your data folders (the ones you compile from) - this includes odfs, reqs, combos, animation files, textures, effects, models - everything.

Some good places to start are the "jedi_creation" doc (which comes with the modtools) and our tutorial thread ("Everything you need"). Here is one specific tutorial you will want to reference along with "jedi_creation":
http://www.gametoast.com/forums/viewtop ... 27&t=12729

Make sure that you remember that you will also need a map to load your sides - even if this is just the test map generated by modtools by default. You can't just "load a character into the game" as easily as you can in JKA.

Re: msh files?

Posted: Fri Mar 06, 2009 10:56 am
by Fiodis
I myself have never edited JKA, BF2 is my home ground.

The addme.script file in C:\BF2_ModTools\data_***\addme is what you use to add classes, among other things. You do not need to edit it if you just change a Jedi's combo.

I assume that's the explosion's ODF you have there? It looks ok, and it should work provided you set up the rest of the jedi correctly.

Re: msh files?

Posted: Fri Mar 06, 2009 9:00 pm
by jedigonebad
ok thanks for that. I think I'm ready to test the jedi (i have animation files, skin files (msh, option, tda), odfs, reqs, and option (man, that was tough, haha)...um am I missing something?) but when I get on the game I don't see him on my selection screen. I've got a hunch I did the lua file wrong... I'm editing the "g_eli.lua" file (I made a jedi assault character) by putting "ReadDataFile("dc:SIDE\\JED.lvl",
"JED_myjedi")"

(excuse the lack of creativity, haha) underneath another ReadDataFile command pertaining to the side ALL.lvl (han, chewie, luke, etc) and munged, but the character doesn't show in the spawn list. I've been looking over the tutorials, which i will do yet again.

By the way, thanks so much for your help, everyone!

Re: msh files?

Posted: Sat Mar 07, 2009 11:14 am
by Commander_Fett
can we see the LUA?

Re: msh files?

Posted: Sat Mar 07, 2009 12:09 pm
by Fiodis
Yes, the LUA would be helpful.

Also, keep in mind that most custom combos are nearly double the size of shipped ones. Though what you are doing doesn't seem like it would be extremely memory-consuming, I would still recommend a non-hero assault mode to test new Jedi if you make lots more. You should be fine with just this one, though.



Also, something extremely helpful, no matter what you are trying to do, whether it's combo editing, skinning, modelling, whatever. In the main modtools directory you should see a program called bf2_modtools.exe. Move it to LucasArts/SWBF2/GameData and run it. You'll get a smaller version of BF2, with green across the top. This is your Debugger, or at least that's what I call it.

If you play your map in that and there are problems with it, after exiting it you'll get a file in the GameData folder called bf2_log.txt. This is your error log; this tells you what to fix. Just keep in mind that Severity: 3 and up errors usually cause CTD's (Crash To Desktop) while Sev 2's don't. You should still try to fix sev 2's, though.

It's, believe me, a very useful tool. If you run your map in it, and your Jedi doesn't show up, right afterwards you'd be able to tell why. It takes out a lot of guesswork.

Re: msh files?

Posted: Sat Mar 07, 2009 7:38 pm
by jedigonebad
Here's the lua:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()

AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
end


---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",70) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo

ReadDataFile("ingame.lvl")

ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)

ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_jedi",
"all_hero_hansolo_tat",
"all_hero_leia",
"all_hero_chewbacca")
ReadDataFile("dc:SIDE\\JED.lvl",
"JED_myjedi")

ReadDataFile("sound\\tat.lvl;tat2gcw")


ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader",
"imp_hero_emperor",
"imp_hero_bobafett")

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_yoda",
"rep_hero_macewindu",
"rep_hero_anakin",
"rep_hero_aalya",
"rep_hero_kiyadimundi",
"rep_hero_obiwan")

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_grievous",
"cis_hero_darthmaul",
"cis_hero_countdooku",
"cis_hero_jangofett")

--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")
SetMemoryPoolSize("MountedTurret", 15)
--]]

--ReadDataFile("SIDE\\snw.lvl", "snw_inf_wampa")

SetupTeams{
hero = {
team = ALL,
units = 12,
reinforcements = -1,
soldier = { "all_hero_hansolo_tat",1,2},
assault = { "all_hero_chewbacca", 1,2},
engineer= { "all_hero_luke_jedi", 1,2},
sniper = { "rep_hero_obiwan", 1,2},
officer = { "JED_myjedi", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_aalya", 1,2)
AddUnitClass(ALL,"rep_hero_kiyadimundi",1,2)

SetupTeams{
villain = {
team = IMP,
units = 12,
reinforcements = -1,
soldier = { "imp_hero_bobafett", 1,2},
assault = { "imp_hero_darthvader",1,2},
engineer= { "cis_hero_darthmaul", 1,2},
sniper = { "cis_hero_jangofett", 1,2},
officer = { "JED_myjedi", 1,2},",
special = { "imp_hero_emperor", 1,2},

},
}
AddUnitClass(IMP, "rep_hero_anakin",1,2)
AddUnitClass(IMP, "cis_hero_countdooku",1,2)

-- 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 = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:ABC\\ABC.lvl", "ABC_eli")
SetDenseEnvironment("false")

-- Sound Stats

ScriptCB_EnableHeroMusic(0)
ScriptCB_EnableHeroVO(0)

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "Allleaving")
SetOutOfBoundsVoiceOver(2, "Impleaving")

SetAmbientMusic(ALL, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_tat_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(IMP, 0.9, "imp_tat_amb_middle", 1,1)
-- SetAmbientMusic(IMP, 0.1, "imp_tat_amb_end", 2,1)

SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(IMP, "imp_tat_amb_victory")
SetDefeatMusic (IMP, "imp_tat_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

SetAttackingTeam(ATT)

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end

I was thinking maybe I have to put something about the new jedi in the "Setupteams" part *shrug*

thanks for the tip about bfront2log, I'm surprised I didn't read about it in any of the documents...maybe I wasn't attentative enough. And you're right, it is extremely helpful. The list is worringly long, but there's nothing pertaining to the JED folder, and no Severity: 3 entries, so I guess it could be worse...but the problem's still there... my character doesn't show.

Re: msh files?

Posted: Sun Mar 08, 2009 10:39 am
by Fiodis
The Debugger is mentioned very birefly at the end of the Getting Started doc.

Now, your LUA, at first glance, seems to be fine.... Did you get any errors like "Failed to add animation state:" or anything about animations or the Jedi's weapons?

And you have a req for both your side and the unit?


EDIT - Yeah, those two things down there are important as well.

Re: msh files?

Posted: Sun Mar 08, 2009 10:50 am
by computergeek
Did you munge your side? Do you have "common" in your sides folder (copied from the assets)?

Re: msh files?

Posted: Sun Mar 08, 2009 2:16 pm
by jedigonebad
Yeah, I have the common folder from the assets, and when you say munged the folder, do you mean the munge.bat command in the sides folder or the application visualmunge.exe in the _build folder? I've been using the application.

And, yes, this is the REQ for my side (in the JED folder):

ucft
{
REQN
{
"lvl"
"JED_myjedi"
}
}


This is the REQ for my character (in my REQ folder):

ucft
{
REQN
{
"class"
"JED_myjedi"
}
}



And also when I munged (just now), the log showed this error message, and this was a red flag for me:

C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\ABC\ABCg_eli.lua:121: unfinished string near `", '
ERROR[scriptmunge scripts\ABC\ABCg_eli.lua]:Could not read input file.ERROR[scriptmunge scripts\ABC\ABCg_eli.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

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

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



I'm going through to find these files now...and were those the req's you were referring to before, fiodis (the ones in the error message)?

Re: msh files?

Posted: Sun Mar 08, 2009 2:28 pm
by Frisbeetarian
What the error says is that there's an error in you Lua script at line 121 near the characters it mentions. Looking at that in the Lua, you have an extra quote and comma at the end of the officer line under the villain's team setup.

Re: msh files?

Posted: Sun Mar 08, 2009 3:58 pm
by jedigonebad
yay, after I deleted that typo that Frisbeetarian pointed out I can spawn my jedi! Thanks a bunch!

Thats one solution, but another problem...it's basically luke with a different skin; it doesn't have the abilities I specified (obi's rush and mace's pound) does that mean I have to redo my combo file?

Re: msh files?

Posted: Sun Mar 08, 2009 4:13 pm
by Fiodis
How did you do your combo file?

And did you rename all the anim files in the SoldierAnimationBank correctly?

Is there any severity: 2 or 3 error relating to the anims?

Re: msh files?

Posted: Sun Mar 08, 2009 5:53 pm
by jedigonebad
I basically followed, and even sometimes copied and removed the sidenotes, the skeleton of the tutorial combo file, but tweaked it in such a way to put in mace's pound and obi's rush, since luke's attacks are default, I only needed to delete any specifications about "regular" attacks.

But i suddenly have a bigger problem: I'm out of space for the soldier animation banks?! how can that happen all of a sudden like that??