Page 1 of 1

Sides Work In Testing, but not in Actual Gameplay (Solved)

Posted: Sun Jun 28, 2009 6:09 pm
by Havoc 526
Okay, I'm in a bit of a pickle. I'll explain everything up to now:

I made some new sides for the Republic. (And this is for a mod I would release when, or if, ARC_Commander would reply anytime soon.) So, I copied all the required msh files, weapon odfs, and whatnot that I needed, set up the req files, etc. I then made the troops, used my test map to make sure they all worked fine, went through every bug I found, and at last, they were perfect. Everything was perfect! (sarcasm ->) I WAS PERFECT!

HOWEVER...

I put them in the maps they were going in. These were the shipped maps Coruscant and Utapau. One side for Coruscant, and the other for Utapau. I play the maps, and within five seconds of the first battle, the game went kaput, and I found myself tilting my head in confusion. I tried the maps on the modtools program, and I found no problem. There should be no reason these maps should be crashing during actual gameplay. Unfortunatly, there is one, and I can't find it.

If anyone has had any experiance in this field and may know the reason, I'm all ears and ready to listen.

Re: Sides work during testing, but not in actual gameplay!

Posted: Sun Jun 28, 2009 6:48 pm
by AQT
Link504 wrote:I put them in the maps they were going in. These were the shipped maps Coruscant and Utapau. One side for Coruscant, and the other for Utapau.
How did you do this? Are you replacing the shipped rep.lvl?

Re: Sides work during testing, but not in actual gameplay!

Posted: Sun Jun 28, 2009 6:53 pm
by Maveritchell
I've come up against issues that crashed the game but not the modtools twice, and it was different both times and unrelated to your issue both times. If you don't have any obvious errors in your error log (even though it will run fine in the modtools), then all you can do is eliminate changes one at a time until you find the error.

Re: Sides work during testing, but not in actual gameplay!

Posted: Sun Jun 28, 2009 7:28 pm
by Havoc 526
AQT wrote:
Link504 wrote:I put them in the maps they were going in. These were the shipped maps Coruscant and Utapau. One side for Coruscant, and the other for Utapau.
How did you do this? Are you replacing the shipped rep.lvl?
No. I'm using a few assets from BFX, and this has been the only time a certain side has worked. I made a seperate folder within the SIDE folder, and I'm placing my custom sides in there. They are two different legions of the Republic Army. I wouldn't dare touch the shipped files without backing them up. Besides, this is for a mod I'm making, and if ARC_Commander will ever be kind enough to answer my request, the result may be a public release. (He hasn't been on since March!) But anyway... :spam: (For more info, PM me.)

I have not had any errors posted in my PC_Mungelog at all recently, so I can't seem to find any errors at all as to why it is crashing. It's like the Kashyyyk campaign map in BFX 1.0. No visible reason...
And if I eliminate the changes one at a time, I may end up making it worse! (I have that talent.) Everthing is as it should be. The sides are basically the same in weaponary, health, sounds, and the like, especially since I copied all the required msh and odf files from all the needed sides, no reason what so ever.
Unless the side's name has to be the same as the name the map is using for it. Could that have any effect?

Re: Sides work during testing, but not in actual gameplay!

Posted: Sun Jun 28, 2009 7:42 pm
by AQT
How does your .lua(s) look? It may be script related. Are you making a new era with these sides?

Re: Sides work during testing, but not in actual gameplay!

Posted: Sun Jun 28, 2009 7:54 pm
by Havoc 526
Not a new era, no. It may have something to do with the memorypoolsize commands.

Here is Coruscant.
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
Conquest = ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("AIHeroSupport")



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

-- Empire Attacking (attacker is always #1)
CIS = ATT
REP = DEF

ReadDataFile("RGH\\Realistic Galatic Hellfire mod\\addon\\RGH\\data\\_LVL_PC\\core.lvl")
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptPostLoad()

AddDeathRegion("death")
AddDeathRegion("death1")
AddDeathRegion("death2")
AddDeathRegion("death3")
AddDeathRegion("death4")




SetProperty ("LibCase1","MaxHealth",1000)
SetProperty ("LibCase2","MaxHealth",1000)
SetProperty ("LibCase3","MaxHealth",1000)
SetProperty ("LibCase4","MaxHealth",1000)
SetProperty ("LibCase5","MaxHealth",1000)
SetProperty ("LibCase6","MaxHealth",1000)
SetProperty ("LibCase7","MaxHealth",1000)
SetProperty ("LibCase8","MaxHealth",1000)
SetProperty ("LibCase9","MaxHealth",1000)
SetProperty ("LibCase10","MaxHealth",1000)
SetProperty ("LibCase11","MaxHealth",1000)
SetProperty ("LibCase12","MaxHealth",1000)
SetProperty ("LibCase13","MaxHealth",1000)
SetProperty ("LibCase14","MaxHealth",1000)


SetProperty ("LibCase1","CurHealth",1000)
SetProperty ("LibCase2","CurHealth",1000)
SetProperty ("LibCase3","CurHealth",1000)
SetProperty ("LibCase4","CurHealth",1000)
SetProperty ("LibCase5","CurHealth",1000)
SetProperty ("LibCase6","CurHealth",1000)
SetProperty ("LibCase7","CurHealth",1000)
SetProperty ("LibCase8","CurHealth",1000)
SetProperty ("LibCase9","CurHealth",1000)
SetProperty ("LibCase10","CurHealth",1000)
SetProperty ("LibCase11","CurHealth",1000)
SetProperty ("LibCase12","CurHealth",1000)
SetProperty ("LibCase13","CurHealth",1000)
SetProperty ("LibCase14","CurHealth",1000)



EnableSPHeroRules()

DisableBarriers("SideDoor1")
DisableBarriers("MainLibraryDoors")
DisableBarriers("SideDoor2")
DisableBarriers("SIdeDoor3")
DisableBarriers("ComputerRoomDoor1")
DisableBarriers("StarChamberDoor1")
DisableBarriers("StarChamberDoor2")
DisableBarriers("WarRoomDoor1")
DisableBarriers("WarRoomDoor2")
DisableBarriers("WarRoomDoor3")
PlayAnimation("DoorOpen01")
PlayAnimation("DoorOpen02")


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}

--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()


herosupport:AddSpawnCP("cp1","CP1SpawnPath")
herosupport:AddSpawnCP("cp2","CP2SpawnPath")
herosupport:AddSpawnCP("cp3","CP3SpawnPath")
herosupport:AddSpawnCP("cp4","CP4SpawnPath")
herosupport:AddSpawnCP("cp5","CP5SpawnPath")
herosupport:AddSpawnCP("cp6","CP6SpawnPath")
herosupport:Start()


end

function ScriptInit()
-- Designers, these two lines *MUST* be first.

SetPS2ModelMemory(4056000)

SetMapNorthAngle(180, 1)
SetMaxFlyHeight(25)
SetMaxPlayerFlyHeight (25)
AISnipeSuitabilityDist(30)

SetMemoryPoolSize ("ClothData",90)
SetMemoryPoolSize ("Combo",90) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",990) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",990) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",990) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",990) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",9000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",900) -- should be ~1x #combo

SetMemoryPoolSize("Music", 33)

SetUberMode(1);
ReadDataFile("ingame.lvl")


ReadDataFile("sound\\cor.lvl;cor1cw")

ReadDataFile("SIDE\\RGH\\tur.lvl",
"tur_bldg_laser")

ReadDataFile("SIDE\\RGH\\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_jettrooper",
--"rep_inf_ep3_commander",
"rep_inf_barc",
"rep_inf_commando_boss",
"rep_hero_obiwan",
"rep_hover_fightertank",
"rep_bldg_artillerygun",
"rep_fly_gunship")

ReadDataFile("SIDE\\RGH\\501.lvl",
"rep_inf_501_rifleman",
"rep_inf_501_rocketeer",
"rep_inf_501_engineer",
"rep_inf_501_sniper",
"rep_inf_501_officer",
"rep_inf_501_jettrooper",
"rep_inf_501_commander")

ReadDataFile("SIDE\\RGH\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_officer",
"cis_inf_sniper",
"cis_inf_droideka",
"cis_inf_recon",
"cis_inf_magnaguard",
"cis_inf_commander",
"cis_hero_countdooku")

ReadDataFile("SIDE\\RGH\\jungle.lvl",
"cis_inf_kas_rifleman",
"cis_inf_kas_rocketeer",
"cis_inf_kas_sniper")

ReadDataFile("SIDE\\rep.lvl",
"rep_fly_assault_dome",
"rep_fly_gunship_dome")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_dome")

SetupTeams{

rep = {
team = REP,
units = 86,
reinforcements = 300,
soldier = { "rep_inf_501_rifleman",23,26},
assault = { "rep_inf_501_rocketeer",5,8},
engineer = { "rep_inf_501_engineer",5,8},
sniper = { "rep_inf_501_sniper",5,8},
officer = {"rep_inf_501_officer",6,9},
special = { "rep_inf_501_jettrooper",5,8},

},
cis = {
team = CIS,
units = 86,
reinforcements = 300,
soldier = { "cis_inf_rifleman",23,26},
assault = { "cis_inf_rocketeer",5,8},
engineer = { "cis_inf_engineer",5,8},
sniper = { "cis_inf_sniper",5,8},
officer = {"cis_inf_officer",6,9},
special = { "cis_inf_droideka",5,8},
}
}

AddUnitClass(REP, "rep_inf_barc",6,9)
AddUnitClass(REP, "rep_inf_commando_boss",6,9)
AddUnitClass(REP, "rep_inf_501_commander",0,1)
AddUnitClass(CIS, "cis_inf_recon",6,9)
AddUnitClass(CIS, "cis_inf_magnaguard",6,9)
AddUnitClass(CIS, "cis_inf_commander",0,1)



-- Level Stats
ClearWalkers()
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(1, 0) --
AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponCnt = 210
SetMemoryPoolSize("Aimer", 22)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 250)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 18)
SetMemoryPoolSize("EntitySoundStream", 10)
SetMemoryPoolSize("EntitySoundStatic", 0)
SetMemoryPoolSize("MountedTurret",12)
SetMemoryPoolSize("PathFollower", 172)
SetMemoryPoolSize("Navigator", 172)
SetMemoryPoolSize("Obstacle", 375)
SetMemoryPoolSize("SoundSpaceRegion", 38)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 140)
SetMemoryPoolSize("UnitAgent", 172)
SetMemoryPoolSize("UnitController", 172)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 4)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("cor\\cor1.lvl","cor1_Conquest")
SetDenseEnvironment("True")
-- SetMaxFlyHeight(25)
--SetMaxPlayerFlyHeight (25)
AddDeathRegion("DeathRegion1")

-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_emt")

SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_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")


-- Camera Stats
--Tat 1 - Dune Sea
AddCameraShot(0.419938, 0.002235, -0.907537, 0.004830, -15.639358, 5.499980, -176.911179);
AddCameraShot(0.994506, 0.104463, -0.006739, 0.000708, 1.745251, 5.499980, -118.700668);
AddCameraShot(0.008929, -0.001103, -0.992423, -0.122538, 1.366768, 16.818106, -114.422173);
AddCameraShot(0.761751, -0.117873, -0.629565, -0.097419, 59.861904, 16.818106, -81.607773);
AddCameraShot(0.717110, -0.013583, 0.696703, 0.013197, 98.053314, 11.354497, -85.857857);
AddCameraShot(0.360958, -0.001053, -0.932577, -0.002721, 69.017578, 18.145807, -56.992413);
AddCameraShot(-0.385976, 0.014031, -0.921793, -0.033508, 93.111061, 18.145807, -20.164375);
AddCameraShot(0.695468, -0.129569, -0.694823, -0.129448, 27.284357, 18.145807, -12.377695);
AddCameraShot(0.009002, -0.000795, -0.996084, -0.087945, 1.931320, 13.356332, -16.410583);
AddCameraShot(0.947720, -0.145318, 0.280814, 0.043058, 11.650738, 16.955814, 28.359180);
AddCameraShot(0.686380, -0.127550, 0.703919, 0.130810, -30.096384, 11.152356, -63.235146);
AddCameraShot(0.937945, -0.108408, 0.327224, 0.037821, -43.701199, 8.756138, -49.974789);
AddCameraShot(0.531236, -0.079466, -0.834207, -0.124787, -62.491230, 10.305247, -120.102989);
AddCameraShot(0.452286, -0.179031, -0.812390, -0.321572, -50.015198, 15.394646, -114.879379);
AddCameraShot(0.927563, -0.243751, 0.273918, 0.071982, 26.149965, 26.947924, -46.834148);

---------------------------------
-- AIHEROSUPPORT NOTE:
-- Note how ONLY these three lines were moved here instead of being left above
-- This will correct the unit list display sizing problem in the game (for when a side has more than 7 unit types)
----------

herosupport = AIHeroSupport:New{gameMode = "conquest", minSpawnTime = 1}
herosupport:SetHeroClass(REP, "rep_hero_obiwan")
herosupport:SetHeroClass(CIS, "cis_hero_countdooku")

---------------------------------

end
See anything wrong with it?

Re: Sides work during testing, but not in actual gameplay!

Posted: Sun Jun 28, 2009 8:05 pm
by Maveritchell
As I meant to say above and will say plainly now - if you have a crash that shows up not in the modtools but during actual gameplay, it will not be overt. If you look at your .lua or anything else, it will not look wrong (and on some level it isn't wrong, because it works in one version of the game).

To fix that kind of error you will need to work backwards slowly and methodically. If you changed a whole lot at once, tough noogies - you're going to have to do a lot of work. There isn't an easy solution, just start taking things out (I would start with eliminating single units at a time) and see how far down you can narrow the problem.

Re: Sides work during testing, but not in actual gameplay!

Posted: Sun Jun 28, 2009 10:59 pm
by obiboba3po
if im not mistaken (ive never loaded sides through an existing map) aren't custom sides in a lua set up like this?

Code: Select all

    ReadDataFile("dc: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")
i dont see why there would be 2 things after SIDE (RGH\\501.lvl)

Code: Select all

ReadDataFile("SIDE\\RGH\\501.lvl",
"rep_inf_501_rifleman",
"rep_inf_501_rocketeer",
"rep_inf_501_engineer",
"rep_inf_501_sniper",
"rep_inf_501_officer",
"rep_inf_501_jettrooper",
"rep_inf_501_commander")
although like i said i've never loaded a custom made side into a stock map, please correct me if i am wrong.
(wait never mind i think i see what the RGH is for. but you still need a dc: do you not?)

Re: Sides work during testing, but not in actual gameplay!

Posted: Mon Jun 29, 2009 1:12 am
by Frisbeetarian
He knows what he's doing. He set it up correctly. The "dc:" just tells the game that it's looking for something in a different directory. If you know how it works, you can manipulate the directory structure and never have to use the "dc:".

Just to confirm: You ran the sides in a test map; it worked. You set up the Lua scripts as displayed for both Coruscant and Utapau, ran the maps through the BF2_modtools.exe; they both worked. You then ran both maps though the regular game; they both failed. Is this all true?

Re: Sides work during testing, but not in actual gameplay!

Posted: Mon Jun 29, 2009 2:42 am
by Tourny
The Mod Tools program is built with a much higher leaniancy (I don't think I spelled that right) level than the real game. once I had a problem with the combo animation memory pool and the real game would crash everytime I swung my saber for a particular unit.

But I have another question:

You said it crashes after 5 seconds. Could you tell us what happens before it crashes? Sometimes that can tell you something. (like how if something about scriptpostload is wrong the bots will adamantly refuse to spawn until you fix it)

Re: Sides work during testing, but not in actual gameplay!

Posted: Tue Jun 30, 2009 12:32 am
by Havoc 526
To Frisbeetarian: Every last word of it. :runaway:

Well, I just solved it, and to answer your question, it had absolutly NOTHING to do with my sides, the problem was the droids. Apparently, you're not supposed to remove the explosion effect from a droid's random explosion of death. All of that trouble for that one problem! So, as a result, when I killed a droid, the game crashed. :oops: Everything else was fine.


Well, I think this can be locked now. Don't you?

Re: Sides work during testing, but not in actual gameplay!

Posted: Tue Jun 30, 2009 2:31 am
by Tourny
lol. A pattern was sought and a pattern was found...

Although I HAVE removed that random explosion of death before and not experienced a problem.

Re: Sides work during testing, but not in actual gameplay!

Posted: Tue Jun 30, 2009 3:04 am
by [RDH]Zerted
It is solved, so the topic title should be changed to let people know they don't have to read this. However, I don't think all the solved topics need to be locked.