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: Planet Search Overhaul (07/13/24)

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - creature

Pages: [1] 2 3 ... 27
1
Hi, I'm trying to add a skill that gives the captain's ship a hullmod, but I'm having trouble actually getting the hullmod to appear and disappear from the ship as the captain is moved from ship to ship. I'm testing this via a clean campaign with just the bare essential mods and a starter fleet with the captain with the custom skill a part of my starting fleet.

I implemented a simple 1-level skill with implements AfterShipCreationSkillEffect. There were only two real statements in the whole file. The first being applying the hullmod when (I assume) the skill is active, in apply():

Code
        @Override
        public void apply(final MutableShipStatsAPI stats, final HullSize hullSize, final String id, final float level) {
        log.info("CALL APPLY BEFORE");
              stats.getVariant().addPermaMod("yrxp_TestSkill");
        }

And the second would be to remove it. Originally, I had it in unapply(), but then I was already having a problem - the hullmod was never being removed. So I tried placing it in unapplyEffectsAfterShipCreation():

Code

@Override
public void unapplyEffectsAfterShipCreation(ShipAPI ship, String id) {
    log.info("CALL UNAPPLY AFTER");
            ship.getVariant().removePermaMod("yrxp_TestSkill");

}

The problem with this now, is that the hullmod is always removed... And worse still, when I reassign the captain to a different ship, that's actually when the hullmod appears - left on the ship where the captain was just removed from. Very strange! So I figured there must something going on with the order in which these functions are being called, and sure enough, the logs showed that weirdness:

Code
294895 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294895 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294896 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294897 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294898 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294899 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294900 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294900 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294901 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294902 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294903 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294903 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294904 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294904 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY BEFORE
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294905 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL UNAPPLY AFTER
294906 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY AFTER
294907 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE
294907 [Thread-3] INFO  data.scripts.campaign.skills.yrxp_TestSkill  - CALL APPLY BEFORE

Whenever I get the code to refresh - that is, switching the view from a different ship and back to the ship with the captain in question - the above logs appear. It was simply a result of adding a single log line to apply(), unapply(), applyEffectsAfterShipCreation() and unapplyEffectsAfterShipCreation(). Firstly, and what I expected, apply() was being called (though it was being called a heck of a lot which was a bit strange). This means that the call for adding the hullmod was certainly being called. however, what I find then is that, for some reason, the unapply() and unapplyEffectsAfterShipCreation() functions also get called? Did I misundestand that the unapply calls would only when the captain is removed? In any case, they, too are being called in rapid succession, and with seemingly no pattern to it. And that's probably what's causing the weird behavior.

tl;dr: How can I make it so a hullmod is applied to a captain's ship, and is then removed when they are dismissed or sent to a different ship?

2
I don't remember, but you could trying setting a SUPPORT wing's range to non-zero to see what that does.
I think you might be looking for some of the tags that Omega fighter wings use (probably either "leader_no_swarm" and "wingmen_no_swarm" or "attack_at_an_angle"? Not 100% on what the tags do exactly but I believe Omega fighters circle their target and attack from a distance rather than closing in like normal fighters)

I'm afraid both of these don't quite do the trick. Giving non-zero range to SUPPORT doesn't seem to do anything as the fighters don't move away from the ship even after being set to Engage.

I also tried each of the omega fighter tags and while it's aesthetically pleasing to see the fighters maintain formation while fighting, it seems the wing as a whole kind of still follows the usual routine of flying past the target ship. There are also some unexpected side effects to it like, while maintaining formation, some fighters in larger wings (4+, CLAW or V formation) get assigned really far away from the target ship and results in them being out of range of their own weapons.

3
I think the Xyphos and Sarissa do what you want, based on what you're describing - I'd suggest looking at their entry in wing_data.csv to see what's different. I think the SUPPORT role might do it.
Ah, sorry, by that, I didn't mean that I wanted them to orbit around their mothership, which is indeed what drones do when set to idle - what I do mean is the behavior of the drones when set to free roam or attack - they maintain a certain distance to the enemy ship while firing. From what I understand, SUPPORT fighters only did the former, right? They will only ever hover around their mothership and never go on the attack.

4
Hi, would there be a way to have fighter wings act like drones in that they just stay some distance away from their target ship while firing rather than rather the strange dance they do where they fly back and forth over the enemy ship, forcing them (the fighter) to keep turning around each time?

5
There is no reference. But, this makes sense - the method is called after the fighter is already created. You could set the ammo on the weapons directly.
Thanks! I'll do so.

6
Hi, I was trying to make some hullmods affecting fighter stats and discovered that some mutableStats did not actually take effect on fighters when called inside applyEffectsToFighterSpawnedByShip(), namely all of the get...AmmoBonus() functions as well as getArmorBonus(). I was thinking, would there happen to be a reference as to what mutableStats commands also work for fighters?

7
Hi, is it possible to dynamically add new (weapon/station) mounts to a ship during battle? In particular, I am thinking of adding a station module to a ship but only during battle, player doesn't have to see it in the refit screen.

8
Modding Resources / Re: [0.96a] Particle Engine (11/27/23)
« on: December 27, 2023, 12:18:04 PM »
Hi, when you get an error like this after calling .burst(), what does it mean? Ran out of memory perhaps?

11419407 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException: null
   at particleengine.ParticleAllocator.allocateParticles(ParticleAllocator.java:174) ~[?:?]
   at particleengine.Particles.burst(Particles.java:475) ~[?:?]
   at particleengine.Particles.burst(Particles.java:438) ~[?:?]
   at data.scripts.utils.yrxp_SpellcastUtils.spawnPEHitSpray(yrxp_SpellcastUtils.java:216) ~[?:?]
   at data.scripts.ai.projectiles.yrxp_ChainmineBombletAI.explodeFX(yrxp_ChainmineBombletAI.java:210) ~[?:?]
   at data.scripts.ai.projectiles.yrxp_ChainmineBombletAI.advance(yrxp_ChainmineBombletAI.java:103) ~[?:?]
   at com.fs.starfarer.combat.entities.Missile$MissileAIWrapper.advance(Unknown Source) ~[starfarer_obf.jar:?]
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source) ~[starfarer_obf.jar:?]
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source) ~[starfarer_obf.jar:?]
   at com.fs.starfarer.combat.CombatState.traverse(Unknown Source) ~[starfarer_obf.jar:?]
   at com.fs.state.AppDriver.begin(Unknown Source) ~[fs.common_obf.jar:?]
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source) ~[starfarer_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source) ~[starfarer_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source) ~[starfarer_obf.jar:?]
   at java.lang.Thread.run(Thread.java:750) [?:1.8.0_392]

9
It's cause crash when I try it

20358235 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.shipsystems.yrxp_CrystalRainStats.apply(yrxp_CrystalRainStats.java:110)
   at com.fs.starfarer.combat.systems.F.advance(Unknown Source)
   at com.fs.starfarer.combat.entities.Ship.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:750)
Thanks for the crash log. Though I wasn't able to personally replicate the crash you're experiencing, I added a failsafe to the area of the code where that crash is happening. I've updated the download links in the OP again with this update, hope it fixes your issue!

10
How to use this Sparkler missile storm on Crystallize FA? It doesn't shoot no matter what I do
Ttry again with broken front armour piece.
This is correct. You can see that the top pods themselves remain covered while the armor is on (or they should be), while the side pods are covered by the armor itself.  They open once the armor is destroyed.

11
Homing lasers fly without homing. ???
Ah, are you using them on a ship without yrxp commisioned crews (if you have that mod, commissioned crews, installed)? Homing lasers can only be guided by Yuri crews (because they do so telepathically -- lore)

12
I am impressed that you work on holidays, especially year end, hope this isn't too much.
I've updated the links in the opening post, as well as the mirror, which is here: https://mega.nz/file/51IwiapB#szkaMM5wLSFvxWihcaIuEEFnqN6TZ5Sz2gVDD7qjtqA And no worries! It isn't work, it's my hobby. I only do it whenever I feel like it; you just happened to catch me at a very favorable time!

13
Everytime I try to generate a world this error appears
exerelin/campaign/PlayerFactionStore
And this is what appears in the log
java.lang.NoClassDefFoundError: exerelin/campaign/PlayerFactionStore
   at data.scripts.YRXPModPlugin.onGameLoad(YRXPModPlugin.java:408)
   at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
   at com.fs.starfarer.ui.public.dismiss(Unknown Source)
   at com.fs.starfarer.ui.newui.do.dismiss(Unknown Source)
   at com.fs.starfarer.ui.newui.classsuper.advanceImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.advance(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.advanceImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: exerelin.campaign.PlayerFactionStore
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 17 more
Is my PC the problem?
Oh, I inadvertently inserted a dependency on nexerelin. I'll fix this now. Hang tight

14
Nice to see the update out (even if the AI-assist stuff looks visually a little funky imo), though I'm fairly certain HVBs can be messed about with to work in tbe magicbounty system pretty easily, if you wanna get that going.
Yep, that's the idea! But more importantly than the engine I'll be using, I more wanted to bring the looks of the ship themselves more in-line with the new roster, since most of the HVBs are still based around the old look.

15
Rejoice! A (post) Christmas Miracle! An update to one of my must-have mods! Maybe the other two will also be updated? Eventually? Royal Azalea and I know the mod creator isn't allowed to post content about their "forbidden" mod, but will it be updated on nexus?
Yes, ARIA and RYAZ will both be updated soon. I will begin work on updating ARIA to 0.96 next. Unlike YRXP, they will not receive any content updates yet, but instead release in their previous forms only updated to the latest version of starsector.

Pages: [1] 2 3 ... 27