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 2 3 [4] 5 6 ... 12

Author Topic: [OUTDATED] MagicLib  (Read 536687 times)

alexwtb234

  • Ensign
  • *
  • Posts: 44
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #45 on: December 17, 2019, 12:47:21 PM »

I get this error : Index= 0 size = 0  only with magic lib installed
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #46 on: December 17, 2019, 02:52:05 PM »

Magic lib requires Lazy lib
Logged
 

alexwtb234

  • Ensign
  • *
  • Posts: 44
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #47 on: December 19, 2019, 07:52:33 AM »

Magic lib requires Lazy lib


Does not work even with lazy lib
Logged

Mongreal

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #48 on: January 06, 2020, 01:17:55 PM »

What does growth affect on MagicRender.battlespace ? When does growth and size get reset ?
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #49 on: January 06, 2020, 09:31:01 PM »

I'm not sure I understand the question. Growth is the size change of the drawn sprite over its lifetime, it doesn't get "reset" nor is the initial size.
Logged
 

Mongreal

  • Ensign
  • *
  • Posts: 46
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #50 on: January 07, 2020, 11:31:41 AM »

Well, in my case, I'm using this :
Spoiler
Code
            vSize = new Vector2f(sprite.getWidth() * modifier, sprite.getHeight() * modifier);
            vGrowth = new Vector2f(2f * modifier, 2f * modifier);
            vVelocity = new Vector2f(burstSpread / 2f * modifier, burstRange / 2f * modifier);
            //VectorUtils.rotateAroundPivot(vVelocity, barrelLocation, weapon.getCurrAngle());
            MagicRender.battlespace(sprite,
                    barrelLocation,
                    vVelocity,
                    vSize,
                    null,
                    weapon.getCurrAngle() - 90f,
                    0f,
                    flashColor,
                    true,
                    0.15f,
                    0.25f,
                    0.05f
            );
[close]
as part of a EveryFrameWeaponEffectPlugin.
This particular battlespace is called with each shot of the weapon itself (which may be the problem but I'll wait for your answer).
Each shot fired from the magazine of the gun increase the modifier value, which add an unknown value to the original size, growth speed, and velocity, if I'm not mistaken.
On the next shot, the size of the sprite doesn't goes back to the initial witdh and height set by the vSize variable : The sprite stays bigger until the last round of this magazine, which suddenly pushes the size to extreme values (should multiply it but 1.5 or 1.8, but instead, the sprite fill the entire screen).
Does the battlespace stay "active" between two reading of this section, and thus, doesn't get "reset" anywhere ? From what I tried, I can only assume that the MagicRender.battlespace shouldn't be use this way on everyframe stuff ? Can I achieve something like this with singleframe instead ?
If you don't mind, I can give you my discord on mp. I don't know if you remember me, but I used to chat with you on Skype three years ago. And, I'm french too, by the way.
« Last Edit: January 07, 2020, 11:46:37 AM by Mongreal »
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #51 on: January 07, 2020, 02:00:28 PM »

You should use the single frame render for that, battlespace renders are for sprite spawned once and are then entirely managed by the Magiclib plugin.
Logged
 

NephilimNexus

  • Commander
  • ***
  • Posts: 155
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #52 on: February 11, 2020, 08:06:30 PM »

I get this error : Index= 0 size = 0  only with magic lib installed

Same here, which is really weird because it was working just fine yesterday.  I haven't altered either MagicLib or LazyLib.  It just... stopped working.

Edit: Never mind, I found the problem.  I went to reinstall a few files from the base game and didn't notice that I had 0.9a sitting right next 0.9.1a and grabbed the wrong version.  Once I had the right version installed, MagicLib started working again.
« Last Edit: February 11, 2020, 08:20:25 PM by NephilimNexus »
Logged

Wispborne

  • Captain
  • ****
  • Posts: 400
  • Discord: wispborne
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #53 on: February 13, 2020, 05:44:17 PM »

I'm getting a crash, probably because I'm using the method wrong but I didn't find any sample code to go off of.

Code
33855 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.campaign.CustomCampaignEntity.readResolve(Unknown Source)
at com.fs.starfarer.campaign.CustomCampaignEntity.<init>(Unknown Source)
at com.fs.starfarer.campaign.BaseLocation.addCustomEntity(Unknown Source)
at data.scripts.plugins.MagicCampaignTrailPlugin.advance(MagicCampaignTrailPlugin.java:59)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.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$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)

The calling code is identical to:

Global.getSector().addScript(new MagicCampaignTrailPlugin());

The player is on the campaign layer, in a dialog, when that's called.
Here's the actual source: https://github.com/davidwhitman/Gates-Awakened/blob/331041fad49b6f0518d99e02fd17c1f6d019759c/src/main/kotlin/org/wisp/gatesawakened/jumping/Jump.kt#L64

Any thoughts? It's crashing inside of addCustomEntity in this MagicLib code:
Code
            associatedEntity = Global.getSector().getPlayerFleet().getContainingLocation().addCustomEntity("nictoy_unique_custom_trail_tracker_object", "YOU SHOULD NOT SEE THIS",
                    "nictoy_campaign_trail_custom_entity", Factions.INDEPENDENT, this);
Logged
Mod: Persean Chronicles | Mod Manager: SMOL | Tool: VRAM Estimator | Tool: Forum+Discord Mod Database | If I'm inactive for 3 months, anyone can use any of my work for anything (except selling it or its derivatives).

Nicke535

  • Commander
  • ***
  • Posts: 240
  • Degenerate Core
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #54 on: February 25, 2020, 09:30:43 AM »

I'm getting a crash, probably because I'm using the method wrong but I didn't find any sample code to go off of.

Might be my bad: that code is non-implemented. I... honestly didn't remember that stuff was still in the release branch. Thought it was on a private dev branch.

Either way, campaign trails are non-implemented, so you cannot use them.

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #55 on: April 26, 2020, 01:52:13 AM »



Fixed a few bugs and added a couple of new functionalities as per a few modder request:
0.29

Added MagicInterferencePlugin
   . Makes exceptionally strong weapons with the "Interference" trait have negative effects when more that one is mounted on a given ship.
   . Those weapons need to trigger the plugin to check for possible other interference sources from a CSV file.
   . If other sources are found, it will add a hullmod that reduced the ship's dissipation depending on the number of interfering weapons and their interference strength.

Added MagicBasicInterferenceEffec loose weapon script to trigger an interference check.

Added MagicIncompatibleHullmods
   . Proposes a uniform "incompatible hullmod" solution.
   . When triggered as two incompatible hullmods are added, it will remove the offending hullmod and add a hullmod to warn the player about that operation.
   . The added hullmod's tooltip will indicate which hullmod was removed and why.

Added MagicModuleRetreatCleaner
   . Fixes the bug with retreating ships with modules preventing the combat from ending.

MagicRender:
   . Added optional blending modes to the sprite renders.

MagicUI:
   . Fixed crash when used the first frame in combat.
[close]

This won't break any saves or mods.

Download available in the OP
Logged
 

Zangetsuke

  • Ensign
  • *
  • Posts: 15
    • View Profile
[0.9.1] MagicLib v0.2.9 (2020/04/26)
« Reply #56 on: April 27, 2020, 10:15:34 AM »

I have some problems with the lastest version

Spoiler
74474 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_4cmrailgunshot
74474 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_4cmrailgunshot
74475 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_6cmrailgunshot
74475 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_6cmrailgunshot
74475 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_9cmrailgunshot
74475 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_9cmrailgunshot
74475 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_12cmrailgunshot
74475 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_12cmrailgunshot
74475 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_20cmrailgunshot
74475 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_20cmrailgunshot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_NTKcannon_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_squiggle_whistler_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_howler_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_hellspear_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_hellspear_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_omniblaster_core_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_artillery_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_artillery_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_scatterlaser_core_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_scatterlaser_sub_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_blaze_shot
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_TBM_submunition
74476 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bomblet2
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_electrogun_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_electrogun_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_plasmadisruptor_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_plasmadisruptor_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_pulseripper_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_pulseripper_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_plasmadriver_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_plasmadriver_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_plasmadriver_shot
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_dem_pulse
74477 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_dem_pulse
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_thermalmortar_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_thermalmortar_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_jackalblade_lg
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_jackalblade
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_breakerLRMbombB
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_shellback_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_shellhead_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_phaserail_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_phaserail_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_phaserail_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_miniphaserail_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_miniphaserail_shot
74478 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_miniphaserail_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_energymortar_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_energymortar_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_calliope_submunition
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_phaseblaster_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_phaseblaster_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_phasedbuster_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_phasedbuster_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_phasedbuster_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bravepulse_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bravepulse_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bravekinetic_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bravekinetic_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bravekinetic_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bravemissile_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bravemissile_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_bravemissile_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_alaudapulse_shot
74479 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - missing layer override for istl_alaudapulse_shot
74480 [Thread-4] ERROR data.scripts.plugins.MagicAutoTrails  - Invalid line, skipping
[close]
Logged

Harmful Mechanic

  • Admiral
  • *****
  • Posts: 1340
  • On break.
    • View Profile
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #57 on: April 27, 2020, 05:02:01 PM »

Just a check, since those errors are DME trail entries; it's not crashing after this, just giving you those errors in the log, right?

I got this before a while ago; it was new field in the MagicLib trail_data.csv file that I hadn't added to my implementation, but it wasn't crashing. So I'll take a look tonight and see what I need to do to match this latest version, but it ran perfectly well last time and should still run fine with this.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #58 on: April 27, 2020, 11:32:32 PM »

Yeah, MagicLib is perfectly save compatible, it's just a matter of optional fields present or not.
Logged
 

Professor Pinkie

  • Ensign
  • *
  • Posts: 23
  • Best cupcakes in a sector!
    • View Profile
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #59 on: July 04, 2020, 12:31:54 PM »

Can anyone tell me any mod using MagicIncompatibleHullmod?

I want to see how it should work.
Logged
Pages: 1 2 3 [4] 5 6 ... 12