Topic: ED scripts: Need to know what terrain type is called for...  (Read 1129 times)

0 Members and 1 Guest are viewing this topic.

Offline Dizzy

  • Captain
  • *
  • Posts: 6179
ED scripts: Need to know what terrain type is called for...
« on: December 30, 2004, 06:37:17 pm »
Only for the Base and Planet assault missions, what terrain is called for? Does the script generate a map based on the map terrain or is it permanently set to empty space for every mission?

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: ED scripts: Need to know what terrain type is called for...
« Reply #1 on: December 31, 2004, 08:29:05 am »
Check here: http://klingon.stasis.ca/sources_and_utils/EvilDave/EDMissionSourceCode.zip

If those sources are not current with the missions you are looking at then try opening the .scrs in a hex editor, you should be able to get a pretty good idea of the terrain its looking for.

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: ED scripts: Need to know what terrain type is called for...
« Reply #2 on: December 31, 2004, 10:53:53 am »
Well, it looks like the missions from those sources will respond to various terrian:

From Met_NWBaseAssault:

in missionmaps.h:
Code: [Select]
int32 TotalMaps = 15;
const char* MapTypes[] = { "Met_NWBaseLP Map",
"Met_NWBaseDefsat Map",
"Met_NWBaseBS Map",
"Met_NWBaseBATS Map",
"Met_NWBaseSB Map",
"Met_NWBaseNebLP Map",
"Met_NWBaseNebDefsat Map",
"Met_NWBaseNebBS Map",
"Met_NWBaseNebBATS Map",
"Met_NWBaseNebSB Map",
"Met_NWBaseAstLP Map",
"Met_NWBaseAstDefsat Map",
"Met_NWBaseAstBS Map",
"Met_NWBaseAstBATS Map",
"Met_NWBaseAstSB Map",
};

and in Met_NWBaseAssault.cpp:

Code: [Select]
tMapTerrain tMet_NWBaseAssault::mAssignMapTerrainTypes(int32 Map)
{
switch ( Map )
{
case 0: // space, listening post
return tMapTerrain (kTerrainSpace|kTerrainBlackholes, kPlanetNone, kBaseListeningPost);
break;
case 1: // space, defense satellite
return tMapTerrain (kTerrainSpace|kTerrainBlackholes, kPlanetNone, kBaseWeaponsPlatform);
break;
case 2: // space, base station
return tMapTerrain (kTerrainSpace|kTerrainBlackholes, kPlanetNone, kBaseBaseStation);
break;
case 3: // space, battle station
return tMapTerrain (kTerrainSpace|kTerrainBlackholes, kPlanetNone, kBaseBattleStation);
break;
case 4: // space, starbase
return tMapTerrain (kTerrainSpace|kTerrainBlackholes, kPlanetNone, kBaseStarbase);
break;
case 5: // space, listening post
return tMapTerrain (kTerrainNebula, kPlanetNone, kBaseListeningPost);
break;
case 6: // space, defense satellite
return tMapTerrain (kTerrainNebula, kPlanetNone, kBaseWeaponsPlatform);
break;
case 7: // space, base station
return tMapTerrain (kTerrainNebula, kPlanetNone, kBaseBaseStation);
break;
case 8: // space, battle station
return tMapTerrain (kTerrainNebula, kPlanetNone, kBaseBattleStation);
break;
case 9: // space, starbase
return tMapTerrain (kTerrainNebula, kPlanetNone, kBaseStarbase);
break;
case 10: // space, listening post
return tMapTerrain (kTerrainAsteroids, kPlanetNone, kBaseListeningPost);
break;
case 11: // space, defense satellite
return tMapTerrain (kTerrainAsteroids, kPlanetNone, kBaseWeaponsPlatform);
break;
case 12: // space, base station
return tMapTerrain (kTerrainAsteroids, kPlanetNone, kBaseBaseStation);
break;
case 13: // space, battle station
return tMapTerrain (kTerrainAsteroids, kPlanetNone, kBaseBattleStation);
break;
case 14: // space, starbase
return tMapTerrain (kTerrainAsteroids, kPlanetNone, kBaseStarbase);
break;
  default:
break;
}
return tMapTerrain();
}


Other planet and base missions look similar. Looks like they will generate a mission map that depends on the terrain of the map hex.



A planet in a nebula hex should not be capturable anyway.

It might be easiest just to test it, as it is possible that the game code (that we do no have), will eliminate nebulas from planetary assault missions... I have just never tested it...

Offline Hexx

  • Sexy Shoeless Lyran God Of War
  • Captain
  • *
  • Posts: 6058
Re: ED scripts: Need to know what terrain type is called for...
« Reply #3 on: December 31, 2004, 12:32:46 pm »
I know on at least one server there were Planet Assault missions drawn in Nebulas.
Courageously Protesting "Lyran Pelt Day"

Offline Bonk

  • Commodore
  • *
  • Posts: 13298
  • You don't have to live like a refugee.
Re: ED scripts: Need to know what terrain type is called for...
« Reply #4 on: December 31, 2004, 01:47:31 pm »
Hex 7,3 on the SFB-OP server is a neutral nebula hex with a planet (asteroid base 3) and a starbase... there's a place to test it out?

Offline FPF-SCM_TraceyG_XC

  • Empress of the Empire
  • Commander
  • *
  • Posts: 2543
  • Gender: Female
Re: ED scripts: Need to know what terrain type is called for...
« Reply #5 on: December 31, 2004, 02:16:02 pm »
I downloaded the scripts from the link, Bonk. Met_NWBaseAssault has maps for nebula terrain, and the maps do include nebulas, so you will get a nebula when taking this mission on a base in a nebula hex.
Captain FPF-TraceyG, Federation Protection Fleet


SFC2.net Admin member
SFC3.net Admin member
Voting member of the DGA
Member of XenoCorp, Squadron Commodore

Offline Dizzy

  • Captain
  • *
  • Posts: 6179
Re: ED scripts: Need to know what terrain type is called for...
« Reply #6 on: December 31, 2004, 09:01:41 pm »
Thanks, guys. That sux.

el-Karnak

  • Guest
Re: ED scripts: Need to know what terrain type is called for...
« Reply #7 on: January 03, 2005, 01:05:31 pm »
If you don't have a corresponding map for a given terrain type on the dyna map then the mission will not load, and after about a minute players will start Alt-F4ing out of them. This situation is one of those most script end-users think is a player network connectivity issue but it's acually a scripting issue. So, you need to have these maps or else short-circuit them with something else that works. ;)

NW's 15 maps is a good base to start from.  EEK uses the same map base.
« Last Edit: January 03, 2005, 04:00:24 pm by el-Karnak »