TODO:
- [x] Setup weapon references
- [x] Manage shuttle damage
- [x] Host…ile ship NPC (Requires testing)
- [x] Allow ship NPCs to fly as well as shoot
- [ ] Finish the ruin generator download archive task
- [x] Add a canister wrench mapping helper
- [ ] Add in a way to be able to take over AI mobs, but have them transform into a human when taken over
- [ ] /area/shuttle/syndicate_scout
Since I think it'll be cool to track time, here is the time tracked with manicTime since I started adding the combat stuff:
This doesn't include any time spent on the content before it and any time spent making the original PR
|Aspect|Time Spent (With program active & open)|
|-|-|
|Coding|7:24:46|
|Testing|5:17:22|
|Mapping|0:38:45|
## About The Pull Request
~~Not a mega big update, but still an update none the less.~~
This is now a mega update, introducing a whole load of new features as well as shuttle weapon system from a long lost PR. #2551
### Shuttle Changes
All pilotable shuttles now require engines. The engines of a shuttle determine its acceleration properly and this will no longer be heavilly limited.
There are 2 new types of engine:
Ion Thruster: Consumes power instead of plasma.
Ion Burst Thruster: Consumes power instead of plasma, but will always consume more power than it can input so that it only runs temporarilly. Has a larger thrust ratio than regular thrusters.
Advanced Thruster: Premium engine for the nukie shuttle, cannot be destroyed and requires no fuel.
Shuttles now have a detection radius. This reduces the number of objects that need to be sent on the UI and limits how far a shuttle can see.
![image](https://user-images.githubusercontent.com/26465327/171474260-67d0a4c6-a57c-4ec3-8782-a03b3512c1c8.png)
Shuttles now have a shield, this will protect them from the storms that appear on the map.
![image](https://user-images.githubusercontent.com/26465327/171474623-2f5978a5-4505-479b-8938-623be2e99a98.png)
Shuttle crashing has now been made into a proper feature. Rather than just deleting machines it lands on, when a shuttle crashes it will cause a small explosion resulting in the deaths of everyone on board. If a shuttle is about to crash, all the lights will go red and a siren will play informing everyone to abandon ship.
Shuttles can now undock from a location after they have initiated docking.
### Combat
Introducing the shuttle weapons console, a targeting console that allows for fierce combat with hostile ships.
Shuttle Weapons Console:
- Will display all ships on the z-level
- Select your weapon and click on the screen to fire.
![image](https://user-images.githubusercontent.com/26465327/94361821-18c87800-00af-11eb-92db-7cfd1097fa47.png)
![image](https://user-images.githubusercontent.com/26465327/94361824-1fef8600-00af-11eb-9882-fe7f257829c3.png)
NPC Ships:
- Ships containing random mobs which can spawn in hostile systems.
- Will fire at any hostile ships in the region.
- Will violently explode when they sustain enough damage (calculated based off number of turfs / damaged turfs / types of turfs)
- Will stop updating when all mobs on board are killed.
Oh yea, and if you manage to board a hostile ship, you can kill the crew and take control of the ship. Useful if your ship is wanted for firing upon cargo vessels, or if you want a syndicate ship to infiltrate their deepest sectors.
### Bluespace Artillery
Nanotrasen's defence artillery used to strike enemy vessels can now be used to strike enemy vessels! Completing the Bluespace artillery will allow you to fire at any combat-capable shuttles, friend or foe.
![image](https://user-images.githubusercontent.com/26465327/102095227-2e7e4b80-3e1b-11eb-92b2-43ff8748f85c.png)
![image](https://user-images.githubusercontent.com/26465327/102095261-39d17700-3e1b-11eb-83a4-23f1c1484d87.png)
### Faction System
Every ship, NPC or player made has a faction. Every faction has a list of other factions they consider friend or foe.
NPC ships will automatically fire at ships they consider hostile, including other NPC ships meaning you can fly to a sector and see a firefight of multiple factions all in combat with each other.
Additionally firing at a ship that is friendly will declare your ship hostile to that faction, so if you encounter another ship of that faction type, they will shoot you too.
Don't shoot at your Nanotrasen friends, unless you want to be shot back.
https://streamable.com/781dj6
In short, this supports PvP, PvE and EvE, for an all-round dynamic experience, where it isn't just you vs the galaxy.
https://user-images.githubusercontent.com/26465327/178799230-27499200-54c4-4694-a98c-ba812ae68e0a.mp4
### Collision Alert System
As part of a new safety software update, shuttles have been equipped with a collision alert system. This will produce audible warnings if a shuttle detects that it is about to collide with an object on the map, giving sufficient time for the pilots to avoid it.
### Map Hazards
The supercruise orbital map now contains a small variety of hazards that will appear and disappear randomly.
While your ship has a shield active, it will take no effect from the hazard but the shield will slowly take damage.
Gravity storm: Shuttles will have their velocity randomly altered by +- 200 while inside the gravity storm.
Ion Storm: Shuttles will randomly be hit with EMP blasts.
Gravitational Vortex: Has extremely high gravity value, will throw things inside the ship around and cause damage to the hull.
Shuttles can now impact with the asteroids that are moving about the map, better watch out and avoid them!
If you hit one travelling at a high speed, your ship will smash into it and explode.
### Distress Beacons
The GPS can now function as a distress beacon. When activated, the range of the orbital object the GPS is on will be extended to some big number so that everyone on the map can see where you are. Useful if you are stuck and you wish to inform someone to come and pick you up.
In future this could be expanded to have some interactions with NPC ships, however I couldn't figure out the behaviour of the NPCs once they are in mob form and the ship has docked.
![image](https://user-images.githubusercontent.com/26465327/171475700-40cabbae-7a67-4c8e-a2c7-72beacccae4d.png)
### Energy Gun Focusing Crystals
Energy guns now require a rare focusing crystal in order to function. Any printed energy guns will need to have one installed, otherwise they will not work.
Roundstart energy weapons come with a standard focusing crystal that provides no extra effect.
Energy weapons purchased from cargo will have a random focusing crystal installed that may have varying effects.
These have a rating from 0 to 1, which will effect the performance of the gun. A terrible standard focusing crystal will make the gun slightly less accurate, while a perfect crystal will make it more accurate.
### Misc Changes
Shuttle engines no longer accept any gas as fuel (Yes, you have been lied to, oxygen worked as fuel).
Tritium will now cause shuttle engines to have a 300% performance boost.
While docked at a station, the shuttle console will display the location of your shuttle rather than lavaland.
Removed the VIP and Assassination objectives. These relied on ghost players taking them which would cause the mission to be pointless if they didnt.
In addition to this, there was a required objective attached to them which reduced options for players, in turn reducing the quality of their interactions.
## Code Documentation
### How things work
Shuttle Data: A single instance that exists per shuttle at all times the shuttle exists.
Shuttle Supercruise Object: An object representing the shuttle in flight. Exists while the shuttle is flying and on the map.
Shuttle AI Pilot: Attached to the shuttle data. Exists at all times the shuttle is controlled by an AI.
### Shuttle Data
Shuttle data is a way of tracking some data related to shuttles.
Shuttle data holds information about the stats of the shuttle, such as consumption rate, the engines attached to the shuttle as well as mass, health and some other things.
Shuttle data is created as a single instance per shuttle object.
To get the shuttle data attached to a shuttle call:
SSorbits.get_shuttle_data(**PORT_ID**)
## Why It's Good For The Game
This PR aims to heavily refactor a large portion of the mechanics related to supercruise/exploration, and change some of the worst parts of it.
The main thing being improved upon is the flight mechanics, at the moment there is nothing to do during flight and no skill involved from getting to A to B. After the changes, explorers will have to locate their target by using the machines they are provided, as well as avoid/fight hostile shuttles.
Secondly, this adds some more progression to explorers and some stuff that they rely on science for; Explorers do not start with any weapons on their ship so are very vulnerable if they get intercepted, and their only way to defend themselves is to board and take over the enemy ship. The progression factor is still being worked on, and technology disks will be improved.
VIP and assassination have been removed. This is because they led to boring interactions as the 2 parties were only interested in killing each other and nothing else. The ghost role potential will be transfered to NPC ships that fly around, which have no objectives and have no objectives to kill them. This means that any engagement between them and explorers is completely optional which opens up a lot more potential for interesting interactions/RP situations.
The goal of this PR is to make supercruise flight more engaging and fun, as well as add some new interesting content.
### An analysis of Exploration
Meaningful decisions are one of the most important parts of making engaging content. Currently exploration lacks meaningful decisions, its more of a process rather than a game.
A meaningful decision is one which:
- The outcome of the decision has a meaningful impact.
- A choice actually has to be made.
A choice where the outcome doesn't matter on the rest of the game is not a meaningful decision, a long with a choice where 1 option is clearly the best option.
Currently exploration consists of:
- Selecting an objective
- Completing the objective
- Returning to the station with some money
This process has some dangers, and can be fun sometimes however lacks any grand importance. The main issue for this is me trying to make exploration have a limited impact on everything else, which completely goes against design for a game where every player is a small cog in a grand machine that falls apart when too many bad decisions are made - Every player should be able to impact the round, and a series of these impactful decisions is what leads to the chaotic nature of SS13, which in turn leads to fun rounds and good stories.
## Testing Photographs and Procedure
![image](https://user-images.githubusercontent.com/26465327/178817755-ef13b261-a8c0-4b1b-a936-160bea61bdc7.png)
![image](https://user-images.githubusercontent.com/26465327/178818050-518b18f3-7c94-498f-a3d7-970cee4ee787.png)
![image](https://user-images.githubusercontent.com/26465327/178824910-d1040e05-8c10-47a3-806d-30481a86afe5.png)
![image](https://user-images.githubusercontent.com/26465327/178825617-b63ed095-2662-4a0f-ba6d-b49ad60b4d74.png)
### Bugs/Issues:
- [x] Autopilot can track targets that have gone out of range
- [x] + Testing
- [x] Its very difficult to find an objective target
- [x] + Testing
- [x] There is lag when accepting a shuttle intercept mission (Because of atmos calculations)
- [x] + Testing
- [x] [20:38:31] Runtime in shuttle.dm, line 562: Cannot read null.delete_after
![image](https://user-images.githubusercontent.com/26465327/178825010-242932c7-9eaf-4e4f-a682-5baae5c5eda9.png)
- [ ] + Testing
- [x] If an NPC ship gets docked at a location, they will get trapped
- [ ] + Testing
- [x] Intercept shuttle mission should suceed once the ship is disabled through killing the enemies on it.
- [x] + Testing
- [x] The shuttle maps have an unhackable shuttle console (Syndicate shuttle console)
- [ ] + Testing
- [x] Syndicate prisoner ships spawns with negative engine force
- [x] + Testing
- [ ] Gun turrets shoot in the complete wrong direction
- [ ] + Testing
## Changelog
:cl: PowerfulBacon (Main Development), KubeRoot (Flight map UI improvements), Sp0cky (Shuttle Mapping), Dog132 (Shuttle Mapping)
add: Added ion thruster
add: Added burst ion thruster
add: Added shuttle shield generator
add: Added distress beacon on GPS
add: Shuttles can now collide with meteors, causing an explosion
add: Shuttles can now undock from a location after they have initiated docking
add: Added in shuttle shield generators
add: Added in orbital map hazards which cause some effect on shuttles that have no shield
add: Tritium can be used to turbo charge an engine, increasing performance by 300%
tweak: A bunch of shuttles have been editted to accomodate their new thrusters
tweak: Shuttles now have a detection radius
tweak: All drivable shuttles now require a proper engine source
fix: Shuttle engines no longer accept all gases
add: Shuttle weapon computer
add: Faction controller multiple unique factions
add: Adds the Zeus MKI Railgun (Shuttle weapon)
add: Adds the Area Scattershot (Shuttle weapon)
add: Adds the Hades MkII Chaingun (Shuttle weapon)
add: Adds the Hades MkI Chaingun (Shuttle weapon)
add: Adds the Prometheus missile launcher (Shuttle weapon)
add: Adds the Minotaur missile launcher (Shuttle weapon)
add: Adds the Centaur II missile launcher (Shuttle weapon)
add: Adds the Centaur missile launcher (Shuttle weapon)
add: Adds the Zeus MKII Anti-Personnel Railgun (Shuttle weapon)
add: Adds the Burst laser (Shuttle weapon)
add: Adds the Burst laser MKII (Shuttle weapon)
add: Adds the Laser Cannon (Shuttle weapon)
add: Transport ship AI
add: Adds energy gun focusing crystals, a rare crystal that is required for the production of energy weapons.
add: BSA can now fire at shuttles.
add: New research tree for shuttle weaponry
add: Shuttles will now explode if they take too much damage
refactor: Refactors some shuttle code: AI pilot is now stored on the persistent shuttle_data class rather than on the shuttle object, meaning that shuttles can think even while not in flight.
balance: The listening outpost syndicate will now always spawn.
del: Removes assassination objective
del: Removes VIP objective
add: Adds shuttle intercept objective
add: Adds in hostage ships, which kidnap crewmembers who die alone in space.
add: Hostage ships now create ghost roles with no direct objectives except to protect their ships and their assets.
refactor: Refactors how radio ranges work: Radio range is now based on the supercruise distance, meaning that if you are near the station, you can hear their comms
/:cl: