Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 [2]

Author Topic: [REDACTED] systems  (Read 3308 times)

Nerzhull_AI

  • Commander
  • ***
  • Posts: 186
  • Do you exist in your dreams?
    • View Profile
Re: [REDACTED] systems
« Reply #15 on: September 22, 2019, 06:55:42 PM »

Or if you can find allowedUnusedFraction somewhere, try upping that.
Okaaaay, i think i found it.
Code
public class SectorThemeGenerator {

public static List<ThemeGenerator> generators = new ArrayList<ThemeGenerator>();

static {
generators.add(new DerelictThemeGenerator());
generators.add(new RemnantThemeGenerator());
generators.add(new RuinsThemeGenerator());
generators.add(new MiscellaneousThemeGenerator());
}

public static void generate(ThemeGenContext context) {
Collections.sort(generators, new Comparator<ThemeGenerator>() {
public int compare(ThemeGenerator o1, ThemeGenerator o2) {
int result = o1.getOrder() - o2.getOrder();
if (result == 0) return o1.getThemeId().compareTo(o2.getThemeId());
return result;
}
});

float totalWeight = 0f;
for (ThemeGenerator g : generators) {
totalWeight += g.getWeight();
g.setRandom(StarSystemGenerator.random);
}

for (ThemeGenerator g : generators) {
float w = g.getWeight();

float f = 0f;
if (totalWeight > 0) {
f = w / totalWeight;
} else {
if (w > 0) f = 1f;
}
//g.setRandom(StarSystemGenerator.random);
g.generateForSector(context, f);

//float used = context.majorThemes.size();
totalWeight -= w;

}
}




}
getWeight always returns 100, so f (allowedUnusedFraction) is always 0.25
Still not sure what context.majorThemes.size returns, but here's thing, context.constellations.size() should return 100 in base game, and i got ~20 systems in first playthrough. Maybe "majorThemes" just unused in base game, hell if i'm know. If it is that way, remnants capped at 25% of free sector systems = 25 remnant systems maximum at default map. Since i changed amount of constellations through mod, maybe it just returned base value of 100 and *** me. I'll try something to see how it works.
Logged

Nerzhull_AI

  • Commander
  • ***
  • Posts: 186
  • Do you exist in your dreams?
    • View Profile
Re: [REDACTED] systems
« Reply #16 on: September 22, 2019, 07:16:06 PM »

So i turned Grand Sector off, changed number of cinstellations from 100 to 300, adjusted overall sector size and MIN/MAX remnant system to 75 and 125 respectfully. Reverted other changes back to default.

It seems that i'm done with researching game files. So the only thing i need right now is info about how i make these adjustments as a mod package, without direct intervention into the game files.
And maybe some more info about derelict motherships. It seems that cryosleeper count is hard 2, but there's some magick with motherships that i'm unsure of.
« Last Edit: September 22, 2019, 07:19:46 PM by Nerzhull_AI »
Logged
Pages: 1 [2]