Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Question about how the game loads Java files  (Read 1054 times)

Spardok

  • Lieutenant
  • **
  • Posts: 99
    • View Profile
Question about how the game loads Java files
« on: February 12, 2021, 03:31:06 PM »

So I am trying to change hull mods and ship values in the Java files of mods (for my own use). When I reload the game it does not seem to take effect even though if I close out and open back up the Java file the entries are indeed changed. Is the game committing the original file to memory and not loading the new one? I have no idea what's going on.

Yes I am closing out the entire game and restarting it.

Any help would be appreciated.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7209
  • Harpoon Affectionado
    • View Profile
Re: Question about how the game loads Java files
« Reply #1 on: February 12, 2021, 04:00:17 PM »

If the mods use a compiled .jar file that has the java files in question, then changing the contents of the source java file won't do anything because its not actually being used. Could you give some more details about which mod and files you are changing? That would let us check for sure.

Values in .csv and .json files (and pretty much everything else other than .java) can be changed and should have effect on a reload.
Logged

Spardok

  • Lieutenant
  • **
  • Posts: 99
    • View Profile
Re: Question about how the game loads Java files
« Reply #2 on: February 12, 2021, 04:47:06 PM »

Yea they certainly are located in the .jar as well. It's the YRXP mod.
« Last Edit: February 12, 2021, 04:51:08 PM by Spardok »
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4682
    • View Profile
    • GitHub profile
Re: Question about how the game loads Java files
« Reply #3 on: February 12, 2021, 05:03:47 PM »

I've manually replaced .class files in .jars before, it does work if done right.

Which files in particular are you replacing, and what were the changes you made to them? Are you replacing the actual .class files or just adding .java files with the same name?
Logged

Spardok

  • Lieutenant
  • **
  • Posts: 99
    • View Profile
Re: Question about how the game loads Java files
« Reply #4 on: February 13, 2021, 06:49:48 PM »

Sorry for the late response, been working on my capstone. The source files are .java but in the .jar they are .class files.

Thanks again for the help
Logged