Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 192 193 [194] 195 196 ... 706

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

Orikson

  • Captain
  • ****
  • Posts: 280
  • Always Seen on Discord
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2895 on: July 23, 2016, 09:21:18 PM »

I got a few questions, may sound a bit silly, so bear with me.

Q1: How do I force the phase cloak system to have a delay at the end of its phase cloak deactivation?

I've messed around with the Citadel's phase cruiser (permission asked and granted), and managed to get it to phase through things properly instead of crashing into stuff.

The only problem was that the delay is missing.

Q2: What are the significant difference in compiled and non-compiled mods?

I couldn't quite grasp the difference, aside from that the compiled mods all have the jars folder (and some src folder outside their jars).

Q3: For the starfarer.api JAR and compressed file alongside the lwjgl and lwjgl_util JAR files, do I just copy them over to the jars file in a compressed mod?

I did that with the Citadel files.

Thanks for listening.
Logged
"A story teller and a trader. Tell me your tales and I'll tell you no lies."

Come join the Starsector Fan Chat! It's decently active.

Link: https://discord.gg/eb5UC

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2896 on: July 24, 2016, 08:55:31 AM »

Q1: How do I force the phase cloak system to have a delay at the end of its phase cloak deactivation?

I've messed around with the Citadel's phase cruiser (permission asked and granted), and managed to get it to phase through things properly instead of crashing into stuff.

The only problem was that the delay is missing.

You mean the cooldown after it turns off? That's specified in the "cooldown" column in ship_systems.csv. The vanilla one has a cooldown of 2 seconds.

Q2: What are the significant difference in compiled and non-compiled mods?

I couldn't quite grasp the difference, aside from that the compiled mods all have the jars folder (and some src folder outside their jars).

Java code needs to be compiled into a form that the java virtual machine (the JVM, i.e. what actually runs the game) can run. The game comes with a third party compiler, Janino, which does this to code provided under data/scripts. However, it's got some issues - it's not aware of certain Java features like generics, and it's been known to fail to compile certain other pieces of code. It also takes time on game start, as it has to do this every time.

The benefit of that is that it's easier to mod, since you can just edit the script and the game does everything else for you, no need to set up a dev environment.

Compiled mods provide the compiled version of their code in a jar file (Java ARchive). You can actually open it upwith winzip or some such and see a bunch of .class files there; .class files are compiled versions of corresponding .java files. So, this means the modder has to compile their code into this form outside the game; I'd imagine mostly one would automate this using an IDE.

The benefits of doing it this way are faster startup time, being able to use all Java language features, and, well, using an IDE (Interactive Dev Environment), though you could also do the latter w/ the loose scripts in data/scripts.


Q3: For the starfarer.api JAR and compressed file alongside the lwjgl and lwjgl_util JAR files, do I just copy them over to the jars file in a compressed mod?

I did that with the Citadel files.

You don't need to do that, the game already comes with those so there's no point to duplicating them.
Logged

joe130794

  • Commander
  • ***
  • Posts: 226
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2897 on: July 25, 2016, 03:03:14 AM »

just wondering what would I have to edit to make it so missiles aren't rendered in the launcher?
And how can i make a weapon not a pd weapon, I modified a pdlaser and have now replaced it with a modified phase beam but its still acting as a pd laser. thanks in advance

and i figured out why I couldnt get some weapons to work. When I moved the mod to the 0.7.2a folder and it worked I didnt think i needed to change anything. BUT the weapons csv files are slightly different at the top for anyone wanting to do a mod.
Heres an example
Spoiler
name,id,tier,base value,range,damage/second,damage/shot,emp,impact,turn rate,OPs,ammo,ammo/sec,reload size,type,energy/shot,energy/second,chargeup,chargedown,burst size,burst delay,min spread,max spread,spread/shot,spread decay/sec,beam speed,proj speed,launch speed,flight time,proj hitpoints,hints,number
name,id,tier,base value,range,damage/second,damage/shot,emp,impact,turn rate,OPs,ammo,ammo/sec,type,energy/shot,energy/second,chargeup,chargedown,burst size,burst delay,min spread,max spread,spread/shot,spread decay/sec,beam speed,proj speed,launch speed,flight time,proj hitpoints,hints,number

the top line is the 0.72a csv file and the bottom is 0.65a i think.
The 0.72a updata added reload size as a option too.
[close]
« Last Edit: July 25, 2016, 06:08:44 AM by joe130794 »
Logged

Orikson

  • Captain
  • ****
  • Posts: 280
  • Always Seen on Discord
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2898 on: July 26, 2016, 02:28:36 AM »


You mean the cooldown after it turns off? That's specified in the "cooldown" column in ship_systems.csv. The vanilla one has a cooldown of 2 seconds.


Java code needs to be compiled into a form that the java virtual machine (the JVM, i.e. what actually runs the game) can run. The game comes with a third party compiler, Janino, which does this to code provided under data/scripts. However, it's got some issues - it's not aware of certain Java features like generics, and it's been known to fail to compile certain other pieces of code. It also takes time on game start, as it has to do this every time.

The benefit of that is that it's easier to mod, since you can just edit the script and the game does everything else for you, no need to set up a dev environment.

Compiled mods provide the compiled version of their code in a jar file (Java ARchive). You can actually open it upwith winzip or some such and see a bunch of .class files there; .class files are compiled versions of corresponding .java files. So, this means the modder has to compile their code into this form outside the game; I'd imagine mostly one would automate this using an IDE.

The benefits of doing it this way are faster startup time, being able to use all Java language features, and, well, using an IDE (Interactive Dev Environment), though you could also do the latter w/ the loose scripts in data/scripts.


You don't need to do that, the game already comes with those so there's no point to duplicating them.

Thanks for the detailed reply! I've checked the version and differences of the files' formatting, updating to the current scheme solved the phase problem. Now that Citadel phase cruiser can fly! (Albeit it keeps phase teleporting suicide in conjunction with phase cloaking... back to the drawing board!).

I see, I'll have to read the instructions carefully and find some tutorials for the IDE (NetBeans) I'm using.
Logged
"A story teller and a trader. Tell me your tales and I'll tell you no lies."

Come join the Starsector Fan Chat! It's decently active.

Link: https://discord.gg/eb5UC

Paralityk

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2899 on: July 28, 2016, 02:00:47 AM »

How do I edit skills? For example I want Construction to give me 3% armor bonus instead of 2%. File I want to edit is:
\data\characters\skills\scripts\SkillDate
Right? I even checked all mods one by one and altered every single one that was messing with skills but values in game remains the same. Even after starting new game.
Logged

Paralityk

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2900 on: July 29, 2016, 03:17:58 AM »

Bumping my question. Still couldn't find solution on my own. Anyone?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2901 on: July 29, 2016, 08:49:03 AM »

just wondering what would I have to edit to make it so missiles aren't rendered in the launcher?
And how can i make a weapon not a pd weapon, I modified a pdlaser and have now replaced it with a modified phase beam but its still

Remove "RENDER_LOADED_MISSILES" from the .wpn file.


How do I edit skills? For example I want Construction to give me 3% armor bonus instead of 2%. File I want to edit is:
\data\characters\skills\scripts\SkillDate
Right? I even checked all mods one by one and altered every single one that was messing with skills but values in game remains the same. Even after starting new game.

Have you tried running without any mods, just to be on the safe side and make sure nothing else is interfering? What you're doing sounds like it should work, unless I'm just missing something here.

Another way to check would be to add some gibberish to the SkillData.java file and make sure that causes the game to crash on startup. But I'd still recommend running w/o any mods to isolate what's going on.
Logged

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2902 on: July 29, 2016, 07:25:48 PM »

Is there an up-to-date reference for how burst beams are timed/handled by the AI? Even just a thread* about how the chargeup/chargedown/burst timings change for beams would be nice; I feel like I end up doing burst-beam stats by trial and error a lot.

One thing I've noticed about burst beams as offensive weapons; the higher the damage over a shorter time, the better a beam is against shields, in part because the AI seems to drop shields more often when it's fired at a ship.

*happy to start one.
Logged

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 430
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2903 on: July 30, 2016, 12:50:22 AM »

Is there any possibility to render characters like "WARNING" using default font in campaign or combat?
Logged
My mods


Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2904 on: July 30, 2016, 08:04:36 AM »

Is there an up-to-date reference for how burst beams are timed/handled by the AI? Even just a thread* about how the chargeup/chargedown/burst timings change for beams would be nice; I feel like I end up doing burst-beam stats by trial and error a lot.

One thing I've noticed about burst beams as offensive weapons; the higher the damage over a shorter time, the better a beam is against shields, in part because the AI seems to drop shields more often when it's fired at a ship.

*happy to start one.

I'm not entirely sure what you're asking. Just, "how does the AI handle burst beams defensively"? If so, the answer is "not particularly well". Unlike for projectiles, where it's aware of individual high-damage shots, it doesn't treat burst beams any differently from regular beams with a high DPS.

Is there any possibility to render characters like "WARNING" using default font in campaign or combat?

Not at the moment, no. I keep meaning to add a text rendering API, but just haven't been able to as of yet.
Logged

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2905 on: July 30, 2016, 07:26:04 PM »

Is there an up-to-date reference for how burst beams are timed/handled by the AI? Even just a thread* about how the chargeup/chargedown/burst timings change for beams would be nice; I feel like I end up doing burst-beam stats by trial and error a lot.

One thing I've noticed about burst beams as offensive weapons; the higher the damage over a shorter time, the better a beam is against shields, in part because the AI seems to drop shields more often when it's fired at a ship.

*happy to start one.

I'm not entirely sure what you're asking. Just, "how does the AI handle burst beams defensively"? If so, the answer is "not particularly well". Unlike for projectiles, where it's aware of individual high-damage shots, it doesn't treat burst beams any differently from regular beams with a high DPS.

It's really how the .csv file's values affect the duration of the burst; I can plug the numbers for projectile weapons into a simple formula and get numbers that yield a desired DPS. I still haven't figured out how to set precise values for burst beams except by trial and error.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2906 on: July 30, 2016, 09:05:29 PM »

It's really how the .csv file's values affect the duration of the burst; I can plug the numbers for projectile weapons into a simple formula and get numbers that yield a desired DPS. I still haven't figured out how to set precise values for burst beams except by trial and error.

The code that figures out dps for burst beams:

Code: java
info.burstFireDuration = ((spec.getChargeupTime() + spec.getChargedownTime()) + spec.getBurstDuration());
info.burstDamage = spec.getDamagePerSecond() * ((chargeUpTime + spec.getChargedownTime()) * 0.333f + spec.getBurstDuration());
info.dps = info.burstDamage / (spec.getChargeupTime() + spec.getChargedownTime() + spec.getBurstDuration() + spec.getBurstCooldown());

0.333f is in there because beam damage ramps up as a square of the brightness. If it was linear, that would've been an 0.5f instead.
« Last Edit: July 30, 2016, 09:07:38 PM by Alex »
Logged

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2907 on: July 30, 2016, 10:05:33 PM »

It's really how the .csv file's values affect the duration of the burst; I can plug the numbers for projectile weapons into a simple formula and get numbers that yield a desired DPS. I still haven't figured out how to set precise values for burst beams except by trial and error.

The code that figures out dps for burst beams:

Code: java
info.burstFireDuration = ((spec.getChargeupTime() + spec.getChargedownTime()) + spec.getBurstDuration());
info.burstDamage = spec.getDamagePerSecond() * ((chargeUpTime + spec.getChargedownTime()) * 0.333f + spec.getBurstDuration());
info.dps = info.burstDamage / (spec.getChargeupTime() + spec.getChargedownTime() + spec.getBurstDuration() + spec.getBurstCooldown());

0.333f is in there because beam damage ramps up as a square of the brightness. If it was linear, that would've been an 0.5f instead.

Aaaahhh, no wonder the numbers didn't make sense. Thanks so much - I understand it's a fairly obscure question and I appreciate getting such a concise answer.
Logged

Paralityk

  • Ensign
  • *
  • Posts: 9
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2908 on: July 31, 2016, 05:54:18 AM »


Have you tried running without any mods, just to be on the safe side and make sure nothing else is interfering? What you're doing sounds like it should work, unless I'm just missing something here.

Another way to check would be to add some gibberish to the SkillData.java file and make sure that causes the game to crash on startup. But I'd still recommend running w/o any mods to isolate what's going on.
Well that's weird... Everything seems to work with starsector+ turned off but ALL values are changed exactly the same way in core and starsector+. Yet when I turn mod on again values are back to default. I checked it so many times that at this poin't I am not sure if game is trolling me or I am going insane :D.
With starsector+ off - skills have changed values
With starsector+ on - skills have default values

But I am 100% sure that I changed both core and starsector+ SkillData exactly the same way to make sure that one is not overwriting another. Can anyone tell me what is going on?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2909 on: July 31, 2016, 01:48:30 PM »

It's possible SS+ is providing a compiled version of that class in a jar file and that takes precedence.


Aaaahhh, no wonder the numbers didn't make sense. Thanks so much - I understand it's a fairly obscure question and I appreciate getting such a concise answer.

Cool, glad that makes sense.
Logged
Pages: 1 ... 192 193 [194] 195 196 ... 706