Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  


Starsector 0.9.1a is out! (05/10/19); Blog post: Skills and Story Points (07/08/19)

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

Pages: 1 2 3 [4]
Modding / Destroyer A.I Fight or Flight
« on: July 27, 2012, 05:42:59 PM »
So, what determines the fight or flight response for ships? I made a destroyer that for whatever reason is as skittish as a cat in a thunderstorm. It books it full thrusters in the other direction any time an enemy pings on its scanners. The only things it ever reluctantly engages are things that are faster than it. At first I thought it was number crunching... but whenever I take control I can down several fighter wings, a destroyer and even a light cruiser single-handedly. So I don't think the number crunching should turn a lasher into an onslaught that should be avoided on penalty of death. I noticed destroyer ships I have made tend to act this way. Is it coded into the destroyer hull size A.I? Destroyers do tend to be carriers or fire support... but there are a few who do not act this way.

Anyway, anyone have similar problems with autopilot and/or npc A.I acting this way? I'm not talking the usual won't commit to capitalize on an overloaded or venting foe issues. I'm talking full on retreat without even trying to get into firing range no matter what size or shape the enemy comes in.

Modding / Log Error Assistance (Code included)
« on: July 22, 2012, 12:02:29 AM »
Quick question, I am receiving this error message after adding a new spawn point for the Tri-Tachyons:

8965 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.lang.RuntimeException: Error compiling []
java.lang.RuntimeException: Error compiling []
at com.fs.starfarer.loading.scripts.ScriptStore$ Source)
Caused by: java.lang.ClassNotFoundException: Compiling unit "data/scripts/world/"
at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(
at org.codehaus.janino.JavaSourceClassLoader.findClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
... 2 more
Caused by: org.codehaus.commons.compiler.CompileException: Source file "data/scripts/world/" does not declare class ""
at org.codehaus.janino.JavaSourceIClassLoader.findIClass(
at org.codehaus.janino.IClassLoader.loadIClass(
at org.codehaus.janino.UnitCompiler.findClassByName(
at org.codehaus.janino.UnitCompiler.getType2(
at org.codehaus.janino.UnitCompiler.access$10300(
at org.codehaus.janino.UnitCompiler$17.visitReferenceType(
at org.codehaus.janino.Java$ReferenceType.accept(
at org.codehaus.janino.UnitCompiler.getType(
at org.codehaus.janino.UnitCompiler.getLocalVariable(
at org.codehaus.janino.UnitCompiler.buildLocalVariableMap(
at org.codehaus.janino.UnitCompiler.access$3700(
at org.codehaus.janino.UnitCompiler$7.visitLocalVariableDeclarationStatement(
at org.codehaus.janino.Java$LocalVariableDeclarationStatement.accept(
at org.codehaus.janino.UnitCompiler.buildLocalVariableMap(
at org.codehaus.janino.UnitCompiler.buildLocalVariableMap(
at org.codehaus.janino.UnitCompiler.compile(
at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(
at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(
at org.codehaus.janino.UnitCompiler.compile2(
at org.codehaus.janino.UnitCompiler.compile2(
at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(
at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(
at org.codehaus.janino.UnitCompiler.compile(
at org.codehaus.janino.UnitCompiler.compileUnit(
at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(
... 5 more

Now, I have tried making a new separate faction file for this particular department of the Tachyons and modifying the fleet compositions to be more militarized. Then in my generator file I add the spawn point at a new station close to Corvus (III?) where the corporate headquarters are. I have also made the specific spawn file that it references here:

import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;


public class MilitaryTriTachyonSpawnPoint extends BaseSpawnPoint {

private final SectorEntityToken station;

public MilitaryTriTachyonSpawnPoint(SectorAPI sector, LocationAPI location,
float daysInterval, int maxFleets, SectorEntityToken anchor,
SectorEntityToken station) {
super(sector, location, daysInterval, maxFleets, anchor);
this.station = station;

protected CampaignFleetAPI spawnFleet() {
//if ((float) Math.random() < 0.5f) return null;

String type = null;
float r = (float) Math.random();
if (r > .8f) {
type = "scout";
} else if (r > 0.6f) {
type = "raiders";
} else if (r > 0.3f) {
type = "attackFleet";
} else {
type = "securityDetachment";

CampaignFleetAPI fleet = getSector().createFleet("militarytritachyon", type);
getLocation().spawnFleet(getAnchor(), 0, 0, fleet);


if (type.equals("scout") || type.equals("raiders") || type.equals("attackFleet")) {
fleet.addAssignment(FleetAssignment.RAID_SYSTEM, null, 30);
fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, getAnchor(), 1000);
} else {
if ((float) Math.random() > 0.3f) {
//fleet.addAssignment(FleetAssignment.RAID_SYSTEM, null, 30);
fleet.addAssignment(FleetAssignment.ATTACK_LOCATION, station, 50);
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;


So my question is... what in the heck does it mean by the generator file is not declaring a class for the spawn file???

Modding / 0 flux generation bug?
« on: July 18, 2012, 02:40:20 PM »
Ok so my mod is just a few play tests away from release, but I am having an issue with one of my custom weapons. It uses the vulcan cannon spite and weapon file slightly modified. The problem I am having is that when I put 10 energy per shot into the weapon data spreadsheet, it shows up in game as 0 flux generated in the weapon groups with "NaN" in the flux per second category of the weapon description. Not sure what could be causing it. Any ideas?

Here is the weapon file:

   "id":"pdplasma",  # this id must match what's in the spreadsheet
   "visualRecoil":3.0,  # the gun sprites are only used if this is non-0
   "turretOffsets":[12, -2, 12, 2],
   "turretAngleOffsets":[0, 0],
   "hardpointOffsets":[17, -2, 17, 2],
   "hardpointAngleOffsets":[0, 0],
   "barrelMode":"ALTERNATING", # or LINKED.  whether barrels fire at the same time or alternate.
   "muzzleFlashSpec":{"length":20.0,   # only used if animationType = MUZZLE_FLASH
   "projectileSpecId":"autopulse_shot",  # projectile that will be fired

Keep in mind that the two other small weapons that use different gun sprites that I use on my fighter wings don't seem to generate any flux either.

I'm stumped  :-[

Modding / Weapon Modding Tutorial?
« on: June 23, 2012, 08:33:33 PM »
Anyone know of a good weapon modding tutorial anywhere even if only the basics? I already looked at the csv data entry explanations but I am more looking for a how-to of setting certain sprites to certain weapon effects and how the recoil animations work and that sort of stuff.

Suggestions / Planet/Station invasions w/ assault forces
« on: June 07, 2012, 02:16:20 PM »
I would like to gauge the community response to this topic. So marines are already an active part of the "personnel" slot of your cargo hold for the purpose of boarding ships, but they are pretty much just a resource mechanic used to acquire combat spoils right now. I would like to implement marines and other assault forces such as tanks, assault mechs and other military units in a more hands-on actual combat phase to take over ships (small engagements), stations (medium) and full scale planetary invasion armies (large). Obviously auto resolve would still be there as a viable though less effective alternative for those uninterested in this facet of the game. For those who don't care about game design and just want the gorey details skip paragraph 2.

Ok here are my reasons/design philosophy behind this aspect of the gameplay. The combat system put in place is honestly one of the best I've seen in my 21 years of gaming for 3 reasons: 1) it is addicting and fun, 2) it is intelligent in terms of A.I implementation and design philosophy and 3) it is simple yet complex at the same time. Lets flesh this out a bit. Addicting and fun is straightforward enough, but what makes it this way? Well the other two both come into play. A.I controlled allies and enemies are intelligent and rarely frustrate players and sometimes even wow them. The combat system itself is intelligently designed with gratifying sound and graphical effects. As a player you get the feeling of actually being in control of your ship while still getting the benefits of fleet command without the micromanagement nightmare that is most strategy games. That is good game design at its core; few of the drawbacks and all of the benefits. As you can see this a detailed description of the third point. Starfarer is a simple game on the surface. You control a ship with four directional keys (five if you count shift as a way to strafe or set auto-fire weapon groups) and fire with one click of the mouse. Changing weapons is easy to reach on the keyboard and shields are turned on and off with another mouse click. One more key for flux ventilation and that is the entire combat control scheme in three sentences. Now juxtaposition that to the veritable manual a game like Eve requires to learn its combat. Starfarer is both easy to pick up and immediately gratifying as your lasers and missiles start illuminating your enemies in deadly fiery explosions. However, once you learned the basics you quickly realize it's not as simple to master as it is to learn. Different weapons have different strengths. Timing your anti-armor high explosive missiles to hit just after a flux or overcharge requires finesse and planning. Knowing when to vent flux yourself is a challenge and good players learn to ride the thin line between overload and high energy weapon output that make or break tough engagements. This description doesn't even get into coordinating with your allied forces, ship setup, variant management and so on. So it may be more complex at a closer look, but this only adds to the depth and appeal of the game overall. Also I'd like to take a moment to remind everyone that this is an Alpha! Holy crap!  :o

So why mention all of this? Brownie points with Alex? Well that has a grain of truth to it but is besides the point! ;) The real reason I bring this up is because the system in place for the current game is flexible yet powerful enough to support a new aspect of gameplay; one that I believe would add further depth and realism to the empire building enthusiast while also giving players another fun thing to do: ground battles and planetary invasions. So how would these work?

Assault forces would be another resource tab like fleet points and personnel. It would scale greatly by hull size with frigates only being able to carry a couple infantry groups and a light vehicle and capital ships able to carry multiple armor groups, infantry squads and even experimental super weapons platforms. Assault forces would be bought at stations for far less money than ships and be able to be modified and outfitted in a separate tab and refit section just as the fleet would. Each faction would have a distinct style of ground force to further identify factions and stay in line with high mid and low tech art design respectively (Hegemony tanks would look like traditional modern tanks while Tri-Tachyon would have mechs or hover tanks with shields for example). Assault units would be just as varied as ships in terms of strengths and roles. Infantry would play a skirmisher/harassment role similar to fighters and be able to distract and pin down larger units and take out dangerous anti-armor infantry squads. Fast Light Assault vehicles would be great at capturing objectives and flanking enemy forces and could also be outfitted to excel at taking down infantry. Medium armored vehicles would be slower yet pack a punch and play multiple support roles depending on its weapon installed (i.e aoe shells, armor piercing, emp). Heavy vehicles and super weapons platforms would be the real heavy hitters and the ones who comprise the backbone of the force. These bad boys could break through shielded installations and destroy enemy point defenses that would be tough for lighter units to crack. Long range support vehicles could create artillery fire or take out high priority targets. Depending on your fleet composition you could even call down orbital planetary bombardments or strike craft bombing runs depending on capture points. There is a lot of gravy here.

Ground assault maps would be easy to implement on the current combat map and work just like any other engagement. You deploy a set amount of forces depending on the type of engagement, number of forces you have and the map itself and capture points to bring down reinforcements and give force wide bonuses and intel. The difference is the background would be terrain and nebulae and asteroids would be replaced by high ground, muddy terrain, water and rocks/trees/brush and the like that all would direct the flow of combat and influence tactical decisions. An A.I mechanic that could be limited to ground assaults would be the "Take cover!" command for infantry or other forces that would make use of nearby terrain to reduce or negate damage of incoming missiles or other projectiles and cost command points. The physics system of inertia would be limited to hovercraft and aerial units. The beauty of the combat system is that it is simple enough to easily make this happen while still being complex enough to make it fun tactically challenging.

The rewards for a successful assault would differ depending on the type of engagement. Ship boarding would obviously give you control of the ship in question. Station assaults would either destroy an enemy station or once the economy is present in the game give you control for a repair and resupply point as well as a potential trade route for income. The large scale planetary invasions could have many, many rewards. Small fleet wide bonuses, resource production, trade income, ship building facilities, strategic strongholds along important space lanes, faction bonuses, new technology options or research, new hull modifications or even artifacts for new ship or weapon designs are just a few I have in mind. The possibilities for making this mechanic a fun and desirable aspect of the game are endless.

So what if you are a naysayer? What if you came to Starfarer to fly space ships and pew pew fighters to an untimely demise and tanks and infantry aren't your style? What if you are a troll and just like to disagree? Well that's another way Starfarer's current game design favors bold new directions like this. For those who don't want to bother or could care a less about ground stuff, simply auto-resolving these battles should be a viable option (though maybe an ever so slightly less cost effective one since we don't want to gift wrap anything to those who would like to play things out) just as it is for fleet engagements now. This would allow players to essentially skip this part of the game if they so desire while still getting the rewards of planet and station capture. Don't want to have to outfit two fleets? Well once you set up the variants for your ground forces reequipping new forces is just a click away. Still not satisfied? Variant presets make it even easier. Flexibility in player choice and play style is always important in any game.

For those who are interested, ground battles add several nice things to the game: 1) new things to look at and a change of scenery, 2) further development of faction identity and lore, 3) greater realism and logistical design without over complexity and pointless gimmicky additions that serve no purpose to the overall game goals, 4) new units, weapons, and tactics to play with and most importantly 5) more fun!

So for anyone who got through that wall of text, what are your thoughts? New ideas/suggestions? Reservations? Baseless flaming?

Modding / Modding Weapons Graphics: Possible?
« on: June 02, 2012, 07:21:06 AM »
I was just wondering if its possible to modify the turret sprites of different weapons or change their projectile graphics? I see a tool for opening ship files (which I've experimented with already) but not weapon files. Any hints in the right direction?

Pages: 1 2 3 [4]