Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into slots

Conflicts:
	dat/gui/slim.lua
	dat/missions/neutral/diy-nerds.lua
	dat/outfits/modifiers/milspec_scrambler.xml
	dat/ships/schroedinger.xml
	dat/tech.xml
	src/console.c
	src/map.c
	src/naev.c
	src/outfit.c
	src/outfit.h
	src/pilot_outfit.c
	src/player.h
	src/ship.c
	src/shipstats.c
	src/shipstats.h

a few weird warnings, but everything seems to work.
  • Loading branch information...
commit 1d285e350b0826123875a328162e257970352edf 2 parents 30e9f52 + 4938594
@nloewen nloewen authored
Showing with 3,544 additions and 1,377 deletions.
  1. +1 −0  .gitignore
  2. +3 −0  AUTHORS
  3. +1 −1  Makefile.am
  4. +14 −14 ai/include/atk_capital.lua
  5. +6 −0 ai/include/attack.lua
  6. +110 −0 ai/tpl/generic.lua
  7. +1 −1  configure.ac
  8. +1 −1  dat/assets/chriik.xml
  9. +1 −1  dat/assets/{chucrchill_ii.xml → churchill_ii.xml}
  10. +1 −1  dat/assets/culex.xml
  11. +1 −1  dat/assets/diabolos.xml
  12. +1 −1  dat/assets/fernando_station.xml
  13. +1 −1  dat/assets/halir.xml
  14. +1 −1  dat/assets/inss3.xml
  15. +1 −1  dat/assets/jaegnhild.xml
  16. +1 −1  dat/assets/madeleine_station.xml
  17. +1 −1  dat/assets/mk.xml
  18. +2 −2 dat/assets/nonuri.xml
  19. +1 −1  dat/assets/omega_station.xml
  20. +1 −1  dat/assets/soromid_wards_beta.xml
  21. +2 −2 dat/assets/three_and_a_half_kings.xml
  22. +1 −1  dat/assets/tori.xml
  23. +1 −1  dat/assets/varaati.xml
  24. +1 −1  dat/assets/vertigo.xml
  25. +1 −1  dat/assets/waterholes_moon.xml
  26. +22 −3 dat/event.xml
  27. +3 −1 dat/events/neutral/animaltrouble.lua
  28. +2 −2 dat/events/neutral/baron_flintley.lua
  29. +3 −3 dat/events/neutral/derelict.lua
  30. +3 −2 dat/events/neutral/npc.lua
  31. +3 −3 dat/events/neutral/shipwreck.lua
  32. +410 −0 dat/events/sirius/preach.lua
  33. +11 −6 dat/events/tutorial/tutorial-combat1.lua
  34. +1 −1  dat/events/tutorial/tutorial-combat2.lua
  35. +1 −1  dat/events/tutorial/tutorial-discovery.lua
  36. +145 −0 dat/events/tutorial/tutorial-heat.lua
  37. +1 −1  dat/events/tutorial/tutorial-planet.lua
  38. +2 −1  dat/events/tutorial/tutorial.lua
  39. +1 −1  dat/faction.xml
  40. +89 −56 dat/gui/slim.lua
  41. +3 −1 dat/mission.xml
  42. +0 −3  dat/missions/baron/baron_baron.lua
  43. +3 −6 dat/missions/baron/baron_prince.lua
  44. +1 −1  dat/missions/dvaered/dv_antiflf02.lua
  45. +2 −0  dat/missions/dvaered/dv_antiflf03.lua
  46. +7 −0 dat/missions/dvaered/dv_patrol.lua
  47. +6 −1 dat/missions/empire/emp_pirbounty.lua
  48. +7 −7 dat/missions/empire/shipping/es02.lua
  49. +3 −3 dat/missions/empire/waste_dump.lua
  50. +3 −2 dat/missions/flf/flf_pre01.lua
  51. +2 −2 dat/missions/flf/flf_pre02.lua
  52. +1 −1  dat/missions/neutral/aristodrink.lua
  53. +12 −12 dat/missions/neutral/cargo.lua
  54. +18 −18 dat/missions/neutral/cargo_rush.lua
  55. +300 −299 dat/missions/neutral/diy-nerds.lua
  56. +2 −2 dat/missions/neutral/kidnapped/traffic_00.lua
  57. +4 −3 dat/missions/rehab_common.lua
  58. +2 −2 dat/missions/runaway/runaway_search.lua
  59. +1 −1  dat/missions/shadow/darkshadow.lua
  60. +8 −8 dat/missions/shadow/shadowvigil.lua
  61. +1 −1  dat/missions/sirius/srs_ferry.lua
  62. +1 −1  dat/news/news_generic.lua
  63. +1 −1  dat/news/news_goddard.lua
  64. +5 −3 dat/outfits/activated/generic_afterburner.xml
  65. +5 −3 dat/outfits/activated/hellburner.xml
  66. +1 −1  dat/outfits/launchers/enygma_systems_spearhead_launcher.xml
  67. +1 −1  dat/outfits/launchers/fury_missile.xml
  68. +0 −3  dat/outfits/launchers/spearhead_missile.xml
  69. +1 −1  dat/outfits/launchers/teracom_banshee_launcher.xml
  70. +1 −1  dat/outfits/launchers/teracom_fury_launcher.xml
  71. +1 −1  dat/outfits/launchers/teracom_headhunter_launcher.xml
  72. +1 −1  dat/outfits/launchers/teracom_medusa_launcher.xml
  73. +1 −1  dat/outfits/launchers/teracom_vengeance_launcher.xml
  74. +2 −2 dat/outfits/launchers/unicorp_caesar_iv_launcher.xml
  75. +1 −1  dat/outfits/launchers/unicorp_fury_launcher.xml
  76. +1 −1  dat/outfits/launchers/unicorp_headhunter_launcher.xml
  77. +1 −1  dat/outfits/launchers/unicorp_medusa_launcher.xml
  78. +1 −1  dat/outfits/launchers/unicorp_vengeance_launcher.xml
  79. +13 −0 dat/outfits/maps/localmap.xml
  80. +0 −1  dat/outfits/maps/map_collective_space.xml
  81. +0 −1  dat/outfits/maps/map_dvaered_core.xml
  82. +0 −1  dat/outfits/maps/map_dvaeredsoromid_trade_route.xml
  83. +0 −1  dat/outfits/maps/map_empire_core.xml
  84. +0 −1  dat/outfits/maps/map_nebula_edge.xml
  85. +0 −1  dat/outfits/maps/map_pirate_strongholds.xml
  86. +0 −1  dat/outfits/maps/map_sirian_border_systems.xml
  87. +0 −1  dat/outfits/maps/map_sol.xml
  88. +2 −2 dat/outfits/maps/map_the_frontier.xml
  89. +0 −1  dat/outfits/maps/ultra_map.xml
  90. +1 −1  dat/outfits/modifiers/droid_repair_crew.xml
  91. +15 −0 dat/outfits/modifiers/jump_scanner.xml
  92. +3 −3 dat/outfits/modifiers/milspec_scrambler.xml
  93. +3 −3 dat/outfits/modifiers/unicorp_scrambler.xml
  94. +1 −0  dat/ships/base.xml
  95. +1 −0  dat/ships/byakko.xml
  96. +1 −0  dat/ships/diplomatic_vessel.xml
  97. +1 −0  dat/ships/genbu.xml
  98. +1 −0  dat/ships/schroedinger.xml
  99. +1 −0  dat/ships/seiryuu.xml
  100. +46 −0 dat/ships/sirius_reverence.xml
  101. +1 −0  dat/ships/suzaku.xml
  102. +4 −0 dat/ssys/capricorn.xml
  103. +1 −1  dat/ssys/churchill.xml
  104. +1 −1  dat/ssys/hekaras.xml
  105. +4 −0 dat/ssys/pontus.xml
  106. +7 −0 dat/tech.xml
  107. +5 −4 docs/lua/templates/file.lp
  108. +4 −4 docs/lua/templates/function.lp
  109. +18 −0 docs/lua/templates/header.lp
  110. +8 −4 docs/lua/templates/index.lp
  111. +101 −8 docs/lua/templates/luadoc.css
  112. +9 −8 docs/lua/templates/module.lp
  113. +46 −43 docs/luadoc.sh
  114. +2 −2 extras/macosx/README
  115. +2 −2 extras/macosx/naev.xcodeproj/project.pbxproj
  116. +3 −0  extras/win_installer/datapath.lua
  117. +51 −12 extras/win_installer/naev.nsi
  118. +1 −0  gfx/ARTWORK_LICENSE
  119. BIN  gfx/gui/slim/cooldown-bg.png
  120. BIN  gfx/gui/slim/cooldown-frame.png
  121. BIN  gfx/gui/slim/cooldown-panel.png
  122. BIN  gfx/gui/slim/cooldown-sheen.png
  123. BIN  gfx/logo/soromid_small.png
  124. BIN  gfx/logo/soromid_tiny.png
  125. +3 −3 gfx/outfit/check.sh
  126. +3 −3 gfx/planet/check.sh
  127. +1 −1  lib/lua/lbaselib.c
  128. +1 −9 lib/lua/lcode.c
  129. +2 −1  lib/lua/ldblib.c
  130. +2 −1  lib/lua/ldo.c
  131. +1 −2  lib/lua/lgc.c
  132. +5 −2 lib/lua/liolib.c
  133. +4 −2 lib/lua/llex.c
  134. +2 −2 lib/lua/loadlib.c
  135. +2 −2 lib/lua/lparser.c
  136. +4 −2 lib/lua/lstrlib.c
  137. +4 −4 lib/lua/lua.h
  138. +6 −2 lib/lua/lvm.c
  139. +3 −0  snd/SOUND_LICENSE
  140. BIN  snd/sounds/afb_disengage.wav
  141. +28 −12 src/ai.c
  142. +4 −4 src/comm.c
  143. +72 −1 src/conf.c
  144. +9 −0 src/conf.h
  145. +3 −1 src/console.c
  146. +33 −34 src/dev_sysedit.c
  147. +4 −5 src/dev_uniedit.c
  148. +1 −0  src/dev_uniedit.h
  149. +8 −1 src/economy.c
  150. +1 −1  src/event.c
  151. +3 −0  src/faction.c
  152. +7 −1 src/gui.c
  153. +106 −53 src/gui_osd.c
  154. +4 −3 src/info.c
  155. +10 −1 src/input.c
  156. +1 −2  src/intro.c
  157. +3 −0  src/land.c
  158. +10 −8 src/land.h
  159. +6 −5 src/land_outfits.c
  160. +19 −1 src/load.c
  161. +83 −9 src/map.c
  162. +4 −0 src/map.h
  163. +0 −2  src/mapData.h
  164. +10 −8 src/mission.h
  165. +21 −12 src/naev.c
  166. +0 −9 src/ncompat.h
  167. +47 −8 src/ndata.c
  168. +31 −11 src/nfile.c
  169. +11 −11 src/nlua_hook.c
  170. +1 −1  src/nlua_misn.c
  171. +292 −48 src/nlua_pilot.c
  172. +17 −34 src/nlua_planet.c
  173. +3 −3 src/nlua_player.c
  174. +4 −1 src/nlua_vec2.c
  175. +95 −32 src/outfit.c
  176. +42 −27 src/outfit.h
  177. +185 −32 src/pilot.c
  178. +80 −62 src/pilot.h
  179. +1 −1  src/pilot_ew.c
  180. +56 −2 src/pilot_heat.c
  181. +3 −0  src/pilot_heat.h
  182. +37 −28 src/pilot_outfit.c
  183. +35 −15 src/pilot_weapon.c
  184. +1 −2  src/pilot_weapon.h
  185. +27 −12 src/player.c
  186. +29 −25 src/player.h
  187. +18 −14 src/player_autonav.c
  188. +20 −7 src/ship.c
  189. +45 −45 src/shipstats.c
  190. +13 −13 src/shipstats.h
  191. +19 −7 src/space.c
  192. +2 −0  src/space.h
  193. +11 −2 src/unidiff.c
  194. +5 −0 utils/NSH/README
  195. +74 −0 utils/NSH/labels.yml
  196. +43 −61 utils/NSH/main.py
  197. +112 −0 utils/NSH/naev-common.css
  198. +3 −6 utils/NSH/naev-global.css
  199. +2 −0  utils/NSH/templates/base.html
  200. +30 −25 utils/in-sanity/main.py
  201. +36 −12 utils/in-sanity/readers/ship.py
View
1  .gitignore
@@ -42,3 +42,4 @@ stdout.txt
*.mode1v3
extras/macosx/build/
extras/.dirstamp
+datapath.lua
View
3  AUTHORS
@@ -135,6 +135,9 @@ Contributions
NeD
* Mission contributor
+ Sudarshan S
+ * Event contributor
+
Testers
---------------------------------------
View
2  Makefile.am
@@ -37,7 +37,7 @@ $(NAEV):
$(PACK):
$(MAKE) -C utils/pack
-VERSION:
+VERSION: src/config.h
echo $(VERSION) > $@
if HAVE_UTILS
View
28 ai/include/atk_capital.lua
@@ -38,7 +38,8 @@ end
function _atk_g_capital( target, dist )
local range = ai.getweaprange(3)
local dir = 0
- ai.weapset( 3 ) -- Forward/turrets
+ local shoot = false
+ ai.weapset( mem.weapset )
--capital ships tend to require heavier energy reserves and burst output for maximum effectiveness
if ai.pcurenergy() <= 1 then
@@ -65,31 +66,30 @@ function _atk_g_capital( target, dist )
if dir < 10 and dir > -10 and ai.relvel(target) > -10 then
ai.accel()
end
- if mem.recharge == false then
- ai.shoot(true)
- end
+ shoot = true
elseif dist > 0.3*range then
--capital ship turning is slow
--emphasize facing for being able to close quickly
dir = ai.iface(target)
-- Shoot if should be shooting.
- if mem.recharge == false then
- ai.shoot(true)
- end
+ shoot = true
--within close range; aim and blast away with everything
else
-
dir = ai.aim(target)
- if mem.recharge == false then
- -- Shoot if should be shooting.
- if dir < 10 then
- ai.shoot()
- end
- ai.shoot(true)
+ -- At point-blank range, we ignore recharge.
+ if dir < 10 then
+ ai.shoot()
end
+ ai.shoot(true)
+ end
+ if shoot and not mem.recharge then
+ if dir < 10 then
+ ai.shoot()
+ end
+ ai.shoot(true)
end
end
View
6 ai/include/attack.lua
@@ -48,6 +48,12 @@ end
-- Wrapper for the attack functions.
--]]
function attack ()
+ -- Don't go on the offensive when in the middle of cooling.
+ if mem.cooldown then
+ ai.poptask()
+ return
+ end
+
if mem.atk ~= nil then
mem.atk()
else
View
110 ai/tpl/generic.lua
@@ -13,6 +13,8 @@ mem.shield_run = 0 -- At which shield to run
mem.shield_return = 0 -- At which shield to return to combat
mem.aggressive = false -- Should pilot actively attack enemies?
mem.defensive = true -- Should pilot defend itself
+mem.cooldown = false -- Whether the pilot is currently cooling down.
+mem.heatthreshold = .5 -- Weapon heat to enter cooldown at [0-2 or nil]
mem.safe_distance = 300 -- Safe distance from enemies to jump
mem.land_planet = true -- Should land on planets?
mem.land_friendly = false -- Only land on friendly planets?
@@ -20,6 +22,8 @@ mem.distress = true -- AI distresses
mem.distressrate = 3 -- Number of ticks before calling for help
mem.distressmsg = nil -- Message when calling for help
mem.distressmsgfunc = nil -- Function to call when distressing
+mem.weapset = 3 -- Weapon set that should be used (tweaked based on heat).
+mem.tickssincecooldown = 0 -- Prevents overly-frequent cooldown attempts.
-- Required control rate
@@ -30,9 +34,42 @@ function control ()
local task = ai.taskname()
local enemy = ai.getenemy()
+ -- Cooldown completes silently.
+ if mem.cooldown then
+ mem.tickssincecooldown = 0
+ if not ai.getPilot():cooldown() then
+ mem.cooldown = false
+ end
+ else
+ mem.tickssincecooldown = mem.tickssincecooldown + 1
+ end
+
-- Reset distress if not fighting/running
if task ~= "attack" and task ~= "runaway" then
mem.attacked = nil
+ local p = ai.getPilot()
+
+ -- Cooldown shouldn't preempt boarding, either.
+ if task ~= "board" then
+ -- Cooldown preempts everything we haven't explicitly checked for.
+ if mem.cooldown then
+ return
+ -- If the ship is hot and shields are high, consider cooling down.
+ elseif ai.pshield() > 50 and p:temp() > 300 then
+ -- Ship is quite hot, better cool down.
+ if p:temp() > 400 then
+ mem.cooldown = true
+ p:setCooldown(true)
+ return
+ -- Cool down if the current weapon set is suffering from >= 20% accuracy loss.
+ -- This equates to a temperature of 560K presently.
+ elseif (p:weapsetHeat() > .2) then
+ mem.cooldown = true
+ p:setCooldown(true)
+ return
+ end
+ end
+ end
end
-- Get new task
@@ -76,6 +113,9 @@ function control ()
return
end
+ -- Pick an appropriate weapon set.
+ choose_weapset()
+
-- Runaway if needed
if (mem.shield_run > 0 and ai.pshield() < mem.shield_run
and ai.pshield() < ai.pshield(target) ) or
@@ -85,6 +125,9 @@ function control ()
-- Think like normal
else
+ -- Cool down, if necessary.
+ should_cooldown()
+
attack_think()
end
@@ -148,6 +191,16 @@ function attacked ( attacker )
-- Notify that pilot has been attacked before
mem.attacked = true
+ -- Cooldown should be left running if not taking heavy damage.
+ if mem.cooldown then
+ if ai.pshield() < 90 then
+ mem.cooldown = false
+ ai.getPilot():setCooldown( false )
+ else
+ return
+ end
+ end
+
if task ~= "attack" and task ~= "runaway" then
if mem.defensive then
@@ -317,3 +370,60 @@ function gen_distress ( target )
end
+
+-- Picks an appropriate weapon set for ships with mixed weaponry.
+function choose_weapset()
+ if ai.hascannons() and ai.hasturrets() then
+ local p = ai.getPilot()
+ local meant, peakt = p:weapsetHeat( 3 )
+ local meanc, peakc = p:weapsetHeat( 2 )
+
+ --[[
+ -- Weapon groups:
+ -- 1: Cannons
+ -- 2: Turrets
+ -- 3: Combined
+ --
+ -- Note: AI indexes from 0, but pilot module indexes from 1.
+ --]]
+
+ -- Use both if both are cool, or if both are similar in temperature.
+ if meant + meanc < .1 then
+ mem.weapset = 3
+ elseif peakt == 0 then
+ mem.weapset = 2
+ elseif peakc == 0 then
+ mem.weapset = 1
+ -- Both sets are similarly hot.
+ elseif math.abs(meant - meanc) < .15 then
+ mem.weapset = 3
+ -- An extremely-hot weapon is a good reason to pick another set.
+ elseif math.abs(peakt - peakc) > .4 then
+ if peakt > peakc then
+ mem.weapset = 1
+ else
+ mem.weapset = 2
+ end
+ elseif meant > meanc then
+ mem.weapset = 1
+ else
+ mem.weapset = 2
+ end
+ end
+end
+
+-- Puts the pilot into cooldown mode if its weapons are overly hot and its shields are relatively high.
+-- This can happen during combat, so mem.heatthreshold should be quite high.
+function should_cooldown()
+ local mean = ai.getPilot():weapsetHeat()
+
+ -- Don't want to cool down again so soon.
+ -- By default, 15 ticks will be 30 seconds.
+ if mem.tickssincecooldown < 15 then
+ return
+ -- The weapons are extremely hot and cooldown should be triggered.
+ elseif mean > mem.heatthreshold and ai.pshield() > 50 then
+ mem.cooldown = true
+ ai.getPilot():setCooldown(true)
+ end
+end
View
2  configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.61])
-AC_INIT([naev], [0.5.1], [bobbens@gmail.com])
+AC_INIT([naev], [0.5.2], [bobbens@gmail.com])
AC_CONFIG_SRCDIR([src/naev.c])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
View
2  dat/assets/chriik.xml
@@ -5,7 +5,7 @@
<y>-11640.000000</y>
</pos>
<GFX>
- <space>H03.png</space>
+ <space>H00.png</space>
<exterior>desertic3.png</exterior>
</GFX>
<presence>
View
2  dat/assets/chucrchill_ii.xml → dat/assets/churchill_ii.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<asset name="Chucrchill II">
+<asset name="Churchill II">
<pos>
<x>-22400.000000</x>
<y>-8820.000000</y>
View
2  dat/assets/culex.xml
@@ -27,7 +27,7 @@
<commodities>
<commodity>Food</commodity>
</commodities>
- <description>Culex is the moon of planet Myonei. Myonei itself is a factory world, but it's too unpleasant for even the geneticlaly altered Soromid to live on. Fortunately, Culex is quite suitable for inhabitation, and so the workers who labor on the surface have their homes here. Culex is little more than a habitat, with no economy of its own. It's fairly uninteresting to most people who don't actually live there.</description>
+ <description>Culex is the moon of planet Myonei. Myonei itself is a factory world, but it's too unpleasant for even the genetically altered Soromid to live on. Fortunately, Culex is quite suitable for inhabitation, and so the workers who labor on the surface have their homes here. Culex is little more than a habitat, with no economy of its own. It's fairly uninteresting to most people who don't actually live there.</description>
<bar>As Culex sees little traffic other than the forensic kind, the spaceport bar has been repurposed as a community centre for the locals. The standard facilities are still present and operational, but in a minimal fashion. Most of the facility is filled with recreational facilities and even a dance floor.</bar>
</general>
</asset>
View
2  dat/assets/diabolos.xml
@@ -22,6 +22,6 @@
<refuel/>
</services>
<commodities/>
- <description>Diabolos station was constructed especially for the sport that made Totoran famous. The station sports two separate arenas. The first one is a deadly, three dimensional labyrinth filled with dangerous traps and obstacles. It fills most of the station's bulk. The second arena is actually space itself. Gladiators fight in lifesuits on the outer hull of the station, without lifelines.</description>
+ <description>Diabolos Station was constructed especially for the sport that made Totoran famous. The station sports two separate arenas. The first one is a deadly, three dimensional labyrinth filled with dangerous traps and obstacles. It fills most of the station's bulk. The second arena is actually space itself. Gladiators fight in lifesuits on the outer hull of the station, without lifelines.</description>
</general>
</asset>
View
2  dat/assets/fernando_station.xml
@@ -25,7 +25,7 @@
</services>
<commodities/>
<description>Officially, Fernando Station is a local security nexus, meant to keep the local systems safe from pirates and the FLF. But it is rather heavily equipped for simply maintaining law and order. Some people believe that the Dvaered are gradually reinforcing Ogat, preparing for a military conflict with the Empire. Nothing currently suggests that the Dvaered are on the warpath, but Fernando Station might be a harbinger of things to come.</description>
- <bar>The spacedock bar is mainly frequented by Dvaered military pilots, as can be expected from a bar on a military base. The drinks served here are mostly free of mind-altering substances, a serious detractor to the ordinary visitor, but then Fernando station isn't out to make itself attractive.</bar>
+ <bar>The spacedock bar is mainly frequented by Dvaered military pilots, as can be expected from a bar on a military base. The drinks served here are mostly free of mind-altering substances, a serious detractor to the ordinary visitor, but then Fernando Station isn't out to make itself attractive.</bar>
</general>
<tech>
<item>Kinetic 1</item>
View
2  dat/assets/halir.xml
@@ -29,7 +29,7 @@
<commodities>
<commodity>Food</commodity>
</commodities>
- <description>Before there was Emperor's Fist, before there was even the Incident, there was Halir, located in the Gamma Polaris system. While near the outskirts of the Empire, it served as one of the largest local civilian hubs, with a strong economy and considerable political influence. Then, one day, the new Emperor had Polaris Prime built, renamed most of the worlds in the system, and subsequently started the Emperor's Fist project. Halir was reduced to an economical support role. However, the local government has stubbornly clung on to the right to sovereignty, and so Halir remains a civilian world.</description>
+ <description>Before there was Emperor's Fist, before there was even the Incident, there was Halir, located in the Gamma Polaris system. While near the outskirts of the Empire, it served as one of the largest local civilian hubs, with a strong economy and considerable political influence. Then, one day, the new Emperor had Polaris Prime built, renamed most of the worlds in the system, and subsequently started the Emperor's Fist project. Halir was reduced to an economic support role. However, the local government has stubbornly clung on to the right to sovereignty, and so Halir remains a civilian world.</description>
<bar>Halir's bar has everything the weary traveler could hope for, from drinks to data uplink terminals to per-table sound dampening fields and music generators. In short it is a luxurious place, which is largely due to Halir's long history of economic success. Anything you can't find in the bar you can find in the pleasure district, which is just a single tube station away.</bar>
</general>
<tech>
View
2  dat/assets/inss3.xml
@@ -26,7 +26,7 @@
<commodities>
<commodity>Food</commodity>
</commodities>
- <description>Somehwat curiously, Imperial Nutrient Supply Station 3 is actually owned by House Dvaered. Though initially constructed by the Empire, the station was ceded to House Dvaered as part of its official inception. INSS-3 still provides food for the Imperial colonies at Tau Prime and Draconis, though the price of food there has gone up by a fair margin ever since the change in ownership.</description>
+ <description>Somewhat curiously, Imperial Nutrient Supply Station 3 is actually owned by House Dvaered. Though initially constructed by the Empire, the station was ceded to House Dvaered as part of its official inception. INSS-3 still provides food for the Imperial colonies at Tau Prime and Draconis, though the price of food there has gone up by a fair margin ever since the change in ownership.</description>
<bar>The bar is not much to speak of. The Dvaered have shown a greater interest in farming than in public relations, so the spaceport bar has been largely neglected. It's a wonder the basic facilities are even functional at all.</bar>
</general>
</asset>
View
2  dat/assets/jaegnhild.xml
@@ -31,7 +31,7 @@
<commodity>Industrial Goods</commodity>
</commodities>
<description>There can almost be no greater contrast than there is between Jaegnhild and its primary, Uuries. One is an ocean world, filled with all kinds of unlikely forms of life, while the other is a lifeless chunk of coalesced dust. Jaegnhild was one of the last colonies established in the First Growth, but among all the chosen worlds it was perhaps the most suitable to life when the colony ship arrived. Though not many call the floating cities their home, the standard of living is unusually high for a Frontier world.</description>
- <bar>Jaegnhild's bar is built into an ancient compartiment of the colony ship Pristine, which brought the first human settlers to this world so many years ago. Though most of the structure has been rebuilt using newer materials, the original plating can still be seen in places.</bar>
+ <bar>Jaegnhild's bar is built into an ancient compartment of the colony ship Pristine, which brought the first human settlers to this world so many years ago. Though most of the structure has been rebuilt using newer materials, the original plating can still be seen in places.</bar>
</general>
<tech>
<item>Basic Trade Ships</item>
View
2  dat/assets/madeleine_station.xml
@@ -25,7 +25,7 @@
<outfits/>
</services>
<commodities/>
- <description>In a strange twist of fate, Madeleine station was named after the granddaughter of the first commander to be stationed here. The place serves as the Empire's southernmost military base. It was originally little more than a minor depot, but has grown into an important line of defense against the southern pirates in recent years.</description>
+ <description>In a strange twist of fate, Madeleine Station was named after the granddaughter of the first commander to be stationed here. The place serves as the Empire's southernmost military base. It was originally little more than a minor depot, but has grown into an important line of defense against the southern pirates in recent years.</description>
<bar>Since traders don't come to this military base, the bar is only frequented by Imperial military personnel. It's more like a canteen than a bar, really.</bar>
</general>
<tech>
View
2  dat/assets/mk.xml
@@ -31,7 +31,7 @@
<commodity>Industrial Goods</commodity>
</commodities>
<description>M.K, a rather oddly named planet, holds a special place in many Soromid's hearts. It is the closest inhabited world to Sorom that survived the Incident. It has little else to set it apart, however. The local economy is operating along predictable lines, and the population is no better off than on most Soromid worlds. To most traders, M.K. is just another market to make profit in.</description>
- <bar>Both Soromid and non-Soromid frequent this spaceport bar. As Wildwood station is more of a service utility than a real community, M.K. is often the first real Soromid port most new traders visit. It is therefore here they get their first taste of a full-fledged Soromid society. It's not uncommon to find yound pilots looking at the surroundings with a mixture of wonder and nervousness.</bar>
+ <bar>Both Soromid and non-Soromid frequent this spaceport bar. As Wildwood Station is more of a service utility than a real community, M.K. is often the first real Soromid port most new traders visit. It is therefore here they get their first taste of a full-fledged Soromid society. It's not uncommon to find yound pilots looking at the surroundings with a mixture of wonder and nervousness.</bar>
</general>
<tech>
<item>Plasma 1</item>
View
4 dat/assets/nonuri.xml
@@ -6,7 +6,7 @@
</pos>
<GFX>
<space>moon-M03.png</space>
- <exterior>station03.png</exterior>
+ <exterior>forest.png</exterior>
</GFX>
<presence>
<faction>Frontier</faction>
@@ -29,7 +29,7 @@
<commodity>Luxury Goods</commodity>
<commodity>Industrial Goods</commodity>
</commodities>
- <description>Nonuri is a world with an under-developed economy, even by Frontier standards. It barely manages to keep itself from going bankrupt. The people who live here stay mainly out of a sense of belonging, a feeling that Nonuri is their birthright. In fact, Nonuri was colonized by the colony ship Petrovosk, which makes Nonuri one of the oldest extrasolar human settlements. Unfortunately for the locals, most of the galaxy doesn't care quite as much as they do.</description>
+ <description>Nonuri is a world with an under-developed economy, even by Frontier standards. It barely manages to keep itself from going bankrupt. The people who live here stay mainly out of a sense of belonging, a feeling that Nonuri is their birthright. In fact, Nonuri was colonized by the colony ship Wendigo, which makes Nonuri one of the oldest extrasolar human settlements. Unfortunately for the locals, most of the galaxy doesn't care quite as much as they do.</description>
<bar>The spaceport bar is humble, yet tidy and functional. The Nonurians may not enjoy a rich life, but they make the most of what they've got. Though the equipment is outdated, in some cases by several generations, this bar has most of the things an intergalactic traveler needs to keep abreast of events.</bar>
</general>
</asset>
View
2  dat/assets/omega_station.xml
@@ -11,7 +11,7 @@
<presence>
<faction>Empire</faction>
<value>200.000000</value>
- <range>1</range>
+ <range>2</range>
</presence>
<general>
<class>0</class>
View
2  dat/assets/soromid_wards_beta.xml
@@ -23,7 +23,7 @@
<bar/>
</services>
<commodities/>
- <description>While Soromid Wards Alpha in Shikima handles seven out of ten gene therapy clients, it is ill equipped for some of the more invasive operations. Soromid Wards Beta, on the other hand, has several facilities that make such operations possible. Of course these advanced procedrues come at a higher cost, so the clients visiting Beta tend to be from the upper classes of galactic society.</description>
+ <description>While Soromid Wards Alpha in Shikima handles seven out of ten gene therapy clients, it is ill-equipped for some of the more invasive operations. Soromid Wards Beta, on the other hand, has several facilities that make such operations possible. Of course, these advanced procedures come at a higher cost, so the clients visiting Beta tend to be from the upper echelon of galactic society.</description>
<bar>The spacedock bar, which doubles as a waiting room for clients, provides its visitors with information on the services that are rendered on Beta, such as ocular augmentation, bone and muscle reinforcement, disease immunities and reproductive facility expansion.</bar>
</general>
</asset>
View
4 dat/assets/three_and_a_half_kings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<asset name="Three and a half Kings">
+<asset name="Three and a Half Kings">
<pos>
<x>-19071.692886</x>
<y>12147.629022</y>
@@ -28,7 +28,7 @@
<commodities>
<commodity>Industrial Goods</commodity>
</commodities>
- <description>It's a nickname, of course. How could it not be? Trouble is, nobody remembers where the name came from, and, bizarrely, there are no records of the station's original name. It's quite a famous story, both within Hekaras and elsewhere. Meanwhile, all involved simply call it Three and a half Kings. It seems to work for them.</description>
+ <description>It's a nickname, of course. How could it not be? Trouble is, nobody remembers where the name came from, and, bizarrely, there are no records of the station's original name. It's quite a famous story, both within Hekaras and elsewhere. Meanwhile, all involved simply call it Three and a Half Kings. It seems to work for them.</description>
<bar>This is a typical stationside bar. It has viewports looking into space, which are of course ignored by everyone, since anyone who comes to a station like this has seen all the space they could possibly want to.</bar>
</general>
<tech>
View
2  dat/assets/tori.xml
@@ -31,7 +31,7 @@
<commodity>Ore</commodity>
<commodity>Industrial Goods</commodity>
</commodities>
- <description>When the thirteenth colony ship, Yamato Nadeshiko, arrived at Tori, it was sterile. though it had both water and carbon in abundant supply, there was no life to be found. With the arrival of the mostly Asian human colonists, this changed. Human flora thrived on the planet, and within a century the planet had acquired a fully functional ecosystem. This marvel has inspired the inhabitants of Tori to leave much of the world's surface to nature. Though this means Tori's economoc potential remains largely untapped, the thriving tourist industry largely compensates.</description>
+ <description>When the thirteenth colony ship, Yamato Nadeshiko, arrived at Tori, it was sterile. Though it had both water and carbon in abundant supply, there was no life to be found. With the arrival of the mostly Asian human colonists, this changed. Human flora thrived on the planet, and within a century the planet had acquired a fully functional ecosystem. This marvel has inspired the inhabitants of Tori to leave much of the world's surface to nature. Though this means Tori's economic potential remains largely untapped, the thriving tourist industry largely compensates.</description>
<bar>The spaceport bar is more than just functional. Since most new arrivals on the planet come here first, the authorities have taken pains to make the bar appealing and comfortable. Of course, the fact that Tori is a tourist attraction also means drinks are quite expensive in this bar...</bar>
</general>
<tech>
View
2  dat/assets/varaati.xml
@@ -31,7 +31,7 @@
<commodity>Ore</commodity>
<commodity>Industrial Goods</commodity>
</commodities>
- <description>The sixteenth colony ship to be launched from Earth, Archimedes had many improvements over its predecessors. Though high-yield terraformind was still unknown in those days, the ship did have rather effective atmospheric equalizers and soil enhancers, which allowed it to transform Varaati from a primordeal world into a stable class M. Despite this success, Varaati's economic development started relatively late in the game, placing it a good distance behind Hope and Tori.</description>
+ <description>The sixteenth colony ship to be launched from Earth, Archimedes had many improvements over its predecessors. Though high-yield terraforming was still unknown in those days, the ship did have rather effective atmospheric equalizers and soil enhancers, which allowed it to transform Varaati from a primordeal world into a stable class M. Despite this success, Varaati's economic development started relatively late in the game, placing it a good distance behind Dawn and Tori.</description>
<bar>Varaati's spaceport bar is one of those places where everything is in a state of disrepair, where none of the safety regulations are met and where the air is thick with odors you don't want to guess the origin of. In short, it's a great place to hang out.</bar>
</general>
<tech>
View
2  dat/assets/vertigo.xml
@@ -28,7 +28,7 @@
<commodity>Food</commodity>
<commodity>Industrial Goods</commodity>
</commodities>
- <description>Vertigo is the second moon orbiting Nartur IV. While the rock itself is utterly uninteresting, it's Nartur's first moon that is. It is a semi-fluid sphere of valuable mineral that often gets used in hyperdrives. Vertigo is the closest place where a harvesting base can be set up, short of building a whole new starbase.</description>
+ <description>Vertigo is the second moon orbiting Nartur IV. While the rock itself is utterly uninteresting, Nartur's first moon is anything but. It is a semi-fluid sphere of valuable mineral that often gets used in hyperdrives. Vertigo is the closest place where a harvesting base can be set up, short of building a whole new starbase.</description>
<bar>Vertigo's spaceport bar has an excellent view of Nartur IV and IVa. Depending on the phase of the various orbital cycles, it can be quite a fetching sight. Of course, some of the time there's very little to see at all.</bar>
</general>
</asset>
View
2  dat/assets/waterholes_moon.xml
@@ -28,6 +28,6 @@
<commodity>Food</commodity>
</commodities>
<description>In the days of the Old Empire, Waterhole was the farthest outpost of the Empire. To the Imperials, it was the last outpost of civilization, the last bastion of safety before venturing out into the systems beyond. It is because of this that Waterhole, the system and the planet, derive their names. Now, centuries later, Waterhole remains at the border of Empire space. It is still the last stop for traders venturing out, and the first of those coming in.</description>
- <bar>Waterhole's moon wouldn't be Waterhole's moon if its bar wasn't called The Waterhole. Though the place is open to visitors from all origins and walks of life, the majority of the clientele is Imperial in nature. It seems that nothing creates a longing for home like being away from it for prolonged periods of time.</bar>
+ <bar>Waterhole's Moon wouldn't be Waterhole's Moon if its bar wasn't called The Waterhole. Though the place is open to visitors from all origins and walks of life, the majority of the clientele is Imperial in nature. It seems that nothing creates a longing for home like being away from it for prolonged periods of time.</bar>
</general>
</asset>
View
25 dat/event.xml
@@ -33,6 +33,10 @@
<lua>tutorial/tutorial-combat2</lua>
<trigger>none</trigger>
</event>
+ <event name="Tutorial: Heat">
+ <lua>tutorial/tutorial-heat</lua>
+ <trigger>none</trigger>
+ </event>
<event name="Tutorial: Activated Outfits">
<lua>tutorial/tutorial-aoutfits</lua>
<trigger>none</trigger>
@@ -68,13 +72,13 @@
<lua>neutral/baron_flintley</lua>
<trigger>land</trigger>
<chance>100</chance>
- <cond>var.peek("baron_active") == nil and planet.cur() == planet.get("Tau Station") and player.misnDone("Prince")</cond>
+ <cond>player.misnActive("Baron") == false and planet.cur() == planet.get("Tau Station") and player.misnDone("Prince")</cond>
</event>
<event name="Prowling baron">
<lua>neutral/baron_prowl</lua>
<trigger>enter</trigger>
<chance>100</chance>
- <cond>var.peek("baron_active") == nil and system.cur() == system.get("Ingot")</cond>
+ <cond>player.misnActive("Baron") == false and system.cur() == system.get("Ingot")</cond>
<flags>
</flags>
</event>
@@ -82,7 +86,22 @@
<lua>neutral/baron_comm</lua>
<trigger>enter</trigger>
<chance>4</chance>
- <cond>player.misnDone("Baron") == false and var.peek("baron_active") == nil and system.cur():presence("friendly") &gt; 3.*system.cur():presence("hostile")</cond>
+ <cond>player.misnDone("Baron") == false and
+ player.misnActive("Baron") == false and
+ (
+ system.cur():faction() == faction.get("Empire") or
+ system.cur():faction() == faction.get("Dvaered") or
+ system.cur():faction() == faction.get("Sirius")
+ )
+ </cond>
+ <flags>
+ </flags>
+ </event>
+ <event name="Preacher">
+ <lua>sirius/preach</lua>
+ <trigger>enter</trigger>
+ <chance>10</chance>
+ <cond>system.cur():presence(faction.get("Sirius"))&gt;50 and (not player.evtActive ("Preacher")) and ( (var.peek("si_convert")==nil) or rnd.rnd(1,var.peek("si_convert")+1)==1)</cond>
<flags>
</flags>
</event>
View
4 dat/events/neutral/animaltrouble.lua
@@ -26,7 +26,9 @@ function create ()
end
function startProblems()
- -- TODO: cancel time compression here!
+ -- Cancel autonav.
+ player.cinematics(true)
+ player.cinematics(false)
tk.msg(title[1], text[1])
ps = player.pilot()
ps:control()
View
4 dat/events/neutral/baron_flintley.lua
@@ -8,7 +8,7 @@ if lang == "es" then
else -- default english
desc = "Flintley is here. He nervously sips from his drink, clearly uncomfortable in this environment."
title = "Flintley"
- text = [[ Flintly greets you, relieved to see a friendly face. "Hello again, %s. What brings you here today? As you can see, I'm here on business again. Nothing too interesting, I'm afraid, just everyday stuff."
+ text = [[ Flintley greets you, relieved to see a friendly face. "Hello again, %s. What brings you here today? As you can see, I'm here on business again. Nothing too interesting, I'm afraid, just everyday stuff."
You spend some time chatting with Flintley, then you get back to work.]]
end
@@ -18,4 +18,4 @@ end
function flintley()
tk.msg(title, text:format(player.name()))
-end
+end
View
6 dat/events/neutral/derelict.lua
@@ -21,8 +21,8 @@ else -- default english
ntext[6] = [[This derelict seems to have been visited by looters already. You find a message carved into the wall near the airlock. It reads: "I WUS HEAR". Below it is another carved message that says "NO U WASNT". Otherwise, there is nothing of interest left on this ship.]]
ntext[7] = [[This derelict seems to have at one time been used as an illegal casino. There are roulette tables and slot machines set up in the cargo hold. However, it seems the local authorities caught wind of the operation, because there are also scorch marks on the furniture and the walls, and there are assault rifle shells underfoot. You don't reckon you're going to find anything here, so you leave.]]
ntext[8] = [[When the airlock opens, you are hammered in the face by an ungodly smell that almost makes you pass out on the spot. You hurriedly close the airlock again and flee back into your own ship. Whatever is on that derelict, you don't want to find out!]]
- ntext[9] = [[This derelict has really been beaten up badly. Most of the corridors are blocked by mangled metal, and your scans read depressurized compartiments all over the ship. There's not much you can do here, so you decide to leave the derelict alone.]]
- ntext[10] = [[The interior of this ship is decorated in a gaudy fashion. There are cute plushies hanging from the doorways, drapes on every viewport, colored pillows in the corners of most compartiments and cheerful graffiti on almost all the walls. A scan of the ship's computer shows that this ship belonged to a trio of adventurous young ladies who decided to have a wonderful trip through space. Sadly, it turned out none of them really knew how to fly a space ship, and so they ended up stranded and had to be rescued. Shaking your head, you return to your own ship.]]
+ ntext[9] = [[This derelict has really been beaten up badly. Most of the corridors are blocked by mangled metal, and your scans read depressurized compartments all over the ship. There's not much you can do here, so you decide to leave the derelict alone.]]
+ ntext[10] = [[The interior of this ship is decorated in a gaudy fashion. There are cute plushies hanging from the doorways, drapes on every viewport, colored pillows in the corners of most compartments and cheerful graffiti on almost all the walls. A scan of the ship's computer shows that this ship belonged to a trio of adventurous young ladies who decided to have a wonderful trip through space. Sadly, it turned out none of them really knew how to fly a space ship, and so they ended up stranded and had to be rescued. Shaking your head, you return to your own ship.]]
ntext[11] = [[The artificial gravity on this ship has bizarrely failed, managing to somehow reverse itself. As soon as you step aboard you fall upwards and onto the ceiling, getting some nasty bruises in the process. Annoyed, you search the ship, but without result. You return to your ship - but forget about the polarized gravity at the airlock, so you again smack against the deck plates.]]
ntext[12] = [[The cargo hold of this ship contains several heavy, metal chests. You pry them open, but they are empty. Whatever was in them must have been pilfered by other looters already. You decide not to waste any time on this ship, and return to your own.]]
ntext[13] = [[You have attached your docking clamp to the derelict's airlock, but the door refuses to open. A few diagnostics reveal that the other side isn't pressurized. The derelict must have suffered hull breaches over the years. It doesn't seem like there's much you can do here.]]
@@ -39,7 +39,7 @@ else -- default english
btitle = "Oh no!"
btext = {}
btext[1] = [[The moment you affix your boarding clamp to the derelect ship, it triggers a boobytrap! The derelict explodes, severely damaging your ship. You escaped death this time, but it was a close call!]]
- btext[2] = [[You board the derelict ship and search its interior, but you find nothing. When you return to your ship, however, it turns out there were Space Leeches onboard the derelict - and they've now attacked themselves to your ship! You scorch them off with a plasma torch, but it's too late. The little buggers have already drunk all of your fuel. You're not jumping anywhere until you find some more!]]
+ btext[2] = [[You board the derelict ship and search its interior, but you find nothing. When you return to your ship, however, it turns out there were Space Leeches onboard the derelict - and they've now attached themselves to your ship! You scorch them off with a plasma torch, but it's too late. The little buggers have already drunk all of your fuel. You're not jumping anywhere until you find some more!]]
btext[3] = [[You affix your boarding clamp and walk aboard the derelict ship. You've only spent a couple of minutes searching the interior when there is a proximity alarm from your ship! Pirates are closing on your position! Clearly this derelict was a trap! You run back onto your ship and prepare to unboard, but you've lost precious time. The pirates are already in firing range...]]
--=== MISSION EVENTS ===--
View
5 dat/events/neutral/npc.lua
@@ -115,7 +115,7 @@ else --default english
"Have you studied your galactic history? The Frontier worlds were the first to be colonized by humans. That makes our worlds the oldest human settlements in the galaxy, now that Earth is gone.",
"We have the Dvaered encroaching on our territory on one side, and the Sirius zealots on the other. Sometimes I worry that in a few decacycles, the Frontier will no longer exist.",
"Have you visited the Frontier Museum? They've got a scale model of a First Growth colony ship on display in one of the big rooms. Even scaled down like that, it's massive! Imagine how overwhelming the real ones must have been.",
- "There are eleven true Frontier worlds, because eleven colony ships successfully completed their journey in the First Growth. But did you know that there were twenty colony ships to begin with? Nine of them never made it. Some are said to have mysteriously disappeared. I wonder what happened to them?",
+ "There are twelve true Frontier worlds, because twelve colony ships successfully completed their journey in the First Growth. But did you know that there were twenty colony ships to begin with? Eight of them never made it. Some are said to have mysteriously disappeared. I wonder what happened to them?",
"We don't have much here in the Frontier, other than our long history leading directly back to Earth. But I don't mind. I'm happy living here, and I wouldn't want to move anywhere else.",
"You know the Frontier Liberation Front? They're the guerilla movement that fights for the Frontier. Not to be confused with the Liberation Front of the Frontier, the Frontier Front for Liberation, or the Liberal Frontier's Front!"
}
@@ -159,7 +159,7 @@ else --default english
-- ALL NPCs have a chance to say one of these lines instead of a lore message.
-- So, make sure the hints are always faction neutral.
msg_mhint = {{"Shadowrun", "Apparently there's a woman who regularly turns up on planets in and around the Klantar system. I wonder what she's looking for?"},
- {"Collective Espionage 1", "The Empire is trying to really do something about the Collective, I hear. Who knows, maybe you can even help them out if you make it to Omega station."},
+ {"Collective Espionage 1", "The Empire is trying to really do something about the Collective, I hear. Who knows, maybe you can even help them out if you make it to Omega Station."},
{"Hitman", "There are often shady characters hanging out in the Alteris system. I'd stay away from there if I were you, someone might offer you a dirty kind of job!"}
}
@@ -291,6 +291,7 @@ function getJmpMessage()
local sel = rnd.rnd(1, #mytargets)
local myfunc = function()
mytargets[sel]:setKnown(true)
+ mytargets[sel]:system():setKnown(true, false)
end
-- Don't need to remove messages from tables here.
View
6 dat/events/neutral/shipwreck.lua
@@ -40,9 +40,9 @@ function create ()
v:setFaction("Derelict")
v:disable()
v:rename("Shipwrecked " .. shipname)
- -- Added extra visibility for big systems (A.)
- v:setVisplayer( true )
- v:setHilight( true )
+ -- Added extra visibility for big systems (A.)
+ v:setVisplayer( true )
+ v:setHilight( true )
end
hook.timer(3000, "broadcast")
View
410 dat/events/sirius/preach.lua
@@ -0,0 +1,410 @@
+--Preliminary draft of a new event where the player meets one of the Touched, who tries to convert him
+--Sudarshan S <ssoxygen@users.sf.net>
+
+include("scripts/fleethelper.lua")
+
+commtitle="The preaching begins..."
+commtext=[[A Sirian appears on your viewscreen. He seems different than most Sirii you've met. He regards you with a neutral yet intense gaze.
+"Man is cruel and deceptive," he says. "You deserve more than you shall ever get from humanity. Your only hope is to follow the Holy One, Sirichana. He shall guide you to peace and wisdom. He is the sole refuge for humans like you and me. You MUST follow him!"
+
+You feel a brief but overpowering urge to follow him, but it passes and your head clears. The Sirian ship makes no further attempt to communicate with you.]]
+
+althoughEnemy={
+"%s, although you are an enemy of House Sirius, I shall not attack unless provoked, for I abhor violence!",
+"%s, although you are an enemy of House Sirius, I shall not attack unless provoked, for I believe mercy is a great Truth!",
+"%s, although you are an enemy of House Sirius, I shall not attack unless provoked, for you too are Sirichana's child!"
+}
+
+friend={
+"%s, I foresee in you a great Sirian citizen, and I look forward to your friendship!",
+"%s, I foresee a bright future for you, illuminated by Sirichana's light!",
+"%s, may Sirichana's light illuminate your path!"
+}
+
+followSirichana={
+"You shall all follow Sirichana henceforth!",
+"Sirichana shall lead you to peace and wisdom!",
+"Sirichana is the Father of you all!",
+"Sirichana's grace shall liberate you!",
+"May Sirichana's light shine on you henceforth!"
+}
+
+praiseSirichana={
+"We shall all follow Sirichana now!",
+"We have been liberated from our evil ways!",
+"No more shall we tread the path of evil!",
+"We see the True path now!",
+"No more shall we commit sins!"
+}
+
+attackerPunished={
+"Serves you right for attacking a Touched!",
+"Fry in hell, demon!",
+"May you suffer eternal torment!",
+"Your doom is Sirichana's curse!"
+}
+
+attackersDead={
+"All the attackers are dead!",
+"We can resume our Quest now!",
+"The glory of Sirichana remains unblemished!",
+"All heretics have been destroyed!"
+}
+
+whatHappened={
+"Do you think everyone can be brainwashed?",
+"You shall convert no more of us!",
+"Some of us shall not be converted, fool!",
+"You'll never convert me!",
+"I shall never be converted!"
+}
+
+presence={
+"You feel an overwhelming presence nearby!",
+"Something compels you to stop",
+"You are jerked awake by a mysterious but compelling urge",
+"You feel... Touched... by a magical power"
+}
+
+startCombat={
+"Die, heretics!",
+"Those who insult the Sirichana shall die!",
+"You've commited an unpardonable sin!",
+"Hell awaits, fools!"
+}
+
+preacherDead={
+"Oh no! The Touched One is dead!",
+"Sirichana save our souls!",
+"We shall never forget You, O Touched One!",
+"We swear eternal revenge!"
+}
+
+urge={
+"You feel an overwhelming urge to hear him out!",
+"A mysterious force forces you to listen!",
+"You feel compelled to listen!"
+}
+
+dyingMessage={
+"With my dying breath, I curse you!",
+"Sirichana speed you to hell!",
+"Sirichana, I did my best!"
+}
+
+dead={
+"The Reverence is dead!",
+"Someone killed the preacher!"
+}
+
+--initialize the event
+function create()
+ curr=system.cur() --save the current system
+
+ v = var.peek( "si_convert" ) -- Get the value
+ if v == nil then -- Doesn't exist, so create
+ var.push( "si_convert", 1 )
+ else
+ var.push( "si_convert", v+1 )
+ end
+
+ --start the fun when the player jumps
+ hook.jumpin("funStartsSoon")
+ hook.land("cleanup") --oops he landed
+end
+
+--Start the real mission after a short delay
+function funStartsSoon()
+ playerP=player.pilot() --save player's pilot
+ rep=faction.playerStanding(faction.get("Sirius"))
+ hook.timer(5000, "theFunBegins") --for effect, so that we can see them jumping in!
+end
+
+--the preaching's about to begin!
+function theFunBegins()
+ if rep < 0 then
+ local dist = vec2.dist(jump.get(system.cur(),curr):pos(),player.pos()) --please note the order of system.cur() and curr matters!
+ if dist < 6000 then
+ hook.timer(5000,"theFunBegins") --wait some more time
+ return
+ end
+ end
+ --summon a preacher from the jump point and highlight him and take control and focus on him
+ preacher=pilot.addRaw("Sirius Reverence", "sirius_norun", curr, "Sirius")[1]
+ preacher:setHilight()
+ preacher:setVisplayer()
+ preacher:control()
+ preacher:broadcast(followSirichana[rnd.rnd(1,#followSirichana)],true)
+ preacher:hailPlayer()
+ playerP:setInvincible()
+
+ --set needed hooks
+ hook.pilot(preacher,"attacked","violence")
+ hook.pilot(preacher,"death","badCleanup")
+ hook.pilot(preacher,"land","landCleanup")
+ hook.pilot(preacher,"jump","jumpCleanup")
+ hook.jumpout("cleanup")
+
+ camera.set(preacher, true)
+ player.cinematics(true,{gui=true, abort=presence[rnd.rnd(1,#presence)]})
+
+ --you're hooked till you hear him out!
+ playerP:control()
+ player.msg(urge[rnd.rnd(1,#urge)])
+
+ --create a random band of converted pirate followers
+ local followerShips = {"Pirate Kestrel", "Pirate Admonisher", "Pirate Shark", "Pirate Vendetta", "Pirate Rhino"} --the types of followers allowed
+ followers = {}
+ local numships = rnd.rnd(2, 6) -- This is the total number of converted follower ships.
+
+ for num=1, numships, 1 do
+ followers[num] = followerShips[rnd.rnd(1, #followerShips)] -- Pick a follower ship at random.
+ end
+
+ followers = addRawShips(followers, "sirius_norun", curr, "Sirius") -- The table now contains pilots, not ship names.
+ for _,j in ipairs(followers) do
+ j:rename("Converted "..j:name())
+ end
+
+ --pick a random converted pirate and have him praise the Sirichana
+ praiser=followers[rnd.rnd(1,#followers)]
+
+ --add some sirian escorts too
+ local sirianFollowers = {"Sirius Fidelity","Sirius Shaman"} --the types of followers allowed
+ local sirianFollowerList = {}
+
+ numships = rnd.rnd(2, 6) -- This is the total number of sirian escort ships.
+ for num=1, numships, 1 do
+ sirianFollowerList[num] = sirianFollowers[rnd.rnd(1, #sirianFollowers)] -- Pick a follower ship at random.
+ end
+
+ sirianFollowers = addRawShips(sirianFollowerList, "sirius_norun", curr, "Sirius") -- The table now contains pilots, not ship names.
+
+ for _, j in ipairs(sirianFollowers) do
+ followers[#followers + 1] = j
+ end
+
+ --set up a table to store attackers
+ attackers={}
+
+ --make these followers follow the Touched one
+ --if Sirius is an enemy still keep these guys neutral... at first
+ for _, j in ipairs(followers) do
+ j:setFriendly()
+ j:control()
+ j:follow(preacher)
+ hook.pilot(j,"attacked","violence")
+ end
+ preacher:setFriendly()
+
+ --pick a random follower and have him praise Sirichana, after a delay
+ hook.timer(4000,"praise")
+
+ --have the preacher say something cool
+ hook.timer(8000,"preacherSpeak")
+
+ --add some normal pirates for fun :)
+ hook.timer(12500,"pirateSpawn")
+
+ --hook up timers for releasing cinematics (and you of course :P)
+ hook.timer(17500,"release")
+
+ --hook up timer for re-hailing player
+ hailHook=hook.date(time.create(0, 0, 1000), "reHail") --hail every 1000 STU till player answers
+
+ --when hailed, the preacher preaches to you
+ hook.pilot(preacher, "hail", "hail")
+end
+
+function preacherSpeak()
+ camera.set(preacher,true)
+ if rep < 0 then
+ preacher:comm(string.format(althoughEnemy[rnd.rnd(1,#althoughEnemy)],player.name()), true)
+ else
+ preacher:comm(string.format(friend[rnd.rnd(1,#friend)],player.name()), true)
+ end
+end
+
+--re-hail the player
+function reHail()
+ if preacher:exists() then
+ preacher:hailPlayer()
+ end
+end
+
+--random praise for the Sirichana
+function praise()
+ camera.set(praiser,true)
+ praiser:broadcast(praiseSirichana[rnd.rnd(1,#praiseSirichana)],true)
+end
+
+--spawn some enemy pirates for fun :P
+--to add even more fun have them say something cool
+function pirateSpawn()
+ local numships=rnd.rnd(2,5)
+ local curiousNumber=rnd.rnd(1,numships)
+ local shiptype={"Pirate Shark","Pirate Vendetta"}
+ local thepilot
+ for num=1,numships,1 do
+ thepilot = pilot.add(shiptype[rnd.rnd(1,#shiptype)], nil, curr)[1]
+ if num==curiousNumber then
+ thepilot:broadcast(whatHappened[rnd.rnd(1,#whatHappened)],true)
+ camera.set(thepilot,true)
+ end
+ thepilot:control()
+ thepilot:attack(followers[rnd.rnd(1,#followers)])
+ end
+end
+
+--called when a new attack happens
+function violence(attacked,attacker)
+ if #attackers == 0 then --we have to change the group to battle mode
+ attacked:broadcast(startCombat[rnd.rnd(1,#startCombat)],true)
+ preacher:control(false)
+ for _, j in ipairs(followers) do
+ if j:exists() then
+ j:control(false)
+ end
+ end
+ end
+ local found=false
+ for _,j in ipairs(attackers) do
+ if j==attacker then
+ found=true
+ break
+ end
+ end
+ if not found then --new attacker
+ attackers[#attackers+1]=attacker
+ hook.pilot(attacker,"exploded","anotherdead")
+ hook.pilot(attacker,"land","anotherdead")
+ hook.pilot(attacker,"jump","anotherdead")
+ end
+end
+
+--another enemy is dead
+function anotherdead(enemy, attacker)
+
+ if attacker==nil then --in case the pilot was blown up by an explosion
+ attacker=preacher
+ end
+
+ if attacker:exists() then --in case the attacker was parallely killed
+ attacker:broadcast(attackerPunished[rnd.rnd(1,#attackerPunished)],true)
+ end
+
+ --find and remove the enemy
+ for i,j in ipairs(attackers) do
+ if j==enemy then
+ table.remove(attackers,i)
+ break
+ end
+ end
+
+ if #attackers == 0 then --last one was killed, restore idle mode
+ attacker:broadcast(attackersDead[rnd.rnd(1,#attackersDead)],true)
+ restoreControl()
+ end
+end
+
+--finds and set a new target for the preacher, when he is outta battle mode
+function getPreacherTarget()
+ local sirius=faction.get( "Sirius" )
+
+ --look for nearby landable sirian planet to land
+ for key, planet in ipairs( system.cur():planets() ) do
+ if planet:faction()==sirius and planet:services()["land"] then
+ target = planet
+ break
+ end
+ end
+
+ --if no landable sirian planets found, jump to random system
+ --TODO: prevent jump back through the entry point
+ if target then
+ preacher:land(target)
+ else
+ preacher:hyperspace()
+ end
+end
+
+--restores control to the idle mode
+function restoreControl()
+ preacher:control()
+ for _, j in ipairs(followers) do
+ if j:exists() then
+ j:control()
+ j:follow(preacher)
+ end
+ end
+ getPreacherTarget()
+end
+
+--releases the player after the cutscene
+function release()
+ camera.set(nil, true)
+ player.cinematics(false)
+ playerP:setInvincible(false)
+ playerP:control(false)
+ --if the attacks have already started, we shouldn't set a target yet
+ if #attackers==0 then
+ getPreacherTarget()
+ end
+end
+
+--when hailed back, show the message
+function hail()
+ tk.msg(commtitle,commtext)
+ player.commClose()
+ hook.rm(hailHook) --no more hailing
+end
+
+--everything is done
+function cleanup()
+ player.pilot():setInvincible(false)
+ evt.finish()
+end
+
+--oops, it seems the preacher died. End gracefully
+function badCleanup()
+ playerP:setInvincible(false)
+ player.msg(dead[rnd.rnd(1,#dead)])
+ preacher:broadcast(dyingMessage[rnd.rnd(1,#dyingMessage)])
+ local survivors={}
+ for _,j in ipairs(followers) do
+ if j:exists() then
+ j:control(false)
+ survivors[#survivors+1]=j
+ end
+ end
+ if #survivors > 0 then
+ follower=survivors[rnd.rnd(1,#survivors)]
+ follower:broadcast(preacherDead[rnd.rnd(1,#preacherDead)],true)
+ end
+ evt.finish()
+end
+
+--the preacher has landed. Land all his followers too
+function landCleanup()
+ playerP:setInvincible(false)
+ for _,j in ipairs(followers) do
+ if j:exists() then
+ j:taskClear()
+ j:land(target)
+ end
+ end
+ evt.finish()
+end
+
+--the preacher has jumped. Jump all his followers too
+function jumpCleanup()
+ playerP:setInvincible(false)
+ for _,j in ipairs(followers) do
+ if j:exists() then
+ j:taskClear()
+ j:control()
+ j:hyperspace(target,true) --attack back as they move away?
+ end
+ end
+ evt.finish()
+end
View
17 dat/events/tutorial/tutorial-combat1.lua
@@ -31,7 +31,6 @@ Before you attack the drone, you should target it. To do so, you can use %s, whi
Target the drone, then shoot at it until it is destroyed.]]
message8 = [[Well done, you have just destroyed your enemy. You now know the basics of ship to ship combat. As the final part of this tutorial, you're going to fight against a live opponent. We've hired the best fighter pilot in the sector to test your mettle, he will jump into the system any moment now. Good luck, you're going to need it!]]
message9 = [[Oh. Well, good job, you've defeated your opponent. Don't worry about him though, he made it out before his ship blew. He mentioned he was good at that. Maybe that should have given us a clue...]]
- message10 = [[Something you might have noticed if the battle lasted for a while is that your weapons started lose accuracy. This is because of heat. Weapons heat up when fired, and when they become too hot they will first lose accuracy, and then firing rate, to the point where they won't fire at all anymore. If you find your weapons are overheating a lot, consider switching them out for a while using weapon groups.]]
message11 = [[You now know the basic principles of combat. As a final tip, you can target specific enemies at long range by clicking on them on the overlay map.
Congratulations! This concludes the basic combat tutorial.]]
@@ -127,8 +126,8 @@ function create()
pp:setDir(90)
player.msgClear()
- player.pilot():setNoLand()
- player.pilot():setNoJump()
+ pp():setNoLand()
+ pp():setNoJump()
tk.msg(title1, message1)
tk.msg(title1, message2:format(tutGetKey("primary")))
@@ -138,6 +137,7 @@ function create()
omsg = player.omsgAdd(wepomsg:format(tutGetKey("primary"), flytime), 0)
hook.timer(1000, "flyUpdate")
+ playerHeatLoss()
end
-- Make the player fire his weapons.
@@ -196,7 +196,7 @@ end
-- Hooked function, initiates drone target practice.
function dummypractice()
- drone = pilot.add("FLF Lancelot", "dummy", player.pilot():pos() + vec2.new(200, 0))[1]
+ drone = pilot.add("FLF Lancelot", "dummy", pp():pos() + vec2.new(200, 0))[1]
drone:rename("Target drone")
drone:setHostile()
drone:setNodisable(true)
@@ -244,14 +244,13 @@ end
-- Captain T. Practice is dead. Long live captain T. Practice.
function captainTPrip()
tk.msg(title1, message9)
- tk.msg(title1, message10)
tk.msg(title1, message11)
hook.safe( "cleanup" )
end
-- Taunt function.
function taunt()
- armour, shield = captainTP:health()
+ armour, shield = captainTP:health()
if shield >= 40 then
captainTP:comm(shield30[rnd.rnd(1, #shield30)])
elseif armour >= 31 then
@@ -260,6 +259,12 @@ function taunt()
taunthook = hook.timer(4000, "taunt")
end
+-- Special timer for the player to stop him from heating up.
+function playerHeatLoss()
+ pp:setTemp(0)
+ hook.timer(500, "playerHeatLoss")
+end
+
-- Cleanup function. Should be the exit point for the module in all cases.
function cleanup()
if not (omsg == nil) then player.omsgRm(omsg) end
View
2  dat/events/tutorial/tutorial-combat2.lua
@@ -198,7 +198,7 @@ end
-- Taunt function.
function taunt()
- armour, shield = captainTP:health()
+ armour, shield = captainTP:health()
if shield >= 40 then
captainTP:comm(shield30[rnd.rnd(1, #shield30)])
elseif armour >= 31 then
View
2  dat/events/tutorial/tutorial-discovery.lua
@@ -16,7 +16,7 @@ Open your system map (%s key).]]
message3 = [[You're looking at the system map for this system. But it appears empty! This is because at the moment, your sensors haven't picked up anything yet. The interference is too strong to see anything from here.
A marker has been placed on your map. Navigate toward it. Remember, you can right-click on a location to get there faster.]]
- message4 = [[Something just happened. You discovered a planet in this system, it's called Tein. Planets are the biggest objects you'll encounter in any system, so you will usually discover them before anything else.
+ message4 = [[Something just happened. You discovered a planet in this system, called Tein. Planets are the biggest objects you'll encounter in any system, so you will usually discover them before anything else.
Keep going.]]
message5 = [[You've discovered something else, Tein's moon Rein. Moons are a lot smaller than planets and are therefore harder to detect.
View
145 dat/events/tutorial/tutorial-heat.lua
@@ -0,0 +1,145 @@
+-- This is the tutorial: heat.
+
+include("dat/events/tutorial/tutorial-common.lua")
+include("scripts/enum.lua")
+
+-- localization stuff, translators would work here
+lang = naev.lang()
+if lang == "es" then
+else -- default english
+ title1 = "Tutorial: Heat"
+ message1 = [[Welcome to the heat tutorial.
+
+In this tutorial we will examine how heat accumulates in your ship, how it affects you, and what you can do to get rid of it.]]
+ message2 = [[Heat is generated by outfits, particularly weapons. Each time you fire a weapon, some of the energy needed to fire it will be converted into heat. This heat accumulates in the weapon outfit, and if the outfit gets hotter and hotter, it starts to lose its efficiency. For weapons, this means that they become inaccurate when they get hot, and start firing more slowly when very hot.
+
+You have been equipped with two Ripper Cannons. To see how heat builds up in weapons, try firing into space (using %s) now. Keep an eye on your weapon indicators on the HUD - after a short while you should see the bars filling up red.]]
+ message3 = [[As you probably saw, your weapons started shooting slightly off to the sides when they heated up. This can be very problematic in combat, so always keep an eye on your weapons' heat levels.
+
+When weapons get hot, they will automatically cool because the heat flows from the outfits into the ship hull. So, it can be a good idea to not use all of your weapons at the same time if you expect a long fight. Switch between weapons to let them cool down periodically.]]
+ message4 = [[So that's heat in a nutshell, right? As it turns out, there's more to it. We just learned that weapons cool down by transferring heat into the ship hull. But what if the ship hull gets hot?
+
+One thing that happens is that the ship becomes more visible to enemies. Objects that are hotter than the space around them will stand out more. So if your ship is hot, you might attract more attention.
+
+Another thing that happens is that your outfits, which are connected to the hull, start to cool more slowly! After all, heat transfer depends heavily on the difference in temperature between objects. So, if your ship gets very hot, you may find that your weapons don't cool as fast anymore, or not at all in extreme cases.
+
+For the purpose of this tutorial, we have made your ship rather hot. Notice the ship temperature indicator on the HUD, and notice also how your weapons aren't cooling anymore.]]
+ message5 = [[As you can see, having a hot ship is very inconvenient. It would be nice if ships could lose their heat somehow, wouldn't it? Fortunately, there are some ways to lose heat.
+
+First of all, ships radiate off heat if they are hotter than the space around them. This happens automatically and continuously, but it is a relatively slow process, especially for larger ships. It may be possible to accelerate the rate of heat loss by installing outfits to that effect.
+
+Heat is also reset to the base level when you land. So every time you take off, you will start out with a nice, cool hull.
+
+There is a third way to lose heat, however.]]
+ message6 = [[Every ship has the ability to go into a special cooling mode called Active Cooldown. When in Active Cooldown, ships rapidly lose their heat. By the end of the cooldown cycle, the ship and all its outfits will have cooled to the galactic base temperature.
+
+Let's try this now. Enter Active Cooldown mode by pressing %s. If you are moving, you will automatically brake to a stop.]]
+ message7 = [[You are now in Active Cooldown mode. You will see a progress bar above your ship. It is slowly draining. When the bar is completely empty, your ship will have cooled down. Don't touch any of the controls, or Active Cooldown will be canceled and you will have to restart it.
+
+Wait for your ship to cool. Keep a close eye on the temperature of your ship!]]
+ message8 = [[Well done! You have completed the Active Cooldown cycle, and your ship is as cool as the space around it.
+
+As you might have noticed during the cooldown process, your heat didn't drop very quickly until the cooling process was almost over. This is because heat is lost at an exponential rate in Active Cooldown mode. It starts off very slow, but picks up a lot of speed over time. What this means is that when using Active Cooldown, you're going to want to wait all the way until the end. Active Cooldown always takes a minimum amount of time, and if you abort the cooldown period, you have to start over from the beginning next time!
+
+Another important thing to remember is that Active Cooldown only works if the ship is sitting still. You can't do it on the move! So while it might seem attractive to use Active Cooldown in a fight to cool your weapons, you make yourself very vulnerable by doing so.]]
+ message9 = [[You now know about the important heat mechanics in the game. As a final tip, remember that the heat rules apply to other ships just as much as they do to you. Dodging an enemy until his weapons overheat is a valid tactic!
+
+Congratulations! This concludes the heat tutorial.]]
+
+ wepomsg = [[Use %s to fire your weapons (%ds remaining)]]
+ waitomsg = [[Observe your ship's heat (%ds remaining)]]
+ coolomsg = [[Enter Active Cooldown (%s)]]
+end
+
+function create()
+ -- Set up the player here.
+ player.teleport("Cherokee")
+ pilot.clear()
+ pilot.toggleSpawn(false) -- To prevent NPCs from getting targeted for now.
+ system.get("Mohawk"):setKnown(false)
+
+ pp = player.pilot()
+ pp:setPos(vec2.new(0, 2000))
+ player.swapShip("Vendetta", "Vendetta", "Paul 2", true, true)
+ pp:rmOutfit("all")
+ pp:addOutfit("Vulcan Gun", 2)
+ pp:setDir(90)
+ player.msgClear()
+
+ pp:setNoLand()
+ pp:setNoJump()
+
+ tk.msg(title1, message1)
+ tk.msg(title1, message2:format(tutGetKey("primary")))
+
+ stages = enumerate("weapons", "wait", "coolwait", "cool")
+ stage = stages.weapons
+
+ flytime = 10 -- seconds of fly time
+ omsg = player.omsgAdd(wepomsg:format(tutGetKey("primary"), flytime), 0)
+
+ -- We want to set the weapon heat just before the overheat point, for demonstration purposes.
+ pp:setTemp(500)
+ pp:setTemp(0, false)
+
+ hook.timer(1000, "flyUpdate")
+end
+
+-- Make the player fire his weapons.
+function flyUpdate()
+ flytime = flytime - 1
+ if stage == stages.weapons then
+ player.omsgChange(omsg, wepomsg:format(tutGetKey("primary"), flytime), 0)
+ if flytime < 0 then
+ player.omsgRm(omsg)
+ tk.msg(title1, message3)
+ tk.msg(title1, message4)
+ flytime = 5
+ stage = stages.wait
+ pp:setTemp(750)
+ omsg = player.omsgAdd(waitomsg:format(flytime), 0)
+ end
+ hook.timer(1000, "flyUpdate")
+ elseif stage == stages.wait then
+ player.omsgChange(omsg, waitomsg:format(flytime), 0)
+ if flytime < 0 then
+ player.omsgRm(omsg)
+ tk.msg(title1, message5)
+ tk.msg(title1, message6:format(tutGetKey("cooldown")))
+ stage = stages.coolwait
+ omsg = player.omsgAdd(coolomsg:format(tutGetKey("cooldown")), 0)
+ inputhook = hook.input("input")
+ end
+ hook.timer(1000, "flyUpdate")
+ elseif stage == stages.cool then
+ if pp:temp() == 250 then
+ tk.msg(title1, message8)
+ tk.msg(title1, message9)
+ cleanup()
+ end
+ hook.timer(1000, "flyUpdate")
+ end
+end
+
+--Input hook
+function input(inputname, inputpress)
+ if inputname == "cooldown" then
+ player.omsgRm(omsg)
+ hook.timer(2000, "cooldownPressed")
+ hook.rm(inputhook)
+ stage = stages.cool
+ end
+end
+
+--Timer called function.
+function cooldownPressed()
+ tk.msg(title1, message7)
+end
+
+-- Cleanup function. Should be the exit point for the module in all cases.
+function cleanup()
+ if not (omsg == nil) then player.omsgRm(omsg) end
+ naev.keyEnableAll()
+ naev.eventStart("Tutorial")
+ evt.finish(true)
+end
View
2  dat/events/tutorial/tutorial-planet.lua
@@ -17,7 +17,7 @@ To access the more interesting facilities on Paul 2, you will need to click on t
Select any tab now to view a short explanation on what you can do there. Once you have seen enough, press the takeoff button to end this tutorial.]]
message3 = [[This is the outfit seller. Here you may buy and sell things such as weapons, ship upgrades and ammunition. Note that you need to visit the equipment facility to actually install most outfits into your ship.
-A particular item of interest that most outfit sellers will carry is the star map. Buying a star map will give you information remote systems and their jump points, so it's a useful item when you're just starting out.]]
+A particular item of interest that most outfit sellers will carry is the star map. Buying a star map will give you information on remote systems and their jump points, so it's a useful item when you're just starting out.]]
message4 = [[This is the spaceport bar. Here you may find people who are interested in giving you missions. You will also see a news feed on the right of the screen. You can approach patrons by clicking on their portrait and then clicking on the "approach" button.
There are no mission givers here at the moment. Missions are explained in more detail in another tutorial.]]
View
3  dat/events/tutorial/tutorial.lua
@@ -13,6 +13,7 @@ else -- default english
menuinterstellar = "Tutorial: Interstellar Flight"
menubasiccombat = "Tutorial: Basic Combat"
menumisscombat = "Tutorial: Missile Combat"
+ menuheat = "Tutorial: Heat"
menuaoutfits = "Tutorial: Activated Outfits"
menudisable = "Tutorial: Disabling"
menuplanet = "Tutorial: The Planetary Screen"
@@ -46,7 +47,7 @@ function create()
system.get("Sioux"):setKnown(false, true)
-- Create menu.
- _, selection = tk.choice(menutitle, menutext, menubasic, menudiscover, menuinterstellar, menucomms, menubasiccombat, menumisscombat, menuaoutfits, menudisable, menuplanet, menumissions, menux)
+ _, selection = tk.choice(menutitle, menutext, menubasic, menudiscover, menuinterstellar, menucomms, menubasiccombat, menumisscombat, menuheat, menuaoutfits, menudisable, menuplanet, menumissions, menux)
startModule(selection)
end
View
2  dat/faction.xml
@@ -117,7 +117,7 @@
</faction>
<faction name="Soromid">
<known/>
- <logo>empire</logo>
+ <logo>soromid</logo>
<colour>orange</colour>
<player>0</player>
<spawn>soromid</spawn>
View
145 dat/gui/slim.lua
@@ -34,6 +34,8 @@ function create()
col_ammo = colour.new(140/255,94/255, 7/255 )
col_heat = colour.new(114/255,26/255, 14/255 )
col_heat2 = colour.new( 222/255, 51/255, 27/255 )
+ col_afb = colour.new(col_heat)
+ col_afb:setAlpha(.5)
col_ready = colour.new(14/255,108/255, 114/255 )
col_prim = colour.new(71/255,234/255, 252/255 )
col_sec = colour.new(136/255,179/255, 255/255 )
@@ -105,6 +107,31 @@ function create()
cooldown = tex.open( base .. "cooldown.png", 6, 6 )
active = tex.open( base .. "active.png" )
+ -- Active outfit bar
+ slot_w, slot_h = slot:dim()
+ slot_y = screen_h - slot_h - 16
+ slot_img_offs_x = 4
+ slot_img_offs_y = 6
+ slot_img_w = 48
+ slot_w, slot_h = slot:dim()
+ slotend_w, slotend_h = slotend:dim()
+
+ -- Cooldown pane.
+ cooldown_sheen = tex.open( base .. "cooldown-sheen.png" )
+ cooldown_bg = tex.open( base .. "cooldown-bg.png" )
+ cooldown_frame = tex.open( base .. "cooldown-frame.png" )
+ cooldown_panel = tex.open( base .. "cooldown-panel.png" )
+ cooldown_frame_w, cooldown_frame_h = cooldown_frame:dim()
+ cooldown_frame_x = (screen_w - cooldown_frame_w)/2.
+ cooldown_frame_y = math.min( slot_y - cooldown_frame_h - 10, (screen_h - cooldown_frame_h)/2. + 150 )
+ cooldown_panel_x = cooldown_frame_x + 8
+ cooldown_panel_y = cooldown_frame_y + 8
+ cooldown_bg_x = cooldown_panel_x + 30
+ cooldown_bg_y = cooldown_panel_y + 2
+ cooldown_bg_w, cooldown_bg_h = cooldown_bg:dim()
+ cooldown_sheen_x = cooldown_bg_x
+ cooldown_sheen_y = cooldown_bg_y + 12
+
--Messages
gui.mesgInit( screen_w - 400, 20, 28+15+5 )
@@ -145,16 +172,9 @@ function create()
missile_lock_text = "Warning - Missile Lockon Detected"
missile_lock_length = gfx.printDim( false, missile_lock_text )
- -- Active outfit bar
- slot_w, slot_h = slot:dim()
- slot_y = screen_h - slot_h - 16
- slot_img_offs_x = 4
- slot_img_offs_y = 6
-
- slot_img_w = 48
-
- slot_w, slot_h = slot:dim()
- slotend_w, slotend_h = slotend:dim()
+ -- Active cooldown display
+ cooldown_text = "Cooling down..."
+ cooldown_length = gfx.printDim( false, cooldown_text )
--Target Pane
ta_pane_w, ta_pane_h = target_pane:dim()
@@ -265,15 +285,6 @@ function update_nav()
autonav_hyp = player.autonavDest()
if nav_pnt then
pntflags = nav_pnt:services()
- n = 0
- if pntflags.land then
- services = { "land", "missions", "outfits", "shipyard", "commodity" }
- for k,v in ipairs(services) do
- if pntflags[tostring(v)] then
- n = n + 1
- end
- end
- end
gui.osdInit( ta_pnt_pane_x + ta_pnt_pane_w + 8, screen_h - 63, 150, 500 )
gui.fpsPos( ta_pnt_pane_x + ta_pnt_pane_w + 3, screen_h - 28 - 15 - deffont_h )
@@ -291,12 +302,25 @@ function update_nav()
if ta_pntfact then
ta_pnt_faction_gfx = ta_pntfact:logoTiny()
end
+
planet = { -- Table for convenience.
name = nav_pnt:name(),
pos = nav_pnt:pos(),
class = nav_pnt:class(),
- col = nav_pnt:colour()
+ col = nav_pnt:colour(),
+ services = {}
}
+
+ if pntflags.land then
+ services = { "missions", "outfits", "shipyard", "commodity" }
+
+ -- "Spaceport" is nicer than "Land"
+ table.insert( planet.services, "Spaceport" )
+ for k,v in ipairs(services) do
+ table.insert( planet.services, pntflags[v] )
+ end
+ planet.nservices = #planet.services
+ end
else
gui.osdInit( 23, screen_h - 63, 150, 500 )
gui.fpsPos( 15, screen_h - 28 - 15 - deffont_h )
@@ -365,6 +389,18 @@ function update_wset()
slot_start_x = screen_w/2 - #aset/2 * slot_w
end
+
+function render_cooldown( percent, seconds )
+ gfx.renderTex( cooldown_frame, cooldown_frame_x, cooldown_frame_y )
+ gfx.renderTex( cooldown_bg, cooldown_bg_x, cooldown_bg_y )
+ gfx.renderRect( cooldown_bg_x, cooldown_bg_y, percent * cooldown_bg_w, cooldown_bg_h, col_temperature )
+ gfx.renderTex( cooldown_sheen, cooldown_sheen_x, cooldown_sheen_y )
+ gfx.renderTex( cooldown_panel, cooldown_panel_x, cooldown_panel_y )
+ gfx.print(false, "Cooling down...", cooldown_frame_x,
+ cooldown_bg_y + cooldown_bg_h + 8, col_txt_bar, cooldown_frame_w, true )
+end
+
+
function render_bar( name, value, txt, txtcol, size, col, bgc )
if size then
offsets = { 22, 5, 9, 3 }
@@ -457,7 +493,7 @@ function render_armourBar( name, value, stress_value, txt, txtcol, size, col, bg
end
end
-function render_ammoBar( name, x, y, value, txt, txtcol, col )
+function render_ammoBar( name, x, y, value, txt, txtcol )
offsets = { 2, 20, 3, 13, 22, 6, 2, 5 } --Bar, y of refire, sheen, y of sheen, y of refire sheen, y of text, x and y of tracking icon
l_bg = _G["bg_" .. name]
if name == "heat" then
@@ -566,7 +602,7 @@ function render( dt, dt_mod )
--Speed
local hspeed = round(speed / stats.speed_max * 100,0)
- txt = tostring( hspeed ) .. "% (" .. tostring( round(speed)) .. ")"
+ txt = string.format( "%d%% (%d)", hspeed, round(speed) )
if hspeed <= 100. then
render_bar( "speed", hspeed, txt, col_txt_bar )
elseif hspeed <= 200. then
@@ -591,8 +627,7 @@ function render( dt, dt_mod )
render_bar( "temperature", temperature, txt, col_txt_bar )
--Weapon bars
- local num = 0
- for k, weapon in ipairs(wset) do
+ for num, weapon in ipairs(wset) do
txt = weapon.name
if weapon.left then -- Truncate names for readability.
if weapon.type == "Bolt Cannon" or weapon.type == "Beam Cannon" then
@@ -613,13 +648,12 @@ function render( dt, dt_mod )
col = col_txt_una
end
values = {weapon.left_p, weapon.cooldown, weapon.level, weapon.track or weapon.lockon, weapon.lockon }
- render_ammoBar( "ammo", x_ammo, y_ammo - (num)*28, values, txt, col, 2, col_ammo )
+ render_ammoBar( "ammo", x_ammo, y_ammo - (num-1)*28, values, txt, col, 2, col_ammo )
else
col = col_txt_bar
values = {weapon.temp, weapon.cooldown, weapon.level, weapon.track}
- render_ammoBar( "heat", x_ammo, y_ammo - (num)*28, values, txt, col, 2, col_heat )
+ render_ammoBar( "heat", x_ammo, y_ammo - (num-1)*28, values, txt, col, 2, col_heat )
end
- num = num + 1
end
--Warning Light
@@ -652,38 +686,37 @@ function render( dt, dt_mod )
end
-- Active outfits
-
- -- Draw the left-side bar cap.
if #aset > 0 then
+ -- Draw the left-side bar cap.
gfx.renderTexRaw( slotend, slot_start_x - slotend_w, slot_y, slotend_w, slotend_h, 1, 1, 0, 0, -1, 1 )
- end
- i = 1
- for i=1,#aset do
- local slot_x = screen_w - slot_start_x - i * slot_w
- if i <= #aset then
- --There is something in this slot
- gfx.renderRect( slot_x, slot_y, slot_w, slot_h, col_slot_bg ) --Background
+ gfx.renderRect( slot_start_x, slot_y, slot_w * #aset, slot_h, col_slot_bg ) -- Background for all slots.
+ for i=1,#aset do
+ local slot_x = screen_w - slot_start_x - i * slot_w
+
+ -- Draw a heat background for certain outfits. TODO: detect if the outfit is heat based somehow!
+ if aset[i].type == "Afterburner" then
+ gfx.renderRect( slot_x, slot_y, slot_w, slot_h * aset[i].temp, col_heat ) -- Background (heat)
+ end
gfx.renderTexRaw( active_icons[i], slot_x + slot_img_offs_x, slot_y + slot_img_offs_y + 2, slot_img_w, slot_img_w, 1, 1, 0, 0, 1, 1 ) --Image
+ if aset[i].type == "Afterburner" then
+ gfx.renderRect( slot_x, slot_y, slot_w, slot_h * aset[i].temp, col_afb ) -- Foreground (heat)
+ end
+
if aset[i].state == "on" then
gfx.renderTex( active, slot_x + slot_img_offs_x, slot_y + slot_img_offs_y )
elseif aset[i].state == "cooldown" then
- --Cooldown
local texnum = round(aset[i].cooldown*35) --Turn the 0..1 cooldown number into a 0..35 tex id where 0 is ready.
gfx.renderTex( cooldown, slot_x + slot_img_offs_x, slot_y + slot_img_offs_y, (texnum % 6) + 1, math.floor( texnum / 6 ) + 1 )
end
- --Frame
- gfx.renderTexRaw( slot, slot_x + slot_w, slot_y, -1*slot_w, slot_h, 1, 1, 0, 0, 1, 1 )
+ gfx.renderTex( slot, slot_x, slot_y ) -- Frame
end
- i = i + 1
- end
- -- Draw the right-side bar cap.
- if #aset > 0 then
- gfx.renderTexRaw( slotend, slot_start_x + #aset * slot_w, slot_y, slotend_w, slotend_h, 1, 1, 0, 0, 1, 1 )
+ -- Draw the right-side bar cap.
+ gfx.renderTex( slotend, slot_start_x + #aset * slot_w, slot_y )
end
--Target Pane
@@ -767,11 +800,16 @@ function render( dt, dt_mod )
end
-- Status information
+ local status
if ta_disabled then
status = "Disabled"
- gfx.print( true, status, ta_pane_x + 14, ta_pane_y + 94, col_txt_top )
elseif tflags["boardable"] then
status = "Boardable"
+ elseif ptarget:cooldown() then
+ status = "Cooling Down"
+ end
+
+ if status then
gfx.print( true, status, ta_pane_x + 14, ta_pane_y + 94, col_txt_top )
end
@@ -833,7 +871,7 @@ function render( dt, dt_mod )
-- Extend the pane depending on the services available.
services_h = 44
if pntflags.land then
- services_h = services_h + (14 * n)
+ services_h = services_h + (14 * planet.nservices)
end
-- Render background images.
@@ -870,21 +908,16 @@ function render( dt, dt_mod )
-- Space out the text.
services_h = 60
if pntflags.land then
- services = { "land", "missions", "outfits", "shipyard", "commodity" }
- servicesp = { "Spaceport", "Missions", "Outfits", "Shipyard", "Commodity" }
- for k,v in ipairs(services) do
- if pntflags[tostring(v)] then
- gfx.print(true, servicesp[k], ta_pnt_pane_x + 60, ta_pnt_pane_y - services_h, col_txt_top )
- services_h = services_h + 14
- end
+ local services_h = 60
+ for k,v in ipairs(planet.services) do
+ gfx.print(true, v, ta_pnt_pane_x + 60, ta_pnt_pane_y - services_h, col_txt_top )
+ services_h = services_h + 14
end
else
gfx.print( true, "none", ta_pnt_pane_x + 110, ta_pnt_pane_y - 46, col_txt_una )
end
- if ta_pnt_dist then
- gfx.print( false, largeNumber( ta_pnt_dist, 1 ), ta_pnt_pane_x + 110, ta_pnt_pane_y - 15, col_txt_std, 63, false )
- end
+ gfx.print( false, largeNumber( ta_pnt_dist, 1 ), ta_pnt_pane_x + 110, ta_pnt_pane_y - 15, col_txt_std, 63, false )
gfx.print( true, planet.name, ta_pnt_pane_x + 14, ta_pnt_pane_y + 149, planet.col )
end
View
4 dat/mission.xml
@@ -21,6 +21,7 @@
<faction>Frontier</faction>
<faction>Goddard</faction>
<faction>Sirius</faction>
+ <faction>Soromid</faction>
</avail>
</mission>
<mission name="Empire Rehabilitation">
@@ -71,6 +72,7 @@
<faction>Frontier</faction>
<faction>Goddard</faction>
<faction>Sirius</faction>
+ <faction>Soromid</faction>
</avail>
</mission>
<mission name="Empire Recruitment">
@@ -144,7 +146,7 @@
</flags>
<avail>
<priority>3</priority>
- <cond>var.peek("es_cargo") == true and planet.get("Omega Station") == planet.cur() and faction.playerStanding("Empire") &gt; 5 and player.getRating() &gt; 5 and var.peek("collective_fail") ~= true</cond>
+ <cond>var.peek("es_cargo") == true and planet.get("Omega Station") == planet.cur() and faction.playerStanding("Empire") &gt; 5 and player.getRating() &gt; 5</cond>
<chance>80</chance>
<location>Bar</location>
<done>Empire Shipping 3</done>
View
3  dat/missions/baron/baron_baron.lua
@@ -91,7 +91,6 @@ function accept()
tk.msg(title[2], text[2]:format(planetname, planetname, sysname2, planetname))
misn.accept()
- var.push("baron_active", true)
misn.setTitle(misn_title)
misn.setReward(misn_reward)
@@ -161,7 +160,6 @@ function board()
pinnacle:changeAI("flee")
pinnacle:setHilight(false)
pinnacle:setActiveBoard(false)
- var.pop("baron_active")
misn.finish(true)
end
@@ -196,6 +194,5 @@ function takeoff()
end
function abort()
- var.pop("baron_active")
misn.finish(false)
end
View
9 dat/missions/baron/baron_prince.lua
@@ -60,18 +60,18 @@ else -- default english
title[9] = "This is not the artefact you're looking for"
- text[12] = [[ "Let's see what we have here," Flintly says as you hand him the artefact you bought on %s. "Ah, I know what this is without even looking anything up. It's a piece of an old-fashioned airlock mechanism, as used on most ships during the Faction Wars. That makes it rather old, but that also makes it worthless, I'm afraid. This is just old scrap." He gives you an apologetic look. "Don't let it get you down. Not many people would know this on first sight. Those scammers can be pretty clever."
+ text[12] = [[ "Let's see what we have here," Flintley says as you hand him the artefact you bought on %s. "Ah, I know what this is without even looking anything up. It's a piece of an old-fashioned airlock mechanism, as used on most ships during the Faction Wars. That makes it rather old, but that also makes it worthless, I'm afraid. This is just old scrap." He gives you an apologetic look. "Don't let it get you down. Not many people would know this on first sight. Those scammers can be pretty clever."
You feel disappointed and frustrated, but you have no choice but to deposit the "artefact" into the nearest disintegrator inlet.]]
text[13] = [[ You hand Flintley the artefact you procured on %s. He examines it for a few moments, then enters a few queries in the info terminal in his table. Once he has found what he was looking for, he heaves a sigh. "I'm sorry, %s. It seems you've been had. What you've got here is little more than a trinket. It's a piece of 'art' created by a third-rank sculptress named Biena Gharibri who lives on Lapra. She's not very talented, I'm afraid. Her creations have been called 'worse than Dvaered opera' by a leading art critic. I really don't think you want to present his lordship with this."
You promptly decide to dispose of the thing, unwilling to carry it around with you a moment longer than necessary.]]
- text[14] = [[ Flintly studies the object on the table for a while, checking the online database a number of times in the process. Then, finally, he turns to you. "I hate to say this, but it seems you've bought a counterfeit. It's a good one, though! That seller on %s must have known his stuff. You see, this is very similar to a number plate used by hovercars on Mars at the time of the Second Growth. However, it's missing a number of vital characteristics, and some details betray its recent manufacture. Close, %s, close. But no cigar."
+ text[14] = [[ Flintley studies the object on the table for a while, checking the online database a number of times in the process. Then, finally, he turns to you. "I hate to say this, but it seems you've bought a counterfeit. It's a good one, though! That seller on %s must have known his stuff. You see, this is very similar to a number plate used by hovercars on Mars at the time of the Second Growth. However, it's missing a number of vital characteristics, and some details betray its recent manufacture. Close, %s, close. But no cigar."
You dispose of the counterfeit artefact. Hopefully the next one will be what Sauterfeldt is looking for...]]
flintdeftitle = "Just passing through"
- flintdeftext = [[ Flintley greets you. "Do you have any objects for me to look at, %s? No? Well, alright. I'll be here if you need me. Good luck out there."]]
+ flintdeftext = [[ Flintley greets you. "Do you have any objects for me to look at, %s? No? Well, all right. I'll be here if you need me. Good luck out there."]]
title[10] = "From days long gone"
@@ -148,7 +148,6 @@ function accept()
misn.osdCreate(misn_title, { osd_msg[1]:format(baronsys:name()),
})
marker = misn.markerAdd(baronsys, "low")
- var.push("baron_active", true)
enterhook = hook.enter("enter")
else
@@ -190,7 +189,6 @@ function board()
player.unboard()
pinnacle:setHealth(100,100)
pinnacle:control(false)
- var.pop("baron_active")
player.pay(reward)