Fractal Softworks Forum

Please login or register.

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

Author Topic: [0.9.1a] 'Remnant-like' mod factions - Fleet generation issues - Ship Tags  (Read 5153 times)

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile

I'm posting this for information, and slightly reluctantly, however I can't quite decide whether it is intended behaviour or not and seems sensible to at least raise it. At the very least it appears to point to some weirdness which might be worth looking at, regardless - or perhaps can be quickly explained.

I'll try and be clear about this, apologies if it stops making sense ...


The crux of the issue is that I was finding that my 'remnant-like' stations / factions were not creating live fleets, in my generated 'remnant-like' systems.

All seemed to be nearly working - It would generate the fleets, in new systems, all tagged with my set themes and all as expected (e.g. at inner system jump points or from Stations) however they would NOT populate with ships I intended for them. Empty fleet would, effectively, immediately despawn when player arrives in locality.

The problem was found to be resolved by changing the 'tag' in the ship_data.csv and generating a completely new tag for the faction fleet ships. Existing mod 'blueprint tags' didn't appear to work for this.


GENERALLY THIS IS WHAT I DID

a) Use fleetFactoryV3 to make fleet from my .faction in a new remnant system. May be from battle station or just at a set point in space. Behaviour very closely mimicking that of the Remnants in terms of generation. Ship list I want to generate from is via (e.g.) Junk_Pirates_BP tag, as defined in .faction file for knownShips.
No ships generate in fleet. Fleet immediately despawns upon teleportation (via console commands) directly to fleet position. Stations continually spew out blank fleets.

b) Try other faction ship tags (all inevitably part of a BP set, as this seems to make sense, right?)
Same behaviour.

c) Try base_bp tag in .faction file for knownShips.
Ships generate in fleets, but only those with base_bp as tag (Ventures etc.) and not those with my custom BP tags.

d) Try market to null; quality overrides, custom_bp tag into shipsWhenImporting etc.
No change, empty fleets or full of base_bp ships.

d) Add new discrete tags to ships that I want to appear in 'special' fleets. Add this tag to the .faction file.
Ships spawn as originally expected! (I will note this is actually in line with the 'remnant' tag for vanilla case which does not link to a blueprint set)


I can't directly identify why my fix works, but to me it points potentially to things working differently to how it may be planned - and may suggest a potential blocker for widening out the mechanisms already in place due perhaps to some unintended checks / weirdness in the code.

My theory is that something in the code is locking out those types of ships which are generated via a BP / Heavy Industry - as it makes sense that there will be a check in there for something like this to stop it. I may well be wrong.

No apparently present overrides are working to offset this in this case (e.g. setting source market to null; which appears to be a designed-for case in fleetfactoryV3 or giving quality overrides to the fleetfactory).

Cheers,

mendonca
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24118
    • View Profile

(Let me move this to Modding; this may well be a bug, but that subforum is more conducive to a longer conversation.)

Are you always adding to shipsWhenImporting alongside knownShips? I would guess your faction doesn't have any colonies with ship production, and would therefore only have access to hulls from the "shipsWhenImporting" section; adding stuff to knownShips would have no effect in that situation.

One thing to consider: ships available to a faction only get refreshed when you start a new campaign. Is it possible that you had stuff in knownShips (which didn't work), then tried doing a bunch of stuff that should've worked (but didn't due to the game not picking it up), and then started a new game where stuff in the second d) step actually worked?


(The reason it doesn't pick up stuff is that available ships can be changed dynamically, right - it'd be odd if say some event removed a faction's access to a ship, and that got reset next time the game was loaded. It can definitely be confusing and inconvenient when working on a faction, though...)
Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile

(Let me move this to Modding; this may well be a bug, but that subforum is more conducive to a longer conversation.)

Yep, makes sense.

Quote
Are you always adding to shipsWhenImporting alongside knownShips? I would guess your faction doesn't have any colonies with ship production, and would therefore only have access to hulls from the "shipsWhenImporting" section; adding stuff to knownShips would have no effect in that situation.
Honestly, not always. But I've tried quite a lot of iterations of various things to try and work round it. I'm reasonably sure it includes adding this in (albeit don't have all the .faction files I've used for this troubleshooting exercise so can never say never).

Would you explicitly need to add in knownShips and shipsWhenImporting? Would something in shipsWhenImporting spawn regardless of knownShips? (I've most certainly tried introducing additional custom bp tags to shipsWhenImporting; can't 100% verify right now that I've added both to shipsWhenImporting AND knownShips - until I got it 'fixed' - in fairness this sounds like something my stubbornness gene(s?) would almost definitely have convinced me in a really sinister subconscious way that I wouldn't need to do this.)

Quote
One thing to consider: ships available to a faction only get refreshed when you start a new campaign. Is it possible that you had stuff in knownShips (which didn't work), then tried doing a bunch of stuff that should've worked (but didn't due to the game not picking it up), and then started a new game where stuff in the second d) step actually worked?

(The reason it doesn't pick up stuff is that available ships can be changed dynamically, right - it'd be odd if say some event removed a faction's access to a ship, and that got reset next time the game was loaded. It can definitely be confusing and inconvenient when working on a faction, though...)

Every test session was started with new game - then using console commands quickly iterate over the systems to find a relevant theme; then jump and quickly search for a test case (battlestation, normally).
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile

Hello,

My Remnant-like faction, SAD, do not seems to have a problem, do not hesitate to look on it(Look the code on bitbucket).
Spoiler
[close]
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24118
    • View Profile

Would you explicitly need to add in knownShips and shipsWhenImporting? Would something in shipsWhenImporting spawn regardless of knownShips? (I've most certainly tried introducing additional custom bp tags to shipsWhenImporting; can't 100% verify right now that I've added both to shipsWhenImporting AND knownShips - until I got it 'fixed' - in fairness this sounds like something my stubbornness gene(s?) would almost definitely have convinced me in a really sinister subconscious way that I wouldn't need to do this.)

I'm not actually sure - I want to say it doesn't need to be added to both, but looking at the code, there's one case where I think it *would* need to be added to both to work.

Every test session was started with new game - then using console commands quickly iterate over the systems to find a relevant theme; then jump and quickly search for a test case (battlestation, normally).

If it's not too much of a hassle - could you send me a link to a version where it's in both shipsWhenImporting and knownShips, that you think should work but doesn't? I could take a look and see what's going on.

Re-reading your initial post, I'm not actually clear on what the conditions are - i.e. "Junk_Pirates_BP" from point a) sounds like "new discrete tags" from point d2), so I'm not exactly sure what you mean here.
Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile

If it's not too much of a hassle - could you send me a link to a version where it's in both shipsWhenImporting and knownShips, that you think should work but doesn't? I could take a look and see what's going on.
No I can't. I've just checked and this actually does resolve the issue.  :-[

(I obviously just did not check this; I even went through this with somebody else as a potential solution, tested it, and told them it didn't work; I think some of my tags just look very similar and I've passed this one over through error)

Quote
Re-reading your initial post, I'm not actually clear on what the conditions are - i.e. "Junk_Pirates_BP" from point a) sounds like "new discrete tags" from point d2), so I'm not exactly sure what you mean here.

So; as above - solving the issue obviously just meant taking it back to first principles. Creating a whole new set of tags allowed me to overcome the issue by ... eh ... doing the set up properly rather than just thinking I've done it properly.

So it appears that we DO need both shipsWhenImporting and knownShips for factions without ship production ... heh ... sorry for this one and thank you for looking into it, I am glad it's clear now at least.
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24118
    • View Profile

Whew, glad this works - no worries! Apologies, for, ah, not documenting it better/at all; can totally see how it would be a pain to sort through.

Btw, I looked into it a bit more: looks like the only case where "shipsWhenImporting" that are *not* in "knownShips" will get used is if the ship pick mode is ShipPickMode.ALL.

I think the way it works now is intentional - the idea, iirc, is that you could configure "shipWhenImporting" to have a more extensive list than the faction knows, in anticipation of it possibly learning those later on. The "ALL" pick mode is a way to get around that, I guess? The more I think about it the more needlessly-future-proofed that aspect of it seems, but, well, at least now we've got some certainty about how it works.
Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile

Excellent, thank you.  :)
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

SafariJohn

  • Admiral
  • *****
  • Posts: 3021
    • View Profile

I think I ran into this and I solved it by manually setting my FleetParamsV3's mode variable. In my case, I used Misc.getShipPickMode(market, factionId), but setting it directly to one of the FactionAPI.ShipPickMode values works too.
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile

One thing to consider: ships available to a faction only get refreshed when you start a new campaign.

May I ask why? It doesn't seem a like a good decision at first glance.
Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile

(The reason it doesn't pick up stuff is that available ships can be changed dynamically, right - it'd be odd if say some event removed a faction's access to a ship, and that got reset next time the game was loaded. It can definitely be confusing and inconvenient when working on a faction, though...)
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile

Hello,

My Remnant-like faction, SAD, do not seems to have a problem, do not hesitate to look on it(Look the code on bitbucket).
Spoiler
[close]

You mentioned the code, but provided no link to it.
I am interested in it too.
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile

Hello,

My Remnant-like faction, SAD, do not seems to have a problem, do not hesitate to look on it(Look the code on bitbucket).
Spoiler
[close]

You mentioned the code, but provided no link to it.
I am interested in it too.
https://bitbucket.org/Snrasha/sad/src/master/
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile

Thanks...

That's a lot of files to get some custom faction fleets spawning. ???
Is it just me or was it simpler before?

Also, compiling a .jar is no longer required for everything to work, right?
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile

Thanks...

That's a lot of files to get some custom faction fleets spawning. ???
Is it just me or was it simpler before?

Also, compiling a .jar is no longer required for everything to work, right?
You need a jar, like always, why you will not longer require a jar? ^^


Else, no,  i have forget to clean my mod of a custom raid than i have tried to made, but forget to remove.
Look src.data.scripts.world.SAD_Gen

You have just 3-4 files for that.
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.
Pages: [1] 2