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.

Messages - xenoargh

Pages: 1 ... 326 327 [328] 329 330 ... 338
4906
Modding / Re: Judgement thread give and receive comments on sprites
« on: September 05, 2012, 11:07:40 AM »
@Okim:  Great cartoon styling!

If you'd like your sprites to become more realistic, here are some things you can do:
Spoiler
1.  Lighting and shadow needs to be consistent.  As I said earlier, David's lighting is slightly in front of and above his ships; your sprites have great use of occlusion, but lighting looks omnidirectional, which produces a toon-like look and actually makes the sprites feel very noisy and hard to interpret, as well as feeling very flat.  To give sprites more depth, you need to respect a single light source's angle and position throughout.

For example, the armor plates on the Novgorod provided me with a quick place to do an example with before and after:



2.  Use more color variation; the little greebles, scratches, dents, old battle damage, etc., etc. are what makes each side quit looking mirrored and like a real thing that's seen use :)
[close]

4907
Modding / Re: Quick Iteration through Stations
« on: September 05, 2012, 08:33:34 AM »
Oops, sorry, terminology screwup.  I meant System, my bad.

Quote
Could you explain that again? I'm not sure I understand what you are trying to do. You want something like getOwner(SectorEntityToken station), only listing multiple potential owners?
What I want to do is to get the owners of each Station and do blahblah if Faction == something.  

Quote
You don't need to be extending BaseSpawnPoint in the first place - your code will be much cleaner if you write your own class that implements SpawnPointPlugin.
I'm still trying to get my head wrapped around Java, so I'm still not sure how to do that yet.  What I've got works, but I don't think needing a "spawn point" is ideal, even though it doesn't really do anything other than run behind the scenes.  

I'll read through the thread and see if I can get un-confused enough to get 'er done ;)


4908
Suggestions / Re: getFaction() extension
« on: September 05, 2012, 08:32:34 AM »
Yup, figured that would be the case :)

It'd be nice if the hierarchy was Sector --> Star --> Planet --> Orbital --> Spawnlocation --> Fleet, so that this kind of thing could be centralized and whole star systems could be converted to (faction) or we could iterate through the faction assignments at the Sector level, changing who spawns where and what they're doing dynamically according to a condition being met.  That would allow for all the empire-building stuff to work. 

However, Spawnlocation needs have ways for it to get different Fleet lists when its Faction gets changed, etc. for it to work.

4909
Modding / Re: a few questions about vanilla mechanics
« on: September 05, 2012, 07:14:52 AM »
Quote
i noticed that fleet points control how much hanger space a fighter wing takes up, is there a way to change this?
Nope, that's the only control variable right now :)

Quote
in the vanilla campaign the hegemony and TT are at war with each other is there a way for me to make them friendly without changing the vanilla files?
Mod files can overwrite Vanilla files. 

You just need to set their relations with one another to >= 0 in initFactionRelationships() within a copy of SectorGen in your mod.

4910
Modding / Re: Quick Iteration through Stations
« on: September 05, 2012, 07:04:22 AM »
OK, here's a SupplyControl script that doesn't need to be tied to any stations or SectorEntityToken:

Spoiler
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 SupplyControl extends BaseSpawnPoint {

   private final SectorEntityToken station;
 
   public SupplyControl(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()
{
StarSystemAPI system = getSector().getStarSystem("Corvus");
List theStations = system.getOrbitalStations();

for (int orbital = 0; orbital < theStations.size(); orbital++)
{
String s1 = "" + orbital;
SectorEntityToken myStation = (SectorEntityToken)theStations.get(orbital);
String stationString = (String)myStation.getName();
//Global.getSectorAPI().addMessage(s1 + " = " + stationString);
//Global.getSectorAPI().addMessage("Supply Control is checking " + stationString);

//Future code for evaluating boolean state of named locations via string match for analysis and monitoring
//boolean factionMatch = stationString.matches("(?i).*hegemony*");



CargoAPI cargo = myStation.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;
int amt;
int i;        
 
//this randomly removes weapons from a station.
List weaponIds = getSector().getAllWeaponIds();
for (int w = 0; w < weaponIds.size(); ++w)
{
i=cargo.getNumWeapons((String)weaponIds.get(w));
//4% chance each day that a weapon will be removed.
if ((float) Math.random() > 0.96)
{
amt = (int)(Math.random() * ((i - 1)));
if (amt > 0)
{
cargo.removeWeapons((String)weaponIds.get(w),amt);
//Global.getSectorAPI().addMessage("Supply Control -Weapon");
}
}
}

//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 >= 1000) && (supplies <= 2000) && ((float) Math.random() > 0.76))
{
//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("Supply Control is truncating supplies");
}

if (supplies > 2000) {
f = (int)(supplies - 2000);
cargo.removeSupplies(f);
//Global.getSectorAPI().addMessage("Supply Control is truncating lots of supplies");
}

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

if (fuel > 2000) {
f = (int)(fuel - 2000);
cargo.removeFuel(f);
}  
 
if ((crewg >= 700) && ((float) Math.random() > 0.93))
{
f = 10 + (int)(Math.random() * ((120 - 10) + 1));
cargo.removeCrew(CrewXPLevel.GREEN,f);
//Global.getSectorAPI().addMessage("Supply Control -green crew");
}  

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

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

}
//Veteran and elite crew weren't added because they're rare enough as it is, but if you do want them to be gradually removed, it should be easy to copy.
CampaignFleetAPI derp = null;
return derp;
}
}
[close]
It's still ugly in a lot of ways. For one thing, it shouldn't need to be designed as a SpawnPoint in the first place; there should be a cleaner way to run code at X hours / days / weeks.



Hmm.  So, I was playing around with some stuff last night before I ran out of steam; basically, I need a generic method to query what Faction an OrbitalStation can be, using SectorEntityToken to start the derivation.

The only method I could think up is pretty hackish; insert a string into each named location giving the Faction ownership, and if the string matches X, then Y.

Is there any more elegant way to approach that problem?

4911
Suggestions / getFaction() extension
« on: September 05, 2012, 06:43:26 AM »
Just a straightforward request; getFaction() needs to be able to be applied to non-Fleet objects, so that we can query if X belongs to Faction Y, then Z, and so forth. 

This will matter a lot if / when the Faction of a given OrbitalStation or other static object may be changed via gamecode.  I'm writing a hackish workaround for now.

4912
Modding / Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« on: September 04, 2012, 08:27:29 PM »
Ah, I'm mainly OK then, I was being pretty conservative with the later ones.  Might have to go back and redo the first ones though :)

4913
Modding / Re: Quick Iteration through Stations
« on: September 04, 2012, 08:20:01 PM »
Well, after a bit of work, I've figured out a method to generically go through all the Stations without ever having to refer to them by name or object:
Code
	StarSystemAPI system = getSector().getStarSystem("Corvus");
List theStations = system.getOrbitalStations();

for (int orbital = 0; orbital < theStations.size(); orbital++)
{
String s1 = "" + orbital;
SectorEntityToken myStation = (SectorEntityToken)theStations.get(orbital);
String s2 = (String)myStation.getName();
Global.getSectorAPI().addMessage("Station Checker is checking " + s2);
}

Having this around opens up a lot of possibilities.  I need to, er, turn them into something that works now ;)

When more than one Sector exists, Alex, it would be real, real nice if you'd give us a method getLocalSector() that would return the Sector the player's currently in, so that scripts like this can operate anywhere without much hassle or having to iterate through all the Systems and determine which one the player's in, etc. :)

4914
Modding / Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« on: September 04, 2012, 08:13:00 PM »
I'd like some numbers; I'm already skipping a lot of little details, I just want to know if I'm getting close-enough or if I need to redo my bounds again :)

4915
Modding / Re: Starfarer PSA #1: Your Ship's Bounds Polygon Is Too Detailed
« on: September 04, 2012, 07:59:26 PM »
Can you give us some rough guidelines, i.e., what targets to shoot for per size?

4916
Modding / Re: Judgement thread give and receive comments on sprites
« on: September 04, 2012, 10:25:51 AM »
Sorry for not writing it clearly, I can see why that was a confusing sentence if English isn't your first language!

Basically, the light source for Vanilla ships is slightly in front of and above the ships.  Therefore, big objects are going to cast a small, but visible, shadow onto things that they're over.  

Same thing applies to edge highlighting; pick areas where the light's going to fall naturally and give them a boost, using white pixels in a layer using the Soft Light setting (in most cases) and then reduce transparency until it's at the value you think works best.

An example, with before and after shots:


4917
Suggestions / Re: Hull Mod: Re-calibrated Targeting Systems
« on: September 04, 2012, 09:44:53 AM »
+1, although I'd rather see it implemented as a percentile (say, 25%) so that it's less calibrated towards making PD Lasers cross over into useful-against-ships category, same with Vulcans.  It may also need a penalty to keep it reasonably balanced, like a smallish nerf on turret speeds.

I like the overall idea a lot, though; I'll probably add that to my mod :)

4918
Modding Resources / Re: Trylobot's ship editor (2.4.5)
« on: September 04, 2012, 08:04:48 AM »
Would be handy, my middle-mouse wheel is purposefully disabled :)

4919
Modding / Re: Judgement thread give and receive comments on sprites
« on: September 04, 2012, 08:03:49 AM »
This is a very good start, and I like the design, but it requires a great deal of pixel work before it's really game-ready.

Here is some specific critique:

Spoiler
1.  All fuzzy edges need to be blacklined and fixed.  Edges should be clean.
2.  Every panel line needs to have highlights added where appropriate.
3.  While the use of occlusion is strong, the overall effect is washed-out and the tonal quality is almost entirely weighted towards grays.  If you still have this in layers, consider using Curves to boost the light levels in the areas where you can get a better feeling of white.
4.  The blue-green paint areas need a lot of specific pixel fill and careful weathering / rubbing marks.
5.  Use a slightly darker shade in a one-pixel border where the light source (David used one slightly forward, not just directly overhead for the areas where it mattered) would cast shadow.
6.  Use contrast and small greebles to strengthen areas like the small "launch port" area to give them a little more detail and life.
7.  You may want to try a few small point lights on the the darker areas, where the contrast would serve them well and add a lot of life to the ship.
[close]

4920
Another kitbash, the Inferno, for those very nervous tanker captains out there:


Pages: 1 ... 326 327 [328] 329 330 ... 338