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 ... 12

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

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #30 on: August 07, 2019, 05:09:43 AM »


Small bugfixes update to solve the Linux case issue as well as the Screencheck culling function being too aggressive.

This won't break any saves or mods.

Download available in the OP
Logged
 

Shuhei

  • Ensign
  • *
  • Posts: 29
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #31 on: August 15, 2019, 02:19:15 AM »

The mod crashes during the game loading phase. Updated Java to the newest version but it didn't solve the problem.

Quote
Code
[code]60965 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.fs.starfarer.loading.scripts.ScriptStore.?00000(Unknown Source)
at com.fs.starfarer.settings.StarfarerSettings.o00000(Unknown Source)
at com.fs.starfarer.launcher.ModManager.getEnabledModPlugins(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)
[/code]
« Last Edit: August 15, 2019, 02:25:57 AM by Shuhei »
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #32 on: August 15, 2019, 05:02:55 AM »

That's strange. Does it crashes with only MagicLib and LazyLib enabled?
Logged
 

Shuhei

  • Ensign
  • *
  • Posts: 29
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #33 on: August 15, 2019, 12:30:57 PM »

Yeah, but I reinstalled the game and... well... it helped.
Logged

Dark

  • Ensign
  • *
  • Posts: 19
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #34 on: September 20, 2019, 05:33:53 PM »

im getting a crash on startup from this mod, heres the log

47554 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error compiling [data.scripts.weapons.MagicVectorThruster]
java.lang.RuntimeException: Error compiling [data.scripts.weapons.MagicVectorThruster]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: data.scripts.weapons.MagicVectorThruster
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more
Logged
I would rather be hated for who I am than loved for who I'm not

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #35 on: September 20, 2019, 11:28:18 PM »

Are you sure you have the latest MagicLib mod ticked on in the launcher? That's all I can think of to cause that specific error.
Logged
 

Ed

  • Captain
  • ****
  • Posts: 442
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #36 on: September 26, 2019, 09:47:33 AM »

Can objectspace() be used to simulate the effect of the phase cloak glow? Is there any code sample of this?
Logged
Check out my ships

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #37 on: September 26, 2019, 10:19:35 AM »

It can but I think you'd be better off using a deco weapon.
Logged
 

Ed

  • Captain
  • ****
  • Posts: 442
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #38 on: September 26, 2019, 10:31:56 AM »

It can but I think you'd be better off using a deco weapon.
You mean using the deco weapon with the glow sprite? I don't quite get how to simulate the effect, do you have a sample?
Logged
Check out my ships

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #39 on: September 26, 2019, 11:18:12 AM »

Exactly that, there are many ships with deco weapons to simulate glow (Thalan comes to mind) and it requires only a little bit of code to get that running.
Logged
 

NoFoodAfterMidnight

  • Ensign
  • *
  • Posts: 39
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #40 on: October 18, 2019, 08:45:00 PM »

When using magictrails, how do you make a trail texture not scroll and not move as it's generated the entire flight of the projectile? Currently the closest I can get it is to not scroll but then it stretches until the projectile disappears.

I'm trying to get a texture of some bubbles to look good, but if they're moving constantly or getting stretched it looks pretty bad.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #41 on: October 18, 2019, 10:05:43 PM »

That's  a limitation of the current implementation. Static textures regardless of variable length is a tough nut to crack but you can talk to Nicke if you have ideas to solve it.
Logged
 

NoFoodAfterMidnight

  • Ensign
  • *
  • Posts: 39
    • View Profile
Re: [0.9.1] MagicLib v0.27 (2019/08/07)
« Reply #42 on: October 18, 2019, 10:09:59 PM »

Aww, RIP my dreams. Thanks though.
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: [0.9.1] MagicLib v0.28 (2019/11/09)
« Reply #43 on: November 09, 2019, 03:03:30 AM »


Added a couple new functionalities as per a few modder request:
MagicAnim.cycle (allows a variable to cycle within an arbitrary range)
MagicGuidedProjectileScript (allows projectiles to track their target)

This won't break any saves or mods.

Download available in the OP
Logged
 

Mongreal

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

Quote
MagicGuidedProjectileScript (allows projectiles to track their target)
What could prevent this script from working ?

Does this (well, it's not the complete script I'm using but it's the part used with projectile that use the MagicGuidedProjectileScript) should work ? :
Spoiler
Code
List<DamagingProjectileAPI> projectiles = engine.getProjectiles();
            int size = projectiles.size();
            for (int i = 0; i < size; i++) {
                proj = projectiles.get(i);
                String spec = proj.getProjectileSpecId();
                WeaponAPI mainWeapon = proj.getWeapon();

                if (mainWeapon.getShip().getShipTarget() != null) {
                    target = mainWeapon.getShip().getShipTarget();
                } else {
                    target = AIUtils.getNearestEnemy(proj);
                }

                switch (spec) {
                       case LIGHT_PLASMA_DART_PROJECTILE_ID:
                              isGuided = true;
                       break;

             if (isGuided) {
                  engine.addPlugin(MagicGuidedProjectileScript(proj, target));
             }
[close]
Logged
Pages: 1 2 [3] 4 5 ... 12