Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 645 646 [647] 648 649 ... 710

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

ctuncks

  • Commander
  • ***
  • Posts: 127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9690 on: March 11, 2023, 04:32:56 AM »

Ah, gotcha. It's not set up to be modified per-weapon this way.

Thanks for the response, it's nice to know what is and isn't currently possible as to pursue more feasible endeavors.
Logged

Great Wound

  • Captain
  • ****
  • Posts: 279
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9691 on: March 11, 2023, 08:17:45 AM »

Does anyone know if "onHitEffect": triggers with "behaviorSpec":{"behavior":"PROXIMITY_FUSE", ???

I'm hoping not but it would be good to know either way.

Edit: Nevermind, just found a dirty way to test it and it appears not  :D
« Last Edit: March 11, 2023, 08:21:42 AM by Great Wound »
Logged

ctuncks

  • Commander
  • ***
  • Posts: 127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9692 on: March 13, 2023, 12:27:30 AM »

I think I understand the mechanics of how missiles work, I would appreciate if anyone could confirm/deny/correct my potentially flawed body of knowledge.

  • Weapon Range dictates the maximum range in which the firing ship can target an enemy ship.
  • “Launch speed” is the initial speed at which the missile is fired from the ship. My assumption is it travels at this speed for 1 second covering the same amount of distance. Using the Reaper Torpedo as an example it has a Launch Speed of 100, so I assume it travels 100 units before the next step.
  • The missile then accelerates or decelerates to it’s “Proj speed” I assume it uses acc and dec stats within the “engineSpec” part of the proj file. (How would deceleration work if the ship has a dec value of 0?).
  • Once again in assumption territory the value of acc or dec dictates how much velocity the missile gains within 1 second. So in the case of the Reaper it is already moving at 100 units per second and it’s max speed is 400 units per second. It only has to accelerate by 300 more and it’s acc value is 500, so it should complete it’s acceleration within 0.6 seconds.
  • At this point the missile is at it’s maximum velocity and will continue to travel as such until it’s flight time expires.
  • My Assumption is flight time begins as soon as the missile is launched, can anyone correct me on this?

Just looking muck about with a Missile Hullmod which alters some of these stats and wanted a firmer understanding before I mess about too much with them.

Logged

Ruddygreat

  • Admiral
  • *****
  • Posts: 524
  • Seals :^)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9693 on: March 13, 2023, 01:11:41 PM »

is there a better way than this to set a portion of a beam's damage to hard flux?
This does work, though I seem to remember that there was a method for it it that just let you set a fraction of damage dealt to be hard flux
also for clarification, is there a specific reason to use .getModifier().modifyX() & returning the mod id over just manually setting the damage & returning null?

code
Code
    public static class palindromeBuiltinBeamHardFluxListener implements DamageDealtModifier {

           @Override
        public String modifyDamageDealt(Object param, CombatEntityAPI target, DamageAPI damage, Vector2f point, boolean shieldHit) {

            if (param instanceof BeamAPI) {
                if (((BeamAPI) param).getWeapon().getId().equals("SBSS_palindromeBuiltin_Pulse")) {
                    Global.getCombatEngine().applyDamage(target, point, (damage.getDamage() * damage.getDpsDuration()) / 2f, damage.getType(), 0f, false, false, ((BeamAPI) param).getSource());
                    damage.getModifier().modifyMult("the sneaky", 0.5f);
                    return "the sneaky";
                }
            }

            return null;
        }
    }
[close]

edit : cleaned up my code a little
« Last Edit: March 13, 2023, 01:41:56 PM by Ruddygreat »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9694 on: March 13, 2023, 03:33:18 PM »

  • “Launch speed” is the initial speed at which the missile is fired from the ship. My assumption is it travels at this speed for 1 second covering the same amount of distance. Using the Reaper Torpedo as an example it has a Launch Speed of 100, so I assume it travels 100 units before the next step.
This is incorrect, the missile starts doing whatever it's going to do - depending on its AI - as soon as it's launched. In the case of the Reaper and other dumbfire missiles, it'll just accelerate immediately.

is there a better way than this to set a portion of a beam's damage to hard flux?

Not 100% sure, but this looks fine to me!

also for clarification, is there a specific reason to use .getModifier().modifyX() & returning the mod id over just manually setting the damage & returning null?

Yes. The damage object is persistent in some cases - for example, a beam, or a projectile that passed through missiles and deals damage multiple times. The id allows the damage modifiers to be cleaned up and the damage restored to its original state. Otherwise e.g. your half-damage modifier would have already been applied next time your damage modifier plugin runs.[/list]
Logged

bananana

  • Commander
  • ***
  • Posts: 228
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9695 on: March 13, 2023, 11:24:15 PM »

is it possible to force beam spec weapon actually load and render the _barrel sprite ?
even if it deosn't actually recoil? for purposes of manually handling it via script
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

JAL28

  • Commander
  • ***
  • Posts: 217
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9696 on: March 14, 2023, 09:16:16 AM »

how do I make a hullmod apply an effect only to weapons of a certain size?
eg. apply a range and damage buff to only mediums and debuff smalls
Logged

bananana

  • Commander
  • ***
  • Posts: 228
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9697 on: March 14, 2023, 05:27:04 PM »

is it possible to make a hullmod's tooltip expandable?
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

ctuncks

  • Commander
  • ***
  • Posts: 127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9698 on: March 14, 2023, 07:00:01 PM »

how do I make a hullmod apply an effect only to weapons of a certain size?
eg. apply a range and damage buff to only mediums and debuff smalls

As someone who's just been attempting to do similar, it seems that while range or base range can be done for different weapon sizes, it appears that you cannot currently alter damage for weapon sizes, types yes, sizes no.
Logged

Ruddygreat

  • Admiral
  • *****
  • Posts: 524
  • Seals :^)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9699 on: March 15, 2023, 02:45:05 AM »

is it possible to make a hullmod's tooltip expandable?

yes, technically

you can have your addPostDescriptionSection check for key presses sing Keyboard.isKeyPressed(); from lwjgl & use that to toggle a boolean that shows the extra stuff.

bananana

  • Commander
  • ***
  • Posts: 228
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9700 on: March 15, 2023, 05:45:28 AM »

is it possible to make a hullmod's tooltip expandable?

yes, technically

you can have your addPostDescriptionSection check for key presses sing Keyboard.isKeyPressed(); from lwjgl & use that to toggle a boolean that shows the extra stuff.
that's actually backwards
i was wondering if i could hijack the tooltip expander to do stuff instead of actually expanding the tooltip
which i can do. but not with hullmod.
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

ctuncks

  • Commander
  • ***
  • Posts: 127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9701 on: March 15, 2023, 06:00:07 AM »

So I've been testing the following boolean statement.
Code
boolean turn1 = weapon.getTurnRate() > 25f;
At current I have it hooked up to a listener on a weapon range modifier for testing purposes. Problem is it seems to be getting the weapons turn rate speed + it's idle bonus speed. What this means in testing using a light autocannon which shouldn't not get the boost and a light mortar that should, that both get the bonus, at least until you start firing which drops the bonus speed and invalidates the conditions for the light autocannon.

Is there anyway to get the unmodified turn speed? I couldn't seem to find a way at the time.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9702 on: March 16, 2023, 11:17:09 AM »

how do I make a hullmod apply an effect only to weapons of a certain size?
eg. apply a range and damage buff to only mediums and debuff smalls

You can add a DamageDealtModifier to the ship. See the EnergyWeaponMastery skill class for an example of doing this, or HighScatterAmp for doing something similar but not from a hullmod.

is it possible to force beam spec weapon actually load and render the _barrel sprite ?
even if it deosn't actually recoil? for purposes of manually handling it via script

I don't believe so.

So I've been testing the following boolean statement.
Code
boolean turn1 = weapon.getTurnRate() > 25f;
At current I have it hooked up to a listener on a weapon range modifier for testing purposes. Problem is it seems to be getting the weapons turn rate speed + it's idle bonus speed. What this means in testing using a light autocannon which shouldn't not get the boost and a light mortar that should, that both get the bonus, at least until you start firing which drops the bonus speed and invalidates the conditions for the light autocannon.

Is there anyway to get the unmodified turn speed? I couldn't seem to find a way at the time.

Hmm - weapon.getSpec().getTurnRate()? This will not include the effect of stuff like Advanced Turret Gyros etc; if you really needed that you could compute the value using the relevant turn rate stat for the weapon.
Logged

ciago92

  • Admiral
  • *****
  • Posts: 577
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9703 on: March 16, 2023, 01:14:43 PM »

I'd like to be able to design the system I spawn in when I start a new game, and I'm hoping to be able to have it change based on selections made in the new game menus*. Are there any mods out there that do anything in the same ballpark (and hopefully would also be okay with me using their code as a template)?


*Basically like Nexerline in design (sliders for numbers, and various options set through use of the menus) except with options like number of randomly generated planets, number of volcanic planets, number of terran planets, etc. Maybe even something like the own faction planet modifier Nex has, though hopefully in the menus before setup as well.
Logged

Lukas04

  • Captain
  • ****
  • Posts: 366
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #9704 on: March 16, 2023, 06:55:06 PM »

I'd like to be able to design the system I spawn in when I start a new game, and I'm hoping to be able to have it change based on selections made in the new game menus*. Are there any mods out there that do anything in the same ballpark (and hopefully would also be okay with me using their code as a template)?


*Basically like Nexerline in design (sliders for numbers, and various options set through use of the menus) except with options like number of randomly generated planets, number of volcanic planets, number of terran planets, etc. Maybe even something like the own faction planet modifier Nex has, though hopefully in the menus before setup as well.

Adverary (https://fractalsoftworks.com/forum/index.php?topic=25821.0) lets you create a customizeable starsystem with outside configs if its just for personal use.
My own Library mod Lunalib lets you create ingame mod configs which can be changed before new game creation, which you could use to modify your systems generation. (https://fractalsoftworks.com/forum/index.php?topic=25658)

« Last Edit: March 16, 2023, 06:57:10 PM by Lukas04 »
Logged
My Mods
Pages: 1 ... 645 646 [647] 648 649 ... 710