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: Anubis-class Cruiser (12/20/24)

Pages: 1 ... 705 706 [707] 708 709 ... 748

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

ctuncks

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10590 on: March 30, 2024, 02:27:19 AM »

See: CustomProductionContract.addArmsDealerBlueprints()

In brief, the dealer excludes weapons with no_sell, no_dealer, and restricted, and weapons with AIHints.SYSTEM, but may sell anything that passes those checks, regardless of it being available to the faction etc.

So in theory if I were to make a modded weapon that I want a faction to use, but not sell, while still allowing for Arms dealer production I would have to:

1. Set Weapon Tier at 5 for no sale.
2. Do not add the SYSTEM AIHint.
3. Do not add the no_sell tag.
4. Do not add the no_dealer tag.
5. Do not add the restricted tag.

For other control on how the weapon could be gotten (or not) I could also make use of:

1. no_drop. This is post combat loot and salvage if I'm not mistaken?
2. no_drop_salvage. This is location based salvage (Like a Research Station) If I'm correct.

I also assume that the SYSTEM hint also prevents drops of the weapon in question too?

Updates on Alex's comments: No you do not want to do this. I did experiments with my own mod of setting weapon tiers to 5, and what happened was that the weapon would almost NEVER appear in the game naturally. Even if you put it in the variant file, and you generate your variant with autofit, the weapon would get lost. My suggestion is that REFRAIN from writing the tier of a weapon above 3, unless you want it to be a weapon that is almost purely used by player. For the military productions, it's more or less not affected as long as the faction knows the weapon. I believe you could set a 'restricted' or 'no_sell' tag with the weapon if you don't want to see it on markets.

Sounds like no_sell + dealer might be the best option then. I'm not doing weapons atm, but in the past (personal mod) I felt that it was too easy to flood the market and dilute the pool of weapon variety.
Logged

Anexgohan

  • Lieutenant
  • **
  • Posts: 80
  • Anexweapons
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10591 on: March 30, 2024, 05:18:26 AM »

Any know of a spreadsheet / google doc that I can use to calculate weapon damage for balancing.
I remember there was such a google doc i used 2 years ago, where i could enter the damage, burst, reload, etc and it would show how much dps it did and per shot.
Anyone member?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24948
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10592 on: March 30, 2024, 09:46:59 AM »

hi, do you know if something like this idea is already existing, or if it would be possible to do in the game?

...

im not sure if its easy to set up limits in the game, but as a self-enforced player rule, it would be something like this:
- you can add any other ships to the fleet, BUT can only deploy your main huge starter ship in combats where possible.
- you can only mount weapon modules and fighters that you FIND or win in battle to your ship.
- BUT you can buy any weapon and fighters etc from trading, BUT only to replace something you already have found.
(you can replace the mining lasers in this way but ONLY after filling all 50 weapon mounts first)
(you can replace the mining pod fighters in this way but ONLY after filling all 10 fighter slots with fighters first)
(you can always buy things when you want, to save them for swapping out later, and can buy/sell items for trading, even weapons and fighters, just follow the rules above) :o)


extra ideas: you can buy another super massive starter ship from traders at a huge cost, but only after you have maxxed out your 1st one.
challenge will be to end up with a fleet of super massive ships in this way, completing all mounts and fighter slots in this way, 1 big ship at a time :O)

can something like this be done in game? a lot of self-enforced rules will make it easier, but am not sure if making such a big sturdy ship is possible, with alll the weapon mounts for energy/missiles/balistics and figher slots are possible, and with high enough stats to be able to move/shoot/shield/armour etc? :)

The game makes no distinction between where you got a weapon - a stack of 10 pulse lasers is a stack of 10 pulse lasers, regardless of how many you found vs how many you bought. So this would be complicated to try to manage, these are not the sort of rules that map nicely onto what the game does/keeps track of.


A quick question. Does anyone know how to make combat screenshots? I want to make some to post on my Mod page, but I don't know how to do this. Everytime when I try to make a screenshot, the game would not stop, and I end up missing those best instances during a combat. Or is it necessary that I have to let the AI fight the battle and be a pure screenshot taker.

Is pressing PrintScreen not working?

Any know of a spreadsheet / google doc that I can use to calculate weapon damage for balancing.
I remember there was such a google doc i used 2 years ago, where i could enter the damage, burst, reload, etc and it would show how much dps it did and per shot.
Anyone member?

Sorry, not aware of a spreadsheet. But the game computes and prints some of this info to the log when starting up - search for "Derived weapon info".)
Logged

ctuncks

  • Commander
  • ***
  • Posts: 152
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10593 on: March 30, 2024, 09:28:28 PM »

Any know of a spreadsheet / google doc that I can use to calculate weapon damage for balancing.
I remember there was such a google doc i used 2 years ago, where i could enter the damage, burst, reload, etc and it would show how much dps it did and per shot.
Anyone member?

I think some of Vayra's mods had them, but I personally found them not as useful as I would have liked, so I made my own in excel, granted it was somewhat flawed in the end too.
Logged

AccuracyThruVolume

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10594 on: April 01, 2024, 06:11:18 AM »

Hello.

I am working on a beam weapon that does additional damage based on the flux level of the ship that fires the beam.

Here is my code:

Code
package data.scripts.weapons;

import com.fs.starfarer.api.combat.WeaponAPI;
import com.fs.starfarer.api.combat.BeamAPI;
import com.fs.starfarer.api.combat.BeamEffectPlugin;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.CombatEntityAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.util.IntervalUtil;



public class DemiurgCuttingBeam implements BeamEffectPlugin
{

    private final IntervalUtil fireInterval = new IntervalUtil(0.1f, 0.1f); //interval between applying flux
    private float FluxLevel = 0f;
    private float MaxFluxLevel = 0f;
    private float FluxPercentage = 0f;

    private float BaseBeamDamageMulti = 0f;

    public static String DAMAGE_MOD_ID = "demiurgmining_dam_mod";

    @Override
    public void advance(float amount, CombatEngineAPI engine, BeamAPI beam)
{

        if (engine.isPaused())
{
            return;
        }

        fireInterval.advance(amount);

        CombatEntityAPI target = beam.getDamageTarget();
        //If we have a target, target is a Ship
        if (target != null && target instanceof ShipAPI)
{
            if (fireInterval.intervalElapsed())
{
                if (beam.getBrightness() >= 1f)
{
                    ShipAPI targetship = (ShipAPI) target; //cast as ship
                    ShipAPI firingship = beam.getSource();

                    FluxLevel = firingship.getCurrFlux();
                    MaxFluxLevel = firingship.getMaxFlux();
                    FluxPercentage = ((FluxLevel/MaxFluxLevel) * 100);

                    if (FluxPercentage < 20 )
                    {
                        BaseBeamDamageMulti = 1;
                    }
                    else if ((FluxPercentage >= 20 ) &&  (FluxPercentage < 30 ))
                    {
                        BaseBeamDamageMulti = 2;
                    }
                    else if ((FluxPercentage >= 30 ) &&  (FluxPercentage < 40 ))
                    {
                        BaseBeamDamageMulti = 3;
                    }
                    else if ((FluxPercentage >= 40 ) &&  (FluxPercentage < 50 ))
                    {
                        BaseBeamDamageMulti = 4;
                    }
                    else if ((FluxPercentage >= 50 ) &&  (FluxPercentage < 60 ))
                    {
                        BaseBeamDamageMulti = 5;
                    }
                    else if ((FluxPercentage >= 60 ) &&  (FluxPercentage < 70 ))
                    {
                        BaseBeamDamageMulti = 6;
                    }
                    else if ((FluxPercentage >= 70 ) &&  (FluxPercentage < 80 ))
                    {
                        BaseBeamDamageMulti = 7;
                    }
                    else if (FluxPercentage >= 80 )
                    {
                        BaseBeamDamageMulti = 8;
                    }

                    if (target.getShield() != null && target.getShield().isWithinArc(beam.getTo()))  // target has a shield, beam hits shield
                    {
                        targetship.getFluxTracker().increaseFlux(BaseBeamDamageMulti * beam.getWeapon().getDerivedStats().getDps(), false); //apply flux
                    }
                    else if (target.getShield() == null || (!(target.getShield().isWithinArc(beam.getTo()))))  // No Shield or not hitting target's shield
                    {
                        if (BaseBeamDamageMulti > 1)
                        {
                            targetship.getMutableStats().getBeamDamageTakenMult().modifyMult(DAMAGE_MOD_ID, 1f + BaseBeamDamageMulti * 0.01f);
                        }
                        else
                        {
                            targetship.getMutableStats().getBeamDamageTakenMult().unmodify(DAMAGE_MOD_ID);
                        }
                    }
                }

            }

        }
    }
}


It does seem to compile and do the additional damage as flux raises.
My question is, can this code as above cause the additional damage multiplier to stay on the target ship and not be removed?  If so is there a more reliable way to remove the damage multiplier?
Logged

Aku1a

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10595 on: April 01, 2024, 09:34:30 AM »

So im having problems adding my weapons to blueprints in the game. Ive added them to their own weapons_data.cvs and it shows in the codex but it isnt listed in the blueprints that should have them. I tried copy pasting a vanilla weapon in but it disappeared from the blueprint it was in after i did that. Im not sure whats wrong because the files are where they should be because it reads all the stats i give the weapons.
« Last Edit: April 01, 2024, 09:36:33 AM by Aku1a »
Logged

Axisoflint

  • Ensign
  • *
  • Posts: 41
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10596 on: April 01, 2024, 11:57:35 AM »

After getting the urge to mod the list of ship names for my faction, I found a mod that does that, altered it for my purposes (purely for my personal use, I'm not intending to distribute it and claim credit for someone else's work), but in the process I was looking at the vanilla ship names list and there's a #'d out section for names for specific ship classes. Is there a way to specify which names go to which class?

Ah, that's very old and I don't think it ever actually was implemented.

Also, on a slightly different but related note, is it possible to have some sort of toggle so that names aren't re-used unless there are no names left on the list?

There isn't sorry!

No problem in either case, just curious :) Thanks!
Logged

AccuracyThruVolume

  • Commander
  • ***
  • Posts: 141
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10597 on: April 01, 2024, 04:46:44 PM »

After getting the urge to mod the list of ship names for my faction, I found a mod that does that, altered it for my purposes (purely for my personal use, I'm not intending to distribute it and claim credit for someone else's work), but in the process I was looking at the vanilla ship names list and there's a #'d out section for names for specific ship classes. Is there a way to specify which names go to which class?




Ah, that's very old and I don't think it ever actually was implemented.

Also, on a slightly different but related note, is it possible to have some sort of toggle so that names aren't re-used unless there are no names left on the list?

There isn't sorry!

No problem in either case, just curious :) Thanks!

My solution to the ship names was to just make a list of over one thousand names for every faction in my mod.  Should make repeats kinda rare  :-)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24948
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10598 on: April 01, 2024, 04:59:13 PM »

My question is, can this code as above cause the additional damage multiplier to stay on the target ship and not be removed?  If so is there a more reliable way to remove the damage multiplier?

It looks like it could stick around permanently, yes. I'd suggesting using the script to add an implementation of DamageDealtModifier to the ship with the weapon instead.


So im having problems adding my weapons to blueprints in the game. Ive added them to their own weapons_data.cvs and it shows in the codex but it isnt listed in the blueprints that should have them. I tried copy pasting a vanilla weapon in but it disappeared from the blueprint it was in after i did that. Im not sure whats wrong because the files are where they should be because it reads all the stats i give the weapons.

What goes into blueprint packages is determined by the tags the weapon has, so I'd look at those.
Logged

pgamesfood

  • Ensign
  • *
  • Posts: 26
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10599 on: April 03, 2024, 04:06:50 AM »

hi, do you know if something like this idea is already existing, or if it would be possible to do in the game?

...

im not sure if its easy to set up limits in the game, but as a self-enforced player rule, it would be something like this:
- you can add any other ships to the fleet, BUT can only deploy your main huge starter ship in combats where possible.
- you can only mount weapon modules and fighters that you FIND or win in battle to your ship.
- BUT you can buy any weapon and fighters etc from trading, BUT only to replace something you already have found.
(you can replace the mining lasers in this way but ONLY after filling all 50 weapon mounts first)
(you can replace the mining pod fighters in this way but ONLY after filling all 10 fighter slots with fighters first)
(you can always buy things when you want, to save them for swapping out later, and can buy/sell items for trading, even weapons and fighters, just follow the rules above) :o)


extra ideas: you can buy another super massive starter ship from traders at a huge cost, but only after you have maxxed out your 1st one.
challenge will be to end up with a fleet of super massive ships in this way, completing all mounts and fighter slots in this way, 1 big ship at a time :O)

can something like this be done in game? a lot of self-enforced rules will make it easier, but am not sure if making such a big sturdy ship is possible, with alll the weapon mounts for energy/missiles/balistics and figher slots are possible, and with high enough stats to be able to move/shoot/shield/armour etc? :)

The game makes no distinction between where you got a weapon - a stack of 10 pulse lasers is a stack of 10 pulse lasers, regardless of how many you found vs how many you bought. So this would be complicated to try to manage, these are not the sort of rules that map nicely onto what the game does/keeps track of.



ah ok thanks for the reply - its ok, i can use "self enforced" rules for those parts :)
 i just wasnt sure if there was a way for the game to allow for a huge ship with lots of weapon slots, (and flux or stat levels to cater for their firing etc)
as i have seen some capital ships, but not any with 50 weapon slots in a mixed harpoint type before.
Logged
my best fleet so far :) rag tag fugitive forty k fleet :)
https://postimg.cc/gallery/DTzHfDp
88x Dmods but still fighting :)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24948
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10600 on: April 04, 2024, 11:43:26 AM »

Ah - that part (the huge ship) is definitely doable!
Logged

pgamesfood

  • Ensign
  • *
  • Posts: 26
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10601 on: April 05, 2024, 03:00:01 AM »

Ah - that part (the huge ship) is definitely doable!

cool, thanks - i'll try and see if i can learn how to use the ship editor mod to make a big ship for the concept  :)
Logged
my best fleet so far :) rag tag fugitive forty k fleet :)
https://postimg.cc/gallery/DTzHfDp
88x Dmods but still fighting :)

Kaysaar

  • Admiral
  • *****
  • Posts: 536
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10602 on: April 05, 2024, 03:23:20 AM »

Is there any way to hide jump point icons on map in star systems?
Correction is there any way to replicate form JumpPoint class behaviour of planetRenderer?
This is obfuscated class so could you give hint Alex how to make one properly?
« Last Edit: April 05, 2024, 09:20:19 AM by Kaysaar »
Logged

VladimirVV

  • Commander
  • ***
  • Posts: 212
  • Captain Vladimir Reporting In!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10603 on: April 05, 2024, 07:16:37 PM »

hi, do you know if something like this idea is already existing, or if it would be possible to do in the game?

...

im not sure if its easy to set up limits in the game, but as a self-enforced player rule, it would be something like this:
- you can add any other ships to the fleet, BUT can only deploy your main huge starter ship in combats where possible.
- you can only mount weapon modules and fighters that you FIND or win in battle to your ship.
- BUT you can buy any weapon and fighters etc from trading, BUT only to replace something you already have found.
(you can replace the mining lasers in this way but ONLY after filling all 50 weapon mounts first)
(you can replace the mining pod fighters in this way but ONLY after filling all 10 fighter slots with fighters first)
(you can always buy things when you want, to save them for swapping out later, and can buy/sell items for trading, even weapons and fighters, just follow the rules above) :o)


extra ideas: you can buy another super massive starter ship from traders at a huge cost, but only after you have maxxed out your 1st one.
challenge will be to end up with a fleet of super massive ships in this way, completing all mounts and fighter slots in this way, 1 big ship at a time :O)

can something like this be done in game? a lot of self-enforced rules will make it easier, but am not sure if making such a big sturdy ship is possible, with alll the weapon mounts for energy/missiles/balistics and figher slots are possible, and with high enough stats to be able to move/shoot/shield/armour etc? :)

The game makes no distinction between where you got a weapon - a stack of 10 pulse lasers is a stack of 10 pulse lasers, regardless of how many you found vs how many you bought. So this would be complicated to try to manage, these are not the sort of rules that map nicely onto what the game does/keeps track of.


A quick question. Does anyone know how to make combat screenshots? I want to make some to post on my Mod page, but I don't know how to do this. Everytime when I try to make a screenshot, the game would not stop, and I end up missing those best instances during a combat. Or is it necessary that I have to let the AI fight the battle and be a pure screenshot taker.

Is pressing PrintScreen not working?

Any know of a spreadsheet / google doc that I can use to calculate weapon damage for balancing.
I remember there was such a google doc i used 2 years ago, where i could enter the damage, burst, reload, etc and it would show how much dps it did and per shot.
Anyone member?

Sorry, not aware of a spreadsheet. But the game computes and prints some of this info to the log when starting up - search for "Derived weapon info".)

It works, thanks!
Logged
Greetings from the P-Space! --Captain Vladimir
My Mods:

VladimirVV

  • Commander
  • ***
  • Posts: 212
  • Captain Vladimir Reporting In!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #10604 on: April 05, 2024, 07:19:27 PM »

Another quick question.

Are there some ways we can use to make a ship always get deployed during battles like a station? I made an AI only ship, and I put it in an allied fleet. It is very annoying and lore breaking that sometimes the allied fleet AI decides to hold that ship in reserve if the player has got a good fleet to join the fight.
« Last Edit: April 05, 2024, 07:21:13 PM by VladimirVV »
Logged
Greetings from the P-Space! --Captain Vladimir
My Mods:
Pages: 1 ... 705 706 [707] 708 709 ... 748