Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 205 206 [207] 208 209 ... 711

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3090 on: April 22, 2017, 10:08:53 AM »

Ok, I lied - looking at the code, it filters out (D) hulls. The shade has a "- Pirates" at the end so it doesn't get picked up. Yes, it's hacky.
Logged

Embolism

  • Admiral
  • *****
  • Posts: 511
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3091 on: April 22, 2017, 10:18:54 AM »

Ok, I lied - looking at the code, it filters out (D) hulls. The shade has a "- Pirates" at the end so it doesn't get picked up. Yes, it's hacky.

 :D Heh, cool. That explains why they show up in the Codex when I edit Pirate hulls from (D) to (P) then. ;D
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3092 on: April 22, 2017, 11:27:19 AM »

Three short ones:
I can't remember what was the function to clear out Hyperspace nebulas around a point. This will be necessary now that custom made system can be placed well within deep hyper.

The procgen also seems to ignore them when placing its own stars, leading to some pretty bad overlap. Is it possible to clear out those as well?

And the most problematic: Systems with a custom star don't seem to spawn at all. I added it to the star_gen_data.csv but the system isn't visible in the campaign. It is however present in the intel screen's planet list, but the game crashed when trying to watch it. Am I missing something there? No idea why that system won't show but it doesn't work with a vanilla star either.
« Last Edit: April 22, 2017, 11:45:46 AM by Tartiflette »
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3093 on: April 22, 2017, 11:58:27 AM »

Three short ones:
I can't remember what was the function to clear out Hyperspace nebulas around a point. This will be necessary now that custom made system can be placed well within deep hyper.

Use NebulaEditor - see StarSystemGenerator.java, line 419 for use example.

The procgen also seems to ignore them when placing its own stars, leading to some pretty bad overlap. Is it possible to clear out those as well?

If your star system is added before progren runs, it should consider them the same way it considers the vanilla systems; that's not hardcoded. I suspect the issue may be your systems being added after procgen? Not 100% sure, obviously.

And the most problematic: Systems with a custom star don't seem to spawn at all. I added it to the star_gen_data.csv but the system isn't visible in the campaign. It is however present in the intel screen's planet list, but the game crashed when trying to watch it. Am I missing something there? No idea why that system won't show but it doesn't work with a vanilla star either.

I'm not sure what you were trying to do, so it's hard to say. A possibly relevant note: star_gen_data still requires a star to be defined in planets.json etc.
Logged

Inventor Raccoon

  • Captain
  • ****
  • Posts: 452
  • Digging through trash for a hydroflux catalyst
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3094 on: April 22, 2017, 12:10:33 PM »

Code
34509 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Filenames are case-sensitive, [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Raccoon's Arms Pack\jars\raccoonarms.jar] vs [C:\Program Files (x86)\Fractal Softworks\Starsector\mods\Raccoon's Arms Pack\jars\raccoonarms.jar]
java.lang.RuntimeException: Filenames are case-sensitive, [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\Raccoon's Arms Pack\jars\raccoonarms.jar] vs [C:\Program Files (x86)\Fractal Softworks\Starsector\mods\Raccoon's Arms Pack\jars\raccoonarms.jar]
at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I know this is to stop Linux crashes, but how is it fixed? Everything seems to be in the same cases. And why is it pointing to starsector-core?
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3095 on: April 22, 2017, 12:10:47 PM »

If your star system is added before progren runs, it should consider them the same way it considers the vanilla systems; that's not hardcoded. I suspect the issue may be your systems being added after procgen? Not 100% sure, obviously.
Hum, ok good, but why would my systems be added after? I add them in the SectorGeneratorPlugin like all the vanilla systems.


Quote
I'm not sure what you were trying to do, so it's hard to say. A possibly relevant note: star_gen_data still requires a star to be defined in planets.json etc.
It was just me forgetting to un-comment the wormhole auto-generation...
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3096 on: April 22, 2017, 12:24:55 PM »

@InventorRaccoon: hotfix! (resolves the crash)

Hum, ok good, but why would my systems be added after? I add them in the SectorGeneratorPlugin like all the vanilla systems.

That's weird. Do you have a minimal-ish mod I can try this with?

It was just me forgetting to un-comment the wormhole auto-generation...

Ah, ok.
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3097 on: April 22, 2017, 02:25:11 PM »

What do the fighter wing changes do? There are new entires and some are not clear

Code
id,variant,tags,tier,rarity,fleet pts,op cost,formation,range,attackRunRange,num,role,role desc,refit,base value,,,,,,,,,,,,,number

broadsword_wing,broadsword_Fighter,"fighter4, fighter, low",0,,6,8,V,4000,500,3,FIGHTER,Heavy Fighter,10,6000,,,,,,,,,,,,,1

what are all the tags?
what does fighter4, fighter3, fighter2 do?
Tier?
rarity?
num?
 
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4693
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3098 on: April 22, 2017, 09:35:16 PM »

Is com.fs.starfarer.api.impl.campaign.rulecmd.newgame not actually a usable package, or is there another reason my class can't be found while in it?

Code
com.fs.starfarer.api.util.RuleException: java.lang.RuntimeException: Command [NGCGetExerelinDefaults] not found in packages:
com.fs.starfarer.api.impl.campaign.rulecmd
com.fs.starfarer.api.impl.campaign.rulecmd.salvage
com.fs.starfarer.api.impl.campaign.rulecmd.newgame

EDIT: Happening with a rule command in plain old com.fs.starfarer.api.impl.campaign.rulecmd as well.

So it's just straight up not finding *any* rule commands from a mod, or only specific ones?
It fails with any rule commands in a mod, as far as I can tell.

I added this to a mod that did not have any rules commands before:
Code: java
package com.fs.starfarer.api.impl.campaign.rulecmd;

import com.fs.starfarer.api.campaign.InteractionDialogAPI;
import com.fs.starfarer.api.campaign.rules.MemoryAPI;
import com.fs.starfarer.api.util.Misc;
import java.util.List;
import java.util.Map;

public class TestRuleCmd extends BaseCommandPlugin {
   
    @Override
    public boolean execute(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) {
        return true;
    }
}

Code: csv
id,trigger,conditions,script,text,options,notes
myTestRule,OpenCommLink,TestRuleCmd,,La la la la la,,

And got the same error.
Spoiler
Code
com.fs.starfarer.api.util.RuleException: java.lang.RuntimeException: Command [TestRuleCmd] not found in packages:
com.fs.starfarer.api.impl.campaign.rulecmd
com.fs.starfarer.api.impl.campaign.rulecmd.salvage
com.fs.starfarer.api.impl.campaign.rulecmd.newgame

at com.fs.starfarer.campaign.rules.A.<init>(Unknown Source)
at com.fs.starfarer.campaign.rules.Rules.o00000(Unknown Source)
at com.fs.starfarer.loading.SpecStore.for(Unknown Source)
at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[close]

(it also happens if the rules command is used as a script action instead of a condition)
Logged

Cyan Leader

  • Admiral
  • *****
  • Posts: 718
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3099 on: April 23, 2017, 02:47:46 AM »

What exactly do these two lines in settings.json do?

Quote
   "officerAIMax":10,
   "baseNumOfficers":4;
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3100 on: April 23, 2017, 03:35:27 AM »

What exactly do these two lines in settings.json do?

Quote
   "officerAIMax":10,
   "baseNumOfficers":4;

Educated guess:

officerAIMax: Maximum level your officers can reach? Alternatively, could be the maximum number of officers, although seems unlikely.

baseNumOfficers: The maximum number of officers you can command at the start. Default is 4, but you can increase that with one of the Command skills (can't remember which).
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3027
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3101 on: April 23, 2017, 06:40:56 AM »

I'm pretty sure officerAIMax is the maximum number of officers an NPC fleet can have.

The officer level cap is 20, btw
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3102 on: April 23, 2017, 09:17:50 AM »

Is com.fs.starfarer.api.impl.campaign.rulecmd.newgame not actually a usable package, or is there another reason my class can't be found while in it?

Code
com.fs.starfarer.api.util.RuleException: java.lang.RuntimeException: Command [NGCGetExerelinDefaults] not found in packages:
com.fs.starfarer.api.impl.campaign.rulecmd
com.fs.starfarer.api.impl.campaign.rulecmd.salvage
com.fs.starfarer.api.impl.campaign.rulecmd.newgame

EDIT: Happening with a rule command in plain old com.fs.starfarer.api.impl.campaign.rulecmd as well.

So it's just straight up not finding *any* rule commands from a mod, or only specific ones?
It fails with any rule commands in a mod, as far as I can tell.

I added this to a mod that did not have any rules commands before:
Code: java
package com.fs.starfarer.api.impl.campaign.rulecmd;

import com.fs.starfarer.api.campaign.InteractionDialogAPI;
import com.fs.starfarer.api.campaign.rules.MemoryAPI;
import com.fs.starfarer.api.util.Misc;
import java.util.List;
import java.util.Map;

public class TestRuleCmd extends BaseCommandPlugin {
   
    @Override
    public boolean execute(String ruleId, InteractionDialogAPI dialog, List<Misc.Token> params, Map<String, MemoryAPI> memoryMap) {
        return true;
    }
}

Code: csv
id,trigger,conditions,script,text,options,notes
myTestRule,OpenCommLink,TestRuleCmd,,La la la la la,,

And got the same error.
Spoiler
Code
com.fs.starfarer.api.util.RuleException: java.lang.RuntimeException: Command [TestRuleCmd] not found in packages:
com.fs.starfarer.api.impl.campaign.rulecmd
com.fs.starfarer.api.impl.campaign.rulecmd.salvage
com.fs.starfarer.api.impl.campaign.rulecmd.newgame

at com.fs.starfarer.campaign.rules.A.<init>(Unknown Source)
at com.fs.starfarer.campaign.rules.Rules.o00000(Unknown Source)
at com.fs.starfarer.loading.SpecStore.for(Unknown Source)
at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[close]

(it also happens if the rules command is used as a script action instead of a condition)

Could you possibly send me a copy? Would make testing a bit easier.


I'm pretty sure officerAIMax is the maximum number of officers an NPC fleet can have.


Right.

what are all the tags?
Tier?
rarity?

Mostly/entirely used for drop generation. See: drop_groups.csv.

what does fighter4, fighter3, fighter2 do?

For autofit - kind of wing, and tier within that group.

num?

Internal, for sorting the spreadsheet. Not used by the game.

(Sorry this is a bit brief...)
Logged

Inventor Raccoon

  • Captain
  • ****
  • Posts: 452
  • Digging through trash for a hydroflux catalyst
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3103 on: April 23, 2017, 10:25:23 AM »

After dabbling in station mechanics, got a couple of questions.

Firstly, any way to make it so that stations will appear in markets with modules? If you stick a variant into the .faction file, it'll appear in markets, but only as a blank base, no modules, and there isn't a way to attach modules. I don't think it works like a built-in weapon, just putting in the variant name of the module instead of a weapon name isn't accepted.

Secondly, what makes it so that stations explode on death? STATION tag? Presence of modules? It's great for large stations where all of their defenses and weapons are on modules, but on a smaller (around the size of a destroyer) station where the main section isn't invulnerable and has weapons, it makes balance trickier. You either have to make the modules very strong (so it's harder to actually make any progress in weakening the station) or risk having the entire station just blown away by two bombing runs.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3104 on: April 23, 2017, 10:31:41 AM »

Firstly, any way to make it so that stations will appear in markets with modules? If you stick a variant into the .faction file, it'll appear in markets, but only as a blank base, no modules, and there isn't a way to attach modules. I don't think it works like a built-in weapon, just putting in the variant name of the module instead of a weapon name isn't accepted.

You'll need to add it directly to that submarket's cargo (i.e. getCargo().getMothballedShips().addFleetMember()). If it's through the .faction file, all you'll get is the stripped hull.

Secondly, what makes it so that stations explode on death? STATION tag? Presence of modules? It's great for large stations where all of their defenses and weapons are on modules, but on a smaller (around the size of a destroyer) station where the main section isn't invulnerable and has weapons, it makes balance trickier. You either have to make the modules very strong (so it's harder to actually make any progress in weakening the station) or risk having the entire station just blown away by two bombing runs.

I forget exactly, but if you're thinking that the base of the station could be destroyed and the modules could survive and fight on, that's going to be tricky for various reasons. For one, the station will register as disabled post-combat.
Logged
Pages: 1 ... 205 206 [207] 208 209 ... 711