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 ... 261 262 [263] 264 265 ... 706

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

noob_i_am

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3930 on: July 13, 2018, 03:22:03 AM »

Im a fan of ballistic weapons and such i love to see pretty fireworks, can someone suggest me a faction mod that, preferably, is working with Nexerelin and Dyna Sector that has a nice ballistic weapons for capital ships. From what i gather, most of the factions avalaible are focusing on energy weapons - i myself like to fly and own capitals with long range balistic weapons.

So anyone have an idea?
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3931 on: July 13, 2018, 09:16:23 PM »

Im a fan of ballistic weapons and such i love to see pretty fireworks, can someone suggest me a faction mod that, preferably, is working with Nexerelin and Dyna Sector that has a nice ballistic weapons for capital ships. From what i gather, most of the factions avalaible are focusing on energy weapons - i myself like to fly and own capitals with long range balistic weapons.

So anyone have an idea?

DiableAvionics have many large ballistic weapons ^^.
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

King Alfonzo

  • Admiral
  • *****
  • Posts: 679
  • -- D O C T O R --
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3932 on: July 14, 2018, 08:07:56 PM »

Blackrock has the ADC Ironweaver, which is hilarious - it's a space shotgun. In a large mount. It's as amazing as you think it is. Also has a Ferrocannon which is one of the most satisfying point-and-eliminate weapons, and the Shard Megacannon, which is hands down one of the best large ballistics options if coupled with a dedicated Targeting core.

SCY has some interesting options, like a gun that can shoot around shields, or a gun that changes from explosive to kinetic the further it travels.

Templar has some hilarious options if you can stomach the flux and OP cost for them, like a gun that shoots straight through shields, ships, etc, and one that shoots essentially a mini-EMP generator like the omen's.

bananana

  • Commander
  • ***
  • Posts: 226
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3933 on: July 28, 2018, 08:09:01 PM »

Sup, FS
i "made" a lil' script. it works, kinda.
can someone look it over and check if there is horribly wrong with it?
Spoiler
Code: java
package data.scripts;

import com.fs.starfarer.api.combat.*;
import com.fs.starfarer.api.util.IntervalUtil;
import org.lazywizard.lazylib.MathUtils;
import org.lazywizard.lazylib.combat.CombatUtils;
import java.util.List;
import org.lwjgl.util.vector.Vector2f;
import java.awt.Color;
import org.lazywizard.lazylib.combat.entities.SimpleEntity;
import java.util.ListIterator;

public class TF_EF_VENT implements EveryFrameWeaponEffectPlugin {


float delay = 0.3f;
private IntervalUtil fluxInterval = new IntervalUtil(delay, delay*1.5f);

public void advance(float amount, CombatEngineAPI engine, WeaponAPI weapon) {
if (engine.isPaused()) return;
if (!weapon.getShip().isAlive()) return;



ShipAPI dfship = weapon.getShip();
Vector2f dftip = MathUtils.getPointOnCircumference(weapon.getLocation(),50f,weapon.getCurrAngle());
float fluxLevel = dfship.getFluxTracker().getFluxLevel();
float maxflux = dfship.getFluxTracker().getMaxFlux();
float dfarea = weapon.getRange();
float dfdamage = weapon.getDerivedStats().getDps()*delay;
float dfflux = weapon.getDerivedStats().getEmpPerSecond()*delay;
Color dfcolor1 = new Color(255, 150, 150);
Color dfcolor2 = new Color(255, 255, 255);

fluxInterval.advance(amount * dfship.getMutableStats().getTimeMult().getModifiedValue());


if (fluxInterval.intervalElapsed()) {

engine.spawnEmpArc(
dfship, //damageSource
dftip, //point
dfship, //pointAnchor
dfship,
DamageType.ENERGY,
0, // damage
0, // emp
100000f, // max range
"",
(dfdamage/4)*(dfship.getFluxTracker().getCurrFlux()/dfship.getFluxTracker().getMaxFlux())+1f,
dfcolor1,
dfcolor2);


if (dfship.getFluxTracker().isOverloadedOrVenting()) {
List <CombatEntityAPI> targets = CombatUtils.getEntitiesWithinRange(dftip,dfarea);

ListIterator<CombatEntityAPI> iter2 = targets.listIterator(targets.size());
while (iter2.hasPrevious()) {
CombatEntityAPI target = iter2.previous();
if (target.getOwner() == dfship.getOwner()) {
iter2.remove();
continue;
}
if (target instanceof ShipAPI) {
ShipAPI ship = (ShipAPI) target;
if (ship.getCollisionClass() == CollisionClass.NONE || !ship.isAlive()) {
iter2.remove();
continue;
}
}
if (!(target instanceof ShipAPI) && !(target instanceof MissileAPI)) {
iter2.remove();
}
}

CombatEntityAPI target = new SimpleEntity(MathUtils.getRandomPointInCircle(dftip, dfarea));
if (iter2.hasNext()){
target = iter2.next();
}
engine.spawnEmpArc(
dfship, //damageSource
dftip, //point
dfship, //pointAnchor
target,
DamageType.ENERGY,
dfdamage/2, // damage
dfflux/2, // emp
100000f, // max range
"tachyon_lance_emp_impact",
dfdamage/4,
dfcolor1,
dfcolor2);

dfship.getFluxTracker().decreaseFlux(dfflux);
if (target instanceof ShipAPI){
((ShipAPI) target).getFluxTracker().increaseFlux(dfflux,true);
}

}
}
}
}
[close]

also a question:
how can i make a weapon not show in weapon groups, while keeping it available for sale
« Last Edit: July 28, 2018, 08:11:29 PM by passwalker »
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.

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3934 on: August 18, 2018, 03:30:37 AM »

Question about something:

My mod add bounty available on a com relay.
These bountys spawn near of the com relay.
Theses bountys fleet are hostile to the player but neutral to every others factions.
When we defeat theses guys, every market on the system wannot trade with you for 2 months or more.
This is normal? If yes, how resolve this problem?
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3935 on: August 18, 2018, 08:15:45 AM »

also a question:
how can i make a weapon not show in weapon groups, while keeping it available for sale

Oh, hey - sorry I totally missed that. I'm not sure I understand the question, exactly - do you want the weapon to be mounted on the ship by the player but not show up in weapon grounds? Or?

Question about something:

My mod add bounty available on a com relay.
These bountys spawn near of the com relay.
Theses bountys fleet are hostile to the player but neutral to every others factions.
When we defeat theses guys, every market on the system wannot trade with you for 2 months or more.
This is normal? If yes, how resolve this problem?

Are you sure they're neutral and not cooperative? Looking at the code, it looks like the "hostile activity near market" timeout gets set for every market within 5500 range that's at worst cooperative with the enemy fleet
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3936 on: August 18, 2018, 09:09:48 AM »

Yes, i have see the code who do that, then, i have looked on my code, and they are neutral. I have put suspicious for be sure, seems to work.
After have talked with the Nexerelin Creator, some of these problems maybe belong to some code.

Thank you!
« Last Edit: August 18, 2018, 09:17:20 AM by Snrasha »
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3937 on: August 29, 2018, 01:24:14 PM »

Hello, i will request a solution for a another problem "Lost progression with the save".


My misc mod need to save some value and list of string and many others values too.
For many week, i have not problem of saving, but when i have inserted the option Endless battle where you can fight round more overpower on each round (with reward), i have a problem of.... integer.

My problem is simple:

Code
public class GS_EndlessContent {
    ...
    private int endlessRound = 0;
    ...
}

This class is on XStream:
Code
        x.alias("GS_EndlessContent", GS_EndlessContent.class);

And some people lost their progression, they are on the round 7, save, alt+f4, then re-launch the game and see with surprise they have now to the round 4.
The integer is saved, but look like the save do not save the current value but a old.
A means to resolve this problem?


Thank!



Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3938 on: August 29, 2018, 02:04:19 PM »

I'd be very surprised if this problem was related to game-saving. I don't recall ever seeing any issues with incorrect values being saved. The only case that was remotely similar was when a derived class had a private variable with the same name as a base class; perhaps that's what's going on here? Other than that, I'd still suspect some sort of logic error in your code - this sort of save problem seems very unlikely.
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3939 on: August 30, 2018, 12:42:52 AM »

This is all variable and the two methods who use the endlessRound, the endlessRound is used only for be displayed on a com relay.
Code
public class GS_EndlessContent {

    private int endlessPower = 10;
    private int endlessRound = 0;
    private int roundloop = 0;
    private int reward = 0;
    private int rank = 0;

    private static final List<String> SHIPS = new ArrayList();

    static {
        SHIPS.add("GS_Guppy_Empty");
        SHIPS.add("GS_Night_Fury_Empty");
        SHIPS.add("GS_Dragonfly_Empty");
        SHIPS.add("GS_Druid_Empty");
        SHIPS.add("GS_Bloody_Submarine_Empty");
        SHIPS.add("GS_Samurai_Empty");
        SHIPS.add("GS_Guppy_Empty");
        SHIPS.add("GS_Night_Fury_Empty");
        SHIPS.add("GS_Dragonfly_Empty");
        SHIPS.add("GS_Guppy_Empty");
        SHIPS.add("GS_Night_Fury_Empty");
        SHIPS.add("GS_Dragonfly_Empty");
       
    }

    private final Set<Integer> shipTaken = new HashSet<>();
    private List<String> currentShip = new ArrayList<>();

    ...

    public int getEndlessRound() {
        return endlessRound;
    }

    public void incEndlessRound() {

        endlessRound++;
        roundloop++;

        if (roundloop > 4) {
            roundloop -= 5;
            reward++;
            rank++;
            if (rank > 5) {
                reward--;
            }

        }
    }

    ...

}
He do not have a derived class on this class.
For the logic error, this is very strange.
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3940 on: August 31, 2018, 08:12:17 AM »

I need a way to tell a fleet "touch this other fleet, do not run from stronger fleets (target included), ignore sensor state". Is there a fleet AI setting, assignment or whatever that lets me do this?

INTERCEPT seems good at making the fleet wander off in a random direction. I think HOLD might be able to do it, but I still need a way to suppress the fleeing behavior.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3941 on: August 31, 2018, 05:58:25 PM »

Hmm, not sure - I think calling fleet.setMoveDestinationOverride() might do the job. Combined with fleet.getAI().setActionTextOverride() so that it looks like it's doing whatever you want it to be doing, which I *think* is in the current API.


This is all variable and the two methods who use the endlessRound, the endlessRound is used only for be displayed on a com relay.

...

He do not have a derived class on this class.
For the logic error, this is very strange.

That's odd - I don't have a good answer for you. Still doubt it's the save code, though; if it was going to mess up, it'd mess up worse. It wouldn't make much sense for it to just pull a slightly wrong value for that variable out of nowhere.
Logged

Takion Kasukedo

  • Admiral
  • *****
  • Posts: 504
  • No longer drinking (Alcohol that is)
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3942 on: September 03, 2018, 03:46:12 PM »

Clip size question - How do you make the reload longer and adjust clip reload size?

The clip size-per reload isn't mandatory, but i'm really confused about the reload time for said clip. Does it have to be decimals?
Logged
Is now able to cook a decent Creamy Salmon Pasta, amok other things.

Still loves purple. Still not skilled enough to make a mod that doesn't get that one damn error.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3943 on: September 03, 2018, 04:03:54 PM »

If clip size is unspecified, it defaults to 1, btw.

Let's say the clip size is 20. If ammo/second is .1, this means it takes 10 seconds for 1 ammo to regenerate. Since the clip size is 20, it would take 20 * 10 = 200 seconds per clip. A more reasonable ammo/second of 1 would mean a 20 second reload time per clip. Does that make sense?
Logged

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3944 on: September 05, 2018, 03:03:10 AM »

Just checking: EMP disables missile warheads, making them not do damage on collision, right?
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too
Pages: 1 ... 261 262 [263] 264 265 ... 706