Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Skill Changes, Part 2 (07/15/21)

Pages: 1 ... 510 511 [512] 513 514 ... 532

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

Tecrys

  • Admiral
  • *****
  • Posts: 548
  • repair that space elevator!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7666 on: July 06, 2021, 11:08:52 AM »

Hi!

I need to get rid of weapon arcs of specific weapons in a EveryFrameWeaponEffectPlugin.
I mean the drawn weapon arc not the arcs of weapon mounts, in case that isn't clear.
Can anyone help me with this, in the best case with a code example?

Thanks in advance!
« Last Edit: July 06, 2021, 11:18:58 AM by Tecrys »
Logged
Adopt a mod! (Or parts of it) I'd be happy if Biomancy Genetic Engineering found a new patron or if my little monsters appear in some form or another in someone's mod.
https://fractalsoftworks.com/forum/index.php?topic=7682.0

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19110
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7667 on: July 06, 2021, 12:46:00 PM »

Ah, as far as I know, that's not possible. If it's a proper weapon that can be fired, the arcs are just a UI thing.
Logged

Tecrys

  • Admiral
  • *****
  • Posts: 548
  • repair that space elevator!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7668 on: July 06, 2021, 01:09:28 PM »

Ah, as far as I know, that's not possible. If it's a proper weapon that can be fired, the arcs are just a UI thing.

okay, instead I would like to remove it from the weapons group but I'm having a hell of trouble with that.
here's my script so far: https://pastebin.com/JbXBJNwT

"droneslot" has to be deleted from the weapon group it is in, the other one is a decorative and doesn't draw weapon arcs.
I got really far with this script, I'd really like to finish it
Logged
Adopt a mod! (Or parts of it) I'd be happy if Biomancy Genetic Engineering found a new patron or if my little monsters appear in some form or another in someone's mod.
https://fractalsoftworks.com/forum/index.php?topic=7682.0

Morrokain

  • Admiral
  • *****
  • Posts: 1950
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7669 on: July 06, 2021, 02:41:22 PM »

okay, instead I would like to remove it from the weapons group but I'm having a hell of trouble with that.
here's my script so far: https://pastebin.com/JbXBJNwT

"droneslot" has to be deleted from the weapon group it is in, the other one is a decorative and doesn't draw weapon arcs.
I got really far with this script, I'd really like to finish it

This line:

Code
mutableShipStatsAPI.getVariant().clearSlot("droneslot");

 - Might be your problem. That requires a slot id and it looks like you are passing in the weapon id from what I can see though its not 100% clear since you are hardcoding it by id. You can get the slot id from the relevant WeaponAPI I believe. Otherwise, seeing the .variant you are dealing with would be helpful.

*EDIT*

Ah nvm looking at it more closely it does seem to be a slot id at least in that you are using it for other parts of the script as a slot id. The only other thing I could think of is if you know the index of the weapon group you could try something like:

Code
stats.getVariant().getWeaponGroups().get(index).removeSlot("droneslot");

And then add it back in as needed.

Iterating through all seven groups and removing any of that slot you find is also possible though if you aren't sure of what the index would be. Other than that, I don't know, sorry.
« Last Edit: July 06, 2021, 03:04:20 PM by Morrokain »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19110
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7670 on: July 06, 2021, 04:04:27 PM »

Just real quick:
ShipAPI.removeWeaponFromGroups(WeaponAPI weapon)
May be of interest.
Logged

Tecrys

  • Admiral
  • *****
  • Posts: 548
  • repair that space elevator!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7671 on: July 06, 2021, 04:05:52 PM »

Thank you! That helped quite a lot.
The game adds the weapons back in again but at least I can make sure they are not in group 1.

Just real quick:
ShipAPI.removeWeaponFromGroups(WeaponAPI weapon)
May be of interest.

Oh nice! I'll try that. Thank you
Logged
Adopt a mod! (Or parts of it) I'd be happy if Biomancy Genetic Engineering found a new patron or if my little monsters appear in some form or another in someone's mod.
https://fractalsoftworks.com/forum/index.php?topic=7682.0

6chad.noirlee9

  • Captain
  • ****
  • Posts: 253
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7672 on: July 06, 2021, 04:07:02 PM »

is it possible to have three way (or more) battles in starsector?
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19110
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7673 on: July 06, 2021, 04:21:43 PM »

 ::)
is it possible to have three way (or more) battles in starsector?

Technically maybe, with some ugly hackery and entirely custom ship AI and accepting that some things will be very rough around the edges. For practical purposes, though, it's just about a hard "no"...
Logged

6chad.noirlee9

  • Captain
  • ****
  • Posts: 253
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7674 on: July 06, 2021, 06:59:29 PM »

ha thats precisely what id expected
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

MeinGott

  • Ensign
  • *
  • Posts: 29
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7675 on: July 07, 2021, 11:01:37 AM »

Hello there; is there documentation or even a brief post about upgrading mods from 91 to 95? Im sure im pretty late for the party so excuse me and thank you
Logged

Jaghaimo

  • Commander
  • ***
  • Posts: 242
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7677 on: July 07, 2021, 11:11:06 AM »

Hello there; is there documentation or even a brief post about upgrading mods from 91 to 95? Im sure im pretty late for the party so excuse me and thank you


You can have a look at 0.9.1a to 0.95a API diff: https://github.com/jaghaimo/starsector-api/commit/a8eb5000982512433042aa1f820b08d83e81fd4b
Logged
Stellar Networks - collection of useful intel boards
Starpocalypse - fortresses and regulations

Yunru

  • Admiral
  • *****
  • Posts: 928
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7678 on: July 07, 2021, 01:33:51 PM »

I'm trying to create a shotgun-esque weapon by basically having a sabot rocket that immediately detonates into it's second stage. It works really well, both in producing loose visual debris and all the shots being created at once.

The problem I'm having is if an enemy isn't in range, the first stage never detonates ruining the illusion. Worse still, if it comes within range of an enemy before it flames out, it'll detonate to its second stage, effectively doubling the range.

Is there a way to make sure it either detonates immediately regardless (preference), or flame out if it doesn't immediately find an enemy?

Edit: On a different topic, how do identically named jsons interact? Does one straight override the other, or is it more as with CSVs?

Sutopia

  • Admiral
  • *****
  • Posts: 901
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7679 on: July 07, 2021, 02:00:28 PM »

I'm trying to create a shotgun-esque weapon by basically having a sabot rocket that immediately detonates into it's second stage. It works really well, both in producing loose visual debris and all the shots being created at once.

The problem I'm having is if an enemy isn't in range, the first stage never detonates ruining the illusion. Worse still, if it comes within range of an enemy before it flames out, it'll detonate to its second stage, effectively doubling the range.

Is there a way to make sure it either detonates immediately regardless (preference), or flame out if it doesn't immediately find an enemy?

Take a peek at Star Federation (FTL fanmod).
https://fractalsoftworks.com/forum/index.php?topic=19115.0

Pages: 1 ... 510 511 [512] 513 514 ... 532