Page 1 of 1

Space Levels in Custom Galactic Conquest

Posted: Mon Sep 21, 2020 5:15 pm
by DrJHanning
Has anyone who's ever played around with custom GCs before found out if it's possible to assign specific space maps for specific planets? So for example say you had a modded Space Jakku map, and you wanted it so that every time a space battle occurred over the planet Jakku, that map would be played, but not over any other planet? And then expand this over the whole GC map so each planet had a unique space map in the same way they have a unique ground map?

(I don't have either of those Jakku maps by the way, I just picked a planet at random.)

Re: Space Levels in Custom Galactic Conquest

Posted: Tue Sep 22, 2020 3:14 am
by Anakin
well, isn't this already the case for stock maps such as coruscant, hoth, geonosis,... ??

Re: Space Levels in Custom Galactic Conquest

Posted: Tue Sep 22, 2020 6:16 am
by DrJHanning
Anakin wrote:
Tue Sep 22, 2020 3:14 am
well, isn't this already the case for stock maps such as coruscant, hoth, geonosis,... ??
Unfortunately not. In a GC, there are actually only 3 space maps. For a GCW one for example, they are spa1g, spa8g and spa9g. In instant action, these levels load as Space Yavin, Space Hoth and Space Tatooine respectively, but in GC they're used for all planets and empty space. If a space battle ensues over a star, the game picks one of the three at random and it just appears as deep space. If a space battle ensues over a planet, the game picks one at random and then adds a still of the planet into the background, and loads with the correct name (i.e. Space Dagobah) all to create an illusion. It's very effective too, but in reality whenever you've played a stock GC, you've only ever played 1 of 3 layouts.

I feel like figuring out how the game loads in the image of the planets might be the key to cracking what I'm trying to do, if what I'm trying to do is even possible.

Re: Space Levels in Custom Galactic Conquest

Posted: Wed Sep 23, 2020 2:49 pm
by Maveritchell
I haven't tried this, but it looks like you might be able to munge a special version of ifs_freeform_battle_mode to edit line 47

Code: Select all

and ifs_freeform_main.spaceMission or ifs_freeform_main.planetMission[ifs_freeform_main.planetSelected]
so that the space missions use the same filter as planet missions. You'd then want to set up your ifs_freeform_init_[yourera] to set up the spaceMission section the same way as the planetMission section.

No idea if it'll work, but it'd be where I'd start.

Re: Space Levels in Custom Galactic Conquest

Posted: Thu Sep 24, 2020 10:13 am
by DrJHanning
Maveritchell wrote:
Wed Sep 23, 2020 2:49 pm
I haven't tried this, but it looks like you might be able to munge a special version of ifs_freeform_battle_mode to edit line 47

Code: Select all

and ifs_freeform_main.spaceMission or ifs_freeform_main.planetMission[ifs_freeform_main.planetSelected]
so that the space missions use the same filter as planet missions. You'd then want to set up your ifs_freeform_init_[yourera] to set up the spaceMission section the same way as the planetMission section.

No idea if it'll work, but it'd be where I'd start.
Interesting. I'll give it a go and let you know if it works. Thanks Mav!

Re: Space Levels in Custom Galactic Conquest

Posted: Fri Feb 10, 2023 7:24 pm
by twinchaka
I have found the solution to this problem. The default space maps use this in their spa6c_cmn script (or whatever other space script).

-- load sky dome
local world = "cor"
if ScriptCB_IsMissionSetupSaved() then
local missionSetup = ScriptCB_LoadMissionSetup()
world = missionSetup.world or world
end
ReadDataFile("SPA\\spa_sky.lvl", world)

If you place this into your modded space level script in place of the one listed below, then it will load whatever sky dome goes with the associated planet. You can change the default sky dome by changing the local world = "xxx" . Hope this helps.

Here is the one you need to replace:

ReadDataFile("dc:XXX\\spa_sky.lvl", "cor")