Creating sides?

Started by Cmd_Smith, February 19, 2015, 05:17:32 PM

Previous topic - Next topic
I was playing around with the modding tools (BFBuilderPro) and I wanted to customize some side classes. How do I do this? I tried following this tutorial (http://www.swbfgamers.com/index.php?topic=4692.msg45256#msg45256) but I dont ever get a sides tab?

Those were from Pandemic, and are good if you already know what to do.

I suggest you follow this guide:
http://www.swbfgamers.com/index.php?topic=8.0

feel free to ask us any questions.  It's always good to have a new modder.   :cheers:
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Whoops! Copied the wrong web address. Yes, that is the tutorial I followed. It says:




"When it says done press OK. Instead of hunting for the folder, re-open the BFBuilder window, it should have changed and now have tabs saying "Edit" "Sides" and "Sound",  "Edit (ModID)" "Localize (ModID)"..etc.

We're only going to bother with the "Sides" for now. For the sake of the tutorial we will just be making a simple Republic Side edit, which should give you an idea how to make other mods.

Click the "Sides" tab. Then click "Import Retail Side". Select "REP" and wait."





I'm not exactly sure what to do, because when I reopen the program it doesnt have a sides tab.

EDIT: I found it! I guess it just took some time to update...

Im just opening the .odf files with Notepad++, but where do I find the names for the weapons? And, how do i create weapons?

Inside the unit ODF is the weapons reference, like this:

WeaponName1   = "rep_weap_inf_rifle"
WeaponAmmo1   = 4
WeaponName2   = "rep_weap_inf_pistol"
WeaponAmmo2   = 0
WeaponName3   = "rep_weap_inf_haywiredetonator"
WeaponAmmo3   = 3
WeaponChannel3  = 1
WeaponName4   = "rep_weap_inf_crackgrenade"
WeaponAmmo4   = 2
WeaponChannel4  = 1

Notice this line:
WeaponName1   = "rep_weap_inf_rifle"

that refers to another ODF named rep_weap_inf_rifle
find that file, then edit the values, then munge, etc.


You can make your own weapon ODF.  The easiest way to do this is copy an existing ODF and edit it.
In the weapon ODF will be a line that references the weapon model.  You can change weapon models, too, but I would not recommend that you take that step until you are very familiar with everything else.






Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

February 19, 2015, 06:35:05 PM #5 Last Edit: February 19, 2015, 06:44:10 PM by -RepubliqueCmdr-
[spoiler=Rambling about naming new weaopns]Core.lvl is battlefronts game file for handling 'localizations'/labels names and the like.
Naming weapons is a little out of the scope of modifying the weapons and/or actually creating the game weapons.

But you can edit the core.lvl with a custom tool for doing it (the stock bfbuilder creates corrupt core.lvls).
It's bamdur's 1.3 Core.lvl builder in THIS Mod Toolbox pack whenever you are interested/feel comforatible modding the sides.

If you create a new weapon and don't name it in a modded core.lvl, it's gameObject hexedicimal address is displayed in the spawn select screen. This doesn't alter gameplay, but it looks kinda funny to see a new rocket launcher named '0x00FE3180'[/spoiler]
--
Welcome to SWBFGamers.com! If you have any modding help, there are a few of us here (including myself) that you can PM for help if you don't feel the need to post a topic, or just need more info.
--
To furthur explain the new weapons bit Led mentioned, you can copy-paste a weapons ODF file(s), rename and modify them as needed. Then replace the name of a weapon in a units ODF to give him that weapon like Led mentioned.

Say we want a new alternative to the republic side's Clone Trooper Rifle:
[spoiler]
Step One: Copy-pasting based on another weapon.
-Copy the entity ODF for the rifle: "rep_weap_inf_rifle.odf" and paste it in the same folder, rename this to anything you like.
Say we rename it to "rep_weap_inf_rifle_2.odf."

Step .2: Changing functionality.
-You can now edit this file with notepad or whatever you use and change a few of the weapons attributes, like what 3d model file to use (MSH files), what it will target in terms of teams, the game target range (at what distance your aimer will change colors or lock on), the zoom amnt applied when you zoom with the weapon, accuracy, and shot fire type, rounds per clip, and other graphical features.
Step .3: Additional functionality.
Thats all great, but what if I want to change color or damage.. Maybe I want this bullet to looks smaller and travel faster?
These things aren't covered in "rep_weap_inf_rifle.odf," but are in the rifles ordnance (and if a rocket launcher or grenade, expire ODFs).

You can keep the stock rifle ones, or you can have your own. If you want to change these extra weapon features, you will need to copy-paste-rename "rep_weap_inf_rifle_ord.odf" to "rep_weap_inf_rifle_2_ord.odf."

Then to make our new rifle ODF use this, we change the line OrdnanceName      = "rep_weap_inf_rifle_ord" To the new file we copy-pasted's name.
E.x.: "OrdnanceName = rep_weap_inf_rifle_2_ord" without the ODF extension.

Now you can edit the ordnance attributes of the new weapon without messing with the stock rifles attributes by
editing rep_weap_inf_rifle_2_ord.odf"

Things this file covers are:
Graphical effects: impact effects, expire effects, laser width and length, laser fade out time, how long the bullet can exist before the game gets rid of it to conserve memory (say you shoot the bullet into the infinite sky, it has to disappear some how).
Velocity of the ordnance, gravity to apply, Damage amount, and damage scale for different game entity types (say you want it to be only a percentage of the damage if the bullet hits a vehicle so it's not as weak as a unit).
[/spoiler]

edit- Sorry if I said anything that is over your head. Just come back to it when you get more comfortable 'modding' and want more info.

February 19, 2015, 10:37:11 PM #6 Last Edit: February 19, 2015, 10:58:43 PM by Phobos
[spoiler=Follow-up Rambles]Nice mini-tutorial repcom, i always thought the EXP files meant Explosion, but I guess Expire makes sense. the three types of ODF are hierarchically structured as follows: Base ODF -> ORD -> EXP

Also what I've discovered is that you can add EXPs to stock weapon ODFs without breaking OC usually, but adding a new ORD will cause crashes and other unusual glitches. Each ODF has a "classlabel", which indicates its function in the game, and certain properties only work with specific classlabels. You will want to read the ODF guide by psych0fred for details on this.

So for Side.lvl modding, the main files to work with are the TGA (textures), ODF (object definition files), MSH (models), OPTION (additional munger settings for msh/tga), FX (effects), some FX are stored in Common.lvl, and localization (names) stored in Core.lvl. You can also hex edit the postmunged LVLs, but this is most commonly used with world LVLs. And with all LVL builders you have REQ files (requirements) which is an index that tells the munger which files to include in the LVL container.

Tools/Apps you will want to download:
- BFBuilder & Patch Kit
- Toolbox V4b (the 5th toolbox is still under development)
- GIMP for TGA files
- Notepad++ for ODF, FX, REQ files
- Hex Editor (xvi32 works great)
- XSI and/or Blender for MSH files (this isnt recommended until you better understand the other aspects of modding)

Welcome Cmd_Smith
I also suggest first learning how to modify the stock sides before trying to create new ones from scratch. Good luck, and if you have more questions let us know.[/spoiler]

Thanks for the tutorial! I put the cleaned/mundged folder into my addon folder, but it loads as a map? I also tried to load just the all.lvl file from sides, which i edited, and it wont load. The file I edited was all_inf_smugglersnow to make the wookie into a soldier-like commando so rebels wont always lose on Hoth. I asume somethings wrong with the files?
And how do I make it work on the Hoth map?

[spoiler][GameObjectClass]

ClassLabel          = "Commando"
GeometryName       = "all_inf_snowtrooper.msh"

[Properties]
FootWaterSplashEffect    = "watersplash_sm"
WaterSplashEffect    = "watersplash_md"
WakeWaterSplashEffect   = "watersplash_wade"

UnitType      = "trooper"
IconTexture    = "all_soldier_icon"
MapTexture       = "troop_icon"
MapScale       = 1.4

GeometryName    = "all_inf_snowtrooper"
AnimationName   = "all_inf_snowtrooper"
FirstPerson      = "all\allhthtr;all_1st_hothtrooper"
FirstPersonFOV   = "70"
ThirdPersonFOV   = "65"
GeometryLowRes   = "all_inf_snowtrooper_low1"

AnimatedAddon    = "CAPE"               //needs to be "CAPE". even if it isn't a cape.
GeometryAddon    = "add_inf_jt12_jetpack"       //name of the model to use without ',msh' extention
AnimationAddon   = "imp_inf_vader_cape" //must be present or game will crash.
                                        //be sure to include "imp_inf_vader_cape.zaabin" and .zafbin in the munged folder
                                        //they can be found in the "Lucasarts\BFBuilder\Assets\Sides\IMP\munged" folder
AddonAttachJoint = "bone_ribcage"       //name of the bone to attatch addon to.

//Regular Jetpack
JetJump               = "7.0"     //The initial jump-push given when enabling the jet
JetPush               = "7.0"     //The constant push given while the jet is enabled (20 is gravity)
JetEffect             = "jetpack" //"" or the name of the jet effect
JetType               = "hover"   //"hover" is the only value I've seen so far.
JetFuelRechargeRate   = "0.1"     //Additional fuel per second (fuel is 0.0 to 1.0)
JetFuelCost           = "0.2"     //Cost per second when hovering (only used for jet-hovers)(fuel is 0.0 to 1.0)
JetFuelInitialCost    = "0.25"    //initial cost when jet jumping(fuel is 0.0 to 1.0)
JetFuelMinBorder      = "0.24"    //minimum fuel to perform a jet jump(fuel is 0.0 to 1.0)


OverrideTexture      = "all_inf_soldier_hoth"
OverrideTexture2      = "Rebel_face01"

CAMERASECTION       = "STAND"

EyePointOffset       = "0.0 1.8 0.0"
TrackCenter      = "0.0 1.8 0.0
TrackOffset       = "0.0 0.0 3.5"
TiltValue      = "5.0"

CAMERASECTION       = "STANDZOOM"

EyePointOffset       = "0.0 1.8 0.0"
TrackCenter      = "0.0 1.8 0.0
TrackOffset       = "0.4 0.05 2.8"
TiltValue      = "3.5"

CAMERASECTION       = "CROUCH"

EyePointOffset       = "0.0 1.3 0.0"
TrackCenter      = "0.0 1.3 0.0
TrackOffset       = "0.0 0.15 3.5"
TiltValue      = "5.0"

CAMERASECTION       = "CROUCHZOOM"

EyePointOffset       = "0.0 1.3 0.0"
TrackCenter      = "0.0 1.3 0.0
TrackOffset       = "0.4 0.2 2.8"
TiltValue      = "3.5"

CAMERASECTION       = "PRONE"

EyePointOffset       = "0.0 0.5 0.0"
TrackCenter       = "0.0 0.5 0.0"
TrackOffset       = "0.0 0.0 3.0"
TiltValue      = "5.0"

CAMERASECTION       = "PRONEZOOM"

EyePointOffset       = "0.0 0.5 0.0"
TrackCenter       = "0.0 0.5 0.0"
TrackOffset       = "0.4 0.2 2.8"
TiltValue      = "3.5"

AimValue       = "1.0"

HealthType      = "person"
MaxHealth       = 500.0

Acceleraton       = 70.0
MaxSpeed       = 6.5
MaxStrafeSpeed       = 4.5
MaxTurnSpeed       = 4.0

EAPONSECTION         = 1
WeaponName    = "cis_weap_inf_rifle"
WeaponAmmo    = 7
WEAPONSECTION         = 2
WeaponName    = "all_weap_inf_sniperrifle"
WeaponAmmo    = 5
WEAPONSECTION         = 3
WeaponName    = "rep_weap_inf_commando_pistol"
WeaponAmmo    = 0
WEAPONSECTION         = 4
WeaponName    = "all_weap_inf_thermaldetonator"
WeaponAmmo    = 3
WeaponChannel   = 1
WEAPONSECTION         = 5
WeaponName    = "all_weap_inf_remotedroid"
WeaponAmmo     = 4
WeaponChannel   = 1



AimFactorPostureSpecial = 50
AimFactorPostureStand    = 100
AimFactorPostureCrouch    = 140
AimFactorPostureProne    = 160
AimFactorStrafe       = 60
AimFactorMove          = 70


AISizeType            = "SOLDIER"


HurtSound            = "all_inf_com_chatter_wound"
DeathSound              = "all_inf_com_chatter_death"
AcquiredTargetSound     = "all_inf_com_chatter_acquired"
HidingSound             = "all_inf_com_chatter_hide"
ApproachingTargetSound  = "all_inf_com_chatter_approach"
FleeSound               = "all_inf_com_chatter_flee"
PreparingForDamageSound = "all_inf_com_chatter_predamage"
HeardEnemySound         = "all_inf_com_chatter_heard"
//ShockFadeOutTime      = "0.8"
//ShockFadeInTime       = "2.0"
ShockFadeOutGain        = ""
ShockSound              = ""
ClothingRustleSound     = ""
LowHealthSound          = ""
//LowHealthThreshold      = ".25"
FoleyFXClass            = "all_inf_soldier"

// squad command VO
SCFieldMoveOutSound      = "all_inf_com_chatter_tac_moveout"
SCFieldHoldSound      = "all_inf_com_chatter_tac_hold"
SCFieldFollowSound      = "all_inf_com_chatter_tac_follow"
SCDriverGetInSound      = "all_inf_com_chatter_tac_needgunner"
SCDriverGetOutSound      = "all_inf_com_chatter_tac_moveout"
SCPassengerMoveOutSound   = "all_inf_com_chatter_tac_spreadout"
SCPassengerStopSound   = "all_inf_com_chatter_tac_stop"
SCPassengerGetInSound   = "all_inf_com_chatter_tac_needgunner"
SCPassengerGetOutSound   = "all_inf_com_chatter_tac_moveout"
SCGunnerAllClearSound   = "all_inf_com_chatter_tac_allclear"
SCGunnerSteadySound      = "all_inf_com_chatter_tac_stop"
SCGunnerGetInSound      = "all_inf_com_chatter_tac_needgunner"
SCGunnerGetOutSound      = "all_inf_com_chatter_tac_moveout"
SCResponseYessirSound   = "all_inf_com_chatter_tac_yes"
SCResponseNosirSound   = "all_inf_com_chatter_tac_no"

// AIsquad command VO
AISCFieldMoveOutSound      = "ai_all_inf_com_chatter_tac_moveout"
AISCFieldHoldSound         = "ai_all_inf_com_chatter_tac_hold"
AISCFieldFollowSound      = "ai_all_inf_com_chatter_tac_follow"
AISCDriverGetInSound      = "ai_all_inf_com_chatter_tac_needgunner"
AISCDriverGetOutSound      = "ai_all_inf_com_chatter_tac_moveout"
AISCPassengerMoveOutSound   = "ai_all_inf_com_chatter_tac_spreadout"
AISCPassengerStopSound      = "ai_all_inf_com_chatter_tac_stop"
AISCPassengerGetInSound      = "ai_all_inf_com_chatter_tac_needgunner"
AISCPassengerGetOutSound   = "ai_all_inf_com_chatter_tac_moveout"
AISCGunnerAllClearSound      = "ai_all_inf_com_chatter_tac_allclear"
AISCGunnerSteadySound      = "ai_all_inf_com_chatter_tac_stop"
AISCGunnerGetInSound      = "ai_all_inf_com_chatter_tac_needgunner"
AISCGunnerGetOutSound      = "ai_all_inf_com_chatter_tac_moveout"
AISCResponseYessirSound      = "ai_all_inf_com_chatter_tac_yes"
AISCResponseNosirSound      = "ai_all_inf_com_chatter_tac_no"

DropItemClass          = "com_item_powerup_ammo"
DropItemProbability    = 0.40
NextDropItem          = "-"
DropItemClass          = "com_item_powerup_health100"
DropItemProbability    = 0.30
NextDropItem          = "-"
DropItemClass          = "com_item_powerup_dual"
DropItemProbability    = 0.10[/spoiler]

Its either the jetpack or the five weapons, which I followed tutorials for (http://www.swbfgamers.com/index.php?topic=4741.0) and (http://www.swbfgamers.com/index.php?topic=5565.msg54751#msg54751)

Help?

Quote from: Cmd_Smith on February 20, 2015, 05:53:12 AM

HealthType = "person"
MaxHealth = 500.0

Acceleraton = 70.0
MaxSpeed = 6.5
MaxStrafeSpeed = 4.5
MaxTurnSpeed = 4.0

EAPONSECTION = 1
WeaponName = "cis_weap_inf_rifle"
WeaponAmmo = 7
WEAPONSECTION = 2
WeaponName = "all_weap_inf_sniperrifle"
WeaponAmmo = 5
WEAPONSECTION = 3
WeaponName = "rep_weap_inf_commando_pistol"
WeaponAmmo = 0
WEAPONSECTION = 4
WeaponName = "all_weap_inf_thermaldetonator"
WeaponAmmo = 3
WeaponChannel = 1
WEAPONSECTION = 5
WeaponName = "all_weap_inf_remotedroid"
WeaponAmmo = 4
WeaponChannel = 1


You are missing a W for the first weapon section. Change it to
WEAPONSECTION         = 1

Fied, and re-cleaned/mundged. But the all.lvl file still wont load. It is in my addon folder. Am I supposed to have the whole map in addon?

Quote from: Cmd_Smith on February 20, 2015, 06:41:05 AM
Fied, and re-cleaned/mundged. But the all.lvl file still wont load. It is in my addon folder. Am I supposed to have the whole map in addon?
It only goes in addon folder if you have modded the LUA scripts for it.

Go to this folder
C:\Program Files (x86)\LucasArts\Star Wars Battlefront\GameData\Data\_LVL_PC\SIDE

You will see a file named all.lvl
rename it to all_stock.lvl

Now move the all.lvl from your mod addon folder to the game SIDE folder. make sure the date modified says 2004 for the stock backup, and 2015 for the new LVL. test this on Hoth and it should work now.

If you wanted this mission to play as a mod map without replacing the stock SIDE file you have to edit the addme and mission LUA scripts. this will preserve multiplayer support without having to constantly rename the side LVLs, but requires more modding.

February 20, 2015, 07:51:18 AM #11 Last Edit: February 20, 2015, 08:21:39 AM by Cmd_Smith
It crashes when I load hoth now. I dont knw what to do.

Quote from: Cmd_Smith on February 20, 2015, 07:51:18 AM
It crashes when I load hoth now. I dont knw what to do.

It sounds like you are jumping in too far too fast.  Step back and read more tutorials, and then reread them as you understand more.  Your next step will be to understand how to make mission.lvl modifications.

There are many steps to making a new side on an existing map, and even more steps to making new sides and new maps.
Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

But I only edited one troop file. Im not sure what could have gone wrong.

February 20, 2015, 10:16:28 AM #14 Last Edit: February 20, 2015, 10:24:39 AM by -RepubliqueCmdr-
ClassLabel       = "Commando" isn't a valid entity type I don't think..
The label is something for C to use as a way to interpret the munged information (not a way to name your unit or entity).
Change that to soldier, you might be okay.
--
ClassLabels can be:
soldier (standard unit)
prop (a static model in the world)
bldg (more advanced/bigger prop)
animatedprop (prop with animations, like bespin Carbon chamber han solo forklift)
Light
Flyer
etc..
--
By the way, messing up one trooper file can normally make the whole game chode up. This is the way a lot of game engines are. So be prepared for a lot of crashes when you change things you don't know to much about (happens a lot when you start modding).
--
If we had the battlefront source code (what the developers used to create it, like the C++ source code), we could have added an entity type called Commando to the entity type list (probably would have some code for making it more agile or aggresive), but since this isn't a built in entity type, battlefront throws its hands in the air saying "What the heck is a commando? I can't work with this crap! *Exit on crash*"