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)

Author Topic: [0.97a] AshLib 1.0.3  (Read 7148 times)

Kaysaar

  • Admiral
  • *****
  • Posts: 530
    • View Profile
[0.97a] AshLib 1.0.3
« on: October 13, 2024, 03:49:00 PM »

Ashlib
NOTE ! IF you have Ashlib folder without "_" delete it and place this one posted in download link!
So basically this is library sort of mod(I would say more like utilitary mod even) that I have decied to post, since few people asked for it and because a lot of functions i have created is used by more than 1 mod , so for my own life to be easier decided to release this as lib mod, hey maybe someone else will also use those features
Horizontal Scrollbar
Spoiler
To use it look at HorizontalTooltipPlugin
NOTE!
1.First create instance then call method init
2.True width and true height are sizes of tooltips themself whether width and height are sizes of scrolable area
3.Set width and heigt AT MAX to twice the size of max width and max height, if its more then tooltip will  have some weird behaviours
4.True width and true height can be basically like 10k but place tooltip and panel as such, that their border is equal to border of game itself
Spoiler
[close]
Spoiler
[close]
[close]
Access  to nearly 1:1 replica of weapon/fighter/ship tooltips
Spoiler
Methods for those are accessable from AshInfoTooltipGenerator
Spoiler
Code
   //Note ! Spec can be either Hullspec, WeaponSpec, or FighterWingSpec!
    public static void generateTooltip(TooltipMakerAPI tooltip,Object spec){
        float width = 400f;
        if(spec instanceof ShipHullSpecAPI){
            width= 990f;
            final CustomPanelAPI panelAPIs = ShipInfoGenerator.getShipImage((ShipHullSpecAPI) spec, 250, null).one;
            ShipInfoGenerator.generate(tooltip, AshMisc.getFleetMemberFromSpec((ShipHullSpecAPI) spec),null,panelAPIs,width);
            return;

        }
        if(spec instanceof WeaponSpecAPI){
            WeaponInfoGenerator.generate(tooltip, (WeaponSpecAPI) spec,width);
            return;

        }
        if(spec instanceof FighterWingSpecAPI){
            FighterInfoGenerator.generate(tooltip, (FighterWingSpecAPI) spec,width);
            return;

        }

    }
[close]
Ship
Spoiler
[close]
Weapon
Spoiler
[close]
Fighter
Spoiler
[close]
[close]
Allowing to correctly render modular ships, fighters and weapons (even with missles!)
Spoiler
Methods for those are accessable from Ship/Weapon/FighterInfoGenerator
Spoiler
[close]
Spoiler
[close]
Spoiler
[close]
Spoiler
[close]

[close]
Custom AI core skill poll
Spoiler
So with this lib you will be able to fully customize what skills should appear in skill selection menu , you can insert there up to 16 different skills.
To implement this , copy file  ai_core_skill_poll.csv from data/campaign to same directory but in your mod.
Field id is id of core,  where skillPoll is list of id's of all skills that should appear
Spoiler

[close]
Spoiler

[close]
[close]
Current ver : 1.0.3( Safe to add mid save)
Special thanks
Lukas04 for some of scripts that are used there
CY/Milkydrommeda as it was his idea in first place for Custom AI Core skill poll

« Last Edit: Today at 06:32:36 AM by Kaysaar »
Logged

Brainwright

  • Admiral
  • *****
  • Posts: 700
    • View Profile
Re: [0.97a] AshLib 1.0.1
« Reply #1 on: October 14, 2024, 05:57:18 PM »

Oh!  This is very nice!
Logged

Snowyowl

  • Ensign
  • *
  • Posts: 14
    • View Profile
Re: [0.97a] AshLib 1.0.1
« Reply #2 on: October 15, 2024, 11:51:08 AM »

Game crash when I open colony UI. Will try more tests for now.

Spoiler
168606 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: ashlib/data/plugins/ui/models/HorizontalTooltipMaker
java.lang.NoClassDefFoundError: ashlib/data/plugins/ui/models/HorizontalTooltipMaker
   at data.kaysaar.aotd.vok.ui.AoTDResearchUI.<init>(AoTDResearchUI.java:57)
   at data.kaysaar.aotd.vok.scripts.CoreUITracker.insertNewResearchPanel(CoreUITracker.java:318)
   at data.kaysaar.aotd.vok.scripts.CoreUITracker.advance(CoreUITracker.java:186)
   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.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: ashlib.data.plugins.ui.models.HorizontalTooltipMaker
   at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   ... 11 more
[close]
Logged

Kaysaar

  • Admiral
  • *****
  • Posts: 530
    • View Profile
Re: [0.97a] AshLib 1.0.1
« Reply #3 on: October 15, 2024, 08:47:20 PM »

Game crash when I open colony UI. Will try more tests for now.

Spoiler
168606 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: ashlib/data/plugins/ui/models/HorizontalTooltipMaker
java.lang.NoClassDefFoundError: ashlib/data/plugins/ui/models/HorizontalTooltipMaker
   at data.kaysaar.aotd.vok.ui.AoTDResearchUI.<init>(AoTDResearchUI.java:57)
   at data.kaysaar.aotd.vok.scripts.CoreUITracker.insertNewResearchPanel(CoreUITracker.java:318)
   at data.kaysaar.aotd.vok.scripts.CoreUITracker.advance(CoreUITracker.java:186)
   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.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: ashlib.data.plugins.ui.models.HorizontalTooltipMaker
   at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   ... 11 more
[close]
Redownload (And in terms of delete prev folder and then add one )
Logged

DeusVauly

  • Ensign
  • *
  • Posts: 22
  • a happy amateur
    • View Profile
Re: [0.97a] AshLib 1.0.1
« Reply #4 on: October 18, 2024, 10:23:24 PM »

Error after Starting a new game and clicking the Command button:

---------------------------
Starsector 0.97a-RC11
---------------------------
Fatal: ashlib/data/plugins/ui/models/HorizontalTooltipMaker
Cause: ashlib.data.plugins.ui.models.HorizontalTooltipMaker
Check starsector.log for more info.

 Going to see if redownloading the mod fixes it

edit: nevermind, installing it through mod organizer gave me the option of downloading the 1.0.0 version as well as 1.0.1 and I chose wrongly
« Last Edit: October 18, 2024, 10:37:10 PM by DeusVauly »
Logged

EnigmaSC

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.97a] AshLib 1.0.1
« Reply #5 on: October 22, 2024, 03:46:06 PM »

Error after Starting a new game and clicking the Command button:

---------------------------
Starsector 0.97a-RC11
---------------------------
Fatal: ashlib/data/plugins/ui/models/HorizontalTooltipMaker
Cause: ashlib.data.plugins.ui.models.HorizontalTooltipMaker
Check starsector.log for more info.

 Going to see if redownloading the mod fixes it

edit: nevermind, installing it through mod organizer gave me the option of downloading the 1.0.0 version as well as 1.0.1 and I chose wrongly

The direct download does the same thing, it gives you a zipped file with an "AshLib" folder and an "ashlib_" folder. The first one is the 1.0.0. "ashlib_" folder is the only file you should drop into your mods folder, the other will cause the above crash. Even if you put both in, like I did the first time, it will only see the 1.0.0 version in the launcher.

Hope this keeps people from crashing.
Logged

Alcoor

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.97a] AshLib 1.0.1
« Reply #6 on: October 25, 2024, 02:05:45 PM »

Hello i need help, in game if i press  D give me a crash with  this : 

501653 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: ashlib/data/plugins/ui/models/HorizontalTooltipMaker
java.lang.NoClassDefFoundError: ashlib/data/plugins/ui/models/HorizontalTooltipMaker
        at data.kaysaar.aotd.vok.ui.AoTDResearchUI.<init>(AoTDResearchUI.java:57) ~[?:?]
        at data.kaysaar.aotd.vok.scripts.CoreUITracker.insertNewResearchPanel(CoreUITracker.java:318) ~[?:?]
        at data.kaysaar.aotd.vok.scripts.CoreUITracker.advance(CoreUITracker.java:186) ~[?:?]
        at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source) ~[port_obf.jar:?]
        at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source) ~[port_obf.jar:?]
        at com.fs.starfarer.BaseGameState.traverse(Unknown Source) ~[port_obf.jar:?]
        at com.fs.state.AppDriver.begin(Unknown Source) ~[port.common_obf.jar:?]
        at com.fs.starfarer.combat.CombatMain.main(Unknown Source) ~[port_obf.jar:?]
        at com.fs.starfarer.StarfarerLauncher.super(Unknown Source) ~[port_obf.jar:?]
        at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source) ~[port_obf.jar:?]
        at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]
Caused by: java.lang.ClassNotFoundException: ashlib.data.plugins.ui.models.HorizontalTooltipMaker
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592) ~[?:?]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
        ... 11 more
Logged

Lephim

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.97a] AshLib 1.0.1
« Reply #7 on: November 03, 2024, 02:19:38 PM »

Got a crash that says
Fatal: ashlib/data/plugins/info/ShipInfoGenerator
Cause: ashlib.data.plugins.info.ShipInfoGenerator
Check starsector.log for more info.

This happens whenever I press the "d" key ingame. I don't know why this is happening, I made sure I have 1.0.1 installed and even deleted and reinstalled. It's shorter than Alcoor's crash info but different. Maybe its a simple fix? I have no idea. pls help, I don't want to have to navigate specifically or crash my game

Edit: nah im just a fricking idiot, holy my brain cavity has never echoed like the grand canyon before, holy ***. I didn't turn it on in mods on startup.
« Last Edit: November 03, 2024, 04:26:45 PM by Lephim »
Logged

Kaysaar

  • Admiral
  • *****
  • Posts: 530
    • View Profile
Re: [0.97a] AshLib 1.0.2
« Reply #8 on: November 22, 2024, 06:48:57 AM »

Ashlib 1.0.2
Fixed previously mentioend crashes where lack of class was detected
NOTE ! IF you have Ashlib folder without "_" delete it and place this one posted in download link!
Logged

Wispborne

  • Captain
  • ****
  • Posts: 483
  • Discord: wispborne
    • View Profile
Re: [0.97a] AshLib 1.0.2
« Reply #9 on: November 27, 2024, 09:13:48 AM »

What license is this published under?

Source: https://github.com/Kaysaar/AshLib
Logged
Mod Managers: TriOS & SMOL | Mod: Persean Chronicles | 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).

Kaysaar

  • Admiral
  • *****
  • Posts: 530
    • View Profile
Re: [0.97a] AshLib 1.0.2
« Reply #10 on: November 27, 2024, 12:18:09 PM »

What license is this published under?

Source: https://github.com/Kaysaar/AshLib
General Public License 3.0
Logged

Kaysaar

  • Admiral
  • *****
  • Posts: 530
    • View Profile
Re: [0.97a] AshLib 1.0.3
« Reply #11 on: Today at 03:11:46 AM »

New version of Ashlib 1.0.3
 - Added Progresion bar Component
 - Added necessary changes (improvments) for next Vaults of Knowledge update
Logged