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 ... 255 256 [257] 258 259 ... 706

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3840 on: April 26, 2018, 09:21:46 AM »

Oddly enough, just ended up putting together a better listener system for campaign events for an entirely unrelated reason.

The main point is to move away from a listener having to implement every single reportXXX method, and by default needing to be registered for everything, as that really limits how many listeners you can have overall, and makes it a pain to adjust the involved interfaces.

Since that makes it considerably easier to add new events, added this:

Code: java
public interface ShowLootListener {
void reportAboutToShowLootToPlayer(CargoAPI loot, InteractionDialogAPI dialog);
}

The way to add it would be like so:
Global.getSector().getListenerManager().addListener(listener);


And it would also need to be removed manually, if that was ever required.

ListenerManager interface:

Code: java
public interface ListenerManagerAPI {

void addListener(Object listener);
void addListener(Object listener, boolean isTransient);

void removeListener(Object listener);
void removeListenerOfClass(Class<?> c);

boolean hasListener(Object listener);
boolean hasListenerOfClass(Class<?> c);

<T> List<T> getListeners(Class<T> c);

}

Now, I haven't converted everything to use this, but will probably at least make it work for fleet events (battle, despawn), and anything new will use this scheme.
Logged

gun&drink

  • Ensign
  • *
  • Posts: 27
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3841 on: April 28, 2018, 05:53:25 AM »

I was testing a hullmod that gives you a lot of speed, but despite the max speed being at 690, the ship won't go faster that 618: the speed bar merely fills up until that speed, leaving some unused space. is there a hard cap in ship speed? can it be removed?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3842 on: April 28, 2018, 08:26:16 AM »

Ship speed is capped at 600; you're seeing it go above 600 due to 1 frame's worth of acceleration. It's not possible to remove it. It's sort of a sanity check/failsafe; at some point beyond that level, issues such as weird collision behavior are likely.
Logged

c plus one

  • Commander
  • ***
  • Posts: 170
  • 'Make Jumpgates Great Again!'
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3843 on: April 28, 2018, 05:59:11 PM »

On a related note, can fighters and/or missiles travel faster than speed 600?

If so, how much faster?
Logged
Quote from: Lopunny Zen
you are playing them wrong then..

Don't tell me I'm playing anything wrong in a singleplayer sandbox game. Just don't.

Twogs

  • Lieutenant
  • **
  • Posts: 76
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3844 on: May 03, 2018, 10:12:41 AM »

Hey guys,

I found the error myself, one space to much
« Last Edit: May 03, 2018, 10:44:24 AM by Twogs »
Logged

TJJ

  • Admiral
  • *****
  • Posts: 1905
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3845 on: May 03, 2018, 10:47:11 AM »

Hey guys,

trying to get my own mini-mod up and running.

So far I only have changed some stats in the ship.csv for my (right now still the tempest sprite using) ship.

It got a name and an ID, it got these new stats, thats it. But the game won't start anymore. Am I missing something so simple that I will be laughing about it?

Quote
5989 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NumberFormatException: For input string: "255                                    "
java.lang.NumberFormatException: For input string: "255                                    "
   at java.lang.NumberFormatException.forInputString(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at java.lang.Integer.parseInt(Unknown Source)
   at com.fs.starfarer.loading.ShipHullSpecLoader.super(Unknown Source)
   at com.fs.starfarer.loading.ShipHullSpecLoader.Ò00000(Unknown Source)
   at com.fs.starfarer.loading.SpecStore.OO0000(Unknown Source)
   at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

Looks like it doesn't like the quote around an integer literal; perhaps you're missing the closing quote, or it shouldn't have quotes at all? (or perhaps you've missed an element separator?)
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 405
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3846 on: May 04, 2018, 05:16:49 PM »

Guys. I don't know if its how things suppose to work but some modded ships have exhaust coming from their weapons when they move backwards. It looks like some sort of engine exhaust but it come from weapon mounts.
Can provide screenshots if necessary.
How to remove it?

Twogs

  • Lieutenant
  • **
  • Posts: 76
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3847 on: May 05, 2018, 05:19:21 AM »

Can the explosionspec be modified so it will spread EMP damage instead of normal damage?

So energy/emp weapon would - with standard parameters - spread it's energy damage part right now, but not it's emp damage part. Can that be changed?
Logged

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 #3848 on: May 05, 2018, 05:41:58 AM »

From memory, the answer is no. In order to do EMP AoE, you need to do some kind of script wizadry that is beyond me. I think it's been asked earlier in this thread, actually.

Twogs

  • Lieutenant
  • **
  • Posts: 76
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3849 on: May 05, 2018, 06:24:23 AM »

Than another EMP question

Is it possible to recreate the effect the Omen's emp has on missiles? I.e. disabling their guidance?

Because just giving your weapon EMP damage doesn't do the trick
Logged

Nicke535

  • Commander
  • ***
  • Posts: 240
  • Degenerate Core
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3850 on: May 06, 2018, 04:46:12 AM »

Ok, not sure if this is the right thread, but here we go.

It seems as though something is very wierd when it comes to damage calculation with Proximity Fuse rounds. Featured below are 4 images, all using the same weapon firing ~20 projectiles with a combined damage of 400 (high explosive).

Spoiler



[close]

As you can see, not only is the damage very varying, it deals *significantly* more damage to armor and hull, around 10-30 times as much damage, in fact. Shield damage seems perfectly sane, and doesn't vary as much. Does anyone know if this is a vanilla issue with Proximity Fuse, or am I missing something obvious?

The projectile file:
Spoiler
Code
{
"id":"nictoy_heavy_flame_projectile",
"specClass":"projectile",
"spawnType":"BALLISTIC",
"collisionClass":"PROJECTILE_FF",
"collisionClassByFighter":"PROJECTILE_FIGHTER",
"length":40.0,
"hitGlowRadius":50,
"width":4.0,
"fadeTime":0.3,
"fringeColor":[255,135,50,0],
#"coreColor":[255,225,175,225],
"coreColor":[255,255,255,0],
"glowColor":[255,135,50,100],
"glowRadius":10,
"textureScrollSpeed":128.0,
"pixelsPerTexel":5.0,
"bulletSprite":"graphics/nictoy/missiles/piercer_shot.png",
"behaviorSpec":{"behavior":"PROXIMITY_FUSE",
"shotRangeVariance":0.95,
"range":25,
"explosionSpec":{"duration":0.3f,
"radius":50,
"coreRadius":25, # full damage within core radius - also equal to proximity fuse range
"collisionClass":PROJECTILE_FF,
"collisionClassByFighter":PROJECTILE_FIGHTER,
"particleSizeMin":2.2,
"particleSizeRange":4.5,
"particleDuration":0.4,
"particleCount":3,
"particleColor":[255,135,50,175],
"sound":"nictoy_drakon_heavy_flame_detonation"},
}
}
[close]

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3851 on: May 06, 2018, 10:40:13 AM »

Than another EMP question

Is it possible to recreate the effect the Omen's emp has on missiles? I.e. disabling their guidance?

Because just giving your weapon EMP damage doesn't do the trick

Basically you want something like this:

if (missile.getEmpResistance() <= 0) {
   missile.flameOut();
} else {
   missile.decrEMPResistance();
}

EMP resistance is the number of EMP hits a missile can ignore for the purpose of getting insta-flamed-out.


Ok, not sure if this is the right thread, but here we go.

Hard to say re: shield w/o knowing what the shield efficiency on the target is; could be high.

I'd try changing "coreRadius":25 to be higher to see if that makes a difference. I could see variance possibly coming from the core and the fuse radius being the same.

Also, there's a chance that some fuse rounds are outright missing - i.e. exploding from the proximity detection not matching the actual collision detection. That's a possibility and is just "how things work", though generally speaking you'd see it more with long/narrow ships and not this sort of thing.
Logged

Nicke535

  • Commander
  • ***
  • Posts: 240
  • Degenerate Core
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3852 on: May 07, 2018, 03:40:57 AM »

Ok, not sure if this is the right thread, but here we go.

Hard to say re: shield w/o knowing what the shield efficiency on the target is; could be high.

I'd try changing "coreRadius":25 to be higher to see if that makes a difference. I could see variance possibly coming from the core and the fuse radius being the same.

Also, there's a chance that some fuse rounds are outright missing - i.e. exploding from the proximity detection not matching the actual collision detection. That's a possibility and is just "how things work", though generally speaking you'd see it more with long/narrow ships and not this sort of thing.

I completely understand what you're saying, and that could be causing damage to be below the projectile damage. I can see that.

What i *don't* understand, is how any of that would *increase* the damage: as i said, the projectiles are only ~20 damage each: they shouldn't add up to ~4000 no matter how many detonate too early.

[PS] : Changed core radius to 40 and 0, didn't affect anything.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3853 on: May 07, 2018, 08:26:23 AM »

Aha, I missed that part, sorry! Read it as being 400 per shot, not total.

Are you 100% sure the per-shot damage is indeed 20? Also, might be worth testing in an as-vanilla-as-possible to try to narrow down what might be going on.

... in other words, no, it doesn't make sense, and I can't see how that would happen either. Although it's certainly possible if say the damage-dealt or damage-received stats of the ship/target are modified by something else.
Logged

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 430
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3854 on: May 08, 2018, 05:34:27 AM »

For now, how to decrease the chance of ship's recover that made them catchable after battle? member.getStats().getDynamic().getStat(Stats.BOARDING_CHANCE_MULT)?
Logged
My mods


Pages: 1 ... 255 256 [257] 258 259 ... 706