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 ... 409 410 [411] 412 413 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6150 on: March 10, 2020, 04:25:48 PM »

there an easy way to have your portrait appear next to your flagship the way other officers do?

There isn't, I don't think.

Thanks for the help earlier, I'm currently fine-tuning the drone movement, and I was wondering how the param of Ship.giveCommand(..., param, ...) works. I've only been setting the param as null, but the API mentions param - Generally a Vector2f with a "mouse" location. See ShipCommand.java for details., but as far as I can see ShipCommand.java doesn't have any comment on a mouse location. Does this mean that I can choose to make the e.g. accelerate command act in a certain direction instead of cardinally? The code below shows what I have. This is quite innacurate as the drones only move diagonally or straight, which causes them to overshoot, correct, then fly around amusingly. Thanks!

"param" is for commands that need a mouse location, such as firing a weapon (missiles uses this for target-picking), using a ship system, or raising shields.
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6151 on: March 10, 2020, 04:29:59 PM »


Thanks for the help earlier, I'm currently fine-tuning the drone movement, and I was wondering how the param of Ship.giveCommand(..., param, ...) works. I've only been setting the param as null, but the API mentions param - Generally a Vector2f with a "mouse" location. See ShipCommand.java for details., but as far as I can see ShipCommand.java doesn't have any comment on a mouse location. Does this mean that I can choose to make the e.g. accelerate command act in a certain direction instead of cardinally? The code below shows what I have. This is quite innacurate as the drones only move diagonally or straight, which causes them to overshoot, correct, then fly around amusingly. Thanks!

"param" is for commands that need a mouse location, such as firing a weapon (missiles uses this for target-picking), using a ship system, or raising shields.

That's a bummer. Is there another way that I could increase the accuracy of the ship acceleration then? Does the source (which I am more or less trying to imitate in behaviour) liberally use intervalutil?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6152 on: March 10, 2020, 04:40:41 PM »

For a drone, I'd suggest directly manipulating the velocity and or/location. You're going to have a tough time getting nice-looking movement otherwise.
Logged

Stormy Fairweather

  • Commander
  • ***
  • Posts: 193
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6153 on: March 10, 2020, 04:46:46 PM »


There isn't, I don't think.


well, poop. a minor thing, i know... but it just feels wrong.
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6154 on: March 10, 2020, 04:47:06 PM »

For a drone, I'd suggest directly manipulating the velocity and or/location. You're going to have a tough time getting nice-looking movement otherwise.

Some of what I got up to, it was even worse with terminator-level speed  ;D. Thanks for the help, I'll start looking into that stuff.
Logged

shoi

  • Admiral
  • *****
  • Posts: 650
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6155 on: March 11, 2020, 03:53:44 PM »

Is there a way to get AI to move through a ship when collisions allow it to ?

That probably doesn't make a lot of sense, right now I have a ship using a custom right click system that is basically shares the property of being able to pass through ships, like phase. The AI type for the system is set to phase, and I set the ship's collisionclass to that of a fighter in a script to be able to pass through other ships while the system is active. Everything works for me, but this doesn't seem to work with AI - they will fly directly in front of the ship they're targetting and stop everytime, like there's an invisible wall stopping them from going any further. Any ideas what could be the cause of this?
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6156 on: March 11, 2020, 04:56:21 PM »

Here is my update, . This is working with ~80ish lines of code without any direct manipulation of velocity or location, only shipcommands, showing it is possible  ;D
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6157 on: March 11, 2020, 05:14:50 PM »

Is there a way to get AI to move through a ship when collisions allow it to ?

That probably doesn't make a lot of sense, right now I have a ship using a custom right click system that is basically shares the property of being able to pass through ships, like phase. The AI type for the system is set to phase, and I set the ship's collisionclass to that of a fighter in a script to be able to pass through other ships while the system is active. Everything works for me, but this doesn't seem to work with AI - they will fly directly in front of the ship they're targetting and stop everytime, like there's an invisible wall stopping them from going any further. Any ideas what could be the cause of this?

The way to do that would probably be to temporarily override what the AI is doing to force it to move the way you want to at the specific time. E.G. the ship system could block all other commands and give the accelerate command every frame, or some such.

Here is my update, . This is working with ~80ish lines of code without any direct manipulation of velocity or location, only shipcommands, showing it is possible  ;D

Very nice! Glad you got it working, even including the landing-back-on-the-ship bits.
Logged

H-Nighthawk

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6158 on: March 12, 2020, 12:19:52 PM »

Ello, I am trying to figure out how to mod the skills, simple changes like increasing or decreasing the strength of them, but for the life of me I can't find the file that has their statistics. Is it even possible to mod them and if so which file are they in?
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 3010
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6159 on: March 12, 2020, 12:31:41 PM »

They are in starfarer.api.jar. You cannot modify them directly. You will have to create a mod and copy the classes you want to modify, then IIRC copy the relevant .skill files (from data/characters/skills) and point each class reference to your version of the class.

I don't think you have to compile the modified classes into a jar, but you may have to tell the game to replace the .skill files in you mod_info.json.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6160 on: March 12, 2020, 03:32:52 PM »

Is station_small used for anything or is it just a test file? I've never encountered it but figured I'd ask to be sure before I remove it.
Logged

H-Nighthawk

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6161 on: March 12, 2020, 04:20:51 PM »

They are in starfarer.api.jar. You cannot modify them directly. You will have to create a mod and copy the classes you want to modify, then IIRC copy the relevant .skill files (from data/characters/skills) and point each class reference to your version of the class.

I don't think you have to compile the modified classes into a jar, but you may have to tell the game to replace the .skill files in you mod_info.json.

Hmmm, this may be out of my mod league, not having any luck figuring it out, or it just may not be possible.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6162 on: March 12, 2020, 04:23:41 PM »

Is station_small used for anything or is it just a test file? I've never encountered it but figured I'd ask to be sure before I remove it.

It's just for testing. I'm not sure if there are any hardcoded references to it in core code; I don't *think* so.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6163 on: March 12, 2020, 06:17:22 PM »

It's just for testing. I'm not sure if there are any hardcoded references to it in core code; I don't *think* so.

Thanks! If it was referenced (as long as it wasn't actually spawned anywhere) that shouldn't cause any weirdness afaik so I shouldn't need to override it.
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6164 on: March 13, 2020, 04:32:18 AM »


Can I override this message by getting the status key somehow? Would like to change this text since it is misleading with how I've changed the functionality of this system. Thanks :)
Logged
Pages: 1 ... 409 410 [411] 412 413 ... 706