Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 270 271 [272] 273 274 ... 711

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1731182 times)

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4065 on: December 10, 2018, 09:09:25 AM »

So if replacing variants, ships and weapons is impossible, are total conversions just dead, or is there something else I can do to solve this problem?

If I rename every file with "archeus_" as a prefix to each id then is there any places where those ids are hardcoded, or does the game now use the factions files for everything?

In other words, if I take out every default ship and variant can I replace all references to them?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4066 on: December 10, 2018, 09:43:39 AM »

Do I replace the file by name without the path?

Or the path to the file in starsector-core?

Because a test of replacing the files directly by adding:

   "data/hulls/odyssey.ship",
   "data/hulls/onslaught.ship",
   "data/variants/onslaught/onslaught_Elite.variant",
   "data/variants/odyssey_Balanced.variant"]

To the end of mod_info,

Does not fix the weird variant/ship glitches with those ships.  :(

*Edit* Just tried it with weapon files and those don't work either.

(I'm assuming you mean in the "replace" array, not just at the end of mod_info.)

That looks right, and looking at the code, it should work, that is, the code loading variants/hulls/weapons should respect the "replace" section.

Again, if you could provide me with a mod to reproduce the problem, I'd be happy to take a look. If it has dependencies on LazyLib etc, that's fine.


I've been trying to figure out the RaidIntel and related classes for Nexerelin's invasion fleets. (This is some really complicated stuff; I might have to write some notes for it as a guide for others).

Problem I have: When the fleet gets to its target planet, it just hangs around nearby and chases any enemy fleets that appear, instead of executing the raid method (i.e. performRaid isn't being called, and the return values of getRaidActionText and getRaidApproachText don't seem to be used). This is even though my current action stage class is mostly a copy of PEActionStage.
What do I change to control this? (Actually, does the punitive expedition actually do non-autoresolve raids either?)

In your spawnFleet method in your version of raid intel, do you have this?

fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_RAIDER, true);

That's what makes fleets raid colonies.

Also, your FleetActionDelegate.canRaid(MarketAPI market) method needs to return true for the target colony.

Finally, the assignment script needs to be RaidAssignmentAI - or if it's not, it needs to handle the raiding behavior itself.

Edit: for punitive expeditions, this assignment AI is created - and the FleetActionDelegage (which is implemented by the action stage) passed in to it - in PunitivieExpeditionIntel.createAssignmentAI().
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4067 on: December 10, 2018, 10:21:56 AM »

(I'm assuming you mean in the "replace" array, not just at the end of mod_info.)

That looks right, and looking at the code, it should work, that is, the code loading variants/hulls/weapons should respect the "replace" section.

Again, if you could provide me with a mod to reproduce the problem, I'd be happy to take a look. If it has dependencies on LazyLib etc, that's fine.

Yeah it was in the array just like how I replace skins (which works fine)

Absolutely, I can link you the entire mod on dropbox (the version those screenshots are from) if that works. There are no external dependencies right now it should work with vanilla alone.

*Edit* Whoops forgot to include the mod_info file in the mod I uploaded so if you downloaded it before this edit it is there now :P

You had originally said a minimal standalone mod, does this qualify or would you like me to fork vanilla and just add a vanilla ship/weapons override to see?

*EDIT 2*  -- Removed active mod link
« Last Edit: December 25, 2018, 09:14:06 PM by Morrokain »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4068 on: December 10, 2018, 10:31:52 AM »

Gave it a quick look - erm, there's no mod_info file at all in this zip :)

You had originally said a minimal standalone mod, does this qualify or would you like me to fork vanilla and just add a vanilla ship/weapons override to see?

(This sorta qualifies, though a smaller mod would be a little easier to handle. Either way, really.)
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4069 on: December 10, 2018, 10:33:33 AM »

Gave it a quick look - erm, there's no mod_info file at all in this zip :)

You had originally said a minimal standalone mod, does this qualify or would you like me to fork vanilla and just add a vanilla ship/weapons override to see?

(This sorta qualifies, though a smaller mod would be a little easier to handle. Either way, really.)

Yeah just responded to that it is there now sorry! :)

Ok well let me know if you don't see anything at a quick. If nothing seems obvious Ill make a smaller standalone. Thanks for the help! (Was typing too fast before)
« Last Edit: December 10, 2018, 10:35:54 AM by Morrokain »
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4070 on: December 10, 2018, 10:34:27 AM »

The file didn't upload originally because I was editing it :P

The ship to look at in this example is the Odyssey -- variant: odyssey_Balanced
« Last Edit: December 10, 2018, 10:37:26 AM by Morrokain »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4071 on: December 10, 2018, 10:50:20 AM »

Got an error launching it:

java.lang.RuntimeException: Ship hull variant [kite_hegemony_Interceptor] not found!
java.lang.RuntimeException: Ship hull variant [kite_hegemony_Interceptor] not found!
   at com.fs.starfarer.loading.ShipVariantStore.getVariant(ShipVariantStore.java:60)
   at com.fs.starfarer.loading.ShipVariantStore.getVariant(ShipVariantStore.java:54)
   at com.fs.starfarer.loading.ShipRolesSpec$RoleEntry.getFPCost(ShipRolesSpec.java:71)
   at com.fs.starfarer.loading.ShipRolesSpec.<init>(ShipRolesSpec.java:183)
   at com.fs.starfarer.loading.SpecStore.loadFactions(SpecStore.java:1233)
   at com.fs.starfarer.loading.SpecStore.loadAll(SpecStore.java:128)
   at com.fs.starfarer.loading.ResourceLoaderState.init(ResourceLoaderState.java:365)
   at com.fs.state.AppDriver.begin(AppDriver.java:64)
   at com.fs.starfarer.combat.CombatMain.main(CombatMain.java:452)
   at com.fs.starfarer.StarfarerLauncher$1.run(StarfarerLauncher.java:271)
   at java.lang.Thread.run(Thread.java:745)


This one is because of:
"variantId": "kite_Interceptor",
in the kite_Interceptor.variant file.

Fixed that, ran again, got another error regarding another kite variant.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4072 on: December 10, 2018, 10:56:06 AM »

Got an error launching it:

java.lang.RuntimeException: Ship hull variant [kite_hegemony_Interceptor] not found!
java.lang.RuntimeException: Ship hull variant [kite_hegemony_Interceptor] not found!
   at com.fs.starfarer.loading.ShipVariantStore.getVariant(ShipVariantStore.java:60)
   at com.fs.starfarer.loading.ShipVariantStore.getVariant(ShipVariantStore.java:54)
   at com.fs.starfarer.loading.ShipRolesSpec$RoleEntry.getFPCost(ShipRolesSpec.java:71)
   at com.fs.starfarer.loading.ShipRolesSpec.<init>(ShipRolesSpec.java:183)
   at com.fs.starfarer.loading.SpecStore.loadFactions(SpecStore.java:1233)
   at com.fs.starfarer.loading.SpecStore.loadAll(SpecStore.java:128)
   at com.fs.starfarer.loading.ResourceLoaderState.init(ResourceLoaderState.java:365)
   at com.fs.state.AppDriver.begin(AppDriver.java:64)
   at com.fs.starfarer.combat.CombatMain.main(CombatMain.java:452)
   at com.fs.starfarer.StarfarerLauncher$1.run(StarfarerLauncher.java:271)
   at java.lang.Thread.run(Thread.java:745)


This one is because of:
"variantId": "kite_Interceptor",
in the kite_Interceptor.variant file.

Fixed that, ran again, got another error regarding another kite variant.

Weird let me investigate. Ill provide an update when I figure out what didn't get uploaded
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4073 on: December 10, 2018, 11:02:44 AM »

I checked all files relevant to the kite and they are all there, even the kite_hegemony skin  ???

What was the second kite error?
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4074 on: December 10, 2018, 11:09:18 AM »

I just downloaded the zip from the repository link I gave you, and ran it with the latest release.

It starts fine, but will likely crash on some variants in the viewer.

Try to only look at the Odyssey - odyssey_Balanced variant. I know you can get to that with the scroll wheel.

You can see the entries for the odyssey file exclusions in mod_info, but there are still merge conflicts with the ship file being mapped to the vanilla variant in some places.

You can then add entries to the replace array like:

"data/variants/onslaught/onslaught_Elite.variant",

and

"data/hulls/onslaught.ship",

And it will not affect the merge conflicts on the onslaught_Elite.variant either.

Maybe the replace array was never set up to handle those file types?
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4075 on: December 10, 2018, 11:29:41 AM »

Ok, (sorry about message spam, but I have a potential fix for that error you are getting)

I just copied the kite_Interceptor variant and renamed its id to kite_hegemony_Interceptor so both will be present. Its in that repository. Let me know if you get any more errors for missing ids and I can add them as well.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4076 on: December 10, 2018, 11:59:53 AM »

On trying to launch the game with the mod enabled:

java.lang.RuntimeException: Ship hull variant [kite_original_Stock] not found!
   at com.fs.starfarer.loading.ShipVariantStore.getVariant(ShipVariantStore.java:60)
   at com.fs.starfarer.loading.ShipVariantStore.getVariant(ShipVariantStore.java:54)
   at com.fs.starfarer.loading.ShipRolesSpec$RoleEntry.getFPCost(ShipRolesSpec.java:71)
   at com.fs.starfarer.loading.ShipRolesSpec.<init>(ShipRolesSpec.java:183)
   at com.fs.starfarer.loading.SpecStore.loadFactions(SpecStore.java:1233)
   at com.fs.starfarer.loading.SpecStore.loadAll(SpecStore.java:128)
   at com.fs.starfarer.loading.ResourceLoaderState.init(ResourceLoaderState.java:365)
   at com.fs.state.AppDriver.begin(AppDriver.java:64)
   at com.fs.starfarer.combat.CombatMain.main(CombatMain.java:452)
   at com.fs.starfarer.StarfarerLauncher$1.run(StarfarerLauncher.java:271)
   at java.lang.Thread.run(Thread.java:745)

This is caused by the data/variants/kite/kite_Stock file having the following variantId in it:

"variantId": "kite_Stock",

Where the actual id the game looks for in various places (in this case, default_ship_roles.json) is "kite_original_Stock". I don't know how this is launching for you, that it is seems indicative of some sort of problem on your end. Either that, or the stuff in dropbox is not what you're running. In any case, what I just downloaded from dropbox can not possibly run.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4077 on: December 10, 2018, 01:19:57 PM »

On trying to launch the game with the mod enabled:

java.lang.RuntimeException: Ship hull variant [kite_original_Stock] not found!
   at com.fs.starfarer.loading.ShipVariantStore.getVariant(ShipVariantStore.java:60)
   at com.fs.starfarer.loading.ShipVariantStore.getVariant(ShipVariantStore.java:54)
   at com.fs.starfarer.loading.ShipRolesSpec$RoleEntry.getFPCost(ShipRolesSpec.java:71)
   at com.fs.starfarer.loading.ShipRolesSpec.<init>(ShipRolesSpec.java:183)
   at com.fs.starfarer.loading.SpecStore.loadFactions(SpecStore.java:1233)
   at com.fs.starfarer.loading.SpecStore.loadAll(SpecStore.java:128)
   at com.fs.starfarer.loading.ResourceLoaderState.init(ResourceLoaderState.java:365)
   at com.fs.state.AppDriver.begin(AppDriver.java:64)
   at com.fs.starfarer.combat.CombatMain.main(CombatMain.java:452)
   at com.fs.starfarer.StarfarerLauncher$1.run(StarfarerLauncher.java:271)
   at java.lang.Thread.run(Thread.java:745)

This is caused by the data/variants/kite/kite_Stock file having the following variantId in it:

"variantId": "kite_Stock",

Where the actual id the game looks for in various places (in this case, default_ship_roles.json) is "kite_original_Stock". I don't know how this is launching for you, that it is seems indicative of some sort of problem on your end. Either that, or the stuff in dropbox is not what you're running. In any case, what I just downloaded from dropbox can not possibly run.

I truly don't understand that. It 100% runs for me. I've triple checked now. To be sure, you aren't going to the codex? You are running in dev mode and using the edit variants menu?

I can make more variants with those ids if you would like.. but to be absolutely sure I downloaded that very zip and ran it with the release from here (other than setting devmode to true in settings.json under starsector-core):

http://fractalsoftworks.com/2018/11/

It ran and I can look at the variant in question.

So, if you are using that build then this should run for you no problem.



It sounds like at this point I just need to fork the release, and add a single ship and variant to the replace array... I'll give you a link soon.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4078 on: December 10, 2018, 01:47:58 PM »

I'm not going into the codex, no. The game crashes before the progress bar starts filling up.

... huh, but it does run if I use the installed version of -RC10 I've got. That's super weird! Let me investigate.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4079 on: December 10, 2018, 01:49:39 PM »

So, just out of curiosity, I downloaded .9 and the mod from the link I sent you on a separate PC to see if it was an environmental issue for some reason.

Same behavior. But I can see the entries in the default_ship_roles.json you are referring to, and they are different than the mods ids. So that is quite strange. I corrected the one id in the repository if you feel like trying again, but I'm going to fork everything anyway to provide a better control.
Logged
Pages: 1 ... 270 271 [272] 273 274 ... 711