Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Updated the Forum Rules and Guidelines (02/29/20); Blog post: GIF Roundup (04/11/20)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - K-64

Pages: [1] 2
1
Suggestions / Enhanced strike craft controls
« on: May 06, 2017, 11:54:49 AM »
So yeah, we can agree that strike craft are stupid strong in the current version, but this isn't supposed to address that, and despite the title being enhanced controls, it's not entirely the case. What I'm proposing is being able to... withhold your fighters and choose when to launch them in a battle, or keep them reserved further in.

Might be extremely situational, but I think it would be useful in those rare times where your carrier can go faster than some strike craft. Or when you're wanting to keep them out of the battle while enemy PD is dealt with, and even having them on Regroup makes them get swiss-cheesed.

2
Discussions / Civ V Multiplayer! Probing for potential shenanigans
« on: August 09, 2013, 05:23:52 PM »
Since the steam sales that ended quite a while ago had it at a very good price, I'm guessing quite a number of folks here have bought Civ V. Now I'm wondering how many of those same folks will be wanting to play in a multiplayer game with fellow forumites.

At the moment, I'm just looking for people who would be interested in joining in a game, and then going from that to determine how to go about the size of the game and all that stuff. Expansions and DLCs aren't a limitation for me, since I've bought all that stuff. Also if this does get to the stage where we're going to have a game being set up, I think reserving civs will be the best way to go about it, just to smooth out the process of game setup, etc. In fact, it might be a good idea to state your preference right off, just because why not :P

Current Players:Chosen Civ:
K-64Babylon

3
Discussions / Starsector Skype chat
« on: March 24, 2013, 03:26:27 PM »
I know there's another thread for Skypeage somewhere else, however it's rather outdated and isn't terribly organised and such, plus this one will likely be in the more appropriate area :P. Plus this way, I can have a list maintained for those that want their name on it.

Right, so yeah, for quite some time we have had an "unofficial" Skype group for us Starsector players (in quotations since AFAIK there's no true official one, and we haven't been endorsed, encouraged  or otherwise promoted by Alex :P), and would like to remind/inform people that it is available for all to join if they so wish. Either put your name in this here thread, or PM it to myself if you wish to not reveal it in the thread and/or don't want it in the list.

There aren't any particularly strict rules, and I certainly won't be offended by bad language there, I would like to say to keep trolling down to a minimum and keep at least a degree of respect for fellow forumites both on the chat and here. And an extension on the latter point, if there are any disagreements that emerge between members on the Skype group, keep it the hell away from the forums. Alex doesn't need to be dealing with things like that. Additionally, try not to be too-spam happy around the place, just so people know what the conversation at hand is about without having to sift through tons of block-caps stuff to see what was last said. Also please use your common sense as well in terms of deciding what is and isn't appropriate, I don't want it to have the exact same rules as the forums here, but I still want forumites to feel at home there, so use your heads, people! :)

Username List (forum name - skype username):

K-64 - mr.lxiv
Pataroo1 - pataroo12
Pelhamds - Pelhamds
Uomoz - Uomoz87
mostmodest - Captainawesome1996
ValkyriaL - valkyria3000
Upgradecap - Upgradecap
Sproginator - Sproginator12
sdmike1 - miketheshlanta1
Dissentient - indissentient
Billy Rueben - Billy Rueben
Vinya - notahipster17
maffo - breezerleaser
silentstormpt - jaanacoreta
NITROtbomb - nicholascruse_nitro
gunnyfreak - gunnyfreak1

As a final note, if you have any questions or whatever, don't hesitate to ask :)

4
Fan Media & Fiction / Setting of Starsector
« on: January 09, 2013, 10:03:45 AM »
With the name change and people talking about how it sorta makes sense since you are travelling in a sector, it got me thinking about something. What is a sector in lore-terms of the game? Because the homepage has some potentially conflicting info between gameplay and lore

Quote from: Lore
The story of Starsector concerns a sector mostly untouched by the calamity that spelled doom for the Domain. For over 200 cycles, humanity has been losing its grip on civilization, and struggling desperately to hang on to what is left.

Quote from: Gameplay
Explore hundreds of star systems to find habitable worlds, rich resource deposits, and lost technology

So, the question is, is a sector in Starsector terms less a cubic area of space and more akin to a country boundary? Because what I have always considered a sector has been a large-ish cubic area in space that may have 5-10 systems in it as opposed to having hundreds. If it is the "Huge area of hundreds of systems" type, then does this mean there may be expansions and such for opening up other sectors in the far future?

5
Suggestions / Combat AI Tweaks
« on: December 16, 2012, 06:18:10 PM »
As far as I can tell, this issue hasn't been brought up in this particular area. I've seen it being posted elsewhere, with varying arguments for and against it, but not in an "official" suggestion as this is. If this is the case, then that thread may be better. For now though, I shall speak out here.

If I may begin my point by saying that I do not think that Starfarer's AI is bad by any definition of the word, quite the opposite in fact. It is a massively refreshing change to see a system where computer controlled opponents use such variety of tactics, and mutual support for fleet assets. However, there are some "token AI" thinks that still make things clear that the foe isn't a thinking being.

   Most apparent of these to me, is the omniscience of the AI in terms of the player's weapon range. That is, they always know exactly how far away to stay from your weapon arcs as to remain safe. What I suggest is that said knowledge of the weapons be changed slightly, so that they know only roughly the range of your longest range weapon, and the arc, to say a 20% tolerance either way and to take into account the rotation speed of the weapon as well (this is most particular to the speedy ships, such as fighters or Hounds). If "mistakes" such as these can be created, it would go a long way to making combat much more immersive and reduce the obvious nature that you are playing against not an enemy commander, but a machine.

Right now, I only have that one suggestion on my mind, however they may be more later, there may not. I know that AI tweaks may not be an easy thing to do, less so for tweaks to emulate "human" behaviour. Regardless, it is still a suggestion and I would like to have it at least out on the table.

6
General Discussion / Question on AI and settings
« on: October 15, 2012, 09:13:10 PM »
Alright, I'm not putting this in suggestions, because I'm not suggesting it, mainly opening the avenue for discussing. A debate about the subject at hand, if you will. Anywho, with that out of the way, I shall begin.

Well, as we all know, in the modern age with game AI, "difficulty levels" translates into a different way than it should. It's all fake difficulty from giving the AI access to resource cheats, construction speed buffs or just giving them free units. I'm sure a large majority of you would agree that this is an extremely cheap way of "adding challenge" to the game. Now here, we have Starfarer, a game that, for me, has the best AI I have seen in a bloody long time. AI that uses skill, rather than stat buffs to out-manoeuvre and at times out-think the player. Now, what if in the campaign startup/mission screen (both, obviously. But since it's two different screens, yadda yadda yadda) there was a set of buttons for the difficulty level (easy, medium, hard. Or however many is practical) with the AI being smarter/dumber depending on the option. So like in easy, the AI is a bit simpler in the way it goes about, makes more mistakes and crew for both the player and AI ships are one level down (Elite has the accuracy of Veteran, etc.). Conversely, the harder AI would be more punishing in regards to player mistakes and the gunnery AI is one level up.
I know this type of thing would take ages to properly implement, considering the amount of AI writing that would need to be done, so that's why it's not a suggestion. It's more food for thought and comparing ideas of what difficult AI should be, etc.

I've rambled enough, so I'll open up the discussion... now.

Spoiler
P.S. This is mostly a ramblish post, and I am sorry for that :P
[close]

7
Discussions / Public Perception of Videogames
« on: September 06, 2012, 04:10:52 PM »
Well, after this post in a different thread

Something about that paper twisting a suicide against videogames or something.

It got me thinking about the way the media, and quite often, the government look at video games, gamers and the gaming industry. It seems in quite a lot of places, that games are treated as the devil in a paper-thin disguise. While in other places (like some officials in this country) recognise its value as a source of revenue, and support universities offering courses on it and providing tax breaks, that kind of thing. So there are two sides that are very real in this debate, with people from all walks of life on both of them. However, the question is, what side of the spectrum do you see more often in your day-to-day life? Discussions/news is also very much welcome. I would love to see what everyone else has to say about this.

8
Bug Reports & Support / Tarsus sprite half-turret
« on: August 27, 2012, 03:22:50 PM »
Dunno whether this should be in bug reports or in general, but seeing as it's probably an oversight from spriting, I'll throw it here. I've noticed when taking a part of the Tarsus for kitbashing, that on the hull there was half a small turret sprite that's been cut off by one of the "arms" starting, which is rather strange and annoyingly distracting now that it's in my mind. Image below with the bit highlighted

Spoiler
[close]

9
Discussions / Endless Space - Roll Call
« on: August 23, 2012, 06:49:07 PM »
Just throwing this thread out to see if any folks here would be interested in a forum-game of Endless Space. For the last while, me and Upgradecap have been playing on a regular basis and it's been rather fun, although I want to see if we can't get more people to play. More folks makes things more unpredictable, after all :)

So if you have Endless Space, are about to get it, are interested in getting it or generally in a position that would mean you could play in the near future, and that you want to, then sign up here. Maximum of 8 players in a game. Although in the off-chance that there is quite a popular movement of it here, could have more games going on at once. On that note, it could be an awesome idea to have screenshots and small AARs (After Action Reports) of gamedays... as far as folks are willing to reveal, anyway.

So if you're wanting in on the action, throw your steam name here and stuff'll get sorted out


Players:

K-64 - Steam Profile
Upgradecap - Steam Profile
kurios - Steam Profile
BillyRueben - Steam Profile
Sweetraveparty - Steam Profile

Stay shiny, folks.

10
Modding / Weapon animations above 100 frames, is it possible?
« on: August 22, 2012, 08:43:40 PM »
Yep, another question from me. And again, it's concerning animation. Currently I'm redesigning a weapon of mine that has had a special place in my heart, which has become slightly more extensive than the previous version. And so the animation has exceeded 100 frames (124 frames, to be precise), however I get a crash with

java.lang.RuntimeException: Error loading [01.png] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Trade Scavengers,../starfarer.res/res,CLASSPATH]

I wanted to make sure whether it was possible or not to actually have over 100 frames before I start renaming for a purpose that would end up being in vain.

11
Suggestions / Built-in Weapon ship layering
« on: August 20, 2012, 10:20:25 AM »
Before I begin, I'll say that this is a purely cosmetic suggestion, and would likely have no to very little impact on actual gameplay (I hope!). An additional note is that I came across this idea due to admittedly entirely selfish reasons, being that creating a certain built-in weapon is proving to be more of a nightmare than I thought it would be.

The idea is this: Built in weapons could have an additional line detailing where in relation to the ship sprite itself it is, on the layer above or the layer below. That way the more elaborate, truly hull consuming weapons would be much, much more practical to make (see where my selfishness comes in yet? :P). Like I said, this change would only be purely cosmetic, the weapon would still act identically to the others in terms of firing, projectiles and being damaged. An additional advantage of this method would be for icons of built-in ships having the potential to be even more complex and techno-babblish, with power cables and fancy doohickeys like that.

So yeah, by no means a high priority suggestion or anything like that, just a "That would be nice" feature

12
Modding / Starfarer Custom Content Interoperability Project (SCCIP)
« on: August 20, 2012, 09:15:14 AM »
This is an idea of mine that will hopefully help users who like to have lots of mods activated at once. For Total Conversions, like Caelus and Ironclads, this won't matter a bit, since they're meant to be run on their own, but for smaller mods, such as single faction and such, this should help reduce conflicts.

Right, so this isn't a very prominent problem thus far, however with the increasing popularity of Starfarer, it will become a very real issue in the future (I've only been bitten by it once, and it was easy enough to remedy). What I am talking about, is prefixes to all unique IDs in your mods. Some of you may do this already, through force of habit (I'm ashamed to say I do not), however there are a large amount of mods (including mine) which do not take advantage of prefixing things. You may be thinking "So you're suggesting we put a prefix to the start of our stuff, so what?". So it means that you can post the prefix you are personally using for your mod here, so that people don't accidentally use what you are, and cause issue.

What I wish to see with this, is a greater sense of harmony between mods, so while 15 mods that someone uses has a ship class of, for example "Zeus", they will all be ingame without incident due to the unique identifiers on each. If there is sufficient support for this project, I shall put up a list of used prefixes in this post so that it's simple to glance and see what's already used.

Peace out.

13
Modding / How to fully add a custom faction to the campaign
« on: August 14, 2012, 09:48:20 AM »
Alright, I know there's already a good guide to get the campaign working (I know, I've used it myself :P), however I designed this to be more of a comprehensive "goto" version, easily copy-pasteable and extensively commented for better understanding. This version aspires to be very easily editable and clear on values, All the while explaining what everything is. This guide assumes you've done the work of creating ships, variants, and possibly weapons for your faction and are wanting them in. However, if this is viewed too similar to Paul's guide, feel free to remove/ignore it. Okay, now that's out of the way. I can get to the meat of the matter.




Alright, first off, you'll need to create a faction file. To do this, you'll need to make a few new folders for the required files. First off, make sure you place this first file in and call it <Faction>.faction (obviously the <Faction> is what you're calling your new guys:
C:\Program Files (x86)\Fractal Softworks\Starfarer\mods\<modname>\data\world\factions

Once that's done, use the text in the spoiler as a guide for your file. Feel free to copy and paste it into your file, it's designed to help you, after all ;)

<Faction>.faction
Spoiler
{
   //Used as a unique identifier of your faction.
   id:"<factionid>",
   //Used to get the colour of the faction's fleets and station(s). It uses an RGBA (Red, Green, Blue, Alpha[transparency]) system for this
   "color":[<red>,<green>,<blue>,<alpha>],
   //Used for choosing what the faction will be named in-game.
   "displayName":"<Factionname>",
   //Gives your faction's ships a prefix on their names.
   "shipNamePrefix":"<prefix>",
   //For the ship names themselves, these are used for getting the lists of shipnames to draw from. In this case it's using the vanilla Roman and Greek sets. Vanilla name sources are NORSE, BEASTS, ROMAN, CELTIC, EGYPTIAN, AZTEC, JAPANESE and GREEK,
   "shipNameSources":{
      "ROMAN":2,
      "GREEK":1,
   },
   //Gives the faction a description in the game Codex
   "description":"<description>",

   //Chooses the pool of names to give the fleet commanders. Choices are old english, modern and fringe.
   "names":{
      "old english":1,
   },
   //Used for choosing portraits for the fleet commanders. For example, these use Hegemony portraits
   "portraits":{
      "standard_male":[
         "graphics/portraits/portrait_hegemony01.png",
         "graphics/portraits/portrait_hegemony02.png",
         "graphics/portraits/portrait_hegemony05.png",
         "graphics/portraits/portrait_mercenary01.png",
         "graphics/portraits/portrait_mercenary03.png",
         "graphics/portraits/portrait13.png",
         "graphics/portraits/portrait15.png",
      ],
      "standard_female":[
         "graphics/portraits/portrait_hegemony03.png",
         "graphics/portraits/portrait_hegemony04.png",
         "graphics/portraits/portrait_mercenary02.png",
         "graphics/portraits/portrait16.png",
      ],
   },
   //This is where you start to put down the fleet types the faction uses. All fleet types are included here
   "fleetCompositions":{
      "patrol":{
         //Name that shows up when the fleet is highlighted/met by the player
         "displayName":"<displayname>",
         //The maximum fleet points you want your fleet to be. Useful for creating fleets with different variable ships
         "maxFleetPoints":<Fleet Point Cap>,
         //The amount of supplies the fleet will have, dependent on the size of it
         "daysWorthOfSupplies":[<min>, <max>],
         //The amount of fuel the fleet will have. Again, dependent on the size of it
         "lyWorthOfFuel":[<min>, <max>],
         //How much extra crew the fleet will have. Possibly if you're wanting a fleet that has a low chance of being reduced due to short manpower after a tough fight
         "extraCrewPercent":[<min>, <max>],
         //How many marines you want present in the fleet
         "marinesPercent":[<min>, <max>],
         "ships":{
            //Adds the different ship variant types in. Which you can have minimum and maximum values if you're wanting variety in your fleet
            "<variantid>":[<min>, <max>],
            //Wings are added in an identical way. This is merely added to avoid confusion
            "<wingid":[<min>, <max>],
         },
      },
      "raid":{
         "displayName":"<displayname>",
         "maxFleetPoints":<Fleet Point Cap>,
         "daysWorthOfSupplies":[<min>, <max>],
         "lyWorthOfFuel":[<min>, <max>],
         "extraCrewPercent":[<min>, <max>],
         "marinesPercent":[<min>, <max>],
         "ships":{
            "<variantid>":[<min>, <max>],
            "<wingid":[<min>, <max>],
         },
      },
      "attack":{
         "displayName":"<displayname>",
         "maxFleetPoints":<Fleet Point Cap>,
         "daysWorthOfSupplies":[<min>, <max>],
         "lyWorthOfFuel":[<min>, <max>],
         "extraCrewPercent":[<min>, <max>],
         "marinesPercent":[<min>, <max>],
         "ships":{
            "<variantid>":[<min>, <max>],
            "<wingid":[<min>, <max>],
         },
      },
      "systemDefense":{
         "displayName":"<displayname>",
         "maxFleetPoints":<Fleet Point Cap>,
         "daysWorthOfSupplies":[<min>, <max>],
         "lyWorthOfFuel":[<min>, <max>],
         "extraCrewPercent":[<min>, <max>],
         "marinesPercent":[<min>, <max>],
         "ships":{
            "<variantid>":[<min>, <max>],
            "<wingid":[<min>, <max>],
         },
      },
      "supplyConvoy":{
         "displayName":"<displayname>",
         "maxFleetPoints":<Fleet Point Cap>,
         "daysWorthOfSupplies":[<min>, <max>],
         "lyWorthOfFuel":[<min>, <max>],
         "extraCrewPercent":[<min>, <max>],
         "marinesPercent":[<min>, <max>],
         "ships":{
            "<variantid>":[<min>, <max>],
            "<wingid":[<min>, <max>],
         },
      },
      "fuelConvoy":{
         "displayName":"<displayname>",
         "maxFleetPoints":<Fleet Point Cap>,
         "daysWorthOfSupplies":[<min>, <max>],
         "lyWorthOfFuel":[<min>, <max>],
         "extraCrewPercent":[<min>, <max>],
         "marinesPercent":[<min>, <max>],
         "ships":{
            "<variantid>":[<min>, <max>],
            "<wingid":[<min>, <max>],
         },
         },
      },
      "personnelConvoy":{
         "displayName":"<displayname>",
         "maxFleetPoints":<Fleet Point Cap>,
         "daysWorthOfSupplies":[<min>, <max>],
         "lyWorthOfFuel":[<min>, <max>],
         "extraCrewPercent":[<min>, <max>],
         "marinesPercent":[<min>, <max>],
         "ships":{
            "<variantid>":[<min>, <max>],
            "<wingid":[<min>, <max>],
         },
      },         
   },
   //Adds various traits to the fleet commanders. With different ones depending on the rank
   "traits":{
      "admiral":{
         
      },
      "captain":{
         "cowardly":1,
         "cautious":1,
         "steady":1,
         "aggressive":1,
         "suicidal":1,
         "fearless":1,
      },
   },
   //Adds different dialogue, depending on the faction's attitude towards you, and of their situation compared to yours
   "dialogue":{
      "greetingFriendly":"<friendly chat>",
      "greetingNeutral":"<indifference>",
      "greetingHostileAggressive":"<anger>",
      "greetingHostileTimid":"<pants crapping>",
   }
},
[close]



Right, now that that's done, you'll need to get some .csv files in to tell the game where to find your faction stuff. First you will need a faction.csv in that same factions folder where your .faction file is. Using a spreadsheet software, like OpenOffice for example, make sure your csv looks like this
Spoiler
[close]

While you're in about the folder area, go up one level to
C:\Program Files (x86)\Fractal Softworks\Starfarer\mods\<modname>\data\world
and create another csv file called generators.csv this time. For this .csv, make sure it looks like
Spoiler
[close]

Again, for both of those, just replace the <Faction> bits with what's relevant for your faction. Now, with that done, we can start on the actual campaign stuff. The real juicy part of the campaign implementation. These next files should be placed in
C:\Program Files (x86)\Fractal Softworks\Starfarer\mods\<modname>\data\scripts\world



<Faction>Gen.java
Spoiler
//This section details the folder in which this will be. If you have  a Corvus folder in world, then it'd be package.data.scripts.world.corvus for example
package data.scripts.world;

//Importing required libraries and such. Be sure to have all the required imports
import java.awt.Color;
import java.util.List;

import com.fs.starfarer.api.campaign.CampaignFleetAPI;

import com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.campaign.FleetAssignment;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.campaign.SectorGeneratorPlugin;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import com.fs.starfarer.api.campaign.CargoAPI.CrewXPLevel;
import com.fs.starfarer.api.fleet.FleetMemberType;

@SuppressWarnings("unchecked")
public class <Faction>Gen implements SectorGeneratorPlugin {

   public void generate(SectorAPI sector) {

            //These lines are getting data from vanilla Starfarer's Corvus System. Critical for locations and such

            //Getting the system itself
            StarSystemAPI system = sector.getStarSystem("Corvus");
            
            //In this one, it's getting the abandoned station orbiting Corvus I. This line can be done with Stars, planets or stations. Basically any fixed object in a star system it will get by name in quotations
            SectorEntityToken stock = system.getEntityByName("Abandoned Storage Facility");

            //Creating a token in the system. Doesn't do much except act as a reference point for getting the planet placement right for any added
            SectorEntityToken <token> = system.createToken(0, 0);

            //Creates a new planet. <planet type> can be gas_giant, ice_giant, lava, frozen, barren, toxic, jungle, terran, desert, arid, or cryovolcanic. <angle> refers to the planet's bearing dependant on <token>. 0 would be to the “east”, with increasing values                going anti-clockwise
            SectorEntityToken <newPlanet> = system.addPlanet(<token>,"<Planet Name>", "<planet type>", <angle>, <planet size>, <distance from <token>>, <orbit speed>);
         
            //If you so desire, you can even make an asteroid belt for yourself. <orbit-parent> refers to the entity that the belt orbits
            system.addAsteroidBelt (<orbit-parent>, <number of asteroids>, <orbit radius>, <belt width>, <min orbit days>, <max orbit days>);
            
            //This is where you create the station for your faction, or just another station for an existing faction, if you so please.
            SectorEntityToken <station> = system.addOrbitalStation(<orbit-parent>, <angle>, <distance>, <orbit-period>, "<Station Name>", "<factionid>");
            
            //Creates a spawn point for the faction's convoys. The combat/reconnaissance fleets will be dealt with in the next line
            system.addSpawnPoint (new <Faction>ConvoySpawnPoint(sector, system, <daysinterval>, <maxfleets>, <spawn location>, <destination>));
            
            //Creates a spawn point for the factions combat/reconnaissance fleets. Just a repetition of before, but still important, as the values will likely be different.
            <Faction>SpawnPoint <Faction>Spawn = new <Faction>SpawnPoint(sector, system, <daysinterval>, <maxfleets>, <spawn location>);
            
            //Actually adding the combat/reconnaissance spawn
            system.addSpawnPoint(<Faction>Spawn);
            
            //This for example, creates 4 fleets from the <Faction>Spawn.java specs. More on that when the time comes
            for (int i = 0; i < 4; i ++) <Faction>Spawn.spawnFleet();
            
            //Getting the cargo of the station. Vital for adding more cargo and ships to the station
            CargoAPI <Faction>cargo = <station>.getCargo();
            
            
            //Adding weapons to the station's initial inventory.
            <station>cargo.addWeapons("<weaponid>", <quantity>);
            
            
            //Adding misc. cargo to the station's inventory. In this instance it is regular crew and supplies
            <station>cargo.addCrew(CrewXPLevel.REGULAR, <quantity>);
            <station>cargo.addSupplies(<quantity>);
            
            //Adding a ship to the station's inventory. Note that you'll have to repeat lines if you're wanting multiple of the same hull type
            <station>cargo.addMothballedShip(FleetMemberType.SHIP, "<shipid>_Hull", null);
            
            //Fighter wings are slightly different, but it's the same principle
            <station>cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, "<wingid>", null);
            
               FactionAPI <factionid> = sector.getFaction("<factionid>");
            <factionid>.setRelationship("<angryfaction>", -1);
            <factionid>.setRelationship("<indifferent>", 0);
            <factionid>.setRelationship("<bestfriends>", 1);
         }
}
[close]



<FactionConvoySpawnPoint>.java
Spoiler
//Same as in <Faction>Gen, make sure this is the same as the hierarchy of your folders
package data.scripts.world;


//And yet again with this, make sure you have the imports correct
import java.util.List;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.Script;
import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.FleetAssignment;
import com.fs.starfarer.api.campaign.LocationAPI;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.fleet.FleetMemberType;
import com.fs.starfarer.api.campaign.CargoAPI.CrewXPLevel;


@SuppressWarnings("unchecked")
public class <faction>ConvoySpawnPoint extends BaseSpawnPoint {

   //All of this is required for the script to work. So just copy this in
   private final SectorEntityToken convoyDestination;

   public <Faction>ConvoySpawnPoint(SectorAPI sector, LocationAPI location,
                     float daysInterval, int maxFleets, SectorEntityToken anchor,
                     SectorEntityToken convoyDestination) {
      super(sector, location, daysInterval, maxFleets, anchor);
      this.convoyDestination = convoyDestination;
   }

   //This line is for if you're wanting incremental convoys to add more stuff. For example if you want to simulate an arms race, or just have a bit of pacing with the way things are going
   private static int convoyNumber = 0;
   
   @Override
   protected CampaignFleetAPI spawnFleet() {
      String type = null;

      //For creating different kinds of convoy, similar to the Hegemony ones, with different resources depending on convoy. Not required, but still worth knowing about
      float r = (float) Math.random();
      if (r > .6f) {
         type = "fuelConvoy";
      } else if (r > 0.3f) {
         type = "personnelConvoy";
      } else {
         type = "supplyConvoy";
      }

      //Getting the location for spawning the supply fleets. Corvus is on a system of -15000 to 15000 for the grid size.
      float angle = (float) ((float) Math.random() * Math.PI * 2f);
      float x = (float) (Math.cos(angle) * <xcoord>f);
      float y = (float) (Math.sin(angle) * <ycoord>f);
      
      //Creates the convoy
      CampaignFleetAPI fleet = getSector().createFleet("<factionid>", type);
      getLocation().spawnFleet(getAnchor(), x, y, fleet);
      

      //Changes the delivered goods depending on the convoy type
      if (type.equals("supplyConvoy")) {
         //In the case of a Supply convoy, delivers 5 random weapons from the list to the station
         CargoAPI cargo = fleet.getCargo();
         addRandomWeapons(cargo, 5);
      }      
      else if (type.equals("personnelConvoy")) {
         //However, if it's a personnel convoy, then the station will receive 25 elite experience crew, and 100 veteran experience crew
         CargoAPI cargo = fleet.getCargo();
         cargo.addCrew(CrewXPLevel.ELITE, 25);
              cargo.addCrew(CrewXPLevel.VETERAN, 200);
      }
      
      //Line used for determining what random ships from the list of defined ships are actually added to the station on the delivery run
      addRandomShips(fleet.getCargo(), (int) (Math.random() * 4f));
      
      //Message for when the supply convoy has entered the system.
      Script script = null;
      if (type.equals("supplyConvoy")) {
         script = createArrivedScript();
         Global.getSectorAPI().addMessage("<Enter Fleet Entered System Message>");
      }
      //Tells the fleet to go to the station, then afterwards return to the point and despawn. To simulate delivering to the station, then moving to another system
      fleet.addAssignment(FleetAssignment.DELIVER_RESOURCES, convoyDestination, 1000, script);
      fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, getAnchor(), 1000);
      
      return fleet;
   }
   
   //Message for when the supply convoy has successfully delivered its cargo
   private Script createArrivedScript() {
      return new Script() {
         public void run() {
            Global.getSectorAPI().addMessage("<Enter Delivery Message>");
         }
      };
   }
   
   //Determining random weapons to add to the station from the list at the end
   private void addRandomWeapons(CargoAPI cargo, int count) {
      List weaponIds = getSector().getAllWeaponIds();
      for (int i = 0; i < count; i++) {
      String weapon = (String) weapons[(int) (weapons.length * Math.random())];
         int quantity = (int)(Math.random() * 4f + 2f);
         cargo.addWeapons(weapon, quantity);
         
      }
   }
   
   //Determining random ships to add to the station from the list at the end. Including fighter wings
   private void addRandomShips(CargoAPI cargo, int count) {
      List weaponIds = getSector().getAllWeaponIds();
      for (int i = 0; i < count; i++) {
         if ((float) Math.random() > 0.4f) {
            String wing = (String) wings[(int) (wings.length * Math.random())];
            cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, wing, null);
         } else {
            String ship = (String) ships[(int) (ships.length * Math.random())];
            cargo.addMothballedShip(FleetMemberType.SHIP, ship, null);
         }
      }
   }

   //These three blocks are for defining the different types of ships, fighter wings and weapons the station stocks. No repetition of types is needed for this part.
   private static String [] ships = {
                           "<shipid>_Hull",
                           };

   private static String [] wings = {
                           "<wingid>",
                           };
   
   private static String [] weapons = {
                           "<weaponid>",
                           };
                           
}
[close]




<Faction>SpawnPoint.java
Spoiler
//Yet again, have this as the heirarchy of the folders.
package data.scripts.world;

//And another yet again, have the imports correct
import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.FleetAssignment;
import com.fs.starfarer.api.campaign.LocationAPI;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;

import data.scripts.world.BaseSpawnPoint;

public class <Faction>SpawnPoint extends BaseSpawnPoint {

   public <Faction>SpawnPoint(SectorAPI sector, LocationAPI location,
                     float daysInterval, int maxFleets, SectorEntityToken anchor) {
      super(sector, location, daysInterval, maxFleets, anchor);
   }

   @Override
   protected CampaignFleetAPI spawnFleet() {
      //if ((float) Math.random() < 0.5f) return null;
      //Like for the convoys, this is for determining the fleet type on a random basis.
      String type = null;
      float r = (float) Math.random();
      if (r > .6f) {
         type = "patrol";
      } else if (r > 0.25f) {
         type = "raid";
      } else if (r > 0.10f) {
         type = "attack";
      } else {
         type = "systemDefense";
      }
      
      //
      CampaignFleetAPI fleet = getSector().createFleet("<factionid>", type);
      getLocation().spawnFleet(getAnchor(), 0, 0, fleet);

      fleet.setPreferredResupplyLocation(getAnchor());
      //Giving the fleets orders depending just on what type of fleet it is. So the patrol, raid and attack fleets will go out and roam the Corvus system The systemDefense fleet, however, will stick by the station to safeguard it
      if (type.equals("patrol") || type.equals("raid") || type.equals(“attack”)) {
         fleet.addAssignment(FleetAssignment.RAID_SYSTEM, null, 10);
         fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, getAnchor(), 1000);
      } else {
         if ((float) Math.random() > 0.8f) {
            fleet.addAssignment(FleetAssignment.PATROL_SYSTEM, null, 30);
            fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, getAnchor(), 1000);
         } else {
            fleet.addAssignment(FleetAssignment.DEFEND_LOCATION, getAnchor(), 20);
            fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, getAnchor(), 1000);
         }
      }
      
      
      return fleet;
   }

}
[close]






I hope this tutorial helps you get a faction up and running in the campaign. If you have any further questions, feel free to post 'em here

On a related note, any mistakes that need fixed in the tutorial (chances are I have made some), please tell me what they are. I want this to be a useful resource for people, not an error-laden kludgefest. Any other feedback is also greatly appreciated

14
Modding / Is it possible to add more functions to stations?
« on: August 11, 2012, 01:07:38 PM »
Well, like the title says, is it at all possible, for the likes of the abandoned station in particular, to have a secondary kind of fleet screen, where you can dump the ship, and if you have the crew and supplies in the station's inventory, have the ship be repaired as though it were in your fleet? I know that I could just click the instant-repair button, but for the likes of when I don't have enough supplies to both repair ships and keep myself running, I would like to deposit some supplies, and let the station get to work while I... acquire more from other places.

15
Discussions / Some rather troubling thoughts about humanity
« on: August 08, 2012, 06:08:42 PM »
First off, I shall just state a warning here, since I know this topic may turn very volatile with the topic. I could just not post it, but I'd rather think that people here are mature enough to keep things civil, and I have good reason to think folks here are just that: Mature. So, without further ado, I shall place the warning with red letters so it is seen better

This thread is not, and will not be about personal attacks on any person, forum member or otherwise. Any "case examples" must be left anonymous, if not for respect of that person, then just to keep things as civil as I want the thread to remain

Right, now to the topic at hand. Right, so I have noticed over my years on the internet, that humanity in general is on a decline in average intelligence, to put it rather bluntly. Yes, we still make massive achievements, like the Curiosity landing, but there are so many more people who can't tell the difference between a patio door and a reasonably sized window. I don't know whether this perceived downfall of mean intelligence is down to higher exposure to such... individuals, or whether there is a genuine degeneration of common and academic sense. I personally would've thought that more advancements in our species would mean that intelligence would only be advanced as well, I mean it's like learning to crawl before walking, and now we're learning to run, right?

Spoiler
You might be wondering what sparked this line of thought to create a thread, well I shall somewhat tell you. Like I said at the start, I will not name any names or give any rootable context. Well, in one of the numerous other forums I visit, there's also quite a strong modding community there, which one modder got on the wrong side of the moderators for saying things that were quite obviously against the rules (I won't go into detail here), and so he gets temp-banned for 3 days. He then posts on another site that the admins had picked on him due to racial/religious reasons (Note: This is a blatant lie). Of course, without any evidence to back him up, the people of that community clamour to his feet and essentially say "that site sucks, man. You're infallible". So when members of Site A come round to stand up for themselves, and put their side of the story up, with accompanying links, I might add, you'd think that the devoted followers would look at the links to see what the kerfuffle is about, right? Wrong, they would go on to not look at the link because they can "take sides without which is supporting what". Yeah... a real prodigy here, folks.
[close]

So there you have it, my tale of frustration towards the human mind and its withering. So, what are your thoughts and opinions of this apparent degradation of humanity? And as a final note, I don't want it to turn into a topic about the case example there, please


P.S. To Alex/Moderators, if this topic is out of line on what it's about, then I wholeheartedly apologise for being tactless and deserve a good smack across the back of my head
P.P.S. This topic is in no way a "I'm smarter than everyone" thread, I know that I am, in fact, not a super-genius

Pages: [1] 2