Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 255 256 [257] 258 259 ... 458

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

Histidine

  • Admiral
  • *****
  • Posts: 2801
    • View Profile
    • Bitbucket profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3840 on: April 25, 2018, 04:02:37 AM »

Is there an equivalent of reportEncounterLootGenerated() for loot from salvaging an entity (including debris fields)? If not, could we get one (or probably better, a common method that handles loot from any source)?

There's a couple of things one might want to do with this, but the one I'd like to do is to scrub out things that should not be in loot for whatever reason.
A mod I'm helping which needs to have its content available nowhere outside of a specific region of space, and could use this as a fallback in case the "normal" prevention methods don't work.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17035
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3841 on: April 25, 2018, 09:49:16 AM »

There isn't, no. Might be a good thing to add; I'll see if I can manage that at some point.

(Any particular reason the "normal" prevention methods aren't working, or are they just not expected to be reliable in the first place?)
Logged

Histidine

  • Admiral
  • *****
  • Posts: 2801
    • View Profile
    • Bitbucket profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3842 on: April 26, 2018, 08:04:29 AM »

That would be helpful, thanks Alex!

(Yeah, I was thinking it'd mostly be a "this turned out to have a bug, in lieu of waiting for a new Starsector release we'll write a script to work around it" kind of backup thing)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17035
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3843 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 #3844 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: 17035
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3845 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: 148
  • 'Make Jumpgates Great Again'
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3846 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: 61
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3847 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: 1866
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3848 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: 258
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3849 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: 61
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3850 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: 570
  • -- D O C T O R --
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3851 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: 61
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3852 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: 236
  • Degenerate Core
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3853 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: 17035
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3854 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
Pages: 1 ... 255 256 [257] 258 259 ... 458