Fractal Softworks Forum

Starsector => Mods => Modding Resources => Topic started by: Wispborne on January 08, 2023, 12:19:09 PM

Title: [0.97a] MagicLib v1.4.3
Post by: Wispborne on January 08, 2023, 12:19:09 PM
(https://i.imgur.com/BVvNdhO.jpg)


The goal of MagicLib is to create a community-built library of useful (and well documented) scripts and plugins that can be leveraged and contributed to by every modder.



(https://i.imgur.com/GMCkkky.png) (https://github.com/MagicLibStarsector/MagicLib/releases/latest/download/MagicLib.zip)
Download (https://github.com/MagicLibStarsector/MagicLib/releases/latest/download/MagicLib.zip)
Requires latest LazyLib (http://fractalsoftworks.com/forum/index.php?topic=5444.0)

Content Pack Downloads
MagicLib itself does not contain any achievements, paintjobs, or bounties.
Achievements Pack (https://fractalsoftworks.com/forum/index.php?topic=28545.0) (30+ achievements, 20+ paintjobs)
Bounties Pack (https://fractalsoftworks.com/forum/index.php?topic=23129.msg395228#msg395228) (20+ bounties)



(https://i.imgur.com/8EpNARt.png) (https://starsector.wiki.gg/wiki/MagicLib)
View JavaDocs (https://magiclibstarsector.github.io/MagicLib/)

(https://i.imgur.com/AnkilqL.png) (https://github.com/MagicLibStarsector/MagicLib)
MagicLib release history (https://github.com/MagicLibStarsector/MagicLib/releases/)

(https://img.shields.io/github/downloads/MagicLibStarsector/MagicLib/total?color=blue&logo=github&label=total downloads) (https://github.com/MagicLibStarsector/MagicLib)


If anyone wants to contribute you are more than welcome to do so as it is intended to be a community tool. Do check the Wiki to get a lot of details on the current content.


The magicSettings functions allow modders to easily access a shared data/config/modSettings.json file that can be used as a unified solution to integrate mods with each-others. I will try to provide a thorough blank modSettings.json sample file with each MagicLib update, so modders that will use the shared modSettings.json file and want their mod's settings to be added to MagicLib's sample file can post them in this thread. Modders can also document their inter-mod compatibility requirements, regardless of their usage of modSettings or not, on this wiki page (https://starsector.wiki.gg/wiki/Category:Modding).

 If you want to integrate your mod to all the ones using the shared modSettings.json solution, you can download a blank sample file here (https://raw.githubusercontent.com/MagicLibStarsector/MagicLib/master/data/config/sample_modSettings.json).


Mod Authors: v1.0.0 breaking changes
The package changed from `data.scripts` to `org.magiclib`.
For most authors, all you need to do is a find & replace in your imports.

Also, a number of deprecated methods have been removed. They all have replacements.
MagicCampaign.createFleet -> createFleetBuilder
MagicCampaign.createCaptain -> createCaptainBuilder
and more.
See all breaking changes in v1.0.0 here:
https://github.com/MagicLibStarsector/MagicLib/releases/tag/1.0.0 (https://github.com/MagicLibStarsector/MagicLib/releases/tag/1.0.0)


Current content:

Functions

    MagicSettings
Offers classes to load merged settings and lists from a shared modSettings.json file. Intended to make cross-mod integration and compatibility much easier to manage.

    MagicBounty framework
Offers a highly customizable yet easy to implement system to add unique bounties to a board present in bars.

    MagicCampaign
Offers classes to help enrich systems with recoverable hulks holding special cargo, or with stations with custom comm officers, etc.

    MagicIndustryItemWrangler
Allows AI colonies to upgrade their installed industry items if a better one is sold to them.

    MagicIncompatibleHullmod
A uniform solution for the "incompatible hullmod" issue with vanilla hullmods.

    MagicInterference
Adds a cross-mod mechanic to balance very powerful weapons.

    MagicAnim
A collection of functions to make smooth animations.

    MagicFakeBeam
Creates convincing punctual beams from arbitrary coordinates.

    MagicLensFlare
Creates "cinematic" lens flares.

    MagicRender
Draw arbitrary sprites on-screen with constraints to entities/camera when needed. (aka "SpriteRenderManager")

    MagicTargeting
Allows "smart" target selection for systems and missiles within distance and search cone parameters, plus it can use ship-class preferences.

    MagicTrails
Allows to create missile-style trails anywhere, from ships to bullets, with a lot of customization options. Also includes a CSV based manager that should be able to handle most projectile use cases with negligible overhead.

    MagicUI
Draws UI elements such as a system-like charge-bar/tick box next to the normal ship-system for special systems, or an extra status bar above the flux/hull bars.

    MagicAchievements framework
Offers a relatively easy to implement way add achievements for your mod.

    MagicPaintjobs framework
Offers a dead-simple way to add ship paintjobs.

    MagicSubsystems
Add up to five extra ship systems to a ship. Includes drone management.

Loose scripts
Scripts that can be used "as it is" or can be copied to individual mods to personalize the result.

    MagicVectorThruster
Manages vectoring or vernier-style attitude thrusters.

    MagicMissileAI
A very customizable and lightweight missile AI script usable without any java knowledge.

    MagicGuidedProjectileScript
A weapon script that allows regular projectiles to track their target.

Planned / considered content:
None at the moment

Changelog
View at https://github.com/MagicLibStarsector/MagicLib/blob/master/CHANGELOGS.md

Contributors
Tartiflette (creator)
Wisp (maintainer)
Amazigh (paintjobs and paintjob icon)
BirdWanderer (paintjobs)
Dark.Revenant (MagicUI)
Deathfly (MagicFakeBeam)
jtyotJOTJIPAEFVJ (MagicAnim.cycle)
Kitta Khan (bugfixes)
Nicke (MagicTrails, MagicGuidedProjectileScript)
Originem (bugfixes and a lot of optimization work)
President Matt Damon (MagicBounty, bugfixes)
CeruleanPancake (MagicBounty)
Schaf-Unschaf (MagicBounty)
SafariJohn (MagicAsteroids)
Selkie (paintjobs)
Snrasha (MagicUI)
Wyvern (MagicIndustryItemWrangler)

Generative "AI" was used in creating the achievement icons. Lora: sxz-2dicon, model: Deliberate v2.

(https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png) (http://creativecommons.org/licenses/by-nc-sa/4.0/)
MagicLib is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-nc-sa/4.0/).
Any derivative work must also comply with Starsector's EULA
Title: Re: [0.95.1a] MagicLib v0.45.2 (2023/01/07)
Post by: Wispborne on January 08, 2023, 12:19:38 PM
Woah, what's happening here?

Tartiflette, after many, many years of building up the Starsector modding community in every aspect you can think of, is focusing his time elsewhere (for now! never say never).

MagicLib is a staple of modding and so, with Tartiflette's blessing, I will head maintenance of it for the foreseeable future.

Note that as of posting, the newest version of MagicLib is 0.45.2 and was released by Tart on Patreon - I haven't released an update yet. That's also why there are two MagicLib threads and the Index still points of Tartiflette's.

What is changing...
...for players?
- Essentially nothing; updates will work the same. You do not need to do anything.
- The forum thread will change, since I cannot edit the original thread.
- The NexusMods mod will fall out of date or be delisted. I have not decided if I want to keep hosting it there, or if the Forums, USC Discord, and MagicLab Discord are enough.

...for mod authors?
- For general usage, nothing. Backwards compability is still the primary goal.
- The repo location has moved to GitHub: https://github.com/MagicLibStarsector/MagicLib.
  - As such, pull requests should be a bit easier, and you can open Issues there as well.
  - master will have the latest released code. dev will have unreleased code.
Title: Re: [0.95.1a] MagicLib v0.45.2 (2023/01/07)
Post by: Dadada on January 08, 2023, 12:48:01 PM
Big huge thank you and to @Tartiflette.

>You must be logged in to download files. Log in here.
Nexus will not be for me, that is for sure.  :-[
E: @ to tag users does not work, feels antiquated man. :D
E2: I'll grab it from Github I guess. :D
Title: Re: [0.95.1a] MagicLib v0.45.2 (2023/01/07)
Post by: SpaceDrake on January 08, 2023, 01:33:28 PM
Love to Tart, always.

I've been curious, Wispborne: is there anything you want to focus on in the near future for MagicLib?
Title: Re: [0.95.1a] MagicLib v0.45.2 (2023/01/07)
Post by: Wispborne on January 08, 2023, 02:35:04 PM
Love to Tart, always.

I've been curious, Wispborne: is there anything you want to focus on in the near future for MagicLib?

My own near future is trying to finish the new Persean Chronicles quests. But before that, since it's taking forever, just bugfixes really. There are already a couple of minor ones fixed (but since there was just a ML release, I'll wait on those for later).

In the longer term, there's been plenty of feedback that I agree with that MagicBounties could be improved pretty much across the board. Some requirements are too high in Locked & Loaded, finding bounties is a pain point, and having bounty timers isn't popular.

I have my own personal library of utility methods, all in Kotlin, which thematically would belong more in LazyLib but I don't see a particular reason not to add the best ones to MagicLib. I would draw from the files here, but certainly not everything: https://github.com/wispborne/questgiver/tree/master/src/main/kotlin/wisp/questgiver/wispLib.

I don't intend to write new code in Kotlin, since it'd lock out most people from learning from or contributing to the code, just optional Kotlin-focused utility methods.
Title: Re: [0.95.1a] MagicLib v0.46.0 (2023/02/08)
Post by: Wispborne on February 08, 2023, 06:55:13 PM
MagicLib 0.46.0

Release and changelog: https://github.com/MagicLibStarsector/MagicLib/releases/tag/0.46.0
Direct download: https://github.com/MagicLibStarsector/MagicLib/releases/download/0.46.0/MagicLib-0.46.0.zip

Changelog:

(https://i.imgur.com/tVa8viK.png)
Title: Re: [0.95.1a] MagicLib v0.46.0 (2023/02/08)
Post by: Alex on March 08, 2023, 05:53:12 PM
Thank you for taking this over! I've moved this to the Mods section and updated the mod index to point here; please let me know if the crediting in the index ("Tartiflette and Wispborne") is ok.
Title: Re: [0.95.1a] MagicLib v0.46.0 (2023/02/08)
Post by: Wispborne on March 09, 2023, 07:25:37 AM
Thank you! Yes, that's good.
Title: Re: [0.95.1a] MagicLib v0.46.0 (2023/02/08)
Post by: TimeDiver on March 09, 2023, 09:42:45 AM
@Alex, doesn't this thread actually belong in 'Modding Resources'?
Title: Re: [0.95.1a] MagicLib v0.46.0 (2023/02/08)
Post by: Kanjejou on April 12, 2023, 01:47:39 PM
when i installed it ask for lazylib 2.6 but we are at lazylib2.7b, is that normal?
Title: Re: [0.95.1a] MagicLib v0.46.0 (2023/02/08)
Post by: Wispborne on April 12, 2023, 01:49:46 PM
when i installed it ask for lazylib 2.6 but we are at lazylib2.7b, is that normal?

Yeah, that's just the minimum required version of LazyLib.
I will update that for a future release, though; 2.6 might be too old but people generally keep LazyLib updated and may not have noticed any issues (people such as me).
Title: Re: [0.95.1a] MagicLib v0.46.0 (2023/02/08)
Post by: Alex on April 12, 2023, 01:58:16 PM
@Alex, doesn't this thread actually belong in 'Modding Resources'?

(Oh, I guess it does!)
Title: Re: [0.95.1a] MagicLib v0.46.0 (2023/02/08)
Post by: Wispborne on April 12, 2023, 04:36:08 PM
MagicLib 0.46.1

Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/0.46.1-rc03/MagicLib-0.46.1-rc03.zip
Code: https://github.com/MagicLibStarsector/MagicLib


Changelog
(https://i.imgur.com/t2HeT1P.png)
Title: Re: [0.95.1a] MagicLib v0.46.1 (2023/04/12)
Post by: Munchkin9 on April 15, 2023, 03:46:56 PM
Hi, I'm new to the modding scene, currently working on a mod that modifies the bounty rewards. It works for vanilla but before I release I was hoping to make it react dynamically to bounties added by other mods such as MagicLib. Is there a way to modify the bounty credit rewards in a blanket way, i.e. for all bounties added by MagicLib?
Title: Re: [0.95.1a] MagicLib v0.46.1 (2023/04/12)
Post by: vicegrip on April 26, 2023, 03:46:38 AM
I've noticed that unlike in job_description, the job_comm_reply and job_intel_success fields will not render \n new lines correctly. Rather than insert an extra line for spacing between paragraphs like in job_description, those fields will just have the text go immediately to the next line. \n\n doesn't seem to address this either. The closest thing I found to a fix was \n.\n but then it's displaying an extra character.

Here is an example from the Paradigm Shift mission from Seeker where the text is "since the visit started.\n\"This is an official"
Spoiler
(https://i.imgur.com/URBVvyb.png)
[close]

Title: Re: [0.95.1a] MagicLib v0.46.1 (2023/04/12)
Post by: Poxil on May 01, 2023, 08:39:34 AM
Is it safe to ongoing game if I update to latest version?
Title: Re: [0.95.1a] MagicLib v0.46.1 (2023/04/12)
Post by: Wispborne on May 01, 2023, 03:40:19 PM
Hi, I'm new to the modding scene, currently working on a mod that modifies the bounty rewards. It works for vanilla but before I release I was hoping to make it react dynamically to bounties added by other mods such as MagicLib. Is there a way to modify the bounty credit rewards in a blanket way, i.e. for all bounties added by MagicLib?

You could use MagicBountyCoordinator to get all ActiveBounty's, loop over them, and increase the payout. Those are the bounties that have been "inflated" from the spec, which happens when the player first views them at a bar. Would need to do it in an EveryFrameScript that runs when the game is paused.
There's no "official" way.

I've noticed that unlike in job_description, the job_comm_reply and job_intel_success fields will not render \n new lines correctly.

Thanks! Fixed for next update.

Is it safe to ongoing game if I update to latest version?

Yes.
Title: Re: [0.96a] MagicLib v1.0.0 (2023/05/05)
Post by: Wispborne on May 06, 2023, 12:39:11 AM
MagicLib v1.0.0
0.96a compatible.

NOT COMPATIBLE WITH PRE-0.96 MODS

Changelog: https://github.com/MagicLibStarsector/MagicLib/releases/tag/1.0.0

(I'm too lazy to convert this all to forum styling, have an image instead)
(https://i.imgur.com/TYBdJOo.png)
Title: Re: [0.96a] MagicLib v1.0.0 (2023/05/05)
Post by: Wispborne on May 07, 2023, 10:23:28 AM
Mod authors updating may find this useful:

Code
// Long createFleet method
MagicCampaign.createFleetBuilder()
        .setFleetName()
        .setFleetFaction()
        .setFleetType()
        .setFlagshipName()
        .setFlagshipVariant()
        .setFlagshipAlwaysRecoverable()
        .setFlagshipAutofit()
        .setCaptain()
        .setSupportFleet()
        .setSupportAutofit()
        .setMinFP()
        .setReinforcementFaction()
        .setQualityOverride()
        .setSpawnLocation()
        .setAssignment()
        .setAssignmentTarget()
        .setIsImportant()
        .setTransponderOn()
        .setVariantsPath()
        .create();

// Shorter createFleet method
MagicCampaign.createFleetBuilder()
        .setFleetName()
        .setFleetFaction()
        .setFleetType()
        .setFlagshipName()
        .setFlagshipVariant()
        .setCaptain()
        .setSupportFleet()
        .setMinFP()
        .setReinforcementFaction()
        .setQualityOverride()
        .setSpawnLocation()
        .setAssignment()
        .setAssignmentTarget()
        .setIsImportant()
        .setTransponderOn()
        .create();

// createCaptain
MagicCampaign.createCaptainBuilder()
        .setIsAI()
        .setAICoreType()
        .setFirstName()
        .setLastName()
        .setPortraitId()
        .setGender()
        .setFactionId()
        .setRankId()
        .setPostId()
        .setPersonality()
        .setLevel()
        .setEliteSkillsOverride()
        .setSkillPreference()
        .setSkillLevels()
        .create();

Note that you don't need to use all of these; each method tells you what the default is, and you can leave out any setter where the default is good (eg don't need to explicitly set isAICore to false for humans).



Paths to replace
Code
import data.scripts.Magic -> import org.magiclib.Magic
import data.scripts.util.Magic -> import org.magiclib.util.Magic
import data.scripts.terrain.Magic-> import org.magiclib.terrain.Magic
import data.scripts.ai.Magic-> import org.magiclib.ai.Magic
import data.scripts.bounty.Magic-> import org.magiclib.bounty.Magic
import data.scripts.campaign.Magic-> import org.magiclib.campaign.Magic
import data.scripts.hullmods.Magic-> import org.magiclib.hullmods.Magic
import data.scripts.plugins.Magic-> import org.magiclib.plugins.Magic
import data.scripts.weapons.Magic-> import org.magiclib.weapons.Magic
Title: Re: [0.96a] MagicLib v1.0.0 (2023/05/07)
Post by: Wispborne on May 07, 2023, 11:32:29 AM
1.0.1

Fixed a possible crash during new game generation.

https://github.com/MagicLibStarsector/MagicLib/releases/download/1.0.1/MagicLib-1.0.1.zip
Title: Re: [0.96a] MagicLib v1.0.0 (2023/05/07)
Post by: Zuthal on May 07, 2023, 11:35:09 AM
Something broke, that link downloads an empty zip
Title: Re: [0.96a] MagicLib v1.0.0 (2023/05/07)
Post by: Wispborne on May 07, 2023, 11:46:58 AM
Something broke, that link downloads an empty zip

Sorry! It should be fixed now.
I relied on my automatic process to create the .zip, it broke, and I didn't double-check it :|
Title: Re: [0.96a] MagicLib v1.0.0 (2023/05/07)
Post by: Zuthal on May 08, 2023, 02:23:18 AM
Something broke, that link downloads an empty zip

Sorry! It should be fixed now.
I relied on my automatic process to create the .zip, it broke, and I didn't double-check it :|

Yep, it works now! Though this time, seems you left a bunch of the project files, kotlin folders and such in it
Title: Re: [0.96a] MagicLib v1.0.1 (2023/05/07)
Post by: Dhunt05 on May 08, 2023, 02:18:43 PM
Breaking support for every mod out there hurts my soul :( theres so many older mods i love to use.
Title: Re: [0.96a] MagicLib v1.0.1 (2023/05/07)
Post by: Wispborne on May 09, 2023, 12:47:21 PM
MagicLib 1.1.0 dev02
This is an experimental update that allows un-updated mods to work with updated MagicLib.
It has been released on the Discord for most of a day and seems fine, but if there is any weirdness or MagicLib crashes, please report it.

https://github.com/MagicLibStarsector/MagicLib/releases/download/1.1.0-dev02/MagicLib-1.1.0-dev02.zip

Changes
- Most older mods are no longer broken by MagicLib and may work with just a mod_info.json file edit (unless broken by something other than MagicLib).
- Mods with code that referenced MagicBounty and haven't been updated will not work.
  - Mods that just add bounties are fine; it's mods with code that used MagicBountyCoordinator, bountyData, etc that need to be updated.
Title: Re: [0.96a] MagicLib v1.1.0 (2023/05/09)
Post by: Wispborne on May 09, 2023, 05:56:08 PM
MagicLib 1.1.0
(no changes from dev02)

Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.1.0/MagicLib-1.1.0.zip

Changes
- Most older mods are no longer broken by MagicLib and may work with just a mod_info.json file edit (unless broken by something other than MagicLib).
- Mods with code that referenced MagicBounty and haven't been updated will not work.
  - Mods that just add bounties are fine; it's mods with code that used MagicBountyCoordinator, bountyData, etc that need to be updated.
Title: Re: [0.96a] MagicLib v1.1.1 (2023/05/16)
Post by: Zelrod92 on May 26, 2023, 07:22:20 AM
hello I keep getting this error when playing and I think it might come from MagicLib.

1172137 [Thread-9] INFO  sound.H  - Playing music with id [battle_ambience_01.ogg]
1172181 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Texture [trails_trail_zappy] from category [fx] not found
java.lang.RuntimeException: Texture [trails_trail_zappy] from category [fx] not found
   at com.fs.starfarer.settings.StarfarerSettings.o00000(Unknown Source)
   at com.fs.starfarer.settings.StarfarerSettings.class(Unknown Source)
   at com.fs.starfarer.settings.StarfarerSettings$1.getSprite(Unknown Source)
   at org.magiclib.plugins.MagicAutoTrails.createTrailSegment(MagicAutoTrails.java:147)
   at org.magiclib.plugins.MagicAutoTrails.advance(MagicAutoTrails.java:136)
   at com.fs.starfarer.title.Object.for$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.super.new.super(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)
Title: Re: [0.96a] MagicLib v1.1.1 (2023/05/16)
Post by: SpaceDrake on June 01, 2023, 01:22:44 AM
hello I keep getting this error when playing and I think it might come from MagicLib.

1172137 [Thread-9] INFO  sound.H  - Playing music with id [battle_ambience_01.ogg]
1172181 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Texture [trails_trail_zappy] from category [fx] not found
java.lang.RuntimeException: Texture [trails_trail_zappy] from category [fx] not found
   at com.fs.starfarer.settings.StarfarerSettings.o00000(Unknown Source)
   at com.fs.starfarer.settings.StarfarerSettings.class(Unknown Source)
   at com.fs.starfarer.settings.StarfarerSettings$1.getSprite(Unknown Source)
   at org.magiclib.plugins.MagicAutoTrails.createTrailSegment(MagicAutoTrails.java:147)
   at org.magiclib.plugins.MagicAutoTrails.advance(MagicAutoTrails.java:136)
   at com.fs.starfarer.title.Object.for$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.super.new.super(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)

That's actually a mod not implementing MagicTrails properly; try updating to 1.1.1, and if it still persists, contact the mod author to whom "trail_zappy" is meant to belong to.
Title: Re: [0.96a] MagicLib v1.1.2 (2023/06/01)
Post by: Wispborne on June 07, 2023, 11:13:39 AM
MagicLib 1.1.2

Effects
- Fixed some effects being rendered twice (if they were added from csv, both new and backward-compat code loaded them).

MagicBounty
- Added two new text variables for use, and changed $faction to $targetFaction (backwards-compatible):
  - $targetFaction The name of the faction (with article) of the bounty fleet.
  - $givingFaction The name of the faction (with article) that's giving the bounty.
  - $rewardFaction The name of the faction (with article) that's giving the bounty reward (typically same as givingFaction).

https://github.com/MagicLibStarsector/MagicLib/releases/download/1.1.2-rc01/MagicLib-1.1.2-rc01.zip
Title: Re: [0.96a] MagicLib v1.1.2 (2023/06/01)
Post by: vicegrip on June 10, 2023, 05:21:09 PM
I was wondering if I could get some help on using the "location_entitiesID" field for magic bounties. Does causing the fleet to spawn in a particular system require establishing a memKey at the start of the game, or could i use some other identifier? For example if I wanted the bounty to spawn specifically in Duzahk, and not any other uninhabited core system such as Penelope's Star, how would I do that?
Title: Re: [0.96a] MagicLib v1.1.2 (2023/06/01)
Post by: Wispborne on June 10, 2023, 05:45:52 PM
I was wondering if I could get some help on using the "location_entitiesID" field for magic bounties. Does causing the fleet to spawn in a particular system require establishing a memKey at the start of the game, or could i use some other identifier? For example if I wanted the bounty to spawn specifically in Duzahk, and not any other uninhabited core system such as Penelope's Star, how would I do that?

location_entitiesID is a list of SectorEntityToken ids.

So, for Duzahk, you could add "duzahk1"(Aka Mainyu) and "duzahk2" (Druj).
There's no option for specifying a specific hardcoded system(s), though.
Title: Re: [0.96a] MagicLib v1.1.2 (2023/06/01)
Post by: vicegrip on June 10, 2023, 06:58:40 PM
I was wondering if I could get some help on using the "location_entitiesID" field for magic bounties. Does causing the fleet to spawn in a particular system require establishing a memKey at the start of the game, or could i use some other identifier? For example if I wanted the bounty to spawn specifically in Duzahk, and not any other uninhabited core system such as Penelope's Star, how would I do that?

location_entitiesID is a list of SectorEntityToken ids.

So, for Duzahk, you could add "duzahk1"(Aka Mainyu) and "duzahk2" (Druj).
There's no option for specifying a specific hardcoded system(s), though.

Interesting. This feature might currently be broken, as it always seems to default to one of the other options, or if one isn't listed, it would prevent the mission from starting at all. I've tried both:

Code
		"location_entitiesID": [
"duzahk1"
],

Code
		"location_entitiesID": [
"galatia_gate"
],

and neither seem to be working.
Title: Re: [0.96a] MagicLib v1.1.2 (2023/06/01)
Post by: vicegrip on June 11, 2023, 05:10:46 PM
Also trigger_memKeys_any seems to be broken. At first I thought it was me who had missed something, but after testing I can fairly conclusively say it's a bug.

Here's what I did:

Create test_mission with memKey $test_mission, and a length of 1 day.

Create followup_mission that has
Code
"trigger_memKeys_all": { "$test_mission_expired": true }
Run the game. This works. followup_mission only shows up after taking and failing test_mission.

Go and change "all" to "any" in attempt to eliminate any chance of a typo.
Code
"trigger_memKeys_any": { "$test_mission_expired": true }
Run the game. followup_mission no longer shows after failing test_mission.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wispborne on June 11, 2023, 09:10:23 PM
MagicLib 1.1.3

Thank you vicegrip for the bug reports!

https://github.com/MagicLibStarsector/MagicLib/releases/download/1.1.3-rc01/MagicLib-1.1.3-rc01.zip

**MagicBounty**
- Fixed "location_entitiesID" never working (reported by vicegrip).
- Fixed "trigger_memKeys_any" never working (reported by vicegrip).
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: vicegrip on July 23, 2023, 12:37:59 AM
I've run into a weird bug where if a variant in the magicBounty_variants folder from an enabled mod has a hullmod from the current mod listed under permaMods, the ship will not spawn with any weapons or fighters. This happens even if both mods are explicitly enabled in the bounty, and doesn't seem related to the hullmod script, since I've tested it with a dummy hullmod using BaseHullMod and the issue still occurs.

Also, a skin variant can't assign module variants. I'm not sure if this is a bug with the core game though, since currently loading modules on skins for the main game is bugged (https://fractalsoftworks.com/forum/index.php?topic=5061.msg406409#msg406409), and setModuleVariant doesn't seem to work either.

Edit: Even more weirdness, mods in hullMods are ending up as permamods upon salvaging the bounty.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: TreeasaurusRex on August 31, 2023, 02:12:57 PM
Ran into a fatal error when trying to start a new game, the description is this: Fatal Error:org/magiclib/kotlin/MagicKotlinModPlugin Cause: org.kotlin.MagicKotlinModPlugin
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: TreeasaurusRex on September 01, 2023, 10:34:55 AM
I figured it out didnt realize I needed to use a different version than the main one thats linked. For whatever reason that one keeps having an error when I try to start a game.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: MnHebi on October 01, 2023, 04:35:01 AM
Got a crash on giving the Hegemony a Cryoarithmeric Engine at Chicomoztoc.

8091313 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.util.MagicIndustryItemWrangler.canUseItem(MagicIndustryItemWrangler.java:254)
   at data.scripts.util.MagicIndustryItemWrangler.reportPlayerMarketTransaction(MagicIndustryItemWrangler.java:115)
   at com.fs.starfarer.campaign.CampaignEngine.reportPlayerMarketTransaction(Unknown Source)
   at com.fs.starfarer.campaign.ui.class.confirmTransaction(Unknown Source)
   at com.fs.starfarer.coreui.voidnew.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.n.buttonPressed(Unknown Source)
   at com.fs.starfarer.ui.I.?00000(Unknown Source)
   at com.fs.starfarer.ui.I.processInput(Unknown Source)
   at com.fs.starfarer.ui.W.super(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(Thread.java:748)

Stelnet.log details my active mods.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wispborne on October 01, 2023, 08:45:59 AM
Got a crash on giving the Hegemony a Cryoarithmeric Engine at Chicomoztoc.

<crash>

Stelnet.log details my active mods.
Thank you! We talked on Discord, and the problem is in AotD. Next MagicLib version will have extra logging in this area to help pinpoint the cause of such crashes.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wyvern on October 02, 2023, 12:45:26 PM
Got a crash on giving the Hegemony a Cryoarithmeric Engine at Chicomoztoc.

<crash>

Stelnet.log details my active mods.
Thank you! We talked on Discord, and the problem is in AotD. Next MagicLib version will have extra logging in this area to help pinpoint the cause of such crashes.
As the original writer of this bit of code, I'll offer: if you'd like assistance in fixing this, I am happy to take a look at it.

(Honestly, seeing this nullpointer annoys me - I thought I'd been careful about that. Not careful enough, apparently. Even if the actual bug is in someone else's mod, this should not be crashing.)

On the other hand, if you'd prefer to deal with this on your own, that is fine too: this is meant as an offer of support for code I wrote, not me trying to poke my nose in regardless.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wispborne on October 02, 2023, 01:03:11 PM
Got a crash on giving the Hegemony a Cryoarithmeric Engine at Chicomoztoc.
<crash>
Thank you! We talked on Discord, and the problem is in AotD. Next MagicLib version will have extra logging in this area to help pinpoint the cause of such crashes.
As the original writer of this bit of code, I'll offer: if you'd like assistance in fixing this, I am happy to take a look at it.

(Honestly, seeing this nullpointer annoys me - I thought I'd been careful about that. Not careful enough, apparently. Even if the actual bug is in someone else's mod, this should not be crashing.)

On the other hand, if you'd prefer to deal with this on your own, that is fine too: this is meant as an offer of support for code I wrote, not me trying to poke my nose in regardless.

It turns out that it was a bug in AotD that had already been fixed, the user just needed to update their mod.

As for the handling of such scenarios, it's always a balance between crashing with info vs swallowing the error and trying to guess at what the right response should be to invalid information. After all, you can risk messing up the player's game in hard-to-pin-down ways, and hiding the actual bug so it doesn't get fixed.

Given that this pretty much hasn't been a problem before and guessing at the correct behavior means the item never gets installed and the bug maybe never gets fixed, I'm fine with it crashing and giving enough info to fix.

The new crash message was, after giving them a patched jar:
Code
Error checking if hegeheavy_databank can be installed in vault_aotd.

I didn't even figure out what the actual cause for the issue was. My guess is either an industry with no spec (?) or a spec with seriously malformed params.
Code
// industry: vault_aotd, item: hegeheavy_databank  
private boolean canUseItem(Industry ind, SpecialItemData item) {
        SpecialItemSpecAPI spec = Global.getSettings().getSpecialItemSpec(item.getId());
        String[] industries = spec.getParams().split(",");  <--- this line crashes, NPE
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wyvern on October 02, 2023, 01:12:46 PM
Fair enough! Yeah, that looks like a bad spec for the "hegeheavy_databank" type item - as you say, either missing or with null parameters.

Were I re-writing this code, I'd probably add a "if( spec == null || spec.getParams() == null ) return false;" - if you can't get a list of industries from the item, then clearly it can't be installed in any industry.*

But letting it crash to make the error obvious isn't unreasonable, either, particularly with the improved logging you've described.

* Or, rather, it maybe can be, but only for industries that implement their own internal item installation mechanism and ignore the item spec. The ItemWrangler code doesn't take that path because that would require somehow injecting custom code into every industry ever, which seems problematic at best. But for someone building their own custom industry that only ever uses their own custom industry items, that's actually not an unreasonable place to put the item handling.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wispborne on October 26, 2023, 10:15:33 PM
Resetting bounties using the Console Command is currently bugged and can break the Bounty Board if used.

Rather than do a full release for this niche bug, it can be fixed by switching to this dev version: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.0-dev19/MagicLib.zip

Save compatible, and compatible with future releases.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Girlweapon-Mechcreature on November 04, 2023, 06:58:19 PM
I might simply be very stupid but somehow this mod seems to be causing some sort of trouble for me? With just this and Lazylib installed/enabled, the game simply crashes and gives me an error message stating something to the effect of "Command [AddBarEvent] not found in packages." I was surprised that I would get trouble from this of all things, so any idea how I've somehow managed to screw this up to cause this, or what might be the problem?
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wispborne on November 04, 2023, 07:53:01 PM
I might simply be very stupid but somehow this mod seems to be causing some sort of trouble for me? With just this and Lazylib installed/enabled, the game simply crashes and gives me an error message stating something to the effect of "Command [AddBarEvent] not found in packages." I was surprised that I would get trouble from this of all things, so any idea how I've somehow managed to screw this up to cause this, or what might be the problem?

Try simply redownloading and reinstalling it. Sometimes things get corrupted and that fixes it.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Girlweapon-Mechcreature on November 05, 2023, 01:19:50 AM
I might simply be very stupid but somehow this mod seems to be causing some sort of trouble for me? With just this and Lazylib installed/enabled, the game simply crashes and gives me an error message stating something to the effect of "Command [AddBarEvent] not found in packages." I was surprised that I would get trouble from this of all things, so any idea how I've somehow managed to screw this up to cause this, or what might be the problem?

Try simply redownloading and reinstalling it. Sometimes things get corrupted and that fixes it.

Tried redownloading and reinstalling it multiple times to no avail, didn't work. Completely deleted the game and re-installed it and this DID work for no reason I can possibly discern besides the corruption being in the base game itself. idk, it worked WITHOUT this mod. but either way it seems unlikely to be the fault of the mod itself. Either way apologies for pestering you with something that the solution to was basically "turn it off and turn it back on again", and thanks for your work keeping the mod functioning.
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wispborne on December 17, 2023, 10:47:03 AM
Dev update: https://github.com/MagicLibStarsector/MagicLib/releases/tag/1.3.0-dev24
Save-compatible.
Use at your own risk, should be stable but not fully done, please report crashes.

There is weirdness around completing bounties, so this is truly a dev version and not indicative of the final release.

**New**
- MagicBounty Intel Board
   - Displays all bounties (with conditions met) within 10LY of your location.
   - You no longer need to travel to a location to accept a bounty.
   - Contributed by President Matt Damon. Thank you!

**Changed**
- Various MagicPaintjob UI work/improvements (not visible yet without a separate, unreleased mod).
Title: Re: [0.96a] MagicLib v1.1.3 (2023/06/11)
Post by: Wispborne on December 25, 2023, 05:54:57 PM
MagicLib 1.3.0

Download: https://github.com/MagicLibStarsector/MagicLib/releases/latest

Mod makers: check out the updated https://starsector.fandom.com/wiki/MagicLib (https://starsector.fandom.com/wiki/MagicLib) wiki entry for achievement and paintjob info.

MagicLib does not come with any achievements or paintjobs.
These are added by other mods. I have assembled a starter pack mod with contributions from BirdWanderer, Amazigh, Selkie, and Tartiflette ['s paintjob tutorial].
MagicAchievementsVanillaPack download: https://github.com/MagicLibStarsector/MagicAchievementsVanillaPack/releases/latest

This is a big release. Please let me know about any issues you find, either here or on Discord.

Known Issues
- Paintjobs are removed when swapping variants. I will look into fixing that.
- Accepted bounties won't appear on the bounty board when out of range of the origin market. They will still show up as their own individual intel items.
- Some paintjobs may be loaded into VRAM even if the feature is disabled. Will fix. (if you don't download the addon pack with paintjobs, then there is no VRAM impact)

---------------------------
Changelog
MagicAchievements
- New feature! Cross-save achievements framework that any mod may add to.
- 20+ achievements available in a separate mod, Magic Achievements: Vanilla Pack.
- May be disabled using LunaLib's settings menu.
- Achievements work similarly to Steam's; once unlocked, they are unlocked forever and across all saves.
  - Nexerelin's Milestones, in contrast, are per-save.
- Find them under your Intel under `Personal`.

MagicPaintjobs
- New feature! Cross-save paintjobs (ship skins) framework that any mod may add to.
- Useful as rewards for achievements! Or for any other reason.
- Mods may add paintjobs, which will be locked by default. The modder chooses when/how to unlock them.
- Caution: because Starsector preloads almost everything, paintjobs in a mod will be loaded into VRAM even if they aren't applied.

MagicBounty
New feature! Intel Board
  - Displays all bounties (if you meet the conditions) within 10LY of your location.
  - **You no longer need to travel to a location to accept a bounty.**
  - Removed MagicBounty default time limits (there will only be a time limit if the bounty maker added one).
  - Contributed by President Matt Damon. Thank you!
- Fixed a potential crash after resetting a bounty via console command (reported by mrmagolor).

CombatGUI
- Properly released to everybody!
- Breaking changes from the Discord-only 1.2.0 version to add `MagicCombat` to the class names.
  - I don't think anybody was using this, but I'll release a backwards-compat patch if someone asks me to.

Other
- Added `MagicTxt.ellipsizeStringAfterLength(String str, int length)`.
- Added some more logging when checking if items can be installed in industries (reported by MnHebi).
- Added `MagicRefreshableBaseIntelPlugin`, which adds a method to refresh Intel's center panel. Used by MagicPaintjobs.

---------------------------

Screenshots
Spoiler
(https://i.imgur.com/YIMYjdM.png)

(https://i.imgur.com/kxdKE2D.png)

(https://i.imgur.com/FJR0IkJ.png)
[close]

This is just bloat! It doesn't belong in a library!
Yes and no.
Since none of the achievements or paintjobs are in MagicLib itself, it's not bloating from a filesize or loading time perspective.
You may disable either or both via LunaLib settings and ignore their existence entirely, even if other mods add achievements or paintjobs.

As for library bloat...do we really need *another* library? Would that be preferable to adding it to MagicLib? For those that don't care about these features, probably the answer is "yes", but taking into account those people that will use these features, I would rather that those uninterested simply update ML and ignore/disable the features than introduce a whole new library to the modiverse - fewer libraries is easier and less confusing for users. As for why make it at all...I think achievements are fun :shrug: and paintjobs exist because I wanted a achievement rewards that don't power creep the player.

What about VRAM?
Paintjobs do use more VRAM. They aren't loaded until after the game is already loaded and shouldn't be loaded at all if paintjobs are disabled (need to double check that and fix if not true).

If you have a GPU with low VRAM, consider avoiding paintjobs.
Title: Re: [0.96a] MagicLib v1.3.0 (2023/12/25)
Post by: Wispborne on December 25, 2023, 11:47:00 PM
MagicLib 1.3.1

Oops #1.
Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.1/MagicLib.zip

MagicBounty
- Fixed a crash on load ("No enum constant", reported by timediver0)
Title: Re: [0.96a] MagicLib v1.3.2 (2023/12/26)
Post by: Wispborne on December 26, 2023, 07:31:22 AM
MagicLib 1.3.2

Oops #2.
Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.2/MagicLib.zip

MagicBounty
- Fixed a crash when accepting "apocrita_belcher" bounty (reported by rosnok)
Title: Re: [0.96a] MagicLib v1.3.2 (2023/12/26)
Post by: Alesha170 on December 26, 2023, 09:53:38 AM
Download link in the main post is broken, it leads to "Not Found" page.
The link in the last post (with 1.3.2 announcement) is working properly.
Title: Re: [0.96a] MagicLib v1.3.2 (2023/12/26)
Post by: Wispborne on December 26, 2023, 09:54:58 AM
Download link in the main post is broken, it leads to "Not Found" page.
The link in the last post (with 1.3.2 announcement) is working properly.

Thank you, fixed.
Title: Re: [0.96a] MagicLib v1.3.2 (2023/12/26)
Post by: ShamanCat on December 27, 2023, 01:45:37 AM
Fresh install of the game and mods on a Win 11 system, loading game with only LazyLib(2.8 ) and MagicLib(1.3.2) enabled and I receive this error in the log file:

____
46828 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: lunalib/lunaSettings/LunaSettingsListener
java.lang.NoClassDefFoundError: lunalib/lunaSettings/LunaSettingsListener
   at org.magiclib.Magic_modPlugin.onApplicationLoad(Magic_modPlugin.java:69)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: lunalib.lunaSettings.LunaSettingsListener
   at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   ... 7 more
------

Is LunaLib a dependency for loading magiclib?
Title: Re: [0.96a] MagicLib v1.3.2 (2023/12/26)
Post by: Wispborne on December 27, 2023, 06:40:20 AM
Fresh install of the game and mods on a Win 11 system, loading game with only LazyLib(2.8 ) and MagicLib(1.3.2) enabled and I receive this error in the log file:

____
46828 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: lunalib/lunaSettings/LunaSettingsListener
java.lang.NoClassDefFoundError: lunalib/lunaSettings/LunaSettingsListener
   at org.magiclib.Magic_modPlugin.onApplicationLoad(Magic_modPlugin.java:69)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: lunalib.lunaSettings.LunaSettingsListener
   at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   ... 7 more
------

Is LunaLib a dependency for loading magiclib?

It's optional, but I remember seeing that there's a bug in Java 7 where even if your code checks whether a mod is enabled, it'll still crash.

For now, upgrade to Java 8 (there's instructions here https://fractalsoftworks.com/forum/index.php?topic=25974.0) OR add LunaLib. I'll see what can be done.

edit: I'm told it happens in Java 8 as well, but I also found out how to fix it (need to move all of the lunalib code into its own class, which is only ever instantiated if lunalib is enabled).

To be clear, all of the code that uses LunaLib is wrapped in `if (Global.getSettings().getModManager().isModEnabled("lunalib"))`. It's crashing anyway.
Title: Re: [0.96a] MagicLib v1.3.2 (2023/12/26)
Post by: Wispborne on December 27, 2023, 07:54:28 AM
MagicLib 1.3.3

Oops #3.
Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.3/MagicLib.zip


Other
- Fixed unintentional hard dependency on LunaLib.

MagicPaintjobs
- Paintjobs are now built-in hullmods. This prevents changing variants from unapplying them.
- Paintjobs images are no longer preloaded into VRAM, which unintentionally caused VRAM use when the feature was disabled.
- <redacted> paintjobs now indicate that they cannot be changed.
Title: Re: [0.96a] MagicLib v1.3.3 (2023/12/27)
Post by: Wispborne on December 29, 2023, 07:40:49 AM
MagicLib 1.3.4

Oops #4.
Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.4/MagicLib.zip


MagicBounty
- Accepted bounties are now always displayed on the Board, even when out of range of the bounty giver.

MagicPaintjobs
- The Paintjob hullmod no longer shows up as installable.
- Fixed crash from ConcurrentModificationException (reported by Meelock)
Title: Re: [0.96a] MagicLib v1.3.5 (2023/12/30)
Post by: Wispborne on December 30, 2023, 12:00:04 PM
MagicLib 1.3.5
Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.5/MagicLib.zip

Content Mod: Achievement + Paintjob Pack 1.1.0
Download: https://github.com/MagicLibStarsector/MagicAchievementsVanillaPack/releases/download/1.1.0/MagicAchievementsVanillaPack.zip
- Added 5 Tiger Stripes paintjobs and 5 Adept achievements to unlock them (Kill 25 ships using <ship>).


Changelog
MagicPaintjobs
- Added a notification when a paintjob is unlocked.
  - Actually, this was meant to be in 1.3.0, but somehow I deleted the code without realizing.
- Paintjobs now apply to `baseHullId` instead of `hullId`.
  - So, both `wolf` and `wolf_d` will share paintjobs.
- In `magic_paintjobs.csv`, the `hull_id` column has been replaced with `hull_ids`.
  - This change is backwards-compatible. No need to update your csv.
  - `hull_ids` is comma-separated. A single paintjob may now apply to multiple hulls.
- Added `ShipKillsAchievement` as an abstract class to easily make "Kill X ships using a \<ship\>" achievements.
- Various UI fixes.
Title: Re: [0.96a] MagicLib v1.3.5 (2023/12/30)
Post by: Arthur_The_Ok on December 31, 2023, 04:24:31 AM
Game crashed while I was navigating normal space

Code
1068791 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at org.magiclib.bounty.intel.MagicBountyInfo.addNotificationBulletpoints(MagicBountyInfo.kt:80)
at org.magiclib.bounty.intel.BountyBoardIntelPlugin.addBulletPoints(BountyBoardIntelPlugin.kt:64)
at com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.addBulletPoints(BaseIntelPlugin.java:211)
at com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.createIntelInfo(BaseIntelPlugin.java:225)
at org.magiclib.bounty.intel.BountyBoardIntelPlugin.createIntelInfo(BountyBoardIntelPlugin.kt:113)
at com.fs.starfarer.campaign.comms.C.recreate(Unknown Source)
at com.fs.starfarer.campaign.comms.C.<init>(Unknown Source)
at com.fs.starfarer.campaign.comms.A.addMessage(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.addMessage(Unknown Source)
at com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.sendUpdateIfPlayerHasIntel(BaseIntelPlugin.java:178)
at org.magiclib.bounty.intel.BountyBoardIntelPlugin.notifyUserThatBountyIsAvailable(BountyBoardIntelPlugin.kt:85)
at org.magiclib.bounty.intel.BountyBoardIntelPlugin.advance(BountyBoardIntelPlugin.kt:101)
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.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:750)

I think it was cause by the new Magic Bounty system
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Wispborne on January 01, 2024, 11:53:47 AM
MagicLib 1.3.6

Oops #6.
Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.6/MagicLib.zip


MagicBounty
- Fixed rare crash if bounty was null (reported by Arthur_The_Ok).
- Fixed "Accept this job" sometimes not updating its text after accepting.

MagicAchievements
- Fixed Linux-only crash when viewing intel (reported by Brainwright).
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: MuleDriver on January 02, 2024, 06:26:18 AM
MagicLib 1.3.6

Upgraded from MagicLib-1.1.3-rc01, and now I have this "Bounty Board" in my intel screen, that
- shows up as "new" on every reload,
- I can't "unimportant",
- does not do anything.

Is this WAI?

PS ... I'm running:
CaptainsLog-0.2.0
Combat.Radar.3.0
DetailedCombatResults.5.3.3
DynamicTariffs 2.0
FleetSizeByDP-1.0.2b
Larger Zoom Out 1.1.0
LazyLib.2.8
LunaLib1.8.3
Neutrino-Detector-MkII-1.4.2
Objects Analysis 002
Officer.Extension0.5.0(0.96a-RC6)
PlanetSearch-1.2.1
Portrait_Changer_v1.0.1
Stellar Networks 3.1.3
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Zeta04 on January 02, 2024, 07:03:02 AM
So with the current update (v1.3.6) it seems that I can repeatedly accept some bounties, with cases where a bounty instantly becomes re-acceptable after completion (unsure if ALL bounties are repeatedly acceptable), is this intehded or is there some sorta bugs causing it to do so?
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Brainwright on January 02, 2024, 09:33:37 AM
Getting this, too, with the new Arma Armatura patch.
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: lustfull on January 02, 2024, 12:23:34 PM
Bug report: double ordo simulator bounti from "a fleet testing mod"  the game crash when i click on the bounty.
 the log if i am not wrong.

ps: i aslo get the infinite bounti ; which could be turn into a cool option

java.lang.NullPointerException: bountySpec.job_description must not be null
   at org.magiclib.bounty.intel.MagicBountyInfo.showBountyText(MagicBountyInfo.kt:334)
   at org.magiclib.bounty.intel.MagicBountyInfo.layoutPanel(MagicBountyInfo.kt:279)
   at org.magiclib.bounty.intel.BountyBoardIntelPlugin$layoutPanel$1.pickedItem(BountyBoardIntelPlugin.kt:137)
   at org.magiclib.bounty.intel.BountyBoardIntelPlugin$layoutPanel$1.pickedItem(BountyBoardIntelPlugin.kt:131)
   at org.magiclib.bounty.ui.lists.ListUIPanelPlugin.itemClicked(ListUIPanelPlugin.kt:117)
   at org.magiclib.bounty.ui.lists.ListItemButtonHandler.onClicked(ListItemButtonHandler.kt:8)
   at org.magiclib.bounty.ui.InteractiveUIPanelPlugin.checkHighlightedButton(InteractiveUIPanelPlugin.kt:101)
   at org.magiclib.bounty.ui.InteractiveUIPanelPlugin.processInput(InteractiveUIPanelPlugin.kt:40)
   at com.fs.starfarer.ui.newui.int.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.int.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.int.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.processInputImpl(Unknown Source)
   at com.fs.starfarer.campaign.comms.v2.EventsPanel.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.processInputImpl(Unknown Source)
   at com.fs.starfarer.campaign.comms.return.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.o0OO.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.public.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.L.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.interfacenew.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.thissuper.processInput(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.processInput(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(Thread.java:748)
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Sajuuk on January 03, 2024, 04:22:07 AM
Hello!
Switched to version 1.3.5 from version 1.1.3-rc01 and in the bars the first line of dialogue disappeared,
"Connect to the local unsanctioned bounty board."
the same in the version 1.3.6
so now I can't take these unique missions, even if start a new game, still the same.
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Zeta04 on January 03, 2024, 09:55:10 AM
Hello!
Switched to version 1.3.5 from version 1.1.3-rc01 and in the bars the first line of dialogue disappeared,
"Connect to the local unsanctioned bounty board."
the same in the version 1.3.6
so now I can't take these unique missions, even if start a new game, still the same.
It is intended.
Now the unique bounties are moved into the "Bounty board" tag under "Bounties"/"Important" tab in the intel screen
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Wispborne on January 03, 2024, 11:48:01 PM
MagicLib 1.3.7

Oops #7.
Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.7/MagicLib.zip


MagicBounty
- May no longer re-Accept already-Completed bounties. Sorry.
- Intel fixes.
  - May now mark unimportant (reported by MuleDriver).
  - No longer always new (reported by MuleDriver).
  - Shouldn't show up if there are no bounties loaded (reported by MuleDriver).
  - Potentially fixes issues if MagicBounty is disabled.

MagicAchievements
- Fixed another Linux-only crash when viewing intel (reported by Brainwright).

MagicPaintjobs
- Cleaned up "select ship" popup (centered text, fixed cell placement, shows current paintjob).

MagicCampaign
- Fixed MagicCampaignTrailPlugin not working (reported by Xaiier and maybe others, sorry).

MagicAutoTrails
- Trails no longer disappear after piercing (e.g. Plasma Cannon trail with Trailer Moments) (reported by Nia).
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Killsode on January 04, 2024, 06:52:46 PM
Hello!
Switched to version 1.3.5 from version 1.1.3-rc01 and in the bars the first line of dialogue disappeared,
"Connect to the local unsanctioned bounty board."
the same in the version 1.3.6
so now I can't take these unique missions, even if start a new game, still the same.
It is intended.
Now the unique bounties are moved into the "Bounty board" tag under "Bounties"/"Important" tab in the intel screen

I'm not really sure about that change. Sure, now they're all really easily available... but they're really easily available. Would finding weapons be as cool if every market had a complete array of all the weapon blueprints they know available at all times?
Title: Re: [0.96a] MagicLib v1.3.7 (2024/01/03)
Post by: Wispborne on January 04, 2024, 07:03:25 PM
Bounties appear if you're within 20LY of the giving market and you meet any conditions (player level, fleet size, time passed, pre-requisites, etc).

One of the most common complaints about the MagicBounty system, as a player, was that actually finding bounties was a total pain, and it was easy to not see certain bounties if you were unlucky with "rolls" (e.g. a market had Legio Rising instead of Rare Bounty).

HVBs, from Vayra's Sector, were available as Intel immediately, albeit at a trickle rather than all at once.
Title: Re: [0.96a] MagicLib v1.3.7 (2024/01/03)
Post by: Kitfox88 on January 10, 2024, 10:43:45 AM
Disabled achievements using the mod organizer and that session ran fine but now when I try to boot the game I get a fatal:null exception with this in the log. It's the only thing I can think that would be causing it since it's the only major change I've made between starting a new save last night and today when I tried to boot the game.
Quote
109283 [Thread-3] INFO  org.magiclib.achievements.MagicAchievementManager  - []
109286 [Thread-3] INFO  org.magiclib.achievements.MagicAchievementManager  - MagicLib achievements are disabled.
109288 [Thread-3] INFO  org.magiclib.achievements.MagicAchievementManager  - Saved 0 achievements.
109489 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at org.magiclib.achievements.MagicAchievementManager.setAchievementsEnabled(MagicAchievementManager.java:154)
   at org.magiclib.achievements.MagicAchievementManager.onApplicationLoad(MagicAchievementManager.java:116)
   at org.magiclib.Magic_modPlugin.onApplicationLoad(Magic_modPlugin.java:74)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)

Anyway to turn them back out outside the game? I can't find an easy option to do so in any of the ini files in the magiclib/data/config directory.
Title: Re: [0.96a] MagicLib v1.3.7 (2024/01/03)
Post by: Wispborne on January 10, 2024, 10:51:21 AM
Disabled achievements using the mod organizer and that session ran fine but now when I try to boot the game I get a fatal:null exception with this in the log. It's the only thing I can think that would be causing it since it's the only major change I've made between starting a new save last night and today when I tried to boot the game.
Quote
109283 [Thread-3] INFO  org.magiclib.achievements.MagicAchievementManager  - []
109286 [Thread-3] INFO  org.magiclib.achievements.MagicAchievementManager  - MagicLib achievements are disabled.
109288 [Thread-3] INFO  org.magiclib.achievements.MagicAchievementManager  - Saved 0 achievements.
109489 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at org.magiclib.achievements.MagicAchievementManager.setAchievementsEnabled(MagicAchievementManager.java:154)
   at org.magiclib.achievements.MagicAchievementManager.onApplicationLoad(MagicAchievementManager.java:116)
   at org.magiclib.Magic_modPlugin.onApplicationLoad(Magic_modPlugin.java:74)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)

Anyway to turn them back out outside the game? I can't find an easy option to do so in any of the ini files in the magiclib/data/config directory.

Ouch. I'll see if I can make time to fix this today.

In the meantime, look in your saves/common/LunaSettings folder for something like MagicLib.json.data. Open that up and there should be the setting you're looking for. Not at my PC at the moment so I can't check.
Title: Re: [0.96a] MagicLib v1.3.7 (2024/01/03)
Post by: Kitfox88 on January 10, 2024, 02:43:17 PM
Ouch. I'll see if I can make time to fix this today.

In the meantime, look in your saves/common/LunaSettings folder for something like MagicLib.json.data. Open that up and there should be the setting you're looking for. Not at my PC at the moment so I can't check.

That fixed it, thanks! I didn't think to look in saves, kind of obvious in retrospect.
Title: Re: [0.96a] MagicLib v1.3.7 (2024/01/03)
Post by: Wispborne on January 11, 2024, 05:32:54 PM
Here's a "quick" fix, but there's an additional internal change to fleet building that needs further testing before I do a proper release.

https://github.com/MagicLibStarsector/MagicLib/releases/tag/1.3.8-dev02
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Wispborne on January 31, 2024, 10:32:28 PM
MagicLib 1.3.8

Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.8/MagicLib.zip


MagicCampaign
- Fixed 5 year old crash: MagicCampaignTrailPlugin sometimes crashed with ConcurrentModificationException if player moved between hyperspace and regular space (reported by Xaiier).
- Added `MagicCampaign.createDerelict` overload that lets you mark a derelict as unrecoverable.

MagicUI
- Fade interpolation fix by Starficz.

MagicAchievements
- Made it clearer when a crash is from using devmode.
- Fixed achievement `advance` methods running when achievements are disabled.

MagicBounty
- Fixed occasional crash when filtering a bounty (reported by laf223).
Title: Re: [0.96a] MagicLib v1.3.8 (2024/01/31)
Post by: El_Sassos on February 02, 2024, 11:44:23 AM
Hello! A CTD occurs at seemingly random intervals while in a battle. There are two stack traces in the log. One for Magiclib and another for your other mod, Persean Chronicles. Turning the Paint module off in Luna doesn't do anything, as the issue persists. Chronicles may be responsible for the CTD instead, of course.

Here's the part for MagicLib:


Code
org.json.JSONException: JSONObject["unlockedPaintjobs"] not found.
    at org.json.JSONObject.get(JSONObject.java:406)
    at org.json.JSONObject.getJSONArray(JSONObject.java:482)
    at org.magiclib.paintjobs.MagicPaintjobManager.loadUnlockedPaintjobs(MagicPaintjobManager.kt:249)
    at org.magiclib.paintjobs.MagicPaintjobManager.onGameLoad(MagicPaintjobManager.kt:91)
    at org.magiclib.Magic_modPlugin.onGameLoad(Magic_modPlugin.java:153)
    at com.fs.starfarer.campaign.save.CampaignGameManager.super(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.impl.L.dismiss(Unknown Source)
    at com.fs.starfarer.campaign.save.LoadGameDialog.actionPerformed(Unknown Source)
    at com.fs.starfarer.ui.n.buttonPressed(Unknown Source)
    at com.fs.starfarer.ui.I.Ò00000(Unknown Source)
    at com.fs.starfarer.ui.I.processInput(Unknown Source)
    at com.fs.starfarer.ui.W.super(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(Thread.java:750)

    My mod list:

 
Spoiler
{
  "enabledMods": [
    "alcoholism",
    "aod_vos",
    "aotd_vok",
    "apex_design",
    "ApproLight",
    "ApproLightPlus",
    "ArkLeg",
    "armaa",
    "assortment_of_things",
    "audio_plus",
    "automatedcommands",
    "blackrock_driveyards",
    "bluefriendballs",
    "CaptainsLog",
    "Celestial Mount Circle",
    "CFT",
    "cmutils",
    "combatactivators",
    "COPS",
    "Cryo_but_better",
    "DetailedCombatResults",
    "diableavionics",
    "Diktat Enhancement",
    "edshipyard",
    "EmergentThreats_Vice",
    "exshippack",
    "FantasyM",
    "fob",
    "forge_production",
    "Goat_Aviation_Bureau",
    "GrandColonies",
    "gudalanmu",
    "hcok",
    "hte",
    "Imperium",
    "IndEvo",
    "Interstellar Federation Refurbished -unbalanced-",
    "istl_dassaultmikoyan",
    "JYD",
    "JYDR",
    "kazeron",
    "kyeltziv",
    "largerZoomOut",
    "leadingPip",
    "lost_sector",
    "luddenhance",
    "lunalib",
    "lw_console",
    "lw_lazylib",
    "mag_protect",
    "MagicLib",
    "molecularreplicator",
    "Musashimanufactor",
    "Neutrino",
    "nexerelin",
    "objects_analysis",
    "ObviousNeutron",
    "OcuA",
    "officerExtension",
    "ORA",
    "PAGSM",
    "pantera_ANewLevel40R",
    "particleengine",
    "pearson_exotronics",
    "planet_search",
    "pn",
    "Polaris_Prime",
    "portrait_changer",
    "presmattdamon_takenoprisoners",
    "progressiveSMods",
    "pt_qolpack",
    "QualityCaptains",
    "Red_Hat_Shenandoah_JRE8",
    "roider",
    "SBR",
    "scalartech",
    "scan_those_gates",
    "ScavengerTrading",
    "SCY",
    "SCYUtility",
    "seven_nexus",
    "shaderLib",
    "shadow_ships",
    "shadowlight",
    "sikr",
    "smc_coalition",
    "spacetruckin",
    "stardustventures",
    "Starsin",
    "stelnet",
    "StopGapMeasures3",
    "sun_fuel_siphoning",
    "sun_hyperdrive",
    "sun_new_beginnings",
    "sun_starship_legends",
    "superweapons",
    "tahlan",
    "Terraforming \u0026 Station Construction",
    "the_vass",
    "THI",
    "timid_admins",
    "timid_commissioned_hull_mods",
    "timid_cum",
    "timid_supply_forging",
    "TraverserDesignBureau",
    "TrulyAutomatedShips",
    "TTSC",
    "uaf",
    "uaf_skills",
    "unionrailsystems",
    "US",
    "vic",
    "which_industry",
    "whichmod",
    "wisp_perseanchronicles",
    "wotani_federation",
    "wyv_planetaryShieldAccessControl",
    "yrutl",
    "yrxp"
  ]
}
[close]

 Here's the end part of the log, including both the magiclib and chronicles errors. (https://pastebin.com/L4jtzNm3)  Might as well do that instead of double posting.
Title: Re: [0.96a] MagicLib v1.3.8 (2024/01/31)
Post by: Wispborne on February 02, 2024, 06:59:31 PM
Hello! A CTD occurs at seemingly random intervals while in a battle. There are two stack traces in the log. One for Magiclib and another for your other mod, Persean Chronicles.
<snip>

Neither of these are crashes, just non-crash errors. The crashes are caused by something else.
Title: Re: [0.96a] MagicLib v1.3.6 (2024/01/01)
Post by: Wispborne on February 02, 2024, 07:20:00 PM
MagicLib 1.3.9

Download: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.9/MagicLib.zip

- Quick 0.97a update (mod_info.json change)
- Changed a few instances of logging to "warn" instead of "error" in order to be less alarming.
Title: Re: [0.97a] MagicLib v1.3.9 (2024/02/02)
Post by: vicegrip on February 03, 2024, 07:53:29 PM
Have some of the fields for magic bounties stopped working? I would like to present a bounty that's a surprise to players, but "job_show_type": false, "job_show_captain": false, "job_show_fleet": "none", no longer seem to be respected in the bounty board itself, even though the mission summary still keeps the information secret.
Title: Re: [0.97a] MagicLib v1.3.9 (2024/02/02)
Post by: Zudgemud on February 04, 2024, 09:01:00 AM
Yeah my magicbounties does not show at all after the update :(
Title: Re: [0.97a] MagicLib v1.3.9 (2024/02/02)
Post by: Wispborne on February 04, 2024, 11:17:37 AM
Yeah my magicbounties does not show at all after the update :(

They are showing fine for me. Do you have Locked & Loaded enabled? It'll need to be edited to work for 0.97a.

(https://i.imgur.com/UTvtx8x.png)
Title: Re: [0.97a] MagicLib v1.3.9 (2024/02/02)
Post by: Wispborne on February 04, 2024, 11:18:19 AM
Have some of the fields for magic bounties stopped working? I would like to present a bounty that's a surprise to players, but "job_show_type": false, "job_show_captain": false, "job_show_fleet": "none", no longer seem to be respected in the bounty board itself, even though the mission summary still keeps the information secret.

(passed along to President Matt Damon)
Title: Re: [0.97a] MagicLib v1.3.9 (2024/02/02)
Post by: MulletCat on February 12, 2024, 01:51:04 AM
I've used MagicLib for ages, but someone recently pointed out to me the new paintjob feature it has. This is really freaking cool and seems way easier than the .skin file and console command hyjinx I was using to get my own personally colored fleet. Thank you for making such a cool feature. However I seem to have run into a weird problem when setting up my stuff with it. Despite the fact I set my mod's magic_paintjobs.csv to "true" on unlocked by default, they are locked when I try to access them via the ingame menu. I even tried setting it to false or leaving the field blank (since it says the default is true) but those don't seem to work. I noticed this post when checking for a possible answer:

- Mods may add paintjobs, which will be locked by default. The modder chooses when/how to unlock them.

Does this mean a mod that introduces paintjobs *needs* an achievement or something to unlock the paintjobs?

screenshots of ingame paint menu and my csv in an editor
Spoiler
(https://i.imgur.com/ffw864k.png) (https://i.imgur.com/0CFsS2u.png)
[close]


PS. Double checking the Magic Achievements mod's csv, a few of the paintjobs it has set to be unlocked by default (EG: Faded Dominator and the Gamer Prometheus) are also locked. Perhaps its a bug? I am unsure. Maybe (hopefully) I am missing something obvious.
Title: Re: [0.97a] MagicLib v1.3.10 (2024/02/12)
Post by: Wispborne on February 12, 2024, 06:03:59 PM
MagicLib v1.3.10
Download: https://github.com/MagicLibStarsector/MagicLib/releases/latest/download/MagicLib.zip

MagicBounty
- Fixes Bounty Board to respect `mb_distance` flags (contributed by President Matt Damon).

MagicAchievements
- Added `completeAchievement` methods to `MagicAchievementManager` (before, you needed an instance of `MagicAchievement` to complete one).

MagicPaintjobs
- Fixed automatically unlocked paintjobs not being automatically unlocked (reported by Galaga Galaxian).
- No longer loads paintjobs for ships that don't exist (e.g. from a mod that's not installed).
- Cleaned up some logging that reported an error on first run and added pj ids to pjs that fail to load.
Title: Re: [0.97a] MagicLib v1.3.9 (2024/02/02)
Post by: Wispborne on February 13, 2024, 07:42:36 AM
- Mods may add paintjobs, which will be locked by default. The modder chooses when/how to unlock them.

Does this mean a mod that introduces paintjobs *needs* an achievement or something to unlock the paintjobs?

Nope - that was just a bug where setting `automaticallyUnlock` to true wasn't working properly.

(we spoke on the Discord and the bug is fixed in 1.3.10, thank you again for reporting it!)
Title: Re: [0.97a] MagicLib v1.3.10 (2024/02/12)
Post by: Dostya on February 13, 2024, 09:04:34 PM
I'm having a crash where I complete a bounty off of the Bounty Board, go back to the intel screen, and when I select the Bounty Board to accept another bounty the game crashes. I suspect it's because I missed updating something so the MagicLib Bounty Board is missing a bounty completion flag, but I'm having no luck figuring out what.

Relevant chunk of log as follows:

Quote
809946 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException: activeBounty.fleet.flagship must not be null
java.lang.NullPointerException: activeBounty.fleet.flagship must not be null
   at org.magiclib.bounty.intel.MagicBountyInfo.showFleet(MagicBountyInfo.kt:579)
   at org.magiclib.bounty.intel.AssassinationMagicBountyInfo.showTargetInfo(AssassinationMagicBountyInfo.kt:86)
   at org.magiclib.bounty.intel.MagicBountyInfo.layoutPanel(MagicBountyInfo.kt:301)
   at org.magiclib.bounty.intel.BountyBoardIntelPlugin$layoutPanel$1.pickedItem(BountyBoardIntelPlugin.kt:135)
   at org.magiclib.bounty.intel.BountyBoardIntelPlugin$layoutPanel$1.pickedItem(BountyBoardIntelPlugin.kt:128)
   at org.magiclib.bounty.ui.lists.ListUIPanelPlugin.itemClicked(ListUIPanelPlugin.kt:117)
   at org.magiclib.bounty.intel.BountyBoardIntelPlugin.layoutPanel(BountyBoardIntelPlugin.kt:146)
   at org.magiclib.bounty.intel.BountyBoardIntelPlugin.createLargeDescriptionImpl(BountyBoardIntelPlugin.kt:155)
   at org.magiclib.util.ui.MagicRefreshableBaseIntelPlugin.refreshPanel(MagicRefreshableBaseIntelPlugin.java:47)
   at org.magiclib.util.ui.MagicRefreshableBaseIntelPlugin.createLargeDescription(MagicRefreshableBaseIntelPlugin.java:26)
   at com.fs.starfarer.campaign.comms.v2.EventsPanel.new(Unknown Source)
   at com.fs.starfarer.campaign.comms.v2.EventsPanel.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.n.buttonPressed(Unknown Source)
   at com.fs.starfarer.ui.I.new(Unknown Source)
   at com.fs.starfarer.ui.I.processInput(Unknown Source)
   at com.fs.starfarer.ui.n.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.ui.privatesuper$Oo.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.ui.z.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.z.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.privatesuper.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.ui.z.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.z.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.ui.z.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.z.processInputImpl(Unknown Source)
   at com.fs.starfarer.campaign.comms.v2.EventsPanel.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.ui.z.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.z.processInputImpl(Unknown Source)
   at com.fs.starfarer.campaign.comms.F.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.ui.z.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.z.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.E.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.ui.z.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.z.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.oo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.for.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.ui.z.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.z.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.R.processInput(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.processInput(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(Thread.java:750)
Title: Re: [0.97a] MagicLib v1.3.10 (2024/02/12)
Post by: fat4eyes on February 14, 2024, 04:34:38 PM
Windows defender is tagging magiclib. Is this a known issue? What's it tagging? Is this the thing that checks for mod updates?
Code
Trojan:Script/Wacatac.B!ml
file: D:\OtherGames\installers\Starsector\MagicLib.zip->MagicLib/jars/MagicLib.jar
webfile: D:\OtherGames\installers\Starsector\MagicLib.zip|https://objects.githubusercontent.com/github-production-release-asset-2e65be/583789919/fa6a86f4-3c59-45ef-8d74-173ccd44240c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=XXXXXXXXXXXXXXXXXX%2F20240215%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240215T002020Z&X-Amz-Expires=300&X-Amz-Signature=42e6a84bf5b9b71e6df0b15caf1321de489b759b0f20f6e4c919e66249c00063&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=583789919&response-content-disposition=attachment%3B%20filename%3DMagicLib.zip&response-content-type=application%2Foctet-stream|pid:16800,ProcessStart:133524300283484010
Title: Re: [0.97a] MagicLib v1.3.10 (2024/02/12)
Post by: Wispborne on February 14, 2024, 06:19:22 PM
I'm having a crash where I complete a bounty off of the Bounty Board, go back to the intel screen, and when I select the Bounty Board to accept another bounty the game crashes. I suspect it's because I missed updating something so the MagicLib Bounty Board is missing a bounty completion flag, but I'm having no luck figuring out what.

This should fix it, but I haven't reproduced the crash so please let me know either way: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.11-dev02/MagicLib.zip

Windows defender is tagging magiclib. Is this a known issue? What's it tagging? Is this the thing that checks for mod updates?
Code
Trojan:Script/Wacatac.B!ml
file: D:\OtherGames\installers\Starsector\MagicLib.zip->MagicLib/jars/MagicLib.jar
webfile: D:\OtherGames\installers\Starsector\MagicLib.zip|https://objects.githubusercontent.com/github-production-release-asset-2e65be/583789919/fa6a86f4-3c59-45ef-8d74-173ccd44240c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=XXXXXXXXXXXXXXXXXX%2F20240215%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240215T002020Z&X-Amz-Expires=300&X-Amz-Signature=42e6a84bf5b9b71e6df0b15caf1321de489b759b0f20f6e4c919e66249c00063&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=583789919&response-content-disposition=attachment%3B%20filename%3DMagicLib.zip&response-content-type=application%2Foctet-stream|pid:16800,ProcessStart:133524300283484010

I assume that's a false positive. Defender loves to call random .7z and .zip files infected by wacatac.
Toss it onto https://www.virustotal.com/ and see what it says.

edit:
VirusTotal says it's clean.
https://www.virustotal.com/gui/file/7bde3d40a19b53aa4932697ed5e3114b0417938c1b2cdffa1ed6c63121d7e6b5
https://www.virustotal.com/gui/url/c58227c268135a9896c4d875a86234c7722534581b9dce710926eea2303f24a3?nocache=1 (this one has one "suspicious" response but it looks like it's just one website that's complaining about GitHub itself for geopolitical reasons, not MagicLib).
Title: Re: [0.97a] MagicLib v1.3.10 (2024/02/12)
Post by: Dostya on February 14, 2024, 07:32:05 PM
This should fix it, but I haven't reproduced the crash so please let me know either way: https://github.com/MagicLibStarsector/MagicLib/releases/download/1.3.11-dev02/MagicLib.zip

That did the trick. Thank you for the quick fix - especially without being able to reproduce it yourself.
Title: Re: [0.97a] MagicLib v1.3.11 (2024/02/14)
Post by: Wispborne on February 14, 2024, 08:01:38 PM
MagicLib v1.3.11
Download: https://github.com/MagicLibStarsector/MagicLib/releases/latest/download/MagicLib.zip
Docs: https://magiclibstarsector.github.io/MagicLib/

MagicBounty
- Fixed a crash when a bounty has no flagship (reported by Dostya).

MagicPaintjobs
- Fixed paintjobs duplicating in the selector every save load (reported by Galaga Galaxian).
Title: Re: [0.97a] MagicLib v1.4.0 (2024/02/22)
Post by: Wispborne on February 23, 2024, 07:49:34 AM
MagicLib v1.4.0
Download: https://github.com/MagicLibStarsector/MagicLib/releases/latest/download/MagicLib.zip
Docs: https://magiclibstarsector.github.io/MagicLib/

Players: If a mod required Combat Activators before updating your MagicLib, it still does after.

New: MagicSubsystems
- tldr; Combat Activators + CMUtils.
- Add additional "ship systems" to ships, each triggered with a hotkey.
- Add drones with formations and charges.
- All displayed in a vanilla-like UI.
- Contributed by President Matt Damon. UI code contributed by tomatopaste.
- See examples in `org.magiclib.subsystems.examples (https://github.com/MagicLibStarsector/MagicLib/tree/master/src/org/magiclib/subsystems/examples)`.
- See wiki  (https://starsector.fandom.com/wiki/MagicLib#Combat_Activators_to_MagicSubsystems_Migration)for migration guide from Combat Activators.

(https://i.imgur.com/Nx3OwPv.png)

edit: The text also reacts to distortion effects. Very cool!
Title: Re: [0.97a] MagicLib v1.4.0 (2024/02/22)
Post by: NITEGHXST on February 25, 2024, 02:36:48 PM
Heyoo I got a question regarding the paintjob system.

I was working on a livery-switching mod that allows you to switch between liveries, but due too mod-compat problems I asked around and came out to MagicLib's paintjob feature.
I now successfully put all those liveries in the paintjob system, but run into a problem.

Since the UI to select a paintjob is only 2 columns wide, when you have more than 8 paintjobs for 1 ship, the rest disappears off screen. Is there a way to change this or to have like some sort of scrollbar within the popup paintjob selection screen?

Thought I'd check the code but you literally wrote (lol):
Quote
To anybody reading this code: I'm sorry. Please don't try to understand it or learn from it.
Deepest apologies,
Wisp

P.S. Attached a screenshot of it to the post idk how else to add an image
Title: Re: [0.97a] MagicLib v1.4.0 (2024/02/22)
Post by: Wispborne on February 26, 2024, 11:20:47 AM
Hey, I responded on Discord, since there are strict filesize limits here. There's a .jar for MagicLib that you can swap out; all it does is change that to be four wide instead of two.

It's not a long-term fix, but as a band-aid let me know if it works. I haven't made time to make that popup scroll yet.
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: Wispborne on March 01, 2024, 09:58:07 PM
Version 1.4.1

MagicSubsystems
- UI is no longer shown if all subsystems were removed during combat (President Matt Damon).
- Distortion no longer affects subsystem text (President Matt Damon)
- Info text now scales based on screen size and fades in/out (President Matt Damon).

MagicPaintjobs
- Paintjobs popup is four wide instead of two (reported by NITEGHXST).

MagicAchievements
- Memory is now saved during combat as well, which fixes the Revisionist achievement (reported by Fuzzatron)
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: pipai on March 02, 2024, 06:07:22 PM
Minor report, I found a warning. Didn't see any major gameplay issues yet, but I'm just doing some mod testing right now so I haven't actually played properly.

Code
16627 [Thread-3] WARN  org.magiclib.util.MagicSettings  - unable to read content of MagicLib in modSettings.json
org.json.JSONException: JSONObject["subsystemInfoKey"] is not a number.
at org.json.JSONObject.getDouble(JSONObject.java:451) ~[json.jar:?]
at org.json.JSONObject.getInt(JSONObject.java:468) ~[json.jar:?]
at org.magiclib.util.MagicSettings.getInteger(MagicSettings.java:150) ~[?:?]
at org.magiclib.subsystems.MagicSubsystemsManager.reloadSettings(MagicSubsystemsManager.kt:147) ~[?:?]
at org.magiclib.subsystems.MagicSubsystemsManager.initialize(MagicSubsystemsManager.kt:31) ~[?:?]
at org.magiclib.Magic_modPlugin.onApplicationLoad(Magic_modPlugin.java:77) ~[?:?]
at com.fs.starfarer.loading.ResourceLoaderState.init(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.o00000(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) [?:?]

A quick grep shows:
Code
data/config/modSettings.json
112: "subsystemInfoKey": "I",

src/org/magiclib/subsystems/MagicSubsystemsManager.kt
147:            infoHotkey = MagicSettings.getInteger("MagicLib", "subsystemInfoKey") ?: 23
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: Xoatl on March 04, 2024, 09:50:18 AM
Thanks for the update. I was having a reoccuring CTD from Magic SubSystem. After the update I don't. Keep it up.
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: NITEGHXST on March 10, 2024, 04:02:21 PM
Heyoo Wisp, I've come across a bug regarding the paintjob system.

When a paintjob is applied, the hullmod in the refit screen shows the applied paintjob. Now this is supposed to happen. Buuut I don't think it's supposed to tell you that all possible paintjobs for that ship are simultaneously applied huh? (Check the attachment lol)
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: Wispborne on March 10, 2024, 06:32:42 PM
Heyoo Wisp, I've come across a bug regarding the paintjob system.

When a paintjob is applied, the hullmod in the refit screen shows the applied paintjob. Now this is supposed to happen. Buuut I don't think it's supposed to tell you that all possible paintjobs for that ship are simultaneously applied huh? (Check the attachment lol)

Thanks - fixed for the next version.
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: Network Pesci on March 11, 2024, 07:07:56 AM
Is this HMI content or MagicLib content?

https://i.imgur.com/TxnZymV.jpg

Whichever it is, it is not only terrible writing, it's terrible for my immersion.  If this is going to be part of MagicLib going forward, I'm not going to be playing mods that use MagicLib.  No HMI, no Covenant, no Luddic Enhancement, no GMDA, no Xhan?  Well, for the price I paid for the mods I guess I can't complain.
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: psykose on March 11, 2024, 10:47:36 AM
Is this HMI content or MagicLib content?

https://i.imgur.com/TxnZymV.jpg

Whichever it is, it is not only terrible writing, it's terrible for my immersion.  If this is going to be part of MagicLib going forward, I'm not going to be playing mods that use MagicLib.  No HMI, no Covenant, no Luddic Enhancement, no GMDA, no Xhan?  Well, for the price I paid for the mods I guess I can't complain.

it's HMI, although nothing in it seems immersion-breaking at all?
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: NITEGHXST on March 13, 2024, 02:37:28 PM
Is this HMI content or MagicLib content?

https://i.imgur.com/TxnZymV.jpg

Whichever it is, it is not only terrible writing, it's terrible for my immersion.  If this is going to be part of MagicLib going forward, I'm not going to be playing mods that use MagicLib.  No HMI, no Covenant, no Luddic Enhancement, no GMDA, no Xhan?  Well, for the price I paid for the mods I guess I can't complain.
Hold on to your horses there cowboy. Let me explain something to you to clear up the biggest misunderstanding I take out of your message.

There was a chance that this isn't even a part of H.M.I. as ANY mod can add to the bounty board as long as it's in your game's modlist. I have never come across this bounty before and I play heavily modded Starsector and have been for as long as I can remember. Now as Psykose said it's apparently from the HMI mod. I personally don't use that mod. No particular reason, but that explains why I have never come across it.

What kinda bugs me is how easily you let a relatively small thing have you immediately come to MagicLib and basically say you're willing to ruin/change your entire modded Starsector experience and lowkey immediately blame MagicLib without first just asking the source respectfully before letting the bull out immediately, by something that has an extremely easy solution, that being to just, not interact with that bounty as it can only bug you if you yourself click on it, OR get rid of HMI and test out if that makes that specific bounty disappear since you already had just the 2 options of HMI or MagicLib. But since you now know it's HMI once you check up on this thread again, I hope it calms you down and you find serenity in knowing MagicLib is not to blame.
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: Brainwright on March 16, 2024, 04:53:25 PM
Is this HMI content or MagicLib content?

https://i.imgur.com/TxnZymV.jpg

Whichever it is, it is not only terrible writing, it's terrible for my immersion.  If this is going to be part of MagicLib going forward, I'm not going to be playing mods that use MagicLib.  No HMI, no Covenant, no Luddic Enhancement, no GMDA, no Xhan?  Well, for the price I paid for the mods I guess I can't complain.

It's HMI, and it's part of a long series of bounties that are some of the most irritating meme fleets I've ever seen.  Nice ship at the end, though.
Title: Re: [0.97a] MagicLib v1.4.1 (2024/03/01)
Post by: swwu on March 20, 2024, 12:49:36 AM
Hey,

Was using MagicAnim.smoothToRange and it seems like it generates values on [toMin - (toMax - toMin), toMin] instead of on [toMin, toMax] like intended.

I was able to get the range to function correctly by changing the last line from
Code
return (float) (FastTrig.cos((x - fromMin) * (1 / (fromMax - fromMin)) * MathUtils.FPI)) * magicNumber + magicNumber + toMin;
to
Code
return (float) (FastTrig.cos((x - fromMin) * (1 / (fromMax - fromMin)) * MathUtils.FPI)) * magicNumber - magicNumber + toMin;
(the difference is the sign of the second "magicNumber" term)
Title: Re: [0.97a] MagicLib v1.4.2
Post by: Wispborne on March 24, 2024, 09:08:09 AM
Version 1.4.2

MagicPaintjobs
- Fixed all possible paintjobs being shown as applied on the hullmod (reported by NITEGHXST).
MagicBounty
- Fixed bounty board job cell all grey when portrait is invalid (reported by mrmagolor, others).
Misc
- Moved PIDController from org.magiclib.subsystems.drones to org.magiclib.util (non-breaking change, old one is marked deprecated).


Hey,

Was using MagicAnim.smoothToRange and it seems like it generates values on [toMin - (toMax - toMin), toMin] instead of on [toMin, toMax] like intended.

I was able to get the range to function correctly by changing the last line from
Code
return (float) (FastTrig.cos((x - fromMin) * (1 / (fromMax - fromMin)) * MathUtils.FPI)) * magicNumber + magicNumber + toMin;
to
Code
return (float) (FastTrig.cos((x - fromMin) * (1 / (fromMax - fromMin)) * MathUtils.FPI)) * magicNumber - magicNumber + toMin;
(the difference is the sign of the second "magicNumber" term)

Thanks, will look into it.
Title: Re: [0.97a] MagicLib v1.4.2
Post by: Wispborne on March 24, 2024, 08:24:33 PM
Version 1.4.3

MagicSubsystems
- Fixed accidental breaking change in MagicSubsystems 1.4.2. Caused a crash in Knights of Ludd. Reported by persocom01.

https://github.com/MagicLibStarsector/MagicLib/releases/download/1.4.3/MagicLib.zip
Title: Re: [0.97a] MagicLib v1.4.3
Post by: Dazs on March 29, 2024, 05:13:14 AM
Wisp, just wanted to thank you for fixing the Vayra's bounties being mistranslated into magic bounties. I started a new game today with the latest version and JYD bounties now show up correctly, woo! :)