Very Basic, Rudimentary Mission/AI Faction System

    Joined
    Sep 24, 2014
    Messages
    69
    Reaction score
    23
    Introduction
    Many people want missions, and this is a very frequently suggested feature, but that does not reduce how much it needs to be heard. Missions, among other things, should have been in before the steam release.

    Anyway, the main direction I want to take this post in is a very simple, rudimentary AI Faction/Mission system that will be the basis for building up in the future and making Starmade a much more fun and interesting game.
    Firstly, AI Factions.

    AI Factions may seem like a small and inconsequential feature, however, creating missions that are fun and engaging pretty much requires this- especially for keeping new players, who probably play on offline for a good deal of time.

    How AI factions can/should be done is sort of similar to a Civilization AI system; with ships acting as units, stations acting as cities, and etc etc. So, for each AI faction, there would be a "main controller" which would control where battles are staged and advances are made.

    But but but, what about the CPU speedz and the lagz?
    For one, units would not be persistent- they would simply disappear and be created and use some kind of AI faction "credit/fleet strength" system. Read the spoiler for more info about this.
    Each organized AI faction would have a few variables in their main control which would determine a few things about them. The most rudimentary would be "Player Relation", how much they like the player, "Credits" how rich and able to get ships for battles, and "fleet strength".

    Factions build up credits in several ways, however, because this is rudimentary, for now, they just build them up based on a set timer. For example, the "Intergalactic Alliance" might generate 1 million credits every 10 minutes. It can, based on its faction "main controller" spend them on giving the player missions(or not, depending on what it chooses. For example, it might not want to give the players more missions when it's almost flat out of money), or it can spend the credits on increasing its "fleet strength". Fleet strength would be 1-1 with credits. If they have a fleet strength of 1 million, the most ships they can spawn has to total up to 1 million credits or less.

    Fleet strength would be how many credits worth of ships they're allowed to summon for each battle. When a battle begins in a sector, they simply spawn in some ships that total to the amount of credits(more or less) that the opponents fleet has at a sector. When they spawn in ships, it will be similar to how pirates spawn ships, only they spawn ships until it reaches the amount of credits they want to use for that battle.

    When a ship is destroyed, fleet strength equal to how expensive the blueprint for that ship is deleted, so the faction has to use more credits to get more fleet strength.

    Now, for player relations. The relation between the player/play faction would go on a scale of 255 which would determine how much the other faction likes/dislikes you. At some point of getting too low, they will set the player to enemy, and at some point of getting high up, they will set the player to ally.

    If the player is an enemy, they will attack the player on sight, and have a chance to siege the players bases should the player posess any. If the player is an ally, they have a chance to show up and assist the player when the player is attacking a base of pirates or whatever.

    Player to AI faction relations would always try to get equalized to neutral, so you'd have to keep helping them if you want to stay friends, and if you attacked them, after a while they relationship would increase back to making you neutral.

    Next, Shop "Trade Routes"

    This is a bit obscure, but it will GREATLY help gameplay and make offline seem alive. What it is for is so that people can see ships moving with purpose, they would have a chance to be a proper pirate themselves, and there would be a basis for some simple "protect the trade ship until it reaches its destination" missions.

    Trade Routes would be an option you can select on the galaxy map so that you can view them. You would only see them if you have discovered both shops- if you have only discovered one, you will see a very short purplish line going in the direction of the other undiscovered shop.

    As you travel along a trade route, you can somtimes see spawned ship entities from trading factions like the Trading Guild. Occasionally, you'll find a battle between pirates and traders- this is just for immersion, you don't really get a reward from either side for helping, really.

    Finally, some effects from trader killing(which are optional, really). If these are added(which are optional), the only way a shop can get resupplied/recreditted is when a player trades with them or when a supply ship reaches the destination. Click the spoiler to read a lot more specific info about this.
    Shops would not restock normally anymore, and instead, they're done based on trade routes. Trade Routes near the player, possibly 1 system in distance, will roll a chance every set time for whether or not pirates interrupt the resupply. If the pirates succeed, the credits and items don't increase, only slightly(or mediocrely) decrease.

    However,
    if they trade route is close to the player when a roll is done, the game will check if there's a trader entity near the player. If there is, it will spawn pirates to attack, if there isn't, it will spawn both traders and pirates. If the pirates win, then the stated occurences will happen. If the trader wins, it will resupply like normal.

    If the player instead leaves the area and lets the AI deactivate, it will instead randomly roll to see which side wins like usual. If the player re-enters the area, there's a chance to see wreckage(unless it's been a while, for example, 5 minutes, then they see nothing).

    The Missions

    Now that the grounds for basic missions have been discussed, it's time to get a little bit technical with the missions.

    Before a Pirate/Trading Guild or Intergalactic Alliance/Pirate battle occurs, it might set it so that when you hail an AI faction ship/station you can ask for a mission and they tell you about the battle. Should you go there and kill some pirates with them, you relation will increase, and you can claim a reward from them.

    Conclusion

    Alright, well that sums it up. If you're wondering why the missions are EXTREMELY rudimentary and all of the stuff is very basic and not very engaging, it's because it's just a groundwork for getting these things operational. It's something that the Schine Devs can add right now and move on to other stuff, and whenever they decide that it's time for missions/in depth AI Factions, they can improve upon this system.

    Thanks for reading, and please offer your input.
     
    • Like
    Reactions: the guyver and Snk
    Joined
    Feb 24, 2014
    Messages
    101
    Reaction score
    23
    • Purchased!
    • Community Content - Bronze 1
    • Legacy Citizen 5
    Missions are already a confirmed feature.

    But I would guess that the scripting API needs to be finished before missions are really possible.

    There is a quest script available in the mod section of the forum. But it's just a basic find the npc mission which is about the best that's possible with the current state of scripting
     
    Joined
    Sep 24, 2014
    Messages
    69
    Reaction score
    23
    Missions are already a confirmed feature.

    But I would guess that the scripting API needs to be finished before missions are really possible.

    There is a quest script available in the mod section of the forum. But it's just a basic find the npc mission which is about the best that's possible with the current state of scripting
    You're definitely right, missions are a confirmed feature, however, my intention with this post is how missions *should* be done. I do not want pointless grind quests. Thanks for your input! I didn't know about that quest script yet but it's reasurring.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    "This is a bit obscure, but it will GREATLY help gameplay and make offline seem alive. What it is for is so that people can see ships moving with purpose, they would have a chance to be a proper pirate themselves, and there would be a basis for some simple "protect the trade ship until it reaches its destination" missions."

    Please, please, please, never request escort missions! Instead, a "defense" mission should always be "go attack strike group X, which is known to be gathering in sector Y in preparation to attack convoy Z.". I have played four lifetimes' worth of forced escort missions in various space combat sims (plus more in other game genres), and can't stand to fly another one.

    A more complicated form to simulate an escort mission without actually being a dreaded escort mission:
    1. Fly to the convoy in sector A.
    2. Enemies immediately detected in distant sector B. Go kill 'em.
    3. Rejoin the convoy in sector C.
    4. Repeat steps 2 and 3 a couple of times for different sectors along the way. (Result: Very little slow-cruising with the convoy; more combat!)
    5. Rejoin the convoy at the final sector and maybe get a prize (E.g. a couple of free shield blocks) if all ships made it. (Which will be usually.)