This repository has been archived by the owner on May 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
How to add a new StarBase. Along with adding ruins to a planet
Including a unique image for the StarBase and unique text reports for the StarBase & Ruins This particular tutorial resides in the Microscopii at the first planet.
- Loading branch information
Showing
15 changed files
with
212 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#(DESTROYED BASE) | ||
---- REPORT FROM ORBIT ---- | ||
|
||
WE HAVE EXPLORED THE INTERIOR OF THE STARBASE. IT HAS BEEN COMPLETELY DESTROYED. | ||
|
||
ACCORDING TO OUR XENO-FORENSICS EXPERTS, THE REACTOR ABOARD THE STARBASE RAN OUT OF FUEL AND SHUT DOWN, TERMINATING LIFE SUPPORT AND FORCING THE INHABITANTS INTO THE ESCAPE PODS, WHICH ARE NOWHERE TO BE FOUND. WE DON'T KNOW WHO THEY WERE OR WHAT THEY LOOKED LIKE, AS THEY LEFT THE STARBASE COMPLETELY EMPTY. | ||
|
||
AND I MEAN EMPTY. THERE ARE NO BODIES, ANYTHING OF VALUE HAS BEEN RIPPED OUT OF THE WALLS, AND EVEN SOME OF THE SUPER-STRUCTURE IS MISSING. EVIDENCE OF ELECTRICAL SCORING IS EVERYWHERE, IT LOOKS AS THOUGH SOMEONE OR SOMETHING CAME THROUGH AND MELTED THE PLACE DOWN FOR RAW MATERIALS. | ||
|
||
WE CAN FIND NOTHING ELSE HERE. RETURNING TO THE SHIP. | ||
|
||
---- END OF REPORT ---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#(RUINS 1) | ||
---- REPORT FROM SURFACE ---- | ||
|
||
EVERYONE AND EVERYTHING ON THIS PLANET HAS BEEN DESTROYED, CAPTAIN. | ||
|
||
WE CAN ONLY SPECULATE TO THE EVENTS THAT TRANSPIRED HERE BUT IT LOOKS AS THOUGH A CATASTROPIC EVENT OF PLANETARY PREPORTIONS HAS RIPPED THIS WORLD TO SHREDS. | ||
|
||
OF THE INFORMATION WE CAN GATHER FROM THE RUINS OF THIS CIVILIZATION IS THAT THEY PREPARED TO MOVE OFF-WORLD BY BUILDING A GIANT STARBASE IN FAR ORBIT, ALMOST IF THEY KNEW WHAT WAS GOING TO HAPPEN HERE. | ||
|
||
UNFORTUNATELY THAT IS ALL WE CAN MANAGE TO LEARN HERE BECAUSE THE CONSTANT EARTHQUAKES ARE LEVELING WHAT IS LEFT OF THESE RUINS WHILE ALSO THREATENING TO TEAR THE LANDER APART. | ||
|
||
CAPTAIN, IN REGARDS TO THE SAFETY OF THE CREW, WE ARE RETURNING TO THE SHIP. | ||
|
||
---- END OF REPORT ---- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
//Copyright Paul Reiche, Fred Ford. 1992-2002 | ||
|
||
/* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
*/ | ||
|
||
#include "genall.h" | ||
#include "../lander.h" | ||
#include "../planets.h" | ||
#include "../../build.h" | ||
#include "../../comm.h" | ||
#include "../../globdata.h" | ||
#include "../../nameref.h" | ||
#include "../../setup.h" | ||
#include "../../sounds.h" | ||
#include "../../state.h" | ||
#include "libs/mathlib.h" | ||
|
||
static bool GenerateBase_generatePlanets (SOLARSYS_STATE *solarSys); | ||
static bool GenerateBase_generateMoons (SOLARSYS_STATE *solarSys, | ||
PLANET_DESC *planet); | ||
static bool GenerateBase_generateOrbital (SOLARSYS_STATE *solarSys, | ||
PLANET_DESC *world); | ||
static COUNT GenerateBase_generateEnergy (const SOLARSYS_STATE *, | ||
const PLANET_DESC *world, COUNT whichNode, NODE_INFO *); | ||
static bool GenerateBase_pickupEnergy (SOLARSYS_STATE *solarSys, | ||
PLANET_DESC *world, COUNT whichNode); | ||
|
||
// This struct contains all the functions necessary to generate your star system | ||
const GenerateFunctions generateStarBaseFunctions = { | ||
/* .initNpcs = */ GenerateDefault_initNpcs, | ||
/* .reinitNpcs = */ GenerateDefault_reinitNpcs, | ||
/* .uninitNpcs = */ GenerateDefault_uninitNpcs, | ||
/* .generatePlanets = */ GenerateBase_generatePlanets, | ||
/* .generateMoons = */ GenerateBase_generateMoons, | ||
/* .generateName = */ GenerateDefault_generateName, | ||
/* .generateOrbital = */ GenerateBase_generateOrbital, | ||
/* .generateMinerals = */ GenerateDefault_generateMinerals, | ||
/* .generateEnergy = */ GenerateBase_generateEnergy, | ||
/* .generateLife = */ GenerateDefault_generateLife, | ||
/* .pickupMinerals = */ GenerateDefault_pickupMinerals, | ||
/* .pickupEnergy = */ GenerateBase_pickupEnergy, | ||
/* .pickupLife = */ GenerateDefault_pickupLife, | ||
}; | ||
|
||
|
||
static bool | ||
GenerateBase_generatePlanets (SOLARSYS_STATE *solarSys) | ||
{ | ||
GenerateDefault_generatePlanets (solarSys); // Procedurally generates the planets for this system based on star location and type | ||
|
||
solarSys->PlanetDesc[0].data_index = SHATTERED_WORLD; // Type of world for the specified planet in array | ||
solarSys->PlanetDesc[0].NumPlanets = MAX_MOONS; // Number of moons for specific planet in the array [MAX_MOONS is 4] | ||
|
||
return true; | ||
} | ||
|
||
static bool | ||
GenerateBase_generateMoons (SOLARSYS_STATE *solarSys, PLANET_DESC *planet) | ||
{ | ||
GenerateDefault_generateMoons (solarSys, planet); | ||
|
||
// matchWorld (solarSys, planet, Which_Planet, Which_Moon_of_Planet) | ||
// alternatively instead of Which_Moon you can just put "MATCH_PLANET" | ||
// to only match the planet itself and not the moons | ||
if (matchWorld (solarSys, planet, 0, MATCH_PLANET)) | ||
{ | ||
solarSys->MoonDesc[3].data_index = DESTROYED_STARBASE; // Type of world for the specified moon | ||
} | ||
|
||
return true; | ||
} | ||
|
||
static bool | ||
GenerateBase_generateOrbital (SOLARSYS_STATE *solarSys, PLANET_DESC *world) | ||
{ | ||
// matchWorld (solarSys, planet, Which_Planet, Which_Moon_of_Planet) | ||
// alternatively instead of Which_Moon you can just put "MATCH_PLANET" | ||
// to only match the planet itself and not the moons | ||
if (matchWorld (solarSys, world, 0, 3)) | ||
{ // Since we're in orbit we have to load the lander reports manually | ||
/* Starbase */ | ||
LoadStdLanderFont (&solarSys->SysInfo.PlanetInfo); // Loads the lander font | ||
solarSys->SysInfo.PlanetInfo.DiscoveryString = | ||
CaptureStringTable (LoadStringTable (STARBASE_RUINS_STRTAB)); // Loads the text file for reading | ||
|
||
DoDiscoveryReport (MenuSounds); // Loads the lander report UI and reads the report | ||
|
||
// This destroys all things lander report related that we loaded to free up memory | ||
DestroyStringTable (ReleaseStringTable ( | ||
solarSys->SysInfo.PlanetInfo.DiscoveryString)); | ||
solarSys->SysInfo.PlanetInfo.DiscoveryString = 0; | ||
FreeLanderFont (&solarSys->SysInfo.PlanetInfo); | ||
|
||
return true; | ||
} | ||
|
||
if (matchWorld(solarSys, world, 0, MATCH_PLANET)) | ||
{ | ||
LoadStdLanderFont (&solarSys->SysInfo.PlanetInfo); // Loads the lander font | ||
solarSys->PlanetSideFrame[1] = | ||
CaptureDrawable (LoadGraphic (RUINS_MASK_PMAP_ANIM)); // Loads the images for the planetary ruins | ||
solarSys->SysInfo.PlanetInfo.DiscoveryString = | ||
CaptureStringTable ( | ||
LoadStringTable (SHATTERED_RUINS_STRTAB)); // Loads the text file for reading | ||
} | ||
|
||
GenerateDefault_generateOrbital (solarSys, world); | ||
|
||
return true; | ||
} | ||
|
||
static bool | ||
GenerateBase_pickupEnergy (SOLARSYS_STATE *solarSys, PLANET_DESC *world, | ||
COUNT whichNode) | ||
{ | ||
if (matchWorld (solarSys, world, 0, MATCH_PLANET)) | ||
{ // Does what it says on the tin, generates lander report UI that displays | ||
// the lander report specified in GenerateBase_generateOrbital | ||
// when it matches the correct planet | ||
GenerateDefault_landerReportCycle (solarSys); | ||
|
||
SetLanderTakeoff (); | ||
|
||
return false; // do not remove the node | ||
} | ||
|
||
(void) whichNode; | ||
return false; | ||
} | ||
|
||
static COUNT | ||
GenerateBase_generateEnergy (const SOLARSYS_STATE *solarSys, | ||
const PLANET_DESC *world, COUNT whichNode, NODE_INFO *info) | ||
{ | ||
if (matchWorld (solarSys, world, 0, MATCH_PLANET)) | ||
{ // This generates ruins on the matched planet | ||
return GenerateDefault_generateRuins (solarSys, whichNode, info); | ||
} | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters