Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 512 513 [514] 515 516 ... 710

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

Great Wound

  • Captain
  • ****
  • Posts: 279
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7695 on: July 11, 2021, 01:11:35 PM »

The other thing to get around somehow is the player installing the hullmod, using the extra OP, and then removing it. Generally speaking the game assumes that hullmods that modify OP costs are non-removable, and breaking that assumption puts it into "unsupported by the game" territory. Not to say it couldn't be made to work somehow, perhaps!

 - at least, there aren't any hooks for this.

Thanks for the prompt response. Saved me floundering.

As far as adding and removing OP there was two schools of thought.

1 - OP is primarily a combat attribute, adding and removing the mod to exceed base OP without losing the cargo capacity has no bearing combat side. On the cargo side (logistics) it would have an impact but, generally speaking, there's easier ways to increase cargo capacity without cheesing the system.

2 - If the concept did prove abusable then I could have always made OP cost = OP bonus so the only way to get the bonus would to build it in which would prevent removal.


Which raises another question, is it possible to make a hull-mod behave differently depending on whether it's built in (or not). Haven't looked into this myself.

Great Wound

  • Captain
  • ****
  • Posts: 279
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7696 on: July 11, 2021, 01:15:39 PM »

edit: how do you make hybrid weapons? I checked in the cvs but all the hybrid weapons are just marked as a single type like normal

In the .wpn file set

   "type":"HYBRID",

Worked for me.

Yunru

  • Admiral
  • *****
  • Posts: 1560
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7697 on: July 11, 2021, 01:32:02 PM »

Which raises another question, is it possible to make a hull-mod behave differently depending on whether it's built in (or not). Haven't looked into this myself.
Yup! Just check if the ship has a S-Mod with the hullmod's ID. If it does, have it do thing B, if not, thing A.

Deshara

  • Admiral
  • *****
  • Posts: 1578
  • Suggestion Writer
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7698 on: July 11, 2021, 02:57:07 PM »

what does projectile speed on missiles/bombs do? I added a 0 to the standard bomb bay's projectile speed & to the proximity launcher's launch speed and the prox launcher fired its bomb out like a railgun while the bomb bay appeared to be unchanged. I undid that, then changed the prox launcher's projectile speed to 0 then set the bomb's launch speed to 0, and the bomb didnt move when it came out but the prox charge was unchaged. It doesn't seem like it would do nothing since every missile's is different. Is it a deprecated stat for missiles that used to do something but got moved to launch speed?

also, while im here; the real thing i was toying with those numbers to figure out was, am I imagining that the proximity launcher's charges move faster right when they're fired and then slow down, or does it really do that? & if its not projectile speed being lower than launch speed doing it, where is that in the code? I want to toy with making the bombs come out faster but then slow down

also also, id been wanting to ask but hadnt yet; where does the special on-hit affect of, like, the breach missile live? I checked mods to see where they store weapon special affects but the core game's scripts folder is basically empty, & I cant find anything in the weapon or projectile files that might suggest it lives there. And I havent been able to find a weapon-modding tutorial that happens to mention where such a thing would live nvm i found it in the proj file. just overlooked it when i checked. Dunno where the code that onhit is calling lives tho, so im only closer to the answer edit: found it. now i just gotta learn to code java..

whats the deal with the use_on_frigates weapon hint? is it deprecated -- in the current build it seems like all it does is undo the strike tag
« Last Edit: July 11, 2021, 08:40:12 PM by Deshara »
Logged
Quote from: Deshara
I cant be blamed for what I said 5 minutes ago. I was a different person back then

dcong89

  • Ensign
  • *
  • Posts: 40
  • Work Hard Play Hard
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7699 on: July 11, 2021, 05:42:44 PM »

This looks like it has something to do with a modular ship involved in an AI-vs-AI battle on the campaign map, but beyond that it's hard to say.

Thanks sir , maybe this error from new modular ship TC: Archean Order mod.
« Last Edit: July 11, 2021, 05:45:25 PM by dcong89 »
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 #7700 on: July 11, 2021, 06:09:48 PM »

Thanks sir , maybe this error from new modular ship TC: Archean Order mod.

There isn't any modular ships in Archean Order. Only stations have modules. Was it a station battle? (Assuming that error also applies to stations, anyway.)
Logged

dcong89

  • Ensign
  • *
  • Posts: 40
  • Work Hard Play Hard
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7701 on: July 11, 2021, 09:30:58 PM »

Thanks sir , maybe this error from new modular ship TC: Archean Order mod.

There isn't any modular ships in Archean Order. Only stations have modules. Was it a station battle? (Assuming that error also applies to stations, anyway.)

sorry Morrokain it's not error from your mod , i've used many mods which have modular ships like LowTech Armada,Kadur Remnant.... maybe i will disable one by one mods to find this error come from.
« Last Edit: July 11, 2021, 09:34:01 PM by dcong89 »
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 #7702 on: July 11, 2021, 10:08:07 PM »

sorry Morrokain it's not error from your mod , i've used many mods which have modular ships like LowTech Armada,Kadur Remnant.... maybe i will disable one by one mods to find this error come from.

No worries and yeah I'd say that is your best bet for finding out which mod is causing it. From what I can tell the error itself doesn't have any mod script references.
Logged

Sutopia

  • Admiral
  • *****
  • Posts: 1005
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7703 on: July 14, 2021, 11:40:58 AM »

Is there a convenient API for me to get all entities or just all ships within X radius instead of getting everything on field and parse distance one by one?
Logged


Since all my mods have poor reputation, I deem my efforts unworthy thus no more updates will be made.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7704 on: July 14, 2021, 11:58:33 AM »

what does projectile speed on missiles/bombs do? I added a 0 to the standard bomb bay's projectile speed & to the proximity launcher's launch speed and the prox launcher fired its bomb out like a railgun while the bomb bay appeared to be unchanged. I undid that, then changed the prox launcher's projectile speed to 0 then set the bomb's launch speed to 0, and the bomb didnt move when it came out but the prox charge was unchaged. It doesn't seem like it would do nothing since every missile's is different. Is it a deprecated stat for missiles that used to do something but got moved to launch speed?

also, while im here; the real thing i was toying with those numbers to figure out was, am I imagining that the proximity launcher's charges move faster right when they're fired and then slow down, or does it really do that? & if its not projectile speed being lower than launch speed doing it, where is that in the code? I want to toy with making the bombs come out faster but then slow down

It's their top speed. There's an... IIRC BOMB_WITH_SLOW AI type that will slow the bombs down; regular BOMB will just use the velocity at which it was launched.

whats the deal with the use_on_frigates weapon hint? is it deprecated -- in the current build it seems like all it does is undo the strike tag

It doesn't quite undo it, iirc it still won't fire on fighters and some other behaviors may be slightly different.

Is there a convenient API for me to get all entities or just all ships within X radius instead of getting everything on field and parse distance one by one?

See: CombatEngineAPI.getAiGridShips() and similar methods. You'd still have to do more exact checks but these can narrow down the initial set you do them against.

The overhead is probably comparable to just iterating over the set of all ships and doing a range check, though, especially if for what you're doing you don't care about fighters and so the maximum actual numbers of ships you do meaningful checks for is low. This sort of thing is more useful if you're looking at all projectiles, for example, since there can be a ton of those.
Logged

theDragn

  • Captain
  • ****
  • Posts: 307
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7705 on: July 14, 2021, 03:03:53 PM »

Do listeners get automatically removed if they're no longer applicable? I was looking at the High Scatter Amplifier code and it doesn't remove the damage listener when the hullmod is unapplied (as far as I can tell), but obviously it turns off the beam hard flux when the hullmod isn't there any more.

Same question for listeners applied by weapon scripts- I have a gun that with an EveryFrameEffect that applies a listener at the start of combat (if the listener wasn't already there). Will this create a problem with a bunch of hanging listeners? I haven't run into any issues, but I'd like to be following best practices anyway.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24128
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7706 on: July 14, 2021, 03:10:08 PM »

ShipAPI does not persist between combats, and in refit, for example, a new one is created every time the variant changes - i.e. if you add a capacitor? New ShipAPI, etc. So broadly, this isn't something to worry about for hullmods if you're using the applyEffectsAfterShipCreation() method. It *is* something to worry about for personal combat skills, since the player can transfer command mid-combat.

Incidentally, this is why hullmods do not have an unapply() method and skills *do*.
Logged

theDragn

  • Captain
  • ****
  • Posts: 307
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7707 on: July 14, 2021, 03:37:31 PM »

Ahh, okay, that was what I was worried about- saw the unapply stuff in the skill code and thought "oh crap do I need to be doing that?". Thanks!

2_Wycked

  • Commander
  • ***
  • Posts: 132
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7708 on: July 15, 2021, 05:33:15 PM »

Hi, just wondering why there are mods hosted here in this "Modding" area as well as the "Mods" section, when they seem similar? Is there a distinction between the two subforums maybe? Thanks!
Logged

Great Wound

  • Captain
  • ****
  • Posts: 279
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #7709 on: July 15, 2021, 05:54:52 PM »

Hi, just wondering why there are mods hosted here in this "Modding" area as well as the "Mods" section, when they seem similar? Is there a distinction between the two subforums maybe? Thanks!

The way I see it:

Originally
Mods - Was for released and downloadable mods.
Modding - Was for discuss modding Starsector.

Then mods got locked.

Now:
Modding - Is for mods "under development"/not feature complete.
Mods - Is for mods that are effectively finished and, should, only be receiving minor/comparability updates.

Being that Mods is more visible and gets more attention this has unfortunately (as is common in the gaming industry) led to rat-race in which mods are being "published" in alpha status, which confuses the whole issue.
Pages: 1 ... 512 513 [514] 515 516 ... 710