[Dunno] A ton of new systems/planets. Added final mission for starting campaign. Fixed a ton of stuff.

This commit is contained in:
Allanis 2013-12-14 21:30:58 +00:00
parent b9f97f321b
commit fbdb944f88
22 changed files with 1102 additions and 669 deletions

View File

@ -1,6 +1,6 @@
# OPTIONS.
#DEBUG := 1
DEBUG_PARANOID := 1
DEBUG := 1
#DEBUG_PARANOID := 1
OS := LINUX
#OS := WIN32

View File

@ -52,7 +52,7 @@
<pilot chance="100">Hyena</pilot>
<pilot chance="80">Hyena</pilot>
<pilot chance="60">Admonisher</pilot>
<pilot chance="80">Vandetta</pilot>
<pilot chance="80">Vendetta</pilot>
</pilots>
</fleet>
<fleet name="DLF Med Force">
@ -69,7 +69,7 @@
</pilots>
</fleet>
<fleet name="DLF Lge Force">
<ai>dlf></ai>
<ai>dlf</ai>
<faction>DLF</faction>
<pilots>
<pilot chance="100">Hyena</pilot>
@ -210,10 +210,17 @@
</pilots>
</fleet>
<fleet name="Trinity">
<ai>empire</ai>
<faction>Emprire</faction>
<pilot>
<ai>collective</ai>
<faction>Collective</faction>
<pilots>
<pilot name="ESS Trinity" chance="100">Empire Hawking</pilot>
</pilot>
</pilots>
</fleet>
<fleet name="Starfire">
<ai>collective</ai>
<faction>Collective</faction>
<pilots>
<pilot name="Starfire" chance="100">Goddard</pilot>
</pilots>
</fleet>
</Fleets>

View File

@ -91,4 +91,17 @@
<planet>Omega Station</planet>
</avail>
</mission>
<mission>
<lua>emp_collective06</lua>
<flags>
<unique>1</unique>
</flags>
<avail>
<cond>player.getFaction("Empire") &gt; 5</cond>
<done>Operation Black Trinity</done>
<chance>100</chance>
<location>Bar</location>
<planet>Omega Station</planet>
</avail>
</mission>
</Missions>

View File

@ -0,0 +1,218 @@
--[[
Operation Cold Metal
Seventh and final mission in the Collective Campaign
Mission Objectives:
-- Assault C-43
-- Final Assault on C-28
-- Kill the Starfire
-- Kill the Trinity (if it got away in Operation Black Metal)
Stages:
0) Just started..
1) Entered C-43.
2) Cleared C-43.
3) Entered C-28.
4) Cleared C-28.
5) Ran away.
]]--
lang = lephisto.lang()
if lang == "es" then
-- not translated atm
else -- default english
misn_title = "Operation Cold Metal"
misn_reward = "Fame and Glory"
misn_desc = {}
misn_desc[1] = "Neutralize enemy forces in %s."
misn_desc[2] = "Destroy the Starfire and hostiles in %s."
misn_desc[3] = "Return to %s in the %s system."
title = {}
title[1] = "Bar"
title[2] = "Operation Cold Metal"
title[3] = "Mission Success"
text = {}
text[1] = [[You see Commodore Keer at a table with a couple other pilots. She motions you over to sit down.
She begins, "We're going to finally attack the Collective. We've gotten the Emperor himself to bless the mission and send some of his better pilots. Would you be interested in joining the destruction of the Collective?"]]
text[2] = [["The Operation has been dubbed 'Cold Metal'. Our goal is to head to C-00, we'll take the route of %s, %s then C-00. Should we encounter the Starfire at any stage our goal will be to destroy it and head back. We'll also clear each system completely of Collective presence before continuing to the next system. See you in combat pilots."]]
text[3] = [[As you do your approach to land on %s you notice big banners placed on the exterior of the station. They seem to be in celebration of the final defeat of the Collective. When you do land you are saluted by the welcoming committee in charge of saluting all the returning pilots.
You notice Commodore Keer. Upon greeting her she says, "You did a good job out there. No need to worry about the Collective anymore. Without Welsh the Collective won't stand a chance, since they aren't truly autonomous. Right now we have some ships cleaning up the last of the Collective, shouldn't take too long to be back to normal."]]
text[4] = [[She continues, "As a symbol of appreciation you should find a deposit of 500 thousand credits has been made to your account. There will be a celebration later today in the officer's room if you want to join in."
And so ends the Collective threat...]]
-- Conversation between pilots
talk = {}
talk[1] = "System Cleared: Procede to %s."
talk[2] = "Mission Success: Return to %s."
talk[3] = "Mission Failure: Return to %s."
end
-- Creates the mission
function create()
-- Intro text
if tk.yesno( title[1], text[1] )
then
misn.accept()
-- Mission data.
misn_stage = 0
misn_base, misn_base_sys = space.getPlanet("Omega Station")
misn_target_sys = space.getSystem("C-43")
misn_final_sys = space.getSystem("C-28")
misn.setMarker(misn_target_sys)
-- Mission details.
misn.setTitle(misn_title)
misn.setReward( misn_reward )
misn.setDesc( string.format(misn_desc[1], misn_target_sys:name() ))
tk.msg( title[2], string.format( text[2],
misn_target_sys:name(), misn_final_sys:name() ) )
hook.enter("jump")
hook.land("land")
end
end
-- Handles jumping to target system.
function jump()
sys = space.getSystem()
if misn_stage == 0 then
-- Entering target system?
if sys == misn_target_sys then
-- Create big battle.
enter_vect = player.pos()
pilot.clear()
pilot.toggleSpawn(false)
-- Empire.
emp_fleets = {}
emp_fleets[1] = "Empire Sml Attack"
emp_fleets[2] = "Empire Sml Attack"
emp_fleets[3] = "Dvaered Goddard" -- They help empire.
for k,v in ipairs(emp_fleets) do
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
pilot.add( v, "def", enter_vect )
end
-- Collective.
col_fleets = {}
col_fleets[1] = "Collective Sml Swarm"
col_fleets[2] = "Collective Sml Swarm"
col_fleets[3] = "Collective Sml Swarm"
-- Set up position.
x,y = enter_vect:get()
enter_vect:set(-x, -y)
-- Count amount created
col_alive = 0
for k,v in ipairs(col_fleets) do
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
pilots = pilot.add( v, "def", enter_vect )
col_alive = col_alive + #pilots
for k,v in ipairs(pilots) do
hook.pilot( v, "disable", "col_dead" )
end
end
misn_stage = 1
end
elseif misn_stage == 2 then
-- Entering target system?
if sys == misn_final_sys then
-- Create bigger battle
enter_vect = player.pos()
pilot.clear()
pilot.toggleSpawn(false)
-- Empire
emp_fleets = {}
emp_fleets[1] = "Empire Lge Attack"
emp_fleets[2] = "Empire Med Attack"
emp_fleets[3] = "Dvaered Goddard" -- They help empire.
for k,v in ipairs(emp_fleets) do
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
pilot.add( v, "def", enter_vect )
end
-- Collective.
col_fleets = {}
col_fleets[1] = "Starfire"
col_fleets[2] = "Collective Lge Swarm"
col_fleets[3] = "Collective Lge Swarm"
if var.peek("trinity") == true then
col_fleets[4] = "Trinity"
end
x,y = enter_vect:get()
enter_vect:set(-x, -y)
col_alive = 0
for k,v in ipairs(col_fleets) do
enter_vect:add( rnd.int(-500,500), rnd.int(-500,500) )
pilots = pilot.add( v, "def", enter_vect )
-- Handle special ships.
if v == "Starfire" then
starfire = pilots[1]
elseif v == "Trinity" then
trinity = pilots[1]
end
-- Count amount created.
col_alive = col_alive + #pilots
for k,v in ipairs(pilots) do
hook.pilot( v, "disable", "col_dead" )
end
end
misn_stage = 3
end
elseif misn_stage == 1 or misn_stage == 3 then
-- Fled from battle - disgraceful.
misn_stage = 5
player.msg( string.format( talk[3], misn_base_sys:name() ))
end
end
-- Handles collective death.
function col_dead()
col_alive = col_alive - 1 -- Another one bites the dust.
-- All dead -> area clear.
if col_alive == 0 then
if misn_stage == 1 then
misn.setDesc( string.format(misn_desc[2], misn_final_sys:name() ))
player.msg( string.format( talk[1], misn_final_sys:name() ))
misn.setMarker(misn_final_sys)
misn_stage = 2
elseif misn_stage == 3 then
misn.setDesc( string.format(misn_desc[3], misn_base:name(), misn_base_sys:name() ))
player.msg( string.format( talk[2], misn_base_sys:name() ))
misn.setMarker(misn_base_sys)
misn_stage = 4
end
end
end
-- Handles arrival back to base.
function land()
planet = space.getPlanet()
-- Final landing stage
if misn_stage == 4 and planet == misn_base then
tk.msg( title[3], text[3] )
-- Rewards
player.modFaction("Empire",5)
misn.finish(true)
diff.apply("collective_dead")
player.pay( 500000 ) -- 500k
tk.msg( title[3], text[4] )
end
end

View File

@ -419,7 +419,7 @@
</outfit>
<outfit name="Fuel Pod">
<general>
<max>2</max>
<max>4</max>
<tech>3</tech>
<mass>5</mass>
<price>15000</price>

View File

@ -27,27 +27,6 @@
<class>M</class>
</general>
</planet>
<planet name="Cerberus">
<GFX>
<exterior>traderoom.png</exterior>
<space>003.png</space>
</GFX>
<pos>
<y>0</y>
<x>0</x>
</pos>
<general>
<bar>The bar is maintained by off-duty scientists and soldiers. It's very small and doesn't have much offerings. There's not much ambient noise, it seems like the boredom has gotten the best of most of the people.</bar>
<description>Named after the guardian dog of hell for it's role in monitoring and observing the immense Sol nebulae. It was created shortly after the nebulae stabilized. Exact details are confidential and there's more then enough military influence to make it suspicious. With all the conspiration theories around the Incident, one can never be too sure where reality ends and fiction starts.</description>
<faction>Empire</faction>
<tech>
<main>0</main>
<special>0</special>
</tech>
<services>3</services>
<class>0</class>
</general>
</planet>
<planet name="Eiroik">
<GFX>
<exterior>methane.png</exterior>
@ -61,6 +40,7 @@
<services>1</services>
<tech>
<main>0</main>
<special>0</special>
</tech>
<class>J</class>
<description>Eiroik used to be a mining planet under the Empire rule until the Collective wiped out the human colonies on it. The harsh atmosphere did the rest, erasing all tracks of former human life.</description>
@ -79,6 +59,7 @@
<services>0</services>
<tech>
<main>0</main>
<special>0</special>
</tech>
<class>3</class>
<faction>Collective</faction>
@ -110,6 +91,51 @@
<class>P</class>
</general>
</planet>
<planet name="Doranthex Prime">
<GFX>
<exterior>lava.png</exterior>
<space>A01.png</space>
</GFX>
<pos>
<y>0</y>
<x>0</x>
</pos>
<general>
<bar>The drinks served in the Furnance, as the bar calls itself are of a pretty strange variety. They are generally very strong and served at a warm temperature. The house specialties also contain volcanic ash which is harvested on the planet surface. A strange bar indeed.</bar>
<description>Doranthex Prime is a mostly molten planet. The only exception is a small island that drifts around the surface mainly around the polar regions. On this island the Draktharr have established a small base, mainly for research and military prototyping, although civilians are allowed in the main facilities. Due to the intense temperatures they are shielded by over 50 m of temperature isolating plating, which doesn't allow any views of the planet itself once you've landed.</description>
<faction>Draktharr</faction>
<commodities>
<commodity>Food</commodity>
</commodities>
<tech>
<main>0</main>
<special>0</special>
</tech>
<services>3</services>
<class>A</class>
</general>
</planet>
<planet name="Cerberus">
<GFX>
<exterior>traderoom.png</exterior>
<space>003.png</space>
</GFX>
<pos>
<y>0</y>
<x>0</x>
</pos>
<general>
<bar>The bar is maintained by off-duty scientists and soldiers. It's very small and doesn't have much offerings. There's not much ambient noise, it seems like the boredom has gotten the best of most of the people.</bar>
<description>Named after the guardian dog of hell for it's role in monitoring and observing the immense Sol nebulae. It was created shortly after the nebulae stabilized. Exact details are confidential and there's more then enough military influence to make it suspicious. With all the conspiration theories around the Incident, one can never be too sure where reality ends and fiction starts.</description>
<faction>Empire</faction>
<tech>
<main>0</main>
<special>0</special>
</tech>
<services>3</services>
<class>0</class>
</general>
</planet>
<planet name="Tau Station">
<GFX>
<exterior>station00.png</exterior>
@ -153,7 +179,8 @@
<commodity>Industrial Goods</commodity>
</commodities>
<tech>
<main>5</main>
<main>0</main>
<special>0</special>
</tech>
<services>7</services>
<class>G</class>
@ -213,13 +240,14 @@
<general>
<bar>The Arrakeen canteen is a shady place. Many scoundrels and lowlifes make this their home to avoid notice from the universal police.</bar>
<description>Arrakis is a desert planet with no natural precipitation.</description>
<faction>Independent</faction>
<faction>Empire</faction>
<commodities>
<commodity>Food</commodity>
<commodity>Ore</commodity>
</commodities>
<tech>
<main>4</main>
<main>0</main>
<special>0</special>
</tech>
<services>7</services>
<class>H</class>
@ -238,11 +266,37 @@
<services>0</services>
<tech>
<main>0</main>
<special>0</special>
</tech>
<class>3</class>
<faction>Collective</faction>
</general>
</planet>
<planet name="Jorcan">
<GFX>
<exterior>mining.png</exterior>
<space>G01.png</space>
</GFX>
<pos>
<y>0</y>
<x>0</x>
</pos>
<general>
<bar>The one word that would describe the Jorcan spaceport bar would be dust. It's everywhere: on the seats, on the counter, in the drinks, on everyone's faces... It's not the usual finer dust you find on most worlds either, it's a thick, consistant, black, disgusting dust that you think you'll never be able to get off you.</bar>
<description>Jorcan is a very barren dull planet, like most mining worlds. It's very poor in deposits, but mining is still done heavily in an attempt to remove every single drop of ore from the planet.</description>
<faction>Draktharr</faction>
<commodities>
<commodity>Food</commodity>
<commodity>Ore</commodity>
</commodities>
<tech>
<main>0</main>
<special>0</special>
</tech>
<services>7</services>
<class>G</class>
</general>
</planet>
<planet name="S72839">
<GFX>
<exterior>station01.png</exterior>
@ -256,6 +310,7 @@
<services>0</services>
<tech>
<main>0</main>
<special>0</special>
</tech>
<class>3</class>
<faction>Collective</faction>
@ -300,6 +355,7 @@
<services>0</services>
<tech>
<main>0</main>
<special>0</special>
</tech>
<class>3</class>
<faction>Collective</faction>
@ -315,7 +371,7 @@
<x>0</x>
</pos>
<general>
<bar>The Slop and Grill is one of the nastiest taverns in the universe. The food and drink doesn't exactly help. Most of it is brewed on New Haven and wouldn't pass any of the minimal health insurance tests. Some of the booze even doubles as ship fuel if needed, which says a lot about the quality.The clients are also deep space thugs, pirates, contrabandiers, mercenaries and othe shady folk that insist on keeping the ground coated with blood and broken teeth. Not a great place to bring the family.</bar>
<bar>The Slop and Grill is one of the nastiest taverns in the universe. The food and drink doesn't exactly help. Most of it is brewed on New Haven and wouldn't pass any of the minimal health insurance tests. Some of the booze even doubles as ship fuel if needed, which says a lot about the quality. The clients are also deep space thugs, pirates, contrabandiers, mercenaries and other shady folk that insist on keeping the ground coated with blood and broken teeth. Not a great place to bring the family.</bar>
<description>New Haven is a small planet located beyond the boundries of law and justice. Founded by Bartax the Great, one of the most successful pirates to ever live after the old Haven was annihilated.The planet is mostly covered by very toxic gases and has a lot of radiation if you stray from the stronghold. These very features are what made the Empire qualify it as uninhabitable as it doesn't have any strategic resources. It's distance from other civilized worlds also gives it a nice cover from prying eyes.</description>
<faction>Pirate</faction>
<commodities>
@ -358,6 +414,31 @@
<class>0</class>
</general>
</planet>
<planet name="Cetrat">
<GFX>
<exterior>aquatic.png</exterior>
<space>O01.png</space>
</GFX>
<pos>
<y>0</y>
<x>0</x>
</pos>
<general>
<bar>The bar is very large and not too full. You notice the drink list has a "living" menu. When you ask the bartender about them, he says they specialize in drinks containing living beings. Generally jellyfish, but sometimes small cephalopods or more exotic beings. What strange habits.</bar>
<description>Cetrat is a small aquatic planet known for it's medical algae that grows. No one has been able to reproduce it exactly as it is in the wild, but with the abundance of it all over there hasn't been too much effort in that field.</description>
<faction>Independent</faction>
<commodities>
<commodity>Medicine</commodity>
<commodity>Luxury Goods</commodity>
</commodities>
<tech>
<main>6</main>
<special>0</special>
</tech>
<services>15</services>
<class>A</class>
</general>
</planet>
<planet name="Raelid Outpost">
<GFX>
<exterior>station02.png</exterior>
@ -368,11 +449,12 @@
<x>0</x>
</pos>
<general>
<bar>Another big dirty bar full of hulking, smelly, sweaty Draktharrs. They make a good brew though.</bar>
<bar>Another big dirty bar full of hulking, smelly, sweaty Dracktarrs. They make a good brew though.</bar>
<description>Constructed by many captured and then enslaved DLF armsmen. The design is pretty sturdy but you can't help to think there must be a hidden bomb somewhere, just waiting to go off and kill the Draktharr opressors.</description>
<faction>Draktharr</faction>
<tech>
<main>6</main>
<main>0</main>
<special>0</special>
</tech>
<services>11</services>
<class>0</class>
@ -437,6 +519,7 @@
<services>0</services>
<tech>
<main>0</main>
<special>0</special>
</tech>
<class>J</class>
</general>
@ -444,7 +527,7 @@
<planet name="Anecu">
<GFX>
<exterior>aquatic.png</exterior>
<space>M03.png</space>
<space>O00.png</space>
</GFX>
<pos>
<y>0</y>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

BIN
gfx/planet/space/A01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
gfx/planet/space/G01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
gfx/planet/space/H02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
gfx/planet/space/I01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
gfx/planet/space/J02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
gfx/planet/space/K00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
gfx/planet/space/L00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
gfx/planet/space/M05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
gfx/planet/space/M06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
gfx/planet/space/O00.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
gfx/planet/space/O01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
gfx/planet/space/P02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -285,7 +285,7 @@ int sound_playPos(int sound, double x, double y) {
/* Need to make sure distance doesn't overflow. */
idist = dist / 4;
if(idist > 255) idist == 255;
if(idist > 255) idist = 255;
if(Mix_SetPosition(v->channel, (int)angle, idist) < 0) {
WARN("Unable to set sound position: %s", Mix_GetError());
return -1;

View File

@ -876,13 +876,12 @@ static StarSystem* system_parse(StarSystem* sys, const xmlNodePtr parent) {
SystemFleet fleet;
char* ptrc;
xmlNodePtr cur, node;
uint32_t flags;
int size;
/* Clear memory for sane defaults. */
memset(sys, 0, sizeof(StarSystem));
sys->faction = 1;
sys->faction = -1;
planet = NULL;
size = 0;
@ -899,7 +898,7 @@ static StarSystem* system_parse(StarSystem* sys, const xmlNodePtr parent) {
flags |= FLAG_XSET;
sys->pos.x = xml_getFloat(cur);
}
if(xml_isNode(cur, "y")) {
else if(xml_isNode(cur, "y")) {
flags |= FLAG_YSET;
sys->pos.y = xml_getFloat(cur);
}
@ -940,7 +939,7 @@ static StarSystem* system_parse(StarSystem* sys, const xmlNodePtr parent) {
else if(xml_isNode(node, "fleets")) {
cur = node->children;
do {
if(cur && xml_isNode(cur, "fleet")) {
if(xml_isNode(cur, "fleet")) {
memset(&fleet, 0, sizeof(SystemFleet));
fleet.fleet = fleet_get(xml_get(cur));
@ -978,7 +977,10 @@ static StarSystem* system_parse(StarSystem* sys, const xmlNodePtr parent) {
}
/**
* @fn
* @fn static void system_setFaction(StarSystem* sys)
*
* @brief Set the system faction based on the planet it has.
* @param sys System to set the faction of.
*/
static void system_setFaction(StarSystem* sys) {
int i;
@ -1070,6 +1072,7 @@ static int systems_load(void) {
ERR("Malformed "SYSTEM_DATA" file: missing root element '"XML_SYSTEM_ID"'");
return -1;
}
node = node->xmlChildrenNode; /* First system node. */
if(node == NULL) {
ERR("Malformed "SYSTEM_DATA" file: does not contain elements");
@ -1083,7 +1086,7 @@ static int systems_load(void) {
systems_nstack = 0;
}
/* Fist pass - Load all the star systems_stack. */
/* First pass - Load all the star systems_stack. */
do {
if(xml_isNode(node, XML_SYSTEM_TAG)) {
/* Check if memory needs to grow. */