Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 56 57 [58] 59 60 ... 141

Author Topic: [0.6.2a] Exerelin - Dynamic Sector and Faction War - v0.644  (Read 917221 times)

jingle

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #855 on: September 25, 2013, 01:18:18 AM »

Are there not supposed to be pirates in this or is my game somehow bugged? I have nothing around me but friendly factions so far and I'm not sure what I should really be doing. I'm excited as hell about playing this though, having more of a clear goal in game should be great.
Logged

PCCL

  • Admiral
  • *****
  • Posts: 2016
  • still gunnyfreak
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #856 on: September 25, 2013, 01:20:34 AM »

ty all, managed to get an actual game going...

Boarding fleets are too OP, IMO. Full atlases worth of supplies (800 per ship) for so little defenders? I killed 2 of those and now has 100,000 creds with nothing to do
Logged
mmm.... tartiflette

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #857 on: September 25, 2013, 02:45:49 AM »

Got the factions working properly, thanks to your help. However, I do run into a really weird error on occasion (thank goodness  I save a ton) that I'm sure anyone who uses the restock mod will wanna know about.

Game crashes with a simple "Fatal: Null". The log file reports the following chunk:

Spoiler
2385688 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
   at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
   at java.util.AbstractList$Itr.next(AbstractList.java:343)
   at com.fs.starfarer.campaign.fleet.CargoData.getItemQuantity(Unknown Source)
   at com.fs.starfarer.campaign.fleet.CargoData.getNumWeapons(Unknown Source)
   at data.scripts.RestockScript.restockWeapons$(RestockScript.java:286)
   at data.scripts.RestockScript.advance(RestockScript.java:187)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.A.super(Unknown Source)
   at com.fs.starfarer.new.øÒÒ000(Unknown Source)
   at com.fs.oOOO.super.new(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
[close]

It seems that Restock doesn't play well with Exerelin. Honestly, I'm not sure why I was running Restock anyway, I think I just left it ticked. The stations stock themselves as they build stuff, so restock is largely redundant to begin with. But at least now I know I SHOULDN'T be using it.

Wasn't trying to cheat to get larger ships, honest...

Exerelin now runs some of its logic in other threads (station inventory management is one of the areas) which will cause a concurrency error if 2 or more threads attemp to modify the same data. So, it is unlikely to play nice with most other mods unfortunately :(

Are there not supposed to be pirates in this or is my game somehow bugged? I have nothing around me but friendly factions so far and I'm not sure what I should really be doing. I'm excited as hell about playing this though, having more of a clear goal in game should be great.

Rebel (essentially pirates) will spawn fleets in systems, but I suggest you declare war (by simply attacking another factions fleet) if you are bored :)

ty all, managed to get an actual game going...

Boarding fleets are too OP, IMO. Full atlases worth of supplies (800 per ship) for so little defenders? I killed 2 of those and now has 100,000 creds with nothing to do

Yeah the new supply cost is a bit of an issue. I could lower te supply cost, but I'll probably just edit the loot after battles to restrict large amounts of supplies/fuel. Thanks for the feedback :)
Logged

Erick Doe

  • Global Moderator
  • Admiral
  • *****
  • Posts: 2489
  • "Pretty cunning, don't you think?"
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #858 on: September 25, 2013, 03:27:41 AM »

Quote
Mining (semi-broken currently)
You can mine (although it's kind of broken at the moment, due to the inability to easily hover) by 'hovering' over an asteroid or gas giant and having mining drone wings in your fleet. The number of wings dictates how much you mine.

Diplomacy Items
You can 'trade' diplomacy items (that appear in your storage facility) to other factions station to change your factions relationship with that faction.

Do Zorg Workers work the same way as mining drones?

Do the different diplomacy items have different effects?
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #859 on: September 25, 2013, 03:29:53 AM »

Got the factions working properly, thanks to your help. However, I do run into a really weird error on occasion (thank goodness  I save a ton) that I'm sure anyone who uses the restock mod will wanna know about.

Game crashes with a simple "Fatal: Null". The log file reports the following chunk:

Spoiler
2385688 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
   at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
   at java.util.AbstractList$Itr.next(AbstractList.java:343)
   at com.fs.starfarer.campaign.fleet.CargoData.getItemQuantity(Unknown Source)
   at com.fs.starfarer.campaign.fleet.CargoData.getNumWeapons(Unknown Source)
   at data.scripts.RestockScript.restockWeapons$(RestockScript.java:286)
   at data.scripts.RestockScript.advance(RestockScript.java:187)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.A.super(Unknown Source)
   at com.fs.starfarer.new.øÒÒ000(Unknown Source)
   at com.fs.oOOO.super.new(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
[close]

It seems that Restock doesn't play well with Exerelin. Honestly, I'm not sure why I was running Restock anyway, I think I just left it ticked. The stations stock themselves as they build stuff, so restock is largely redundant to begin with. But at least now I know I SHOULDN'T be using it.

Wasn't trying to cheat to get larger ships, honest...

Exerelin now runs some of its logic in other threads (station inventory management is one of the areas) which will cause a concurrency error if 2 or more threads attemp to modify the same data. So, it is unlikely to play nice with most other mods unfortunately :(

If you're modifying cargo in a separate thread, it won't play nice with vanilla either. ;)
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #860 on: September 25, 2013, 03:40:04 AM »

Got the factions working properly, thanks to your help. However, I do run into a really weird error on occasion (thank goodness  I save a ton) that I'm sure anyone who uses the restock mod will wanna know about.

Game crashes with a simple "Fatal: Null". The log file reports the following chunk:

Spoiler
2385688 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.util.ConcurrentModificationException
java.util.ConcurrentModificationException
   at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
   at java.util.AbstractList$Itr.next(AbstractList.java:343)
   at com.fs.starfarer.campaign.fleet.CargoData.getItemQuantity(Unknown Source)
   at com.fs.starfarer.campaign.fleet.CargoData.getNumWeapons(Unknown Source)
   at data.scripts.RestockScript.restockWeapons$(RestockScript.java:286)
   at data.scripts.RestockScript.advance(RestockScript.java:187)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.A.super(Unknown Source)
   at com.fs.starfarer.new.øÒÒ000(Unknown Source)
   at com.fs.oOOO.super.new(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
[close]

It seems that Restock doesn't play well with Exerelin. Honestly, I'm not sure why I was running Restock anyway, I think I just left it ticked. The stations stock themselves as they build stuff, so restock is largely redundant to begin with. But at least now I know I SHOULDN'T be using it.

Wasn't trying to cheat to get larger ships, honest...

Exerelin now runs some of its logic in other threads (station inventory management is one of the areas) which will cause a concurrency error if 2 or more threads attemp to modify the same data. So, it is unlikely to play nice with most other mods unfortunately :(

If you're modifying cargo in a separate thread, it won't play nice with vanilla either. ;)

Ah because fleets dump stuff at stations sometimes on despawn? And other things too? Yeah... Hmmm might have to move that part out then I guess. Pity, it made a fairly noticble difference. Actually, if I could stop vanilla code from modifying cargo at all that would be great; it throws some of the balancing out a bit. I guess I can't lock/guard/check the cargo either...

Thanks :)
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #861 on: September 25, 2013, 04:53:49 AM »

You can still have most of the work done in another thread; only the actual alterations to the cargo need to be done in the main thread.

Basically, your second thread would grab the stacks copy, do the needed analysis, etc, but instead of making alterations to the station's contents, you'd want to put a list of instructions into a queue that's handled by an EveryFrameScript in the main thread (this queue variable needs to be thread-safe, check out ConcurrentLinkedQueue).

Here's a simple example of an EveryFrameScript that would check a thread-safe queue for instructions every frame (not tested!):

ExampleQueue.java:
Code
package data.scripts.plugins;

import com.fs.starfarer.api.EveryFrameScript;
import data.scripts.commands.BaseCommand;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;

// Keep a reference to this object in your mod's
// master script, otherwise it's worthless
public class ExampleQueue implements EveryFrameScript
{
    private final Queue queuedCommands = new ConcurrentLinkedQueue();

    @Override
    public boolean isDone()
    {
        return false;
    }

    @Override
    public boolean runWhilePaused()
    {
        return false;
    }

    @Override
    public void advance(float amount)
    {
        synchronized (queuedCommands)
        {
            BaseCommand tmp;
            while (!queuedCommands.isEmpty())
            {
                tmp = (BaseCommand) queuedCommands.remove();
                tmp.executeCommand();
            }
        }
    }

    public synchronized void addCommandToQueue(BaseCommand command)
    {
        queuedCommands.add(command);
    }

    public synchronized boolean isQueueEmpty()
    {
        return queuedCommands.isEmpty();
    }
}


The queue holds a list of commands that need to be executed in the main thread. The commands are defined by a simple interface:

BaseCommand.java:
Code
package data.scripts.commands;

public interface BaseCommand
{
    public void executeCommand();
}


And an example BaseCommand implementation (this one for removing cargo, since that's what brought this up):

RemoveCargo.java:
Code
package data.scripts.commands;

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

public class RemoveCargo implements BaseCommand
{
    private CargoAPI cargo;
    private Object data;
    private CargoAPI.CargoItemType type;
    private float toRemove;

    public RemoveCargo(CargoAPI cargo, Object stackData,
            CargoAPI.CargoItemType stackType, float toRemove)
    {
        this.cargo = cargo;
        this.data = stackData;
        this.type = stackType;
        this.toRemove = toRemove;
    }

    @Override
    public void executeCommand()
    {
        cargo.removeItems(type, data, toRemove);
    }
}


So if your second thread needs to remove 500 green crew from a station's cargo, instead of doing so directly it'd use something like the following:
Code
ClassThatKeepsTrackOfVariables.getCommandQueue().addCommandToQueue(new RemoveCargo(station.getCargo(), "green_crew", CargoItemType.RESOURCES, 500f));

And the crew would be removed the next game frame.

An important thing to note, though, is that you'd want to check isQueueEmpty() before starting your analysis 'frame'. Otherwise you'll have problems where your second thread runs multiple times between game frames and ends up removing 1000+ crew because the RemoveCargo command hasn't run yet, so the station still registers as having too much crew.

This method is how the console mod handles being multi-threaded, at least. There are probably better ways of doing it, and I am by no means an expert at threading. :)
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #862 on: September 25, 2013, 06:02:56 AM »

@LazyWizard

Yep OK not a bad idea. Thanks heaps for the in-depth examples :) (you should be a teacher) I can definitely see that approach working.

Although it seems like a small thing, it has improved performance on my slow dual core quite a bit by moving things off the main game thread. With multi-systems, it means more *stuff* and so if I can get this to work in a thread-safe way that would be great :)

Quote
Mining (semi-broken currently)
You can mine (although it's kind of broken at the moment, due to the inability to easily hover) by 'hovering' over an asteroid or gas giant and having mining drone wings in your fleet. The number of wings dictates how much you mine.

Diplomacy Items
You can 'trade' diplomacy items (that appear in your storage facility) to other factions station to change your factions relationship with that faction.

Do Zorg Workers work the same way as mining drones?

Do the different diplomacy items have different effects?

Sorry Erick forgot to reply to this!

Yeah Zorg Workers can also act as mining drones. I'll add that.

Yep, the effects are as follows:
 - Prisoner; increases your factions relationship with the faction you deliver the prisoner to
 - Agent; attempts to create a division between the faction you plant the agent at and another faction (not yours)
   - Small chance to backfire, resulting in a relationship loss between your faction and thiers
   - Small chance to fail with no penalties
 - Saboteur; causes a station explosion that reduces a station efficiency and destroys resources (including marines), weapons and ships on the station they are planted on. Good for softening up before boarding.

Also, if you use multiple diplomacy items they will run one after another.
Logged

Erick Doe

  • Global Moderator
  • Admiral
  • *****
  • Posts: 2489
  • "Pretty cunning, don't you think?"
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #863 on: September 25, 2013, 06:24:02 AM »

Thank you, Zaphide. Very informative.  :)
Logged

xeranes

  • Ensign
  • *
  • Posts: 12
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #864 on: September 25, 2013, 10:26:15 AM »

Despite the hovering error, is it still possible to mine?


Also, how does the omnifactory work?
Logged

joey4track

  • Commander
  • ***
  • Posts: 108
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #865 on: September 25, 2013, 11:53:38 AM »

I LOVE the idea of random independent trading stations!

And if I give a prisoner to a faction I am neutral with there may be a chance to improve to allies??
Logged

Tchey

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
    • Jeux1d100
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #866 on: September 25, 2013, 12:22:48 PM »

Thank you for the updates.

I cannot load it. I'm running the game on Linux and after the loading screen the game crashes.

The log file gives this :

Code
53844 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.lang.RuntimeException: Error compiling [data.scripts.plugins.CharacterCreationPluginImpl]
java.lang.RuntimeException: Error compiling [data.scripts.plugins.CharacterCreationPluginImpl]
at com.fs.starfarer.loading.scripts.ScriptStore$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Compiling unit "data/scripts/world/exerelin/SectorManager.java"
at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:212)
at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:164)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
Caused by: org.codehaus.commons.compiler.CompileException: File data/scripts/world/exerelin/SystemStationManager.java, Line 7, Column 7: Imported class "org.lazywizard.lazylib.MathUtils" could not be loaded
at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:9403)

I tried with Exerelin alone and with Gedune faction.

Also, can you host the file somewhere else ? Bitbucket is censored in some countries. I can bypass it with tools like Tor but it may be more convenient for other people.
« Last Edit: September 25, 2013, 12:39:31 PM by ( Tchey ) »
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #867 on: September 25, 2013, 12:50:52 PM »

Despite the hovering error, is it still possible to mine?


Also, how does the omnifactory work?

It is if you can position your fleet correctly (slow moving asteroids and gas giants should be OK).

Actually, LazyWizard's next version of LazyLib will apparently contain a method that may be able to solve the mining issue, so by StarSector 0.6.1 there should be a fix for it in some form :)

The OmniFactory will reproduce(up to a stack size maximum) any ships/weapons you give it.

I LOVE the idea of random independent trading stations!

And if I give a prisoner to a faction I am neutral with there may be a chance to improve to allies??

It increases your relationship by a base amount. From memory, you'll need between 1-8 prisoners to force an instant alliance (depending on your factions and the other factions relationship to each other), but the relationship system works like a pendulum swing; if you start it one direction it will continue with that 'bias' for a while before returning back towards neutral. There is a bit of randomisation in there as well, but there is a definite trend.

Thank you for the updates.

I cannot load it. I'm running the game on Linux and after the loading screen the game crashes.

The log file gives this :
Spoiler
Code
53844 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.lang.RuntimeException: Error compiling [data.scripts.plugins.CharacterCreationPluginImpl]
java.lang.RuntimeException: Error compiling [data.scripts.plugins.CharacterCreationPluginImpl]
at com.fs.starfarer.loading.scripts.ScriptStore$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Compiling unit "data/scripts/world/exerelin/SectorManager.java"
at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:212)
at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:164)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 2 more
Caused by: org.codehaus.commons.compiler.CompileException: File data/scripts/world/exerelin/SystemStationManager.java, Line 7, Column 7: Imported class "org.lazywizard.lazylib.MathUtils" could not be loaded
at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:9403)
[close]
I tried with Exerelin alone and with Gedune faction.

Also, can you host the file somewhere else ? Bitbucket is censored in some countries. I can bypass it with tools like Tor but it may be more convenient for other people.

You'll need to have LazyLib 1.5 installed and running.

RE hosting:
No worries I'll look into it. That is pretty annoying :( Any recommendations?
Logged

Sidie Hawkton

  • Ensign
  • *
  • Posts: 23
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #868 on: September 25, 2013, 02:49:49 PM »

I might just be missing an update or in topic post but I'm not able to load any saves...  I'm running (having made the changes needed per download post):
Exerelin 0.6
Lazylib 1.5
Bushi 1
Hiigarian 1
Junk Pirates 1.61b
Kadur Theocracy 1.1.4
Neutrino 1.7
Shadowyards 0.4.2
Gedune 1

I've been trying to play 4 systems, small max, 12 planets, 4 asteroids, 15 stations, omnifactory, all factions, respawn all every 2 months, starting as Neutrino Singularity (at least this faction has major fleet control issues right off the bat due to the big ships logistic cost unless you use all 3&3 points to up it).  Upon any load, after having taken first station, I'm no longer able to load the save.

I'm not sure what I'm looking for in the log, but I notice:
419726 [Thread-6] ERROR com.fs.starfarer.campaign.save.CampaignGameManager  - Could not call com.fs.starfarer.campaign.accidents.AccidentManager.readResolve() : null : Could not call com.fs.starfarer.campaign.accidents.AccidentManager.readResolve() : null
---- Debugging information ----
message             : Could not call com.fs.starfarer.campaign.accidents.AccidentManager.readResolve() : null
cause-exception     : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message       : Could not call com.fs.starfarer.campaign.accidents.AccidentManager.readResolve() : null
class               : com.fs.starfarer.campaign.accidents.AccidentManager
required-type       : com.fs.starfarer.campaign.accidents.AccidentManager
converter-type      : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path                : /CampaignEngine/modAndPluginData/persistentData/entry/map/entry[5]/FleetMember/fleetData/fleet/accidentManager
line number         : 123853
class[1]            : com.fs.starfarer.campaign.fleet.CampaignFleet
class[2]            : com.fs.starfarer.campaign.fleet.FleetData
class[3]            : com.fs.starfarer.campaign.fleet.FleetMember
class[4]            : java.util.HashMap
converter-type[1]   : com.thoughtworks.xstream.converters.collections.MapConverter
class[5]            : com.fs.starfarer.campaign.ModAndPluginData
class[6]            : com.fs.starfarer.campaign.CampaignEngine
converter-type[2]   : com.fs.starfarer.campaign.save.void
version             : null
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: [0.6a] Exerelin - Dynamic Sector and Faction War - v0.6
« Reply #869 on: September 25, 2013, 04:34:28 PM »

I might just be missing an update or in topic post but I'm not able to load any saves... 
--- snip ---

Hmmm, just ran a couple of tests and didn't have any issues. I'll have another look this evening as all my faction mods may not be the latest versions.

If you run Exerelin without any faction mods do you still have the same issue?

The only thing that I can initially think of is memory issues (as Exerelin has fairly large save files) and something may be going wrong in the save/load process. There are some links in the OP about increasing memory allocation to StarSector.

Quote
(at least this faction has major fleet control issues right off the bat due to the big ships logistic cost unless you use all 3&3 points to up it)

Yeah it does. Not a nice trap for newer players but the Neutrino super-freighters are a class above, and so flavor over functionality here unfortunately :)
Logged
Pages: 1 ... 56 57 [58] 59 60 ... 141