Game crashes when I put "dc:" in front of "SIDE" in .lua

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
KimochiCompadre
Recruit Womprat Killer
Posts: 7
Joined: Fri Jul 01, 2016 9:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by KimochiCompadre »

Recently, I've been toying around with making very small mods for my own personal use (basically editing default maps and such). However, I recently decided to reskin a few of my units for the republic side. So i loaded the .tga into GIMP, did all of my edits, and exported it (yes, I disabled RLE compression). Then, I went into my world's script for OMGc_con.lua, and went to where the sides are loaded in. I promptly added "dc:" in front of "SIDE" to change where the game looks to load the side, saved my script, and munged. Once the munge finished, I moved my world into the SWBF2's "addon" folder (idk how to use modtools' test environment) and then loaded up my game. Tried to start up my map, and as soon as it was done loading, the game completely crashed, and shut down. I'm willing to share my .lua code and everything, just need help possibly fixing this issue. Please help.
Samee3
First Lance Corporal
First Lance Corporal
Posts: 123
Joined: Sun Jul 05, 2015 5:07 pm
Projects :: BF2 Refresh Mod
Games I'm Playing :: Empire at War
xbox live or psn: VaporousFern310
Location: California, USA

Re: Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by Samee3 »

Sounds like there is a problem with the model/texture.

That said, you should get yourself well acquainted with using the Bfront2.log.
If you have no clue what I'm talking about, you should probably read this:
http://www.gametoast.com/viewtopic.php?f=27&t=13806
And this:
http://www.gametoast.com/viewtopic.php?f=27&t=14816
KimochiCompadre
Recruit Womprat Killer
Posts: 7
Joined: Fri Jul 01, 2016 9:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Re: Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by KimochiCompadre »

I didnt change the model at all. Just the tga (without RLE compression as I've heard that causes issues).
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by Kingpin »

Could you please post your LUA, the .req of your side, and your BF2log? Thanks
KimochiCompadre
Recruit Womprat Killer
Posts: 7
Joined: Fri Jul 01, 2016 9:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Re: Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by KimochiCompadre »

I'm not modifying the side itself, just the .tga of a few units on the the rep side. So the req would be the same as the republic req file.
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by Kingpin »

KimochiCompadre wrote:I'm not modifying the side itself, just the .tga of a few units on the the rep side. So the req would be the same as the republic req file.
If you are just loading in the textures as a custom side, you will want to first use dc:SIDE...... as well as that without DC. You need them both, and DC needs to be first.
KimochiCompadre
Recruit Womprat Killer
Posts: 7
Joined: Fri Jul 01, 2016 9:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Re: Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by KimochiCompadre »

Would you mind posting an example .lua?
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by Kingpin »

Let's say you are replacing the textures of all the CIS units. You have them loaded in your custom side. You don't have all of the various weapons, models, and so forth, so you will also need to load in the stock side.
Hidden/Spoiler:
[code] ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_hero_darthmaul",
"CIS_inf_officer",
"cis_inf_droideka")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_hero_darthmaul",
"CIS_inf_officer",
"cis_inf_droideka"[/code]
KimochiCompadre
Recruit Womprat Killer
Posts: 7
Joined: Fri Jul 01, 2016 9:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: Swbf2
xbox live or psn: No gamertag set

Re: Game crashes when I put "dc:" in front of "SIDE" in .lua

Post by KimochiCompadre »

Ohhhhhh okay. Totally makes sense now.
Post Reply