Fractal Softworks Forum

Please login or register.

Login with username, password and session length

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 - Psiyon

Pages: 1 2 [3] 4 5
31
As the title says, the rate of fire multipliers (like getEnergyRoFMult()) doesn't have any effect on a beam weapon's cooldown. Obviously the beams in question would be burst beams, not continuous fire beams.

So, instead of lowering the "chargedown" value in weapon_data.csv for burst beam weapons, they should be lowering the "burst delay" value, where the real cooldown for burst beams is determined. Hopefully this one is easy enough to fix.


32
Modding / Java / Convoy Delivery Help
« on: August 08, 2012, 01:13:18 PM »
I've ran into a bit of a wall.

I'm trying to create a campaign script that lets you order ships to be delivered to your private station at a reduced cost. The premise is pretty simple: each ship up for mail order has a corresponding item, a "ship token" if you will. You buy this from a station, and put it in your cargo. The next day, the ship token is removed, and eventually a convoy will be dispatched to your dockyard to deliver that ship to you.

However, there's a problem when it comes to the fleet actually delivering stuff. I want the fleet to only deliver the ships, and not any if its supplies/fuel/etc, so for the script that runs when the convoy arrives at its destination, I tried to simply add the ordered ships directly to the station's cargo. Only problem is that I can't seem to figure out how to pass the variables that contain the number of ships ordered to the arrived script.

Here's the whole thing, with comments:
Spoiler
Code
	@Override
public CampaignFleetAPI spawnFleet() {

StarSystemAPI system = getSector().getStarSystem("God");
FactionAPI player = getSector().getFaction("player");
FactionAPI lyseti = getSector().getFaction("lyseti");

SectorEntityToken playerf = system.getEntityByName("Fleet");
SectorEntityToken dockyard = system.getEntityByName("Dockyard");
CargoAPI dcargo = dockyard.getCargo();

CargoAPI cargoplayer = playerf.getCargo();
CampaignFleetAPI fleet = null;



//adds the items to the dockyard for testing purposes.
dcargo.addItems(CargoAPI.CargoItemType.RESOURCES, "uap", 5);
dcargo.addItems(CargoAPI.CargoItemType.RESOURCES, "kal", 5);
dcargo.addItems(CargoAPI.CargoItemType.RESOURCES, "emite", 5);
dcargo.addItems(CargoAPI.CargoItemType.RESOURCES, "ac03", 5);
dcargo.addItems(CargoAPI.CargoItemType.RESOURCES, "dara", 5);



//counts for the number of ships that are ordered.
float uapcount = 0;
float kalcount = 0;
float daracount = 0;
float ac03count = 0;
float emitecount = 0;



//gets the number of ships of each type ordered, courtesy of Alex.
List stacks = cargoplayer.getStacksCopy();

for (int i = 0; i < stacks.size(); i++) {
    CargoStackAPI stack = (CargoStackAPI) stacks.get(i);
    if (stack.isNull()) continue;
    if (stack.getData().equals("uap")) {
        uapcount += stack.getSize();
    } else if (stack.getData().equals("kal")) {
        kalcount += stack.getSize();
    } else if (stack.getData().equals("dara")) {
        daracount += stack.getSize();
    } else if (stack.getData().equals("ac03")) {
        ac03count += stack.getSize();
    } else if (stack.getData().equals("emite")) {
        emitecount += stack.getSize();


}
}


//removes any of the cargo items bought, if they exist.
if (uapcount >= 1) {
cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "uap", uapcount);
} if (kalcount >= 1) {
cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "kal", kalcount);
} if (daracount >= 1) {
cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "dara", daracount);
} if (ac03count >= 1) {
cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "ac03", ac03count);
} if (emitecount >= 1) {
cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "emite", emitecount);
}



//if they bought something...
if ((uapcount >= 1) || (kalcount >= 1) || (daracount >= 1) || (ac03count >= 1) || (emitecount >= 1)) {

//delivery fleet spawn setup
SectorEntityToken ltoken;

if ((float) Math.random() > 0.6) {
ltoken = system.getEntityByName("Esk");
} else if ((float) Math.random() > 0.1)  {
ltoken = system.getEntityByName("Bli");
} else {
ltoken = system.getEntityByName("Nara");
}


fleet = getSector().createFleet("lyseti", "deliveryfleet");
getLocation().spawnFleet(ltoken, 0, 0, fleet);
fleet.setPreferredResupplyLocation(ltoken);


//and then here's where the problem begins.
Script script = createArrivedScript();

fleet.addAssignment(FleetAssignment.GO_TO_LOCATION, dockyard, 1000, script);
fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, ltoken, 1000);



}


return fleet;


}


//the arrival script. I'm not sure how to get the "x"count variables down here, where they are needed.
//Of course, I could just add the ships to the fleet's cargo, but then when they arrive at the station, they'd drop off all their supplies/fuel as well as the ships. This way prevents that.

public Script createArrivedScript() {
return new Script() {
public void run() {
Global.getSectorAPI().addMessage("Your order from the Lyseti Trading Corporation has arrived at your dockyard.", Color.green);



StarSystemAPI system = getSector().getStarSystem("God");
SectorEntityToken dockyard = system.getEntityByName("Dockyard");
CargoAPI dcargo = dockyard.getCargo();




if (uapcount >= 1) {
for (int u = 0; u < uapcount; u++) {
dcargo.getMothballedShips().addFleetMember("uap_def");
}
} if (kalcount >= 1) {
for (int k = 0; k < kalcount; k++) {
dcargo.getMothballedShips().addFleetMember("kalion_def");
}
} if (daracount >= 1) {
for (int d = 0; d < daracount; d++) {
dcargo.getMothballedShips().addFleetMember("daratok_def");
}
} if (ac03count >= 1) {
for (int a = 0; a < ac03count; a++) {
dcargo.getMothballedShips().addFleetMember("ac03_wing");
}
} if (emitecount >= 1) {
for (int e = 0; e < emitecount; e++) {
dcargo.getMothballedShips().addFleetMember("emite_def");
}
}


}
};
}

[close]

So the question is, how do I pass the "x"count variables to the arrived script at the bottom? Any help would be greatly appreciated.

33
Suggestions / [Modding] Defensive Ship System AI Type
« on: August 04, 2012, 11:39:59 AM »
So, I've been toying around with ship systems for a while. One thing I've found disappointing is that there isn't an AI type that can properly make use of a defensive STAT_MOD system. In fact, every somewhat-logical AI type I've tried to use crashes the game. All that the system does is make a ship take 75% less armor damage when active.

I'm curious if there would be a chance of getting a generic AI type that detects incoming threats, and activates the system appropriately.

34
Bug Reports & Support / [Modding] Bug with Fighters and Weapons
« on: August 02, 2012, 07:29:55 PM »
Because the bug itself is kind of hard to explain straight-up, I'll just explain my situation:

-I found that fighters with only one weapon mounted would have that weapon disappear when I went to test in-game. When I took control of one of the fighters in devmode, the weapon that should be there simply didn't exist; the craft was defenseless. However, in the codex and ship info tooltip, the weapon was shown to exist.

-After testing everything I could think of, I got the weapon to work again when I set the AI hint in weapon_data.csv to "PD." All other single-weapon fighters that used weapons without the PD flag wouldn't work.

-The weapons affected were in HIDDEN slots.



Also, did the Wasp drone's PD laser always have a 360 arc? Because it does now. I always seem to remember it as firing straight ahead, but I'm probably wrong as I hardly ever use them.


35
Modding / Milky Way Skybox
« on: July 08, 2012, 02:45:13 PM »


This came as a result of testing out Space Engine's skybox exporting ability, which works fairly well, though they required a bit of editing.

So, this is a set of 5 backgrounds centered in a location on the other side of the Milky Way. Might not be the most dramatic backgrounds ever, but if realism is your thing, then these might be for you.

Download: https://dl.dropbox.com/u/71512473/mwskybox.zip



36
Discussions / Space Engine
« on: July 04, 2012, 08:34:03 PM »
Oh my God. I found the most amazing thing ever:

http://en.spaceengine.org/

In short, it's basically a universe simulator. Ever wanted to explore star systems in Andromeda, or look at Saturn from one of its close-orbiting moons? Here you go.

The only downsides are that it's buggy, and requires a fair bit of CPU and graphics power to run smoothly. But if you're willing to wade through the occasional lag spikes and crashes, this program is goddamned awesome. At least, it's awesome for me, because I love anything that has to do with space.

Oh, and it's free.

37
Modding / Fonts & Cowardly Carriers
« on: June 29, 2012, 06:44:41 PM »
Question: has anyone tried to get a custom font in-game? My short attempt at it a few days ago failed. As far as I can tell, it seems the game uses bitmap fonts in .fnt format, which, isn't very helpful as there are very few programs that let you edit it or even save to that format. I did, however, find one program, "Fony 1.4" that lets you import .ttf fonts and export them to whatever size .fnt file you want. Only problem is that A: The game gives me a fatal error when I use a .fnt file exported from that program, and B: It won't even let me open Starfarer's default .fnt files to edit them, saying that vector fonts are unsupported (which is confusing, because I thought .fnt files were essentially bitmaps).

So, anyone have any ideas? If not, I suppose Alex will have to swoop in and save the day by enlightening us on exactly what format these fonts are truly in.



While I'm at it, I'd may as well bring up a second issue: ships with flight decks seem to be really, really obsessed with avoiding confrontations with the enemy. While this makes sense for the majority of normal Starfarer (as carriers aren't very powerful and should be kept out of the way), for mods, it doesn't always make sense, as one of the strongest ships in my mod always seems to act like a coward simply because it has two flight decks. Is there anything that I can change that might influence the AI to act in a more aggressive manner?

38
Discussions / Mass Effect 3 Extended Cut (Spoilers)
« on: June 27, 2012, 08:56:58 PM »
Anyone else play though it yet?

I was kind of taken by surprise--I went in expecting very little, and it seems that Bioware actually did a competent job with it. The endings are still pretty lame from a plot perspective (starbrat still exists), but now they actually have some closure.


Spoiler
The only part that was really "wtf" for me was the Normandy's extraction run--what the hell? Harbinger is just shooting everyone right the hell up, and then Shepard's all "'ayo Normandy, get your ass down here and pick up my wounded henchmen!" So then the Normandy comes down right in front of Harbinger who seems to have politely stopped killing everything for just long enough for them to get out, and then is like "Ok Shep, your friends are safe, i'ma toast you and everyone else with this beam now, k?"

I guess Harbinger is just a really courteous Reaper.

That refusal ending was kind of lulzy too. I knew that there wouldn't be a victory against the Reapers, but come on. The ending was incredibly short, and it really didn't even feel much like and ending. I wanted to see everyone getting gunned down by the Reapers as they slowly lost the war. Damn it, I wanted to see every character we cared about on the Normandy die a brutal death! Now there's a thought--seeing Kaidan/Ashley getting killed would make dooming the galaxy just about worth it.

Finally, in the normal endings, it was also nice to see that the Normandy didn't get stranded ('cause that was pretty dumb. They retconned it too--the Normandy's wing no longer gets blown off). And of course, nice to see that the galaxy has a future and rebuilds the mass relays. I laughed my ass off at the synthesis ending though, that green techno-overlay on everything was just too silly to take seriously.
[close]

So, yeah. Amazingly, they managed to take an abysmally bad ending and turn it into something far more acceptable. Still not great, but acceptable.

39
Modding / Psiyon's Splendid Planet Tutorial
« on: June 20, 2012, 05:09:08 PM »
I don't know why I made this, but w/e

This is a tutorial that will teach you how to get a custom planet in-game, from the texture, to planets.json, to sectorgen.java.

Link:

40
Modding / Let's Make the Wiki Not Suck
« on: June 03, 2012, 02:47:01 PM »
EDIT: We've moved the modding wiki over here: http://starfarer.thegamewiki.com/wiki/Modding


I've spent a bit of time going through the modding wiki and improving on it.

http://starfarergame.wikia.com/wiki/Modding (old wiki)

So far, I've restructured the main page into something more coherent, added a few pages and links, namely the ship_data.csv, and the misc .csv files page.

If anyone can help out by filling in some of those red links (or at least starting on them), that would be greatly appreciated. Every bit helps.

We really need this wiki. I feel pretty bad for new modders, because trying to find relevant information on this forum seems like it would be a complete pain in the ass.

41
Modding / Code Sample - Random Reduction of Station Inventory
« on: May 27, 2012, 12:42:04 PM »
Been fiddling around with this for an hour or so. It's simple, and it seems to work well. The idea is that inventory in an orbital station is randomly eaten up as time progresses, providing the feeling that you're not the only one making purchases from stations. With a little tweaking, this can easily prevent a station from having boatloads of crew, fuel, and supplies in your mod. It can also make resupplying more interesting, as perhaps one station will not have enough inventory to satisfy your demand.

I haven't attempted to try to do this with weapons yet, as I'm short on time. If anyone has any ideas on how to do that, feel free to respond, as I'd love to know.

Also, thanks to vorpal+5 because I used his dynamic reinforcements script as a simple template for this.

Here's the code:

Code

package data.scripts.world.corvus;
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 com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import com.fs.starfarer.api.campaign.CargoAPI.CrewXPLevel;
import com.fs.starfarer.api.fleet.FleetMemberType;
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.Script;
import data.scripts.world.BaseSpawnPoint;
import java.util.List;
@SuppressWarnings("unchecked")
public class stationrapist extends BaseSpawnPoint {

   private final SectorEntityToken station;


   public stationrapist(SectorAPI sector, LocationAPI location, float daysInterval, int maxFleets, SectorEntityToken anchor, SectorEntityToken station) {
      super(sector, location, daysInterval, maxFleets, anchor);
      this.station = station;
   }
@Override
public CampaignFleetAPI spawnFleet() {


CargoAPI cargo = station.getCargo();



//sets up all the different cargo items, and gets their amounts
      float supplies = cargo.getSupplies();
  float fuel = cargo.getFuel();
  float crewg = cargo.getCrew(CrewXPLevel.GREEN);
  float crewr = cargo.getCrew(CrewXPLevel.REGULAR);
  float marines = cargo.getMarines();

 
  int f;
     
 
  //As long as the supplies at a station are greater than or equal to 400, there's a 16% chance that this code will run
      if ((supplies >= 400) && ((float) Math.random() > 0.84)) {
 
 
  //the 60s here are the minimum value that can be removed. 350 is the maximum value. Make sure the maximum value is below the value in the if statement above, which is 400 here.
  //Otherwise, you might get negatives and I don't know how Starfarer will like that.
f = 60 + (int)(Math.random() * ((350 - 60) + 1));
         cargo.removeSupplies(f);   

//uncomment this to get an ingame notification when this code runs
//Global.getSectorAPI().addMessage("Station rapist-supplies");


      }

     if ((fuel >= 600) && ((float) Math.random() > 0.66)) {
 
f = 160 + (int)(Math.random() * ((350 - 160) + 1));
         cargo.removeFuel(f); 
//Global.getSectorAPI().addMessage("Station rapist-fuel");

      }
 
     if ((crewg >= 700) && ((float) Math.random() > 0.95)) {
 
f = 10 + (int)(Math.random() * ((120 - 10) + 1));
         cargo.removeCrew(CrewXPLevel.GREEN,f);
//Global.getSectorAPI().addMessage("Station rapist-green crew");

         
      }  

     if ((crewr >= 260) && ((float) Math.random() > 0.84)) {
 
f = 20 + (int)(Math.random() * ((190 - 20) + 1));
         cargo.removeCrew(CrewXPLevel.REGULAR,f);
//Global.getSectorAPI().addMessage("Station rapist-regular crew");
         
      }    

     if ((marines >= 60) && ((float) Math.random() > 0.91)) {
 
f = 6 + (int)(Math.random() * ((35 - 6) + 1));
cargo.removeMarines(f);
//Global.getSectorAPI().addMessage("Station rapist-marines");

      }    

//Veteran and elite crew weren't added because they're rare enough as it is, but if you do want them to be removed, it should be easy to copy.


CampaignFleetAPI derp = null;
return derp;

}

}



And you'll need one of these lines in your corvus.java file for the station you want this script to run on:

Code

      stationrapist NAMEHERE = new stationrapist(sector, system, 1, 999, token, STATIONHERE);
      system.addSpawnPoint(NAMEHERE);



Sorry about the... uh... crude name, but that's how I keep myself entertained while programming. Those of you who have looked through Ascendency's betrayal script should know that :P

42
Suggestions / Missile and Ship System Ideas
« on: May 26, 2012, 05:09:52 PM »
When I saw the blog post about ship systems, it got me thinking about the weapons from the games Battlezone 1 and 2. I think some of the ideas that those games employed could be very relevant here.

First off, a few missile type ideas:

At the moment, the game has a few different missile types. MIRVs, heat-seekers, rockets, and a few others, but I feel the game could benefit from a little more variety.

"Tag Missile" - This weapon fired a tracer round that stuck into a target. If it hit a target, there would be a short delay, and then a stream of low-damage missiles would fire from your craft and home in on the enemy.

"Sand Bag Missile" - This was a missile weapon that slowed down an enemy upon impact. The slowdown effect was cumulative with each hit from the rocket, but it faded away over a bit of time. This helped slower, less maneuverable vehicles pin down the small and fast ones.

"Image Locking Shadower Missile" - Though its mechanics would work a bit differently in Starfarer, the idea was that this missile "charged" up. The longer you held down the mouse button, the more missiles would fire in the salvo. The weapon, however, encouraged salvo-firing, as firing one missile at a time yielded a much slower rate of fire.

"Acid Cloud Mortar" - This was a mortar, but the same idea applies to missiles. Upon detonation, the mortar released a cloud of corrosive acid that damaged any vehicle that moved through it. In Starfarer, this could work with a missile on a small proximity fuse, releasing a cloud of AoE damage.

"Manual Detonation Mortar" - Again, a mortar. This weapon fired a mortar with one click. The next time you clicked, the mortar detonated. Though I don't think this would work too well with standard missiles, if the projectile slowed itself and came to a halt after a very short period of flight, it could work as a sort of crude minelayer or bomb.



Now for the ship systems:


"Blink Device" - This essentially enabled you to instantly teleport to a location within your line of sight, but it ate up a ton of ammo. Maybe in Starfarer it will let you teleport anywhere, but you'll be overloaded once you arrive? Though that might create some problems with rushing mission objectives...

"Static Charge" - This worked as a melee weapon that projected a field around your vehicle that damaged enemies.

"Magnetic Curtain Mine" - This essentially projected a field that deflected slower projectiles at the appropriate angle. Though this was a mine in Battlezone, this could work as some sort of temporary shield augmentation in Starfarer.

"Radar Echo Dampening Field" - This rendered you invisible by enemy radar, and ate up a steady stream of ammo if you had it on. In Starfarer, perhaps it could make it so missiles cannot lock on to you for a period of time, and maybe it could generate a steady amount of flux while active.

"Magnetic Inverting Tethering Snare" - This worked like a magnetic curtain mine, but the exact opposite. Instead, it pulled projectiles and enemy vehicles into it, from which it was very difficult to escape. The mine lasted for under a minute though before it blew up. This, unlike the Magnetic Curtain, would have to be some sort of deployed mine as making it a shield augmentation would be silly.



Just figured I'd through this stuff out there. I personally think the tag missile and RED Field would be the most excellent additions above all others.

43
Discussions / SpaceX Dragon Docks With ISS
« on: May 25, 2012, 08:47:44 AM »
http://www.space.com/15874-private-dragon-capsule-space-station-arrival.html

Well, looks like SpaceX did it; they got their capsule to the space station in one piece. Score one for the private sector.

Still, though commercial space flight is starting to go forward and will undoubtedly do some awesome stuff in the coming decades, I'll always miss the good ol' space shuttles.

I hope SpaceX tries to go to the moon once they've established themselves in the area of resupplying the ISS. :P Man, if there's isn't a base on the moon/mission to Mars at some point in my lifetime, I'll be very, very ***.

44
Modding / Name Generator
« on: May 13, 2012, 09:08:35 AM »
I keep forgetting to post this here.

http://rinkworks.com/namegen/

I found this online tool that generates names a while back. You can use them for person names, ship names, or whatever. Yes, there are a ton of name generators out there on the internet, but not many let you create your own generation parameters.

For example, I used this template to generate the person names for the KTA in Ascendency:

(tal|ma|ka|hir||van|kar|nal|ula|el|na|tu|ir|ko|si)(<s>aa|<sv>|<s>|<V>|<C>|<v>)(aan|ova|ja|ni|lan|ka|ni|tan|ut|ta|a|en|aa|kea)


The first part in parentheses determines the beginning on the name. The second parentheses determines the middle, and the last part in parentheses determines the ending. Anything enclosed in "< >" represents a special character code. <s> generates a generic syllable, <v> generates a vowel, <c> a consonant, etc.

There are links on the left of the website to show you how to make your own templates. You can also use one of the default templates if you need something fast.


Here's a few of the names that template generated:

Quote
Naalan
Eloka
Vaniut
Ageaa
Naloaa
Vanentaan
Nalessaani
Taloova
Irkaa
Talissova
Kachalan
Tumorta
The template ended up working perfectly, generating the Finnish-like set of names that I was shooting for. Keep in mind however, that not all of these will end up perfect--you need to read them over, because I'd say at least about 1/4th of the names generated are pretty crappy, even with the best template.

lulzy names:
Quote
Ulaoughkaa
Ulaightija
Maughutan
Akaa
Ini
Danni

So yeah. If you're making your own faction and you want them to have a set of unique person/ship names, here you go.

45
Suggestions / Refit Screen - A Check for Breaking the OP Limit
« on: May 12, 2012, 12:04:18 PM »
This deals with modding, to begin.

Now here's what I'm trying to do, and my suggestion on how to make it possible:

Simply put, I'm toying around with negative OP hullmods. The general idea of these would be to reduce the effectiveness of your ship in certain areas to give you more OPs to use in other areas.

While it works, there's a way that they can be terribly, terribly exploited:

Before:


After:



As you can see, you can use negative OP hullmods to exceed the OP limit of your ship once you remove them. So, the proposed solution is relatively simple: Don't let the user leave the refit screen if they're over the OP limit. Give them a popup message notifying them that their vessel is over capacity, and that they need to remove some stuff in order for the refit to take place.


Anyway, I just thought I'd throw this out there. Could open up some interesting opportunities for new hullmods.

Pages: 1 2 [3] 4 5