Looking for modding help [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

Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Looking for modding help [Solved]

Post by Bulletkid »

Hey guys, first of all i want to thank u for reading this.

I just got started at modding , and ive surfed over and over the forum including the faqs and using the content in it in order to achieve my goal.
Well since i am a noob in modding my goal is still something small.
My goal is to give Secura's animations to maul.
Even tho ive been trying for days now i cant seem to change anything.
Certainly ive been interpreting ur teachings wrong.

If u guys dont have the patience to help me which i understand, could u send me the link of the tutorial on this matter? maybe ive been using the wrong threads , althought i think thats highly unprobable since the threads seem well organized and simple.
PS: The only programs needed for this little change are modtool and notepad right???
Last edited by Bulletkid on Wed Mar 25, 2015 6:47 pm, edited 2 times in total.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: noob looking for help

Post by jedimoose32 »

First of all, yes, Notepad and the ModTools are all you will need. I'm not sure what you have done so far, but here's a quick summary of what you need to do in order to change a unit's animations:
1. Change Darth Maul's .odf file so his Animation property is the same as Aayla Secura's (should be spelled 'aalya' if I remember correctly).
2. Copy from the assets/sides/rep/munged folder the following files: aalya.anims, aalya.zaabin, and aalya.zafbin. Put them into your side's munged folder (e.g. data_ABC/sides/cis/munged).
3. Copy rep_hero_aayla.combo (I think that's what it's called) from the assets/sides/rep/odf folder and put it in your side's odf folder (data_ABC/sides/cis/odf).
What you do from here depends on what kind of weapon you want Darth Maul to have. If you want him to keep his double saber then you might need to change the contents of that .combo file in some way. Maybe someone else can tell you for sure?
If you want him to have two lightsabers just like Aayla, then copy over her lightsaber .odf from the Republic assets folder and put it in your odf folder. Now rename the prefix 'rep' to whatever you side name is, just to keep things tidy, e.g. cis_weap_hero_lightsabre_aayla.odf, or something similar (sorry, not at home right now so I can't verify file names).
Then go back into Maul's .odf file and change his first weapon name to match the name of that new .odf you just renamed. So now you've done everything you need to for the actual unit and weapon properties. Next...
4. Go to your data_ABC/common/scripts/ABC/ folder and open the script for your world (e.g. ABCc_con.lua). Scroll down to the part that says ReadDataFile("SIDE\\cis.lvl, ...") and simply add dc: before SIDE, so it looks like this: ReadDataFile("dc:SIDE\\cis.lvl, ... ")
If your side is not called cis then make sure you make this change to whatever side has your Darth Maul unit.
Then munge! Make sure Common is checked, and also choose EVERYTHING for Sides.
Before you munge make sure you have copied the Common side from assets/sides into data_ABC/sides/ or else you will get some nasty crashes. Hope this helps. :) Happy modding!
Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Bulletkid »

and yes i want to give him aayla double sword


btw whenever i paste the files from the assets into my sides folder should i rename it?
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: noob looking for help

Post by jedimoose32 »

It's up to you. If you do, make sure you also change any references to that file so that the names match. Just like in the example I gave with the lightsaber.
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: noob looking for help

Post by razac920 »

I'm guessing that you want this modified Darth Maul character on a custom map? or stock map? At any rate, if that's ALL you want, you should be able to make those changes without having to make a custom side (though for most things you do and it is a good skill to have...)

If you go to data_***/Common/scripts/***/, find the era(s) and mode(s) you want these changes in, open those corresponding .lua files in notepad, make sure you load both Darth Maul and Aayla:

Code: Select all

    ReadDataFile("SIDE\\rep.lvl",
                "rep_hero_aalya")
    ReadDataFile("SIDE\\cis.lvl",
                "cis_hero_darthmaul")
then use the LUA function "SetClassProperty" to make the changes to Darth Maul that you want, e.g.

Code: Select all

  SetClassProperty("cis_hero_darthmaul","WeaponName1","rep_weap_lightsaber_aalya")
  SetClassProperty("cis_hero_darthmaul","AnimationName","aalya")
In general the syntax is SetClassProperty([class],[property],[value]), where properties and values are found in .odf files

The one big limitation to this method is you cannot use SetClassProperty to modify weapon properties, only unit classes.

I've never tried switching out an animation set before, but I *think* it should work. And I know for a fact switching weapons does work. It's best to change properties in ScriptInit() not ScriptPostLoad(). Changing class weapons midgame (i.e. in ScriptPostLoad) will cause crashes in MP, and in SP works, but you need to respawn to get the new weapon.
Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Bulletkid »

sorry for not awnsering with feedback, but when i munged it i got the level pack error, ive been trying to fix it.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: noob looking for help

Post by jedimoose32 »

What happens in-game? Anything?
Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Bulletkid »

fixed the lvlpack error.

i made the changes u advised me and its crashing ingame, trying to fix it.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: noob looking for help

Post by jedimoose32 »

Are you running the game from BF2_ModTools.exe? If so, can you copy and paste the contents of your BFront2.txt error log here for me to see?
Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Bulletkid »

for some reason that exe cant start, i have to copy the _LVL_PC file and the addme into the game.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: noob looking for help

Post by jedimoose32 »

Did you copy the exe into Battlefront II/GameData/ ?
Run it from there.
Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Bulletkid »

OHHH lol its supposed to run it there? LOL

Edit: now it works offcourse thx
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: noob looking for help

Post by jedimoose32 »

Yes, sorry, sometimes I assume that is common knowledge, when of course it isn't if you are relatively new to modding... :P
If you haven't skimmed through the FAQ/Everything You Need thread be sure to do that at some point. :)
Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Bulletkid »

it doesnt generate the bfront2.txt, i dont have compability files , and i checked the appdata path and nothing was there, is there some way to force its creation?

Edit: btw this only happens whenever i give him aaylas lightsaber, the animation files located in the munge folder and some odf. force powers i gave him , made no negative impact whatsoever.

Edit: GOT IT

Hidden/Spoiler:
[code]Opened logfile BFront2.log 2015-03-24 0157
shell_interface: Entered
shell_interface: gPlatformStr, gOnlineServiceStr, gLangStr, gLangEnum: PC GameSpy english 0
ifs_era_handler - Entered
ifs_era_handler - Exited
shell_interface: No custom_gc_0.lvl
shell_interface: No custom_gc_1.lvl
shell_interface: No custom_gc_2.lvl
shell_interface: No custom_gc_3.lvl
shell_interface: No custom_gc_4.lvl
shell_interface: No custom_gc_5.lvl
shell_interface: No custom_gc_6.lvl
shell_interface: No custom_gc_7.lvl
shell_interface: No custom_gc_8.lvl
shell_interface: No custom_gc_9.lvl
shell_interface: No custom_gc_10.lvl
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Finished building game mode table Known Modes: 39
custom_GetMPGameModeList(): Finished building game mode list table List Length: 40
custom_SetMovieLocation()
custom_GetGCButtonList()
custom_SetMovieLocation()
custom_GetFreeformBattleModeList(): Finished building freeform battle mode list Known Modes: 39
ingame stream movies\crawl.mvs
shell_interface: Opening movie: movies\shell.mvs
shell_interface: Leaving
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to compare two nil values
stack traceback:
(none): in function `ifs_login_EnterInterface'
(none): in function <(none):598>

[/code]

btw: the game crashes 3 seconds after the team select menu appears
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: noob looking for help

Post by jedimoose32 »

That's a strange one I haven't seen before. Do the stock maps or any other mod maps give you the same crash?
Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Bulletkid »

The funny thing is that it only happens when i change the lightsaber, so it got nothing to do with the maps, when i changed back the lightsaber to darthmauls original i didnt crash.
before it crashes i can see darthmauls lightsaber turned white, instead of having 2 lightsabers.


EDIT: OH WAIT A SECOND.... when u said
"If you want him to have two lightsabers just like Aayla, then copy over her lightsaber .odf from the Republic assets folder and put it in your odf folder. Now rename the prefix 'rep' to whatever you side name is, just to keep things tidy, e.g. cis_weap_hero_lightsabre_aayla.odf, or something similar (sorry, not at home right now so I can't verify file names).
Then go back into Maul's .odf file and change his first weapon name to match the name of that new .odf you just renamed. So now you've done everything you need to for the actual unit and weapon properties. Next..."
was it supposed for me to transfer correspondent msh file?

Edit2: already tried... made no difference whatsoever....

EDIT3
I can see now i forgot to do one of the things u mentioned... i didnt change any properties
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: noob looking for help

Post by jedimoose32 »

That would be a problem. Does it work now?
Bulletkid
Private Recruit
Posts: 24
Joined: Sun Mar 15, 2015 7:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Battlefront 2
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Bulletkid »

im not sure what is the full extent of the properties, how far they go?
Hidden/Spoiler:
[code][GameObjectClass]
ClassParent = "com_jedi_default"
GeometryName = "rep_inf_aaylasecura.msh"

[Properties]
NumTentacles = "2"
BonesPerTentacle = "3"
TentacleCollType = "0"

AISizeType = "HOVER"

GeometryName = "rep_inf_aaylasecura"
GeometryLowRes = "rep_inf_aaylasecura_low1"

AnimationName = "aalya"

//JetJump

JetJump = "10.0" //The initial jump-push given when enabling the jet
JetPush = "0.0" //The constant push given while the jet is enabled (20 is gravity)
JetAcceleration = "10.0" // for characters with jet jump, use this acceleration for in air control
JetEffect = ""
JetFuelRechargeRate = "0.0" //Additional fuel per second (fuel is 0 to 1)
JetFuelCost = "0.0" //Cost per second when hovering (only used for jet-hovers)(fuel is 0 to 1)
JetFuelInitialCost = "0.0" //4initial cost when jet jumping(fuel is 0 to 1)
JetFuelMinBorder = "0.0" //minimum fuel to perform a jet jump(fuel is 0 to 1)
JetShowHud = 0
JetEnergyDrain = 40.0
CollisionScale = "0.0 0.0 0.0" // don't take damage from collisions

///JetJumpEnd


WEAPONSECTION = 1
WeaponName1 = "rep_weap_lightsaber_aalya"
WeaponAmmo1 = 0

WEAPONSECTION = 2
WeaponName2 = "com_weap_inf_sabre_throw"
WeaponAmmo2 = 0
WeaponChannel2 = 1

WEAPONSECTION = 3
WeaponName3 = "com_weap_inf_force_pull"
WeaponAmmo3 = 0
WeaponChannel3 = 1

///SOUND
SndHeroSelectable = ""
SndHeroSpawned = "hero_secura_spawn"
SndHeroDefeated = "hero_secura_exhausted"
SndHeroKiller = "hero_secura_exhausted"

VOSound = "rep_off_response_hero_command SC_Follow"
VOSound = "rep_off_response_hero_command SC_StopFollow"
VOSound = "rep_off_response_hero_command SC_VehicleWaitUp"
VOSound = "rep_off_response_hero_command SC_GetIn"
VOSound = "rep_off_response_hero_command SC_GetOut"

VOSound = "hero_secura_AcquiredTarget AcquiredTarget"
VOSound = "hero_secura_KillingSpree4 KillingSpree4"

VOUnitType = 189
SoldierMusic = "rep_hero_secura_lp"
HurtSound = ""
DeathSound = ""
AcquiredTargetSound = ""
HidingSound = ""
//ApproachingTargetSound = ""
FleeSound = ""
PreparingForDamageSound = ""
HeardEnemySound = ""
ShockFadeOutTime = ""
ShockFadeInTime = ""
ShockFadeOutGain = ""
ShockSound = ""
ClothingRustleSound = ""
//LowHealthSound = "com_inf_saber_ambient"
LowHealthThreshold = "1.1"
FoleyFXClass = "rep_inf_soldier"


[/code]

ps: are the tentacles really necessary...?
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: noob looking for help

Post by razac920 »

The only edits you need to make to the Darth Maul odf are switching WeaponName1 to "rep_weap_lightsaber_aalya" and switching/adding AnimationName to "aalya". That's it. Like I previously said, you could make this edits in the script itself, rather than a custom side. If you do want to make a custom side, you have the choice of either copying over all the necessary Darth Maul/Aalya assets to this custom side, or you can just make a minimal custom side that only contains a darth maul .odf file and a darth maul .req file. If you are having trouble finding all the assets to copy over, this could be simple: just make sure to load the stock darth maul and aalya in your script before loading your custom darth maul.
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: noob looking for help

Post by Sandtrooper956 »

I know this might not help much NOW, but I have also recently gotten into modding and I experienced the same crash that happens a few seconds after the map starts. I had made a backup though of my data_ABC folder and my ABC folder in the addon folder though. From what I can tell, the crash will just start happening after messing around sometimes. How far into your mod were you? If you are not that far it might just be best to start over and make backups. Sorry I can't help more D:
Post Reply