Fractal Softworks Forum

Please login or register.

Login with username, password and session length

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.

Topics - cjy4312

Pages: [1]
1
Modding / Ships created by "engine.createFXDrone" have no ID
« on: October 17, 2023, 06:36:15 AM »
Hi Alex!

For some reason, I need to identify ships based on their IDs. and then I realized that ships created by "engine.createFXDrone" just have a empty ID.

Even though I can differentiate them by adding different tags,but I can't do this to other mods

So I hope the CombatEngine will add Unique IDs after these ships created in the future.

Sorry for my poor English,it may cause some misunderstandings?

2
It's a drone AI ,need run something with mothership after drone created,so I cant put it in ModPlugin directly
If I ignore the part of mothership, Logger can work normally when set by ModPlugin.pickShipAI.
But I need Logger for mothership :'(
What should I do?

3
hi ,I have a problem with modding
Any weapon with 0 damage will cause incorrect display of flux value(this weapon and the weapon group, All will be ZERO).
I think it should be a bug :P

4
Modding / [Modding]How can I hide the armor damage text?
« on: March 12, 2022, 06:45:12 AM »
Hi everyone!
  Im trying to make a module shield, the modules can record the damage by damage listener, and send flux to ship.
now I have a problem:
  projectiles onhit sound will not play If I set module's armor damage taken multiple to ZERO.But if I set armor damage taken multiple to 0.01f. yellow armor damage text will appear.
  Is there any way to hide that text or play sound when hit on a invincible armor? :-[
 



[attachment deleted by admin]

5
Modding / [0.95a]A problem about bar event
« on: July 16, 2021, 08:04:43 AM »
hi!

Im trying to addOption with same optionId
for example:

      {........
                 options.addOption("TextA", OptionId.A);
                 options.addOption("TextB", OptionId.B);
                 options.addOption("TextC", OptionId.B);
                 break; 
          case A:
                ....................
                   ........}
It will like this in game:
                         1.TextA
                         3.2TextB
                         TextC

If I use different optionId like
       {........
                 options.addOption("TextA", OptionId.A);
                 options.addOption("TextB", OptionId.B);
                 options.addOption("TextC", OptionId.C);
                 break; 
          case A:
                ....................
                   ........}
It will be normal:
                         1.TextA
                         2.TextB
                         3.TextC

Is this a bug?

*I uploaded two screenshots to show this thing


[attachment deleted by admin]

6
Hi Alex!
I had some problems when I using ship.setSprite() in Hullmod. :P
I'm trying to use this code to change my ship's sprite and flux dissipation when all wings removed.
Code
public void applyEffectsAfterShipCreation(ShipAPI ship, String id){
        if(ship.getVariant().getWings().isEmpty()){
            ship.setSprite("CTB_Ship", "ctb_mycarrier_redrunway");
            ship.getMutableStats().getFluxDissipation().modifyMult(id, 2f);
        }else{
            ship.getMutableStats().getFluxDissipation().unmodify(id);
        }
    }
The ship is rendered in the wrong position when I removed all wings
(I must reselect the ship then it will set "redrunway" sprite and increase flux dissipation,but when I re-added any wing to the ship,sprite and flux dissipation will be reset immediately. )/(picture.a&picture.b)

There is another issue when ship join battle with no wings,I don't know how to describe it,as shown in picture.c

I uploaded a video to show these issues:
https://www.bilibili.com/video/BV1eK4y1f7BV

[attachment deleted by admin]

7
Modding / I have some problem when using setSprite in hullmod
« on: November 24, 2020, 09:42:07 PM »

I'm not good at English,I can't describe this issue exactly,So I uploaded a video https://www.bilibili.com/video/BV1eK4y1f7BV


I'm trying to use this code to change my ship's sprite and improve flux dissipation when all wings removed


Code
public void applyEffectsAfterShipCreation(ShipAPI ship, String id){
        if(ship.getVariant().getWings().isEmpty()){
            ship.setSprite("CTB_Ship", "ctb_mycarrier_redrunway");
            ship.getMutableStats().getFluxDissipation().modifyMult(id, 2f);
        }else{
            ship.getMutableStats().getFluxDissipation().unmodify(id);
        }
    }


[attachment deleted by admin]

8
My ship lost modules in the last battle, If I deploy it before it's completely fixed, It will "die" after deployment like this screenshot. HP is full, but It's dead.


[attachment deleted by admin]

9
Hi,I'm making a honeycomb shield these days. now I had some trouble.

I'm using fighter wings with "setExtraAlphaMult" as shield blocks. when these blocks take any damage, They will glow.
(This way causes serious FPS loss when shield deploying on large(veeeeeery Large) ship, there is so many ships deployment tips)

I was trying to use BOMBs with SHIP CollisionClass instead of them,but  missile.getSpriteAPI().setAlphaMult(float) is notwork in combat(Maybe there's something wrong  I use this code.)
How does this code work? ::)

[attachment deleted by admin]

10
Modding / A NullPointerException with Vector2f.sub
« on: August 27, 2019, 06:10:46 AM »

Code
4207497 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain -java.lang.NullPointerException
-java.lang.NullPointerException
                 at org.lwjgl.util.vector.Vector2f.sub(Vector2f.java:210)
                 at com.fs.starfarer.combat.entities.ship.new.getCellAtLocation(Unknown Source)
                 at com.fs.starfarer.combat.entities.ship.new.getCellAtLocation(Unknown Source)
                 at data.scripts.weapons.ai.CannonAmmoSelectAI.advance(CannonAmmoSelectAI.java:100)


I've never seen this before.


I'm try create a cannon that switch ammos
    using this code in MissileAI to get target's armor value:


Code
if(target_!=null&&target_ instanceof ShipAPI){
            float target_armor = target_.getArmorGrid().getMaxArmorInCell();
            Vector2f pt=CollisionUtils.getCollisionPoint(missile.getLocation(), target_.getLocation(), target);
                if(target_.getArmorGrid().getCellAtLocation(pt)!=null){
                    int[] armorG =target_.getArmorGrid().getCellAtLocation(pt);
                    float x =target_.getArmorGrid().getArmorValue(armorG[0], armorG[1]);
                    target_armor*=((x/target_armor)/2f)+0.5f;
            }
Strangely, I found no problem in the simulation.
but myfriend use my weapon in campaign ,that's what happened.

11
This is the situation:
If a Multi-module ship join a battle, and it blown up before all modules destroyed, I cannot retreat this battle.
If I use code to kill all module at the beginning of the battle( by "applydamage()"), when mothership destroyed, this issue will not occur.

12
Modding / [0.9.1a RC8]Cargo will be restored after battle
« on: July 15, 2019, 10:28:09 AM »
Okay. I'm here again with poor English. :P

This is the situation:

In 0.9a, I'm using a self-made weapon reload script, when my weapon run out of ammo in battle, it will check for adequate "Ammunition box(a new Commodity)",remove a certain quantity if boxes and start to reload
It's worked, but if I use this script in simulation, the "Ammunition box" will indeed removed from Cargo (That's not I want)
If I use it in normal battle, when it's over, the quantity of boxes have not decrease at all (That's not I want too)

In 0.9.1a RC10
I can only get "0f" when I use "getCommodityQuantity(id)"("getSupplies()"is also "0f") in battle. the script failed.

13
Modding / [0.9a RC10]A bug with weapon charge down
« on: April 12, 2019, 11:40:00 PM »
Sorry I'm not good at English. Try use GOOGLE  TRANSLATION:

I made a weapon with:

"interruptibleBurst":true,

"chargedown">0

"burstsize"=4

if burst delay less than 0.05, "chargedown" will be "0" when I stop firing.

14
a ship wtih some shield modules,when it retreated,I can still attack these modules at the edge of battleground

15
Modding / [0.9aRC10]All D-ships in markets have been repaired
« on: November 28, 2018, 01:27:45 AM »
I'm not good at English,It may not be very accurate in expression.(using google translation)

It's not always occurred.

for example ,I just finished the tutorial,bought a ship in the jangala open market,with 3 D-mods,I put this ship into storage,and then left the Corvus.few months later,I return to jangala ,ALL SHIPS in open market , military market and storage(i forgot to check the black market)have been repaired,no any d-mods,no any scratch.

another small problem: "WS 005"&"WS 006"weaponslot in wolf class,they are not symmetrical.

btw, I used ShipVariantAPI.clearSlot(String slotId) in 0.8.1a,it can remove the weapon from slot, and put this weapon into Cargo.in 0.9a RC10,the weapon be removed but i cant find it again.
Is this a bug too?

Pages: [1]