Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 115 116 [117] 118 119 ... 711

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

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1740 on: October 05, 2014, 11:41:22 AM »

Well what information do you need to get? That's the solution you're looking for.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24157
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1741 on: October 05, 2014, 12:30:18 PM »

Perhaps the factory is instantiated prematurely in 0.6.2a?

It's possible, could have had something to do with the memory leak cleanup - the class implementing FactoryAPI is the actual campaign engine. Hm, this is odd that you two are getting different results, though.
Logged

celestis

  • Captain
  • ****
  • Posts: 285
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1742 on: October 05, 2014, 12:53:06 PM »

Sundog, no, getting settings didn't help. ExceptionInInitializerError is actually not related to the problem - it is that because I initialize my stuff in static class constructor.
Debido, I need to define, what hull mods and weapons are loaded on variant and number of flight decks. I need that to "classify" ships automatically for later use in random picking. I can easily get all that after creating a fleet member. Anyway, if Alex says that it is not supposed to work, I'd rather not try further. I implemented it less "beautifully" via manually parsing the variant/hull files.
Thanks all for help

P.S.
By the way, it would be great to have more detailed metadata in API: i mean, loaded hulls/variants/weapons/..., their attributes (which are often present in CSVs, but not in API classes) - I guess this information is explicitly stored inside the engine, why isn't it made public? It would make many things like this much simpler.
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1743 on: October 05, 2014, 01:28:06 PM »

Fair enough, you could pre-create the data you want in a CSV or JSON file and have that loaded. Then manipulate it that way.

Otherwise Alex would need to expose an API for that somewhere, so you can parse interrogate the information. Wouldn't surprise me if it's all in JSONArrays though.
Logged

ORMtnMan

  • Commander
  • ***
  • Posts: 148
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1744 on: October 06, 2014, 05:58:20 AM »

Okay, so,
I made a copy (basically) of SHI engine stopper ship system. (with Shadow's permission). while making the following changes:

Changed the names off all the scripts and parts
Changed sounds and sprite pointers to non SHI assets,
Changed it to a missile weapon with limited ammo instead of a recharging beam.
Created a new JAR to house the engine kill effect and the system usage AI.

I am now getting this error in my log:
Spoiler
12635 [Thread-5] ERROR com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.RuntimeException: Error compiling [data.shipsystems.scripts.ac_EASAI]
java.lang.RuntimeException: Error compiling [data.shipsystems.scripts.ac_EASAI]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: data.shipsystems.scripts.ac_EASAI
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:165)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more
[close]

I can't for the life of me figure out what is going wrong.
Logged
Creator and lord of The Ashkurr Commonwealth

Sprite artist and designer for Naysmyth Armouries

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 #1745 on: October 06, 2014, 06:16:09 AM »

Not sure if it's that but by default IDEs now comes with Java8, but the game is in Java7. You need to download the previous SDK and select it in your compiler.
Logged
 

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1746 on: October 06, 2014, 06:26:09 AM »

The issue root cause has been identified. :)
Logged

ORMtnMan

  • Commander
  • ***
  • Posts: 148
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1747 on: October 06, 2014, 06:32:23 AM »

The issue root cause has been identified. :)
Yep, thanks to David. I now know to make references to my Jar files in the Mod info file >.<
Logged
Creator and lord of The Ashkurr Commonwealth

Sprite artist and designer for Naysmyth Armouries

stormbringer951

  • Commander
  • ***
  • Posts: 130
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1748 on: October 06, 2014, 08:11:02 AM »

Hi, I posted a topic about this in the subforum earlier but it doesn't seem to have gotten any traction :( .

Does anyone know if it's possible to modify the chase/ignore/flee logic of fleets? For example, would it be possible to have a situation where large enemy fleets with equal fleet points would avoid each other but small fleets would fight each other? My guess is no, but maybe I'm looking in the wrong part of the javadocs.

Thanks :)
« Last Edit: October 06, 2014, 09:24:09 AM by synthetic »
Logged
Weapons Group Controls mod - deselect all weapon groups, hold-down hold-fire mode, toggle alternating/linked fire
Captain's Log - throw away your notepad: custom notes, ruins and salvageable reminders
Old Hyperion - for your dose of nostalgia
Adjustable Skill Thresholds - set fleet DP and fighter bay thresholds

SlimPickens

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1749 on: October 06, 2014, 03:31:30 PM »

Code
ERROR com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.RuntimeException: Error compiling [data.scripts.DGYModPlugin]
..........words.........
Caused by: org.codehaus.commons.compiler.CompileException: Source file "data/scripts/world/DGYGen.java" does not declare class "data.scripts.world.DGYGen"
at org.codehaus.janino.JavaSourceIClassLoader.findIClass

Not sure what this is specifically trying to tell me is wrong, everything is looking pretty good and declared to me. Obviously missing something though...
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1750 on: October 06, 2014, 03:34:58 PM »

Code
ERROR com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.RuntimeException: Error compiling [data.scripts.DGYModPlugin]
..........words.........
Caused by: org.codehaus.commons.compiler.CompileException: Source file "data/scripts/world/DGYGen.java" does not declare class "data.scripts.world.DGYGen"
at org.codehaus.janino.JavaSourceIClassLoader.findIClass

Not sure what this is specifically trying to tell me is wrong, everything is looking pretty good and declared to me. Obviously missing something though...

Java packaging requires the folder structure match the specified package for a class (I believe).

Your code file data/scripts/world/DGYGen.java likely has an incorrect package of data.scripts.

Set package at top of code file (DGYGen.java) like:
Code
package data.scripts.world;

Hopefully that fixes it :)
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1751 on: October 06, 2014, 03:37:18 PM »

Hi, I posted a topic about this in the subforum earlier but it doesn't seem to have gotten any traction :( .

Does anyone know if it's possible to modify the chase/ignore/flee logic of fleets? For example, would it be possible to have a situation where large enemy fleets with equal fleet points would avoid each other but small fleets would fight each other? My guess is no, but maybe I'm looking in the wrong part of the javadocs.

Thanks :)

I don't think you can change this manually. There are a couple of the fleet behaviors that ignore other fleets, and although that means they won't chase other fleets, they also won't run from other fleets. I think "DELIVER_RESOURCES" or whichever is like this?
Logged

SlimPickens

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1752 on: October 06, 2014, 03:40:38 PM »

Set package at top of code file (DGYGen.java) like:
Code
package data.scripts.world;

Hopefully that fixes it :)

It's already in there
Logged

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1753 on: October 06, 2014, 03:49:57 PM »

Set package at top of code file (DGYGen.java) like:
Code
package data.scripts.world;

Hopefully that fixes it :)

It's already in there

OK well is DGYGen.java in the data/scripts/world folder? Basically the folder needs to match the package definition (I believe, Java is certainly not my strong point :) )
Logged

SlimPickens

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #1754 on: October 06, 2014, 04:02:22 PM »

OK well is DGYGen.java in the data/scripts/world folder? Basically the folder needs to match the package definition (I believe, Java is certainly not my strong point :) )

Yeah it is. I wish it were that straightforward (it probably still is and I'm just blind, it's been awhile since I played with java)
Logged
Pages: 1 ... 115 116 [117] 118 119 ... 711