Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 189 190 [191] 192 193 ... 637

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

Blaze

  • Commander
  • ***
  • Posts: 219
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2850 on: July 01, 2016, 10:34:00 PM »

Code
	@Override
public boolean isApplicableToShip(ShipAPI ship) {
return !ship.getVariant().getHullMods().contains("UnstableInjector") && !ship.getVariant().getHullMods().contains("AugmentedEngines");
}

Adding this should make it so you can't apply it if you have either hullmod and block installing those hullmods if you have your hullmod installed.
« Last Edit: July 01, 2016, 10:37:19 PM by Blaze »
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3517
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2852 on: July 02, 2016, 01:13:07 AM »

Depending on the implementation you seek, you'll have to take some mods' hullmods into account too.
Also since it is built-in, it's the other way around: you have to remove the hullmod they just added instead, and probably something like this to tell the players about the incompatibility.
Logged
 

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 407
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2853 on: July 02, 2016, 01:33:34 AM »

Question about skill_data.csv.
If i set a skill's 'combat officer' TRUE, it will appear in officers' level up skills any way?
Logged
My mods


King Alfonzo

  • Admiral
  • *****
  • Posts: 641
  • -- D O C T O R --
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2854 on: July 02, 2016, 02:39:31 AM »

Depending on the implementation you seek, you'll have to take some mods' hullmods into account too.
Also since it is built-in, it's the other way around: you have to remove the hullmod they just added instead, and probably something like this to tell the players about the incompatibility.

Giving your 'block hullmod' thing a go from that link, but I keep getting an error:

Code
81401 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error compiling [data.hullmods.LionsGuard]
java.lang.RuntimeException: Error compiling [data.hullmods.LionsGuard]
at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Parsing compilation unit 'data.hullmods.LionsGuard'
at org.codehaus.janino.JavaSourceIClassLoader.findIClass(JavaSourceIClassLoader.java:172)
at org.codehaus.janino.IClassLoader.loadIClass(IClassLoader.java:254)
at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:214)
at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:178)
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/hullmods/LionsGuard.java', Line 34, Column 70: Identifier expected instead of '>'
at org.codehaus.janino.Parser.compileException(Parser.java:3125)
at org.codehaus.janino.Parser.readIdentifier(Parser.java:2909)
at org.codehaus.janino.Parser.parseQualifiedIdentifier(Parser.java:245)
at org.codehaus.janino.Parser.parseReferenceType(Parser.java:1776)
at org.codehaus.janino.Parser.parseType(Parser.java:1752)
at org.codehaus.janino.Parser.parseTypeArgument(Parser.java:1856)
at org.codehaus.janino.Parser.parseTypeArgumentsOpt(Parser.java:1827)
at org.codehaus.janino.Parser.parseReferenceType(Parser.java:1776)
at org.codehaus.janino.Parser.parseType(Parser.java:1752)
at org.codehaus.janino.Parser.parsePrimary(Parser.java:2444)
at org.codehaus.janino.Parser.parseUnaryExpression(Parser.java:2252)
at org.codehaus.janino.Parser.parseMultiplicativeExpression(Parser.java:2211)
at org.codehaus.janino.Parser.parseAdditiveExpression(Parser.java:2190)
at org.codehaus.janino.Parser.parseShiftExpression(Parser.java:2169)
at org.codehaus.janino.Parser.parseRelationalExpression(Parser.java:2072)
at org.codehaus.janino.Parser.parseEqualityExpression(Parser.java:2046)
at org.codehaus.janino.Parser.parseAndExpression(Parser.java:2025)
at org.codehaus.janino.Parser.parseExclusiveOrExpression(Parser.java:2004)
at org.codehaus.janino.Parser.parseInclusiveOrExpression(Parser.java:1983)
at org.codehaus.janino.Parser.parseConditionalAndExpression(Parser.java:1962)
at org.codehaus.janino.Parser.parseConditionalOrExpression(Parser.java:1941)
at org.codehaus.janino.Parser.parseConditionalExpression(Parser.java:1922)
at org.codehaus.janino.Parser.parseAssignmentExpression(Parser.java:1901)
at org.codehaus.janino.Parser.parseExpression(Parser.java:1886)
at org.codehaus.janino.Parser.parseVariableInitializer(Parser.java:966)
at org.codehaus.janino.Parser.parseVariableDeclaratorRest(Parser.java:1230)
at org.codehaus.janino.Parser.parseFieldDeclarationRest(Parser.java:1195)
at org.codehaus.janino.Parser.parseClassBodyDeclaration(Parser.java:631)
at org.codehaus.janino.Parser.parseClassBody(Parser.java:515)
at org.codehaus.janino.Parser.parseClassDeclarationRest(Parser.java:481)
at org.codehaus.janino.Parser.parsePackageMemberTypeDeclaration(Parser.java:269)
at org.codehaus.janino.Parser.parseCompilationUnit(Parser.java:168)
at org.codehaus.janino.JavaSourceIClassLoader.findCompilationUnit(JavaSourceIClassLoader.java:203)
at org.codehaus.janino.JavaSourceIClassLoader.findIClass(JavaSourceIClassLoader.java:146)
... 7 more

I've narrowed it down to this line (I think) by process of elimination (IE sticking the block hullmod in various spots in the hullmod code and comparing with the line at which the error occurs):

    private static final Set<String> BLOCKED_HULLMODS = new HashSet<>();

The error doesn't exist if you remove the 'block' hullmod section. The code SHOULD work, as I've had a peak in your own blocked hullmod section and there is barely (if any) difference to what you put in the Radioactive Code Dump. Clearly, I am doing something wrong. Any thoughts?

Tartiflette

  • Admiral
  • *****
  • Posts: 3517
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2855 on: July 02, 2016, 05:05:15 AM »

It needs to be compiled though.
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 21242
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2856 on: July 02, 2016, 07:19:22 AM »

Question about skill_data.csv.
If i set a skill's 'combat officer' TRUE, it will appear in officers' level up skills any way?

Yes, it should show up as one of the levelup choices for the officers. Press "L" in dev mode to gain a bunch of XP to test this out more easily.
Logged

King Alfonzo

  • Admiral
  • *****
  • Posts: 641
  • -- D O C T O R --
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2857 on: July 02, 2016, 11:13:40 PM »

Seems like you're going about it the right way - you want to add a "lions_guard.faction" file, and then point to your new ships from shipRoles in that file. However, that would only add those ships to the existing configuration for the faction, not replace it entirely. To do that, you need to add the faction file to the "replace" list in your mod_info.json, like so:

"replace":["data/world/factions/lions_guard.faction", "<another file if needed>"],

A follow up to this:

I've made anew Lion's Guard Faction file and used the code above in the mod_info...and it hasn't replaced it. I've seen standard vanilla brawlers in the Lion's Guard, not to mention I haven't seen any of the modded ships - at all - in either Sindrian or Lion's Guard factions. Using FindShip in console comes back 'no ships found'. So what's a more solid way of adding ships to vanilla factions? Or am I doing something completely wrong? The ships work - I've used AddShip to get them in the fleet and I've had no issue. Once I've got this one, single detail down pat then I can finally release the BETA for this mod, and start work on my own faction.

Tartiflette

  • Admiral
  • *****
  • Posts: 3517
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2858 on: July 02, 2016, 11:51:35 PM »

There is no "more solid" way to add ships: that's the way to add ships to a faction. Are you only using your mod with vanilla to test that first? With no other mods that overwrite the fleets composition like DynaSector?
Logged
 

King Alfonzo

  • Admiral
  • *****
  • Posts: 641
  • -- D O C T O R --
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2859 on: July 03, 2016, 12:43:44 AM »

There is no "more solid" way to add ships: that's the way to add ships to a faction. Are you only using your mod with vanilla to test that first? With no other mods that overwrite the fleets composition like DynaSector?

Just checked. Works like a charm with vanilla. The question then becomes how do you get it to work in a dynasector / starsector game, if at all? There must be a way, considering Ship and Weapons pack isn't affected, so to speak. Yet all the stuff I've looked at focuses on adding carrier fleets to the game, and making fleets from roles, and not exactly where it specifically focuses on the mod ships. Presumably it should use ships based on roles, not based on mod.

Adding onto this: Is there a tutorial on making ship systems? I've cast around and I can't seem to locate one.

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 407
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2860 on: July 03, 2016, 04:52:34 AM »

Yes, it should show up as one of the levelup choices for the officers. Press "L" in dev mode to gain a bunch of XP to test this out more easily.

Alright, i know. Thx
Logged
My mods


King Alfonzo

  • Admiral
  • *****
  • Posts: 641
  • -- D O C T O R --
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2861 on: July 06, 2016, 04:14:44 AM »

Alright, I'm stuck - how do skin files work?

I've got the SKIN files pointing to the skins images, I've got the Variants pointing at the skin files, but the game keeps chucking a 'ship hull_id not found' error.

Histidine

  • Admiral
  • *****
  • Posts: 4124
    • View Profile
    • Bitbucket profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2862 on: July 07, 2016, 07:05:18 AM »

Alright, I'm stuck - how do skin files work?

I've got the SKIN files pointing to the skins images, I've got the Variants pointing at the skin files, but the game keeps chucking a 'ship hull_id not found' error.
Paste your .skin and .variant files and maybe we can see what's wrong.
(My totally random guess is an incorrect baseHullId in the skin definition)
Logged

King Alfonzo

  • Admiral
  • *****
  • Posts: 641
  • -- D O C T O R --
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2863 on: July 07, 2016, 05:45:10 PM »

Here's the SKIN file:

Code
{
"baseHullId":"brawler",
"skinHullId":"lg_brawler",
"hullName":"Brawler (LG)",
"descriptionId":"brawler",
"descriptionPrefix":"One of the Lion's Guard Fleet, this ship has been modified by the best Sindrian Engineers with several minor improvements to the flux systems and increased ordinance, enabling these ships to hit well above their weight. Unfortunately these improvements, as varied and often incompatible as the best Sindrian engineers that included them, increase the deployment costs of these ships.",
"fleetPoints":5,
"ordnancePoints":50,
"baseValueMult":1.75,
"spriteName":"graphics/ships/brawler/lg_brawler.png",
"coversColor":[255,255,255,255],
"removeWeaponSlots":[], # ids
"removeEngineSlots":[], # indices, as engine slots have no id in the .ship file
"removeBuiltInMods":[], # hullmod ids
"removeBuiltInWeapons":[], # weapon slot ids
"builtInMods":["LionsGuard", "solar_shielding"],
"builtInWeapons":{
    },
}

...and the VARIANT file:

Code
{
  "displayName": "Raider",
  "fluxCapacitors": 7,
  "fluxVents": 8,
  "hullId": "lg_brawler",
  "hullMods": [],
  "quality": 0.25,
  "variantId": "lg_brawler_Raider",
  "weaponGroups": [
    {
      "autofire": false,
      "mode": "LINKED",
      "weapons": {
        "WS 001": "heavymauler",
        "WS 002": "heavyac"
      }
    },
    {
      "autofire": false,
      "mode": "ALTERNATING",
      "weapons": {
        "WS 003": "harpoon",
        "WS 004": "harpoon"
      }
    }
  ]
}

Histidine

  • Admiral
  • *****
  • Posts: 4124
    • View Profile
    • Bitbucket profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2864 on: July 08, 2016, 08:10:56 AM »

I put the variant and skin into a test mod (removing the LG hullmod and using an existing vanilla sprite for the Brawler) and I could add it to my fleet with console command, no problems.

What does starsector.log say? (Should've asked for that from the beginning...)
Maybe it's crashing on a different ship?
Logged
Pages: 1 ... 189 190 [191] 192 193 ... 637