Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 23

Author Topic: [0.9.1a] Vayra's Sector 3.2 - back from the dead 2021-02-11  (Read 263192 times)

Hrothgar

  • Captain
  • ****
  • Posts: 304
    • View Profile
    • Email
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #30 on: August 23, 2019, 12:53:49 AM »

I ran into an issue caused by the recent mod split. Basically, if you try to start a new Nexerelin campaign with one of the colonial competitor factions/fleets (Warhawk Republic, Ashen Keepers, etc.), then you will crash to desktop.

Anyway, it should be a fairly straightforward fix if I'm understanding the problem correctly (i.e. just move the colonial competitor blueprint entries from the Kadur Remnant mod to a new special_items.csv file for this mod).

The smae and its working.

Also theme music for People Front are terrible. TERRIBLE. Its *** torture to listen. The quality is is low than the lowest.


That's the point, it's glorious.
Logged

Offensive_Name

  • Lieutenant
  • **
  • Posts: 61
    • View Profile
    • Email
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #31 on: August 23, 2019, 01:35:59 AM »

I ran into an issue caused by the recent mod split. Basically, if you try to start a new Nexerelin campaign with one of the colonial competitor factions/fleets (Warhawk Republic, Ashen Keepers, etc.), then you will crash to desktop.

Anyway, it should be a fairly straightforward fix if I'm understanding the problem correctly (i.e. just move the colonial competitor blueprint entries from the Kadur Remnant mod to a new special_items.csv file for this mod).

The smae and its working.

Also theme music for People Front are terrible. TERRIBLE. Its *** torture to listen. The quality is is low than the lowest.
All the more reason to kill those pinkos.
Logged

Hrothgar

  • Captain
  • ****
  • Posts: 304
    • View Profile
    • Email
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #32 on: August 23, 2019, 01:40:08 AM »

I think there is some spiritual connection :

https://www.youtube.com/watch?v=1yHbAhFnfrA
Logged

Morathar

  • Lieutenant
  • **
  • Posts: 64
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #33 on: August 23, 2019, 07:39:00 AM »

I didn't want to post anything until I did more testing, but now that I've played around with it for a few hours, I'm fairly certain that the raider base information isn't getting saved/loaded properly. From what I can tell, raider bases only spawn properly in a new campaign during your initial gaming session. (For reference purposes, I'm considering a "gaming session" to be running/exiting the Starsector executable itself - not simply exiting a campaign back to the main menu and then loading a saved campaign.)

Rather than go into a rambling summary of all the different things I tried that led me to this conclusion, let me just give a quick series of steps that should reproduce the issue:
Spoiler
- Start a new campaign with Kadur Remnant, Vayra's Sector, Nexerelin, and whatever other mods you desire enabled.
- Save the game once you've started flying around after sector generation. (Do NOT save again after this point...)
- Use Nex's faction directory feature (defaults to 'z' key - not sure if you can change it) to see which markets Kadur owns.
- Speed up time with the 'shift' key until a month or two passes.
- Check the faction directory again - it should indicate that Kadur now has 1 Hidden market (i.e. the raider base).
- Exit the campaign and shut down Starsector completely WITHOUT saving.
- Restart the game and load/continue the save.
- From this point forward, month after month will pass without ever spawning a Kadur raider base.
[close]
There are probably much more efficient ways of reproducing this problem, but I wasn't sure if using something like the vayraDebug flag in the settings file would mess with the results.

Normally, this is the point where I'd try to suggest a fix (or at least some spot in the code to look at), but I'm really not sure how Starsector decides what to save/load. I can suggest a really silly workaround for players that seems to temporarily fix the problem though. Due to the VayraRaiderBaseManager class storing the raider data as a static member, you could start a brand new campaign, immediately exit (and delete) that new campaign after sector generation, and then load your previously saved campaign. This little trick should keep the raider data in memory (and allow them to spawn bases as expected) for the rest of the gaming session...
Logged

Morathar

  • Lieutenant
  • **
  • Posts: 64
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #34 on: August 23, 2019, 01:33:39 PM »

Hmm, I think the unique bounties may have the same strange save/load issue across gaming sessions as well. After setting the uniqueBountySpawnChance to 1.0 (instead of the default 0.15), the Crow/Black Talon bounty reliably shows up after a month or so into a new campaign as long as it's the same gaming session where I started the campaign. However, if I've restarted Starsector, then I can go months without the bounty ever appearing.

The same workaround (of creating a temporary campaign to reload the values) seems to work here as well, but I wonder if it might cause problems if I'd already completed the bounty. (The same Crow/Black Talon bounty might show up over and over using this goofy trick...)
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 259
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #35 on: August 25, 2019, 12:41:02 PM »

Ashen Keepers colonize one world in my game but they didn't build anything on it(outside spaceport and Patrol HQ) not even mine and have no leader to give them cores.
Is this intended?
Also do they colonize new worlds build industry eventually?

Hrothgar

  • Captain
  • ****
  • Posts: 304
    • View Profile
    • Email
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #36 on: August 25, 2019, 01:15:19 PM »

They do, but they colonised worthy planet, or like stormhawk revolutionists or whatev, a basically bunch of sand with nothing on it?
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 259
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #37 on: August 25, 2019, 01:25:32 PM »

Bunch of sand far away from everything.

Morathar

  • Lieutenant
  • **
  • Posts: 64
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #38 on: August 25, 2019, 02:08:32 PM »

I apologize for monopolizing your thread, but I think you'll probably like this post more than my last two. On second thought, "like" may not be the right word - you'll actually probably dislike the implications of what I've uncovered. Regardless, I hope you at least appreciate the information because I certainly appreciate all the effort you've put into making the various frameworks included in this mod...

Anyway, I believe I've discovered the cause of the issues mentioned in those other two posts. Here's my theory (hidden behind spoilers for those who don't care to read all the boring details):

Spoiler
None of the static member variables of classes like VayraRaiderBaseManager are getting initialized properly unless the onNewGameAfterTimePass() method is called first. This is why everything works properly during a new campaign (or when I start a temporary new campaign), but some things are broken if you just load the saved campaign in later gaming sessions. Why is this happening?

- First, from what I can tell, Starsector uses Java's serialization to preserve the state of various scripts (like VayraRaiderBaseManager) in campaign.xml.
- Second, static variables are not saved during serialization. This explains why members like the RAIDERS HashMap aren't getting saved with the other VayraRaiderBaseManager data stored in campaign.xml. Obviously, this isn't ideal, but it didn't seem like a problem because I thought they'd just get reloaded when the class constructor got called when reloading the saved campaign.
- Third, the class constructor is NOT called during the Java de-serialization process. From what I've read, Java only calls the constructor of the first non-serializable parent class, which I'm guessing isn't the VayraRaiderBaseManager class in this case. I suppose this makes sense given that the object is being recreated from the serialized data, but it's rather unfortunate in this specific case because it means the class never gets to call its loadData() method and never reloads the data from raider_factions.csv...

This theory explains the behavior I've seen in each of the following cases:

- VayraRaiderBaseManager: the RAIDERS HashMap and 'loaded' boolean are static and not serialized. Data is loaded in the class constructor (via the loadData() method). As a result, raider bases stop spawning in future gaming sessions because RAIDERS is empty and never reloaded.
SUGGESTED QUICK FIX: Add a method to VayraRaiderBaseManager that will always get called every game session (advance() perhaps?) and move the loadData() method there.

- VayraUniqueBountyManager: the BOUNTIES HashMap is static and not serialized. The 'loaded' boolean is NOT static and is serializable, so it gets saved to campaign.xml. Data is loaded once in the advance() method (via the loadBounties() method). At first glance this should work, but due to the mismatch between static (BOUNTIES) and non-static (loaded) data, the serialization process can result in those values being out of sync in future gaming sessions. (Basically, 'loaded' will be saved/reloaded as TRUE, but BOUNTIES will be empty and never reread from the file.) As a result, unique bounties stop spawning in future gaming sessions because BOUNTIES is empty.
SUGGESTED QUICK FIX: Make the 'loaded' boolean static as well. This should cause the entire BOUNTIES HashMap to be reloaded in future gaming sessions, and I think your purgeBountiesIfNeeded() method will remove those that are already completed.

Now, this is the part you'll probably dislike - the implications if my theory is correct. Basically, any script that uses a static HashMap, HashSet, ArrayList, etc. is at risk of suffering from this issue to some degree. At some point, you'll probably want to go through all of them and double-check that their static data is properly loaded/reloaded and that none of their constructors do anything that doesn't get saved somewhere.
[close]

Edit: OK, I don't feel so bad about "monopolizing" the thread since three posts were made while I was writing my book/post. Please go ahead and ignore that comment...
« Last Edit: August 25, 2019, 02:11:06 PM by Morathar »
Logged

Vayra

  • Admiral
  • *****
  • Posts: 598
  • jangala delenda est
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #39 on: August 25, 2019, 03:14:15 PM »

I apologize for monopolizing your thread, but I think you'll probably like this post more than my last two. On second thought, "like" may not be the right word - you'll actually probably dislike the implications of what I've uncovered. Regardless, I hope you at least appreciate the information because I certainly appreciate all the effort you've put into making the various frameworks included in this mod...

Anyway, I believe I've discovered the cause of the issues mentioned in those other two posts. Here's my theory (hidden behind spoilers for those who don't care to read all the boring details):

Spoiler
None of the static member variables of classes like VayraRaiderBaseManager are getting initialized properly unless the onNewGameAfterTimePass() method is called first. This is why everything works properly during a new campaign (or when I start a temporary new campaign), but some things are broken if you just load the saved campaign in later gaming sessions. Why is this happening?

- First, from what I can tell, Starsector uses Java's serialization to preserve the state of various scripts (like VayraRaiderBaseManager) in campaign.xml.
- Second, static variables are not saved during serialization. This explains why members like the RAIDERS HashMap aren't getting saved with the other VayraRaiderBaseManager data stored in campaign.xml. Obviously, this isn't ideal, but it didn't seem like a problem because I thought they'd just get reloaded when the class constructor got called when reloading the saved campaign.
- Third, the class constructor is NOT called during the Java de-serialization process. From what I've read, Java only calls the constructor of the first non-serializable parent class, which I'm guessing isn't the VayraRaiderBaseManager class in this case. I suppose this makes sense given that the object is being recreated from the serialized data, but it's rather unfortunate in this specific case because it means the class never gets to call its loadData() method and never reloads the data from raider_factions.csv...

This theory explains the behavior I've seen in each of the following cases:

- VayraRaiderBaseManager: the RAIDERS HashMap and 'loaded' boolean are static and not serialized. Data is loaded in the class constructor (via the loadData() method). As a result, raider bases stop spawning in future gaming sessions because RAIDERS is empty and never reloaded.
SUGGESTED QUICK FIX: Add a method to VayraRaiderBaseManager that will always get called every game session (advance() perhaps?) and move the loadData() method there.

- VayraUniqueBountyManager: the BOUNTIES HashMap is static and not serialized. The 'loaded' boolean is NOT static and is serializable, so it gets saved to campaign.xml. Data is loaded once in the advance() method (via the loadBounties() method). At first glance this should work, but due to the mismatch between static (BOUNTIES) and non-static (loaded) data, the serialization process can result in those values being out of sync in future gaming sessions. (Basically, 'loaded' will be saved/reloaded as TRUE, but BOUNTIES will be empty and never reread from the file.) As a result, unique bounties stop spawning in future gaming sessions because BOUNTIES is empty.
SUGGESTED QUICK FIX: Make the 'loaded' boolean static as well. This should cause the entire BOUNTIES HashMap to be reloaded in future gaming sessions, and I think your purgeBountiesIfNeeded() method will remove those that are already completed.

Now, this is the part you'll probably dislike - the implications if my theory is correct. Basically, any script that uses a static HashMap, HashSet, ArrayList, etc. is at risk of suffering from this issue to some degree. At some point, you'll probably want to go through all of them and double-check that their static data is properly loaded/reloaded and that none of their constructors do anything that doesn't get saved somewhere.
[close]

Edit: OK, I don't feel so bad about "monopolizing" the thread since three posts were made while I was writing my book/post. Please go ahead and ignore that comment...

Thanks for this, that's a huge help actually. Implemented the changes you suggested and I'll try to look at the other scripts and throw a patch out tonight.
Logged
Kadur Remnant: http://fractalsoftworks.com/forum/index.php?topic=6649
Vayra's Sector: http://fractalsoftworks.com/forum/index.php?topic=16058
Vayra's Ship Pack: http://fractalsoftworks.com/forum/index.php?topic=16059

im gonna push jangala into the sun i swear to god im gonna do it

Offensive_Name

  • Lieutenant
  • **
  • Posts: 61
    • View Profile
    • Email
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #40 on: August 26, 2019, 08:39:00 PM »

Is he chance of being hunted when a bounty is placed on you influenced by your relationship with the independent? I have a 180k bounty on me for taking out a hegemony trade fleet and all I have is a couple destroyers and some frigates, yet it says it will be extremely rare if I get hunted for the bounty. I want to try out this bounty system but it seems it is too hard to get people to actually go after you. maybe have some other factions hunt me if my relations with the independents is what is causing the lack of action.
Logged

Peanut Man

  • Ensign
  • *
  • Posts: 17
  • Peanut Man, Unsalted!
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #41 on: August 27, 2019, 04:22:19 AM »

Hello! I seem to be a well of problem! :D recently. I started running into a crash that resulted from what seems to be the treasure fleet! Fatal: Texture [vayra_treasurefleet] from category [intel] not found.   I'm not too sure what it might mean hoping to get some help when you have the time! And sorry if I'm not using the expected format, quite new to the forum and it's tools! Edit: if additionally information is needed, is be happy to post/adjust my post!
« Last Edit: August 27, 2019, 04:24:26 AM by Peanut Man »
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 259
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.3 BOUNTY BUG FIXED 2019-08-20
« Reply #42 on: August 29, 2019, 11:08:00 AM »

The People Armada mod ship is suppose to buff speed or cost of recovering the CR but instead its slow its by half.

New Emergent factions don't have a person to whom you can turn cores or take commission(at last the Havk and Red faction for sure) at their colonies. If they take some from core factions they get some at their new conquered world.

Vayra

  • Admiral
  • *****
  • Posts: 598
  • jangala delenda est
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.4 - Absolutely No Bugs I Swear 2019-08-29
« Reply #43 on: August 29, 2019, 08:33:43 PM »

HI everyone! Sorry it took so long, but Update to 3.0.4 is OUT! Download and changelog in the OP.  ;D

Short version: lots of bug fixes. That treasure fleet intel crash should be gone, and unique bounties should spawn reliably now.
Logged
Kadur Remnant: http://fractalsoftworks.com/forum/index.php?topic=6649
Vayra's Sector: http://fractalsoftworks.com/forum/index.php?topic=16058
Vayra's Ship Pack: http://fractalsoftworks.com/forum/index.php?topic=16059

im gonna push jangala into the sun i swear to god im gonna do it

Kastor

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: [0.9.1a] Vayra's Sector v3.0.4 - Absolutely No Bugs I Swear 2019-08-29
« Reply #44 on: August 29, 2019, 11:38:00 PM »

Please consider changing the color of Starhawk Republic. It's barely visible :(
Logged
Pages: 1 2 [3] 4 5 ... 23