Page 1 of 1

My custom Era works on all maps aside from Mygeeto

Posted: Wed May 13, 2020 4:33 pm
by GitFinda
Hello, So i thought about editing this question into my previous thread, But i thought it was too much of it's own issue so it deserves a new topic. FtF, Thanks to the RC profile picture guy for helping me out, Traced back and on the 4th time or so realized what i did wrong, So thank you!

Now back to the main topic. So yeah, Basically my custom era crashes the moment the map finishes loading on mygeeto. I just see a flash of the faction select screen and then it's gone. Doesn't happen with any other map, I repeated the process for Mygeeto a couple of times to check if i might have done something differently, But i haven't.

Not sure what the issue could be. Maybe i have a corrupted map file or something?

Thanks in advance

Re: My custom Era works on all maps aside from Mygeeto

Posted: Thu May 14, 2020 7:33 am
by Benoz
Could be a lua problem, but since it's crashing right after loading it seems there's something wrong with the units.
Usually when this happens to me a certain weapon of a unit isn't set up correctly and as soon as the AI tries to spawn and uses that weapon, it crashes.

Could you post your lua file anyway?

Re: My custom Era works on all maps aside from Mygeeto

Posted: Thu May 14, 2020 8:05 am
by GitFinda
The66Order66 wrote:
Thu May 14, 2020 7:33 am
Could be a lua problem, but since it's crashing right after loading it seems there's something wrong with the units.
Usually when this happens to me a certain weapon of a unit isn't set up correctly and as soon as the AI tries to spawn and uses that weapon, it crashes.

Could you post your lua file anyway?
Yeah maybe, Though it's weird since i didn't edit anything about the units.
You mean the lua file in the common/scripts/xxx right? where the gamemodes are? If so there you go
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script --
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")

-- Republic Attacking (attacker is always #1)
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2

---------------------------------------------------------------------------
-- 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()

DisableBarriers("dropship")
DisableBarriers("shield_03")
DisableBarriers("shield_02")
DisableBarriers("shield_01")
DisableBarriers("ctf")
DisableBarriers("ctf1")
DisableBarriers("ctf2")
DisableBarriers("ctf3")
DisableBarriers("coresh1")

EnableSPHeroRules()

cp1 = CommandPost:New{name = "CP1_CON"}
cp2 = CommandPost:New{name = "CP2_CON"}
--cp3 = CommandPost:New{name = "CP3_CON"}
cp4 = CommandPost:New{name = "CP4_CON"}
cp5 = CommandPost:New{name = "CP5_CON"}
cp7 = CommandPost:New{name = "CP7_CON"}
--cp8 = CommandPost:New{name = "CP8_CON"}

conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF, textATT = "game.modes.con", textDEF = "game.modes.con2", multiplayerRules = true}

conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
--conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp7)
--conquest:AddCommandPost(cp8)

conquest:Start()

end

function ScriptInit()
-- Designers, these two lines *MUST* be first!
StealArtistHeap(2048 * 1024)
SetPS2ModelMemory(4000000)
ReadDataFile("ingame.lvl")

ReadDataFile("sound\\myg.lvl;myg1cw")

ReadDataFile("dc:SIDE\\rep.lvl",
--"rep_fly_assault_dome",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_jettrooper",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_fly_gunship_dome",
"rep_hover_fightertank",
"rep_hero_kiyadimundi")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_hover_aat",
"cis_fly_gunship_dome",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_grievous")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_recoilless_lg")


SetupTeams{

rep={
team = REP,
units = 32,
reinforcements = 150,
soldier = {"rep_inf_ep3_rifleman", 9, 25},
assault = {"rep_inf_ep3_rocketeer", 1, 4},
engineer = {"rep_inf_ep3_engineer", 1, 4},
sniper = {"rep_inf_ep3_sniper", 1, 4},
officer = {"rep_inf_ep3_officer", 1, 4},
special = {"rep_inf_ep3_jettrooper", 1, 4},


},

cis={
team = CIS,
units = 32,
reinforcements = 150,
soldier = {"cis_inf_rifleman", 9, 25},
assault = {"cis_inf_rocketeer", 1, 4},
engineer = {"cis_inf_engineer", 1, 4},
sniper = {"cis_inf_sniper", 1, 4},
officer = {"cis_inf_officer", 1, 4},
special = {"cis_inf_droideka", 1, 4},
}
}


-- Hero Setup Section --

SetHeroClass(REP, "rep_hero_kiyadimundi")
SetHeroClass(CIS, "cis_hero_grievous")

-- Level Stats
ClearWalkers()
AddWalkerType(0, 4)
AddWalkerType(2, 0)
local weaponCnt = 230
SetMemoryPoolSize("Aimer", 60)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 250)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 19)
SetMemoryPoolSize("EntityHover", 7)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntitySoundStream", 1)
SetMemoryPoolSize("EntitySoundStatic", 76)
SetMemoryPoolSize("MountedTurret", 16)
SetMemoryPoolSize("Navigator", 50)
SetMemoryPoolSize("Obstacle", 500)
SetMemoryPoolSize("PathNode", 256)
SetMemoryPoolSize("TreeGridStack", 275)
SetMemoryPoolSize("UnitAgent", 50)
SetMemoryPoolSize("UnitController", 50)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("myg\\myg1.lvl", "myg1_conquest")
SetDenseEnvironment("false")
AddDeathRegion("deathregion")
SetMaxFlyHeight(20)
SetMaxPlayerFlyHeight(20)

-- 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\\myg.lvl", "myg1")
OpenAudioStream("sound\\myg.lvl", "myg1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\myg.lvl", "myg1_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(1, "Repleaving")
SetOutOfBoundsVoiceOver(2, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_myg_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_myg_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_myg_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_myg_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_myg_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_myg_amb_end", 2,1)

SetVictoryMusic(REP, "rep_myg_amb_victory")
SetDefeatMusic (REP, "rep_myg_amb_defeat")
SetVictoryMusic(CIS, "cis_myg_amb_victory")
SetDefeatMusic (CIS, "cis_myg_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 Shizzle--

-- Collector Shot
AddCameraShot(0.008315, 0.000001, -0.999965, 0.000074, -64.894348, 5.541570, 201.711090);
AddCameraShot(0.633584, -0.048454, -0.769907, -0.058879, -171.257629, 7.728924, 28.249359);
AddCameraShot(-0.001735, -0.000089, -0.998692, 0.051092, -146.093109, 4.418306, -167.739212);
AddCameraShot(0.984182, -0.048488, 0.170190, 0.008385, 1.725611, 8.877428, 88.413887);
AddCameraShot(0.141407, -0.012274, -0.986168, -0.085598, -77.743042, 8.067328, 42.336128);
AddCameraShot(0.797017, 0.029661, 0.602810, -0.022434, -45.726467, 7.754435, -47.544712);
AddCameraShot(0.998764, 0.044818, -0.021459, 0.000963, -71.276566, 4.417432, 221.054550);
end


Re: My custom Era works on all maps aside from Mygeeto

Posted: Thu May 14, 2020 11:13 am
by Sporadia
What does it say in the debug log? Also, have you tested Ki Adi Mundi on anything else? Since he isn't on any other maps except hero assault, he's the first thing I'd look at.

Re: My custom Era works on all maps aside from Mygeeto

Posted: Thu May 14, 2020 11:51 am
by GitFinda
Sporadia wrote:
Thu May 14, 2020 11:13 am
What does it say in the debug log? Also, have you tested Ki Adi Mundi on anything else? Since he isn't on any other maps except hero assault, he's the first thing I'd look at.
I tried removing both him and grevious from the readdatafile and setHeroClass sections but still no luck. Maybe the issue is the map itself?
EDIT: So i've encountered another odd issue which i'm not sure if is an actual issue or not. So i tried redoing everything in a new map but switching the base from myg1c_con to myg1g_con, Just to check if the issue might be the CW era. So i load the map, And once again, I get flashed with a CW selection screen and then i crash to the desktop. Even weirder is that when i check in the common/scripts/myg1a_con folder the units are GCW imperial and rebel sides. I feel like i messed something up pretty bad

Mods pls, It's been like 6 hours

Re: My custom Era works on all maps aside from Mygeeto

Posted: Thu May 14, 2020 1:23 pm
by Benoz
I second Sporadia's suggestion. If you decide not to edit Ki Adi then just load the vanilla hero

Re: My custom Era works on all maps aside from Mygeeto

Posted: Fri May 15, 2020 8:36 am
by GitFinda
The66Order66 wrote:
Thu May 14, 2020 1:23 pm
I second Sporadia's suggestion. If you decide not to edit Ki Adi then just load the vanilla hero
So since removing both of the heroes didn't work, I tried replacing them. It also didn't do anything. Btw are you sure mundi isn't on the stock mygeeto? could have sworn he is available in the campaign.
i also tried uninstalling and reinstalling the modtools to check maybe the MYG file was bad but nothing has changed.

If you guys got anything i could try, No matter how obscure it is, Pleae do let me know. Since i'm really out of ideas

Re: My custom Era works on all maps aside from Mygeeto

Posted: Fri May 15, 2020 2:43 pm
by Sporadia
GitFinda wrote:
Fri May 15, 2020 8:36 am
Btw are you sure mundi isn't on the stock mygeeto? could have sworn he is available in the campaign.
He is on stock Mygeeto, but the only other thing he appears in is Mos Eisley hero assault. So if he was crashing the game then it could have looked like only Mygeeto was crashing. That's what I meant. Regardless, you've tried it without the heroes now so I guess that's not it. What does it say in the debug log? Also, can I check that the 'dc:' when you're reading the sides is intentional? Have you made changes to all those units? If you're using stock units then there's nothing preventing you from loading them out of the normal SIDE\\rep.lvl or SIDE\\cis.lvl. You only need dc:SIDE\\rep.lvl and dc:SIDE\\cis.lvl to load units which you've modded in some way.

In other words, say you've made changes to rep_inf_ep3_rifleman, and you wanted to add an entirely new unit to the cis side called cis_inf_newguy. But you no longer wanted to use the droideka. The cleanest way to load it all would be like this:

Code: Select all

ReadDataFile("SIDE\\rep.lvl",
	"rep_fly_gunship_dome",
	-- "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_hover_fightertank",
	"rep_hero_kiyadimundi")

ReadDataFile("SIDE\\cis.lvl",
	"cis_fly_gunship_dome",
	"cis_inf_rifleman",
	"cis_inf_rocketeer",
	"cis_inf_engineer",
	"cis_inf_sniper",
	"cis_inf_officer",
	-- "cis_inf_droideka",
	"cis_hover_aat",
	"cis_hero_grievous")

ReadDataFile("dc:SIDE\\rep.lvl",
	"rep_inf_ep3_rifleman")
	
ReadDataFile("dc:SIDE\\cis.lvl",
	"cis_inf_newguy")

Re: My custom Era works on all maps aside from Mygeeto

Posted: Fri May 15, 2020 3:08 pm
by Benoz
I checked the lua again and compared it with a stock myg1c_con.lua and I couldn't find anything that could cause the crash. So it has to be something missing/wrong with the sides. As Sporadia already mentioned (again before me) only load the units from dc: you're sure you edited properly. With properly I mean working msh, odf, req and entry in the side.req.

You say every map works expect Mygeeto so I assume you also got it working on Kashyyyk and Naboo? Did you load the "rep_hover_fightertank" and the "cis_hover_aat" on those maps from the stock side or your custom? And what about the "cis_fly_gunship_dome"? I don't recall if there's any mod customizing that at all, so I'd definitely would load that from stock (although I doubt that's causing the crash).

Re: My custom Era works on all maps aside from Mygeeto

Posted: Sun May 17, 2020 3:31 am
by GitFinda
The66Order66 wrote:
Fri May 15, 2020 3:08 pm
I checked the lua again and compared it with a stock myg1c_con.lua and I couldn't find anything that could cause the crash. So it has to be something missing/wrong with the sides. As Sporadia already mentioned (again before me) only load the units from dc: you're sure you edited properly. With properly I mean working msh, odf, req and entry in the side.req.

You say every map works expect Mygeeto so I assume you also got it working on Kashyyyk and Naboo? Did you load the "rep_hover_fightertank" and the "cis_hover_aat" on those maps from the stock side or your custom? And what about the "cis_fly_gunship_dome"? I don't recall if there's any mod customizing that at all, so I'd definitely would load that from stock (although I doubt that's causing the crash).
Yeah all of these were alright. Now i managed to sorta fix it by reinstalling the game, looks like the issue really has been something in the core game's files missing or being corrupt oddly enough. suprising considering i can play stock mygeeto just fine.

Thanks for your and sporadia's help though, I really do appreciate it