Fractal Softworks Forum

Starsector => Mods => Modding Resources => Topic started by: LazyWizard on January 19, 2013, 09:48:04 PM

Title: [0.97a] LazyLib v2.8b (released 2024-02-02)
Post by: LazyWizard on January 19, 2013, 09:48:04 PM
LazyLib
A library for Starsector modders
Download version 2.8b (https://github.com/LazyWizard/lazylib/releases/download/2.8b/LazyLib.2.8b.zip) (mirror (https://www.nexusmods.com/starsector/mods/1?tab=files)) (mirror 2 (https://www.mediafire.com/file/pr0ycpiipmij8gz/LazyLib_2.8b.zip/file))
View Javadoc (https://lazywizard.github.io/lazylib/)
View progress and source code on GitHub (https://github.com/LazyWizard/lazylib)
Supports Version Checker (http://fractalsoftworks.com/forum/index.php?topic=8181.0)


Introduction:
LazyLib is not a regular mod. It doesn't add any ships, weapons or factions. In fact, it doesn't change anything at all in your game! All it does is make writing code for mods easier. It contains methods to deal with otherwise complicated tasks like collision detection and formatted sector messages, among many other things.

Some mods may require LazyLib to run. If you are ever running a mod and get an error along the lines of 'Imported class "org.lazywizard.lazylib.<whatever>" could not be loaded', then this mod is required. Just make sure you have the latest version installed and that it is tagged in the launcher and everything should work. :)


Installation:
This is installed the same way as a normal mod. Simply extract the zip into your mods folder and tag it in the launcher. As this mod does nothing until its classes are called, there is no harm in leaving it tagged in the launcher at all times even if your currently active mods don't require it.


Why use LazyLib?
Say you're writing custom shipsystem AI and need to get all visible enemies within 5000 su of your ship. Without LazyLib you would need to write code that iterates over all ships on the battle map, check their distance from your ship, ensure they aren't covered by the fog of war, filter out allies and hulks, etc. All of this would create massive clutter in your code and make your mod very difficult to maintain.

With LazyLib, the above can be done in one line (AIUtils.getNearbyEnemies(ship, 5000f)). This is just one of dozens of methods contained in this library, all designed to make complicated modding tasks as painless as possible.


Why a utility mod?
In the past this mod was a simple jar bundled with other mods. However, once there were multiple versions of LazyLib floating around compatibility issues started to arise. Starsector will use the first version of the jar it finds, even if there is a newer version used by another mod. So if mod A requires a collision detection algorithm that was added in a recent release, it would have a compile error if mod B (containing an old version of this library) was loaded first.

As a utility mod there is only one copy of the jar shared between all mods, and it is up to the player to keep it up-to-date (meaning other mods won't need to release a patch every time there is a new LazyLib version).


A note to modders:
Since this is a utility mod, all you need to do is let your users know they need this mod downloaded and tagged in the launcher. Starsector will do the rest. :)
For modders who use an IDE, you will want to add mods/LazyLib/jars/LazyLib.jar as a library in your project (the same as you did for starfarer.api.jar).

If your mod used the old, bundled version of this library, you should remove LazyLib.jar from your mod folder and mod_info.json, as well as delete data/scripts/plugins/LazyLibPlugin.java if you have it.

Features should remain stable now that this library has reached version 1.0. If I absolutely need to remove something, it will remain under the @Deprecated tag until the next major Starsector release comes out (as you would be rewriting portions of your code at that point anyway).

Every method and class in this mod is fully documented (~2,000 lines of documentation as of December 2013). Documentation can be found in javadoc.zip in the main mod folder (open index.html). The source is included in the jar if you wish to see how things were done. Modders have my permission to borrow any code they want from LazyLib.


Contributing to this mod:
If you wish to contribute to LazyLib, the public project repository can be found here (https://bitbucket.org/LazyWizard/lazylib). All of my projects use Mercurial for revision control. Pull requests (https://confluence.atlassian.com/display/BITBUCKET/Fork+a+Repo,+Compare+Code,+and+Create+a+Pull+Request) are preferred, but if you want direct write access just PM me (include a link to your Bitbucket account) and I'll add you to the repository.

There are a few things you should keep in mind when contributing:


Basic package overview:
Quote
org.lazywizard.lazylib - general methods that help with non-API data types
  • CollectionUtils - methods for working with Collections (Lists, Maps, etc)
  • CollisionUtils - methods for working with bounds and collision detection
  • EllipseUtils - methods for working with ellipses (of course)
  • FastTrig - Slick2D's implementations of sin and cos, with significant speed increases over java.lang.Math's implementations
  • MathUtils - methods for working with angles, distances and circles
  • ModUtils - methods for handling non-gameplay related mod tasks
  • VectorUtils - methods for working with vectors
org.lazywizard.lazylib.campaign - campaign helper classes
  • CargoUtils - methods for working with cargo and item stacks
  • FleetUtils - methods for working with fleets and fleet data
  • MessageUtils - a class that allows formatted, multi-line, word-wrapped sector messages
org.lazywizard.lazylib.combat - combat helper classes
  • AIUtils - methods that deal with how a single combat entity views the battle map
  • CombatUtils - methods that deal with the battle map in general
  • DefenseUtils - methods that deal with a ship's defenses (shields, armor, etc)
  • WeaponUtils - methods that deal with weapons and weapon arcs
org.lazywizard.lazylib.opengl - OpenGL helper classes
  • ColorUtils - methods for working with OpenGL using AWT colors
  • DrawUtils - methods for drawing simple shapes using OpenGL primitives


Changelog:
Spoiler
Quote
2.8b (February 02, 2024)
==========================
Updated to be compatible with Starsector 0.97a
Changes to LazyFont:
 - Changed default blendSrc back to GL_SRC_ALPHA (was GL_ONE since 2.4c)
Deprecated org.lazywizard.lazylib.campaign.orbits.KeplerOrbit:
 - Deprecated at the request of its contributor

 2.8 (April 05, 2023)
======================
Updated to be compatible with Starsector 0.96a
Updated bundled libraries:
 - kotlin-stdlib: v1.5.31 -> v1.6.21
 - kotlinx-coroutines: v1.5.2 -> v1.6.4 (custom build)
 - These are the last versions that support Java 7
Added org.lazywizard.lazylib.campaign.orbits.KeplerOrbit:
 - Submitted by Liral, this provides more accurate orbits than EllipticalOrbit
Changes to CombatUtils:
 - Updated to use CombatEngineAPI's bin-lattice system where applicable, as
   requested by several modders since those methods introduction

 2.7b (December 10, 2021)
==========================
Updated to be compatible with Starsector 0.95.1a
Updated bundled libraries:
 - jetbrains-annotations: v22.0.0 -> 23.0.0
Changes to LazyFont.DrawableString:
 - Center/right-aligned text no longer requires maxWidth to be set
 - setRenderDebugBounds() now shows anchor and max size

 2.7 (October 22, 2021)
========================
Fixed links to online Starsector API in javadoc.zip
Updated bundled libraries:
 - kotlin-stdlib: v1.4.31 -> v1.5.31
 - kotlinx-coroutines: v1.4.3 -> v1.5.2
 - jetbrains-annotations: v20.1.0 -> 22.0.0
Changes to CombatUtils:
 - Fixed a bug where ships spawned by spawnShipOrWingDirectly() would
   report the wrong fleet side in some circumstances
Changes to LazyFont:
 - Fixed log spam with some whitespace being considered unsupported characters
Changes to LazyFont.DrawableString:
 - Fixed minor memory leak when dispose() is not called before GC
 - Added TextAlignment, setAlignment(), and getAlignment(). TextAlignment
   controls whether text is drawn left-aligned (the default), right-aligned,
   or centered
 - Added TextAnchor, setAnchor(), and getAnchor(). TextAnchor controls the
   origin when drawing text; for example, TextAnchor.TOP_LEFT (the default)
   will mean draw() will start drawing at the top left, so the text will
   appear below and to the right of the position passed into draw()
 - Added setBaseColor() and getBaseColor() (replace setColor()/getColor())
 - Added isRebuildNeeded() and triggerRebuildIfNeeded() (unnecessary 99% of
   the time as rebuilding happens automatically, but useful in fringe cases)
 - Cleaned up some out-of-date documentation
Deprecated in LazyFont.DrawableString:
 - Deprecated setColor() and getColor(), as users were assuming they set the
   color of the next append. Added setBaseColor() and getBaseColor() as
   replacements that better convey what these methods do (set/get the color of
   all text that _doesn't_ have a color argument passed in)

 2.6 (March 26, 2021)
======================
Updated to be compatible with Starsector 0.95a
Updated bundled libraries:
 - kotlin-stdlib: v1.4.21 -> v1.4.31
 - kotlinx-coroutines: v1.4.2 -> v1.4.3
The Javadoc's index is now one single page
Added org.lazywizard.lazylib.IOUtils:
 - Contains methods to help with reading/writing files using the API
 - byte[] readAllBytes(String filePath), an API-safe port of
   java.nio.Files.readAllBytes()
Changes to LazyFont.DrawableString:
 - Added tab support (2x the base vertical height of the text)
 - Added append(String text)
 - Added append(String text, Color color)
 - Added appendIndented(String text, int indent)
 - Added appendIndented(String text, Color color, int indent)
 - Added getBlendSrc(), setBlendSrc(int blendSrc), getBlendDest(), and
   setBlendDest(int blendDest) to control color blending
Deprecated in LazyFont.DrawableString:
 - Deprecated all appendText() methods in favor of new append() equivalents.
   The append() variants take any object and return the DrawableString so that
   calls can be chained together

 2.5c (January 23, 2021)
=========================
Changes to LazyFont.DrawableString:
 - Fixed rendering issues on some computers (thanks to Dream from the
   Discord server for reporting the bug and testing the fix)
 - Added colored substring support
 - Added appendText(String text, Color color)
 - Added appendText(String text, Color color, int indent)
 - Appending colored text only colors that substring, and all subsequent
   text will return to the base color chosen at DrawableString creation.
   To change the base color, call DrawableString.setColor()

 2.5b (January 20, 2021)
=========================
Retroactively renamed v2.4g to v2.5
Changes to LazyFont:
 - Added getFontName()
Changes to LazyFont.DrawableString:
 - Fixed a crash with word-wrapped text that includes a hyphenated line break
 - Added setRenderDebugBounds(), which draws a box showing the text's width,
   height, and position

 2.5 (January 18, 2021)
========================
(originally released as v2.4g)
Updated bundled libraries:
 - kotlin-stdlib: v1.3.61 -> v1.4.21
 - kotlinx-coroutines: v1.2.0 -> v1.4.2
 - jetbrains-annotations: v13.0 -> v20.1.0
 - removed kotlinx-atomicfu (this was an erroneous dependency added by
   an earlier version of kotlinx-coroutines and wasn't used for anything)
Changes to LazyFont:
 - Rewrote DrawableString to use vertex buffers instead of display lists.
   This should fix a bug that caused text corruption and visual glitches
   when DrawableStrings were rendered in the campaign layer
Deprecated in LazyFont:
 - Deprecated drawText(String text, float x, float y, float fontSize,
   float maxWidth, float maxHeight), use createText() instead

 2.4f (January 31, 2020)
=========================
Updated bundled Kotlin runtime library to v1.3.61
Javadoc is now available online at https://lazywizard.github.io/lazylib
Moved .version file hosting to GitHub

 2.4e (April 21, 2019)
=======================
Updated bundled Kotlin runtime library to v1.3.30
Bundled Kotlin coroutines library v1.2.0
Changes to CombatUtils:
 - Reverted 2.4c changes due to bugs

 2.4d (March 03, 2019)
=======================
Changes to CombatUtils:
 - Reverted changes to getEntitiesWithinRange() (it now only returns ships,
   projectiles, missiles and asteroids as it did pre-2.4c)

 2.4c (March 01, 2019)
=======================
Updated bundled Kotlin runtime library to v1.3.21
Changes to CombatUtils:
 - All getXWithinRange() methods have been updated to use 0.9a's new
   CollisionGridAPI, which should improve performance
 - getEntitiesWithinRange() now includes BattleObjectiveAPIs
Changes to LazyFont:
 - Fixed text blending issue
 - Blend mode is no longer automatically enabled during rendering - if you want
   your text to be drawn blended, you must ensure GL_BLEND is enabled and set
   the blend func (usually glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA))

 2.4b (November 16, 2018)
==========================
Changes to JSONUtils:
 - loadCommonJSON(String filename, String defaultJSONPath) will save the newly
   created CommonDataJSONObject to disk immediately if defaultJSONPath exists

 2.4 (November 16, 2018)
=========================
Updated to be compatible with Starsector 0.9a
Updated bundled Kotlin runtime library to v1.3.10
Added org.lazywizard.lazylib.JSONUtils.CommonDataJSONObject:
 - Provides a wrapper around a standard JSONObject
 - save() method saves JSON to common data folder (saves/common), which will
   persist between saves (and presumably survive Starsector updates)
 - Constructor takes the filename under saves/common to save the data to
Changes to JSONUtils:
 - Added clear(JSONObject toClear)
 - Added loadCommonJSON(String filename)
   (if file does not exist, returns an empty CommonDataJSONObject)
 - Added loadCommonJSON(String filename, String defaultJSONPath)
   (if file does not exist, copies existing data from defaultJSONPath)

 2.3 (November 12, 2018)
=========================
Bundled the Kotlin runtime library (v1.3.0) with LazyLib:
 - Kotlin is an alternate JVM language that is 100% interoperable with Java
 - "Core" LazyLib is and always shall be written in Java, though some features
   such as the font classes are written in Kotlin for convenience's sake
 - Kotlin extension methods can be found within the org.lazywizard.lazylib.ext
   package in jars/LazyLib-Kotlin.jar (Java users can safely ignore this jar)
Added @Nullable and @NotNull annotations where appropriate
Added org.lazywizard.lazylib.ui.LazyFont:
 - Represents a bitmap font (the same type Starsector itself uses)
 - Load a font using the static method loadFont(String fontPath)
 - Use createText() to create a reusable DrawableString, which can draw a
   block of text repeatedly and very efficiently
 - Use drawText() to manually draw text into a VBO or display list
 - See LazyFont's javadoc for example usage
Changes to CampaignUtils:
 - Added getEntitiesWithRep(SectorEntityToken token, String entityTag,
   IncludeRep include, RepLevel rep)
 - Added toWorldCoordinates(Vector2f screenCoordinates)
 - Added toScreenCoordinates(Vector2f worldCoordinates)
Changes to CollectionUtils:
 - Added implode(Enum toImplode)
 - Added implode(Enum toImplode, String separator)
Changes to CollisionUtils:
 - Added getNearestPointOnBounds(Vector2f source, CombatEntityAPI entity)
Changes to ColorUtils:
 - Added glColor(Color color, float alpha)
Changes to CombatUtils:
 - Added toWorldCoordinates(Vector2f screenCoordinates)
 - Added toScreenCoordinates(Vector2f worldCoordinates)
Changes to FastTrig:
 - Added atan() and atan2() that are much faster (though less accurate)
   than the implementations in Java's core Math class
   (roughly 5-20x faster; accurate to within 0.005 radians/~0.29 degrees)
Changes to MathUtils:
 - Added FPI and FTAU constants, contain Math.PI and Math.PI * 2 as floats
 - Added clamp(float/int toClamp, float/int min, float/int max). This clamps
   the passed value within the given range. Variants are provided for both
   integers and floats.
 - Added getNearestPointOnLine(Vector2f source, Vector2f lineStart,
   Vector2f lineEnd)
 - Added getPoint(Vector2f center, float radius, float angle). This acts as an
   alias for the existing getPointOnCircumference(), which is both the most
   commonly used method in LazyLib as well as one of the most awkwardly named
Changes to ModUtils:
 - Added isModEnabled(String modId)
 - Added loadClassesIfClassIsPresent(String classCanonicalName,
   List<String> classesToLoadCanonicalNames, boolean initializeClasses)
 - Added getEnabledModIds()
 - Added getOverrides(), returns vanilla files explicitly overridden by any
   mod (ie: in that mod's mod_info.sjon 'replace' section)
Changes to VectorUtils:
 - getFacing() and getAngle() now use FastTrig's new atan2() implementation
 - Added getFacingStrict() and getAngleStrict(), which are slower but more
   accurate (these use the old pre-2.3 atan2() implementations)
 - Added isZeroVector(Vector2f vector)
 - Added resize(Vector2f vector, float length)
 - Added resize(Vector2f vector, float length, Vector2f dest)
 - Added clampLength(Vector2f vector, float maxLength)
 - Added clampLength(Vector2f vector, float maxLength, Vector2f dest)
 - Added clampLength(Vector2f vector, float minLength, float maxLength)
 - Added clampLength(Vector2f toClamp, float minLength, float maxLength,
   Vector2f dest)
 - Added rotate(Vector2f toRotate, float angle), convenience method that
   stores the result in toRotate
 - Added rotateAroundPivot(Vector2f toRotate, Vector2f pivotPoint,
   float angle), convenience method that stores the result in toRotate
Removed from LazyLib:
 - Removed isDevBuild()
Removed from SimpleEntity:
 - Removed Object constructor (it used reflection, which is now blocked;
   remaining options are Vector2f, WeaponAPI, and ShipEngineAPI)
Miscellaneous Javadoc improvements

 2.2 (April 21, 2017)
=======================
Updated to be compatible with Starsector 0.8a
LazyLib Javadoc now links to LWJGL, Starsector, and JSON Javadocs
Changes to CampaignUtils:
 - Removed crew XP level argument from addShipToFleet()

 2.1b (March 16, 2017)
=======================
Switched version file hosting to Bitbucket

 2.1 (November 19, 2015)
=========================
Changes to AnchoredEntity:
 - getLocation() no longer returns a direct reference to the anchor's location
   when the anchored entity shares the same location
Changes to CampaignUtils:
 - Added addShipToFleet(String wingOrVariantId, FleetMemberType type,
   CrewXPLevel level, CampaignFleetAPI fleet)
 - Removed all getXOfType() methods, replaced with getXWithTag() (was filtering
   using class, now uses entity tags)
 - All methods that took a "Class entityClass" argument have had said argument
   replaced with "String tag"
 - getNearbyFleets(), getNearbyHostileFleets(), get NearestHostileFleet(),
   and getHostileFleetsInSystem() only include fleets that are visible to the
   sensors of the token passed in to the method
 - Fixed a few getNearbyX() methods potentially including the token they are
   searching around
Changes to CollectionUtils:
 - Added combinedList() and combinedSet() to simplify creating a List/Set from
   multiple source Collections, take any number of Collections as arguments
Changes to ColorUtils:
 - Fixed: glColor() alphaMult value isn't multiplied correctly when argument
   "overrideOriginalAlpha" is true

 2.0b (October 20, 2014)
=========================
Changes to CampaignUtils:
 - Added getNearestEntityFromFaction(SectorEntityToken token, Class entityType,
   FactionAPI faction)
 - Added getNearbyEntitiesFromFaction(SectorEntityToken token, float range,
   Class entityType, FactionAPI faction)
 - Added getEntitiesFromFaction(LocationAPI location, Class entityType,
   FactionAPI faction)
 - Renamed getXByRep() methods to getXWithRep(), also made them no longer
   include members of the passed in token's faction in their results

 2.0 (October 20, 2014)
========================
Updated to be compatible with Starsector .65a
Renamed FleetUtils to CampaignUtils
Changes to CampaignUtils:
 - Changed all method arguments to use a SectorEntityToken instead of a
   CampaignFleetAPI wherever applicable
 - Removed methods that RepLevel now handles
 - Removed methods that search for a specific subclass of SectorEntityToken
   in favor of more generic methods
 - Removed areAllies(CampaignFleetAPI fleet1, CampaignFleetAPI fleet2)
 - Removed areEnemies(CampaignFleetAPI fleet1, CampaignFleetAPI fleet2)
 - Removed areNeutral(CampaignFleetAPI fleet1, CampaignFleetAPI fleet2)
 - Removed getNearestFleet(CampaignFleetAPI fleet)
 - Removed getNearestAlliedFleet(CampaignFleetAPI fleet)
 - Removed getNearbyAlliedFleets(CampaignFleetAPI fleet, float range)
 - Removed getAlliedFleetsInSystem(CampaignFleetAPI fleet)
 - Renamed getNearestEnemyFleet() to getNearestHostileFleet(), only returns
   fleets who will actively attack on sight
 - Renamed getNearbyEnemyFleets() to getNearbyHostileFleets(), only returns
   fleets who will actively attack on sight
 - Renamed getEnemyFleetsInSystem() to getHostileFleetsInSystem(), only returns
   fleets who will actively attack on sight
 - Removed getNearestStation(CampaignFleetAPI fleet)
 - Removed getEnemyFleetsInSystem(CampaignFleetAPI)
 - Added areSameFaction(SectorEntityToken token1, SectorEntityToken token2)
 - Added areAtRep(SectorEntityToken token1, SectorEntityToken token2,
   IncludeRep include, RepLevel rep)
 - Added getReputation(SectorEntityToken token1, SectorEntityToken token2)
 - Added getNearestEntityOfType(SectorEntityToken token, Class entityType)
 - Added getNearbyEntitiesOfType(SectorEntityToken token, float range,
   Class entityType)
 - Added getNearestEntityByRep(SectorEntityToken token, Class entityType,
   IncludeRep include, RepLevel rep)
 - Added getEntitiesByRep(SectorEntityToken token, Class entityType,
   IncludeRep include, RepLevel rep)
 - Added getNearbyEntitiesByRep(SectorEntityToken token, float range,
   Class entityType, IncludeRep include, RepLevel rep)
Changes to CargoUtils:
 - Added isShipInMothballed(String fleetMemberId, CargoAPI cargo)
Changes to CombatUtils:
 - Added centerViewport(Vector2f newCenter)
Changes to DefenseUtils:
 - Added hasHullDamage(ShipAPI ship)
 - Added hasArmorDamage(ShipAPI ship)
 - Added getMostDamagedArmorCell(ShipAPI ship)
Changes to EllipseUtils:
 - Added Vector2f getRandomPointInEllipse(Vector2f ellipseCenter,
   float ellipseWidth, float ellipseHeight, float ellipseAngleOffset)
Changes to MathUtils:
 - Added int getRandomNumberInRange(int min, int max)
Changes to VectorUtils:
 - Added List<Vector2f> rotate(List<Vector2f> toRotate, float angle)
 - Added List<Vector2f> rotateAroundPivot(List<Vector2f> toRotate,
   Vector2f pivotPoint, float angle)
Changes to WeaponUtils:
 - Fixed getNearestAllyInArc() returning the host ship
 - Fixed getAlliesInArc() including the host ship
Removed all pre-existing deprecated methods from the code
Removed all methods with a 'sortByDistance' parameter
 - Use Collections.sort(list, new CollectionUtils.SortXByDistance(location))
   instead
Removed from AIUtils:
 - List<ShipAPI> getEnemiesOnMap(CombatEntityAPI entity, boolean sortByDistance)
 - List<ShipAPI> getNearbyEnemies(CombatEntityAPI entity, float range,
   boolean sortByDistance)
 - List<ShipAPI> getAlliesOnMap(CombatEntityAPI entity, boolean sortByDistance)
 - List<ShipAPI> getNearbyAllies(CombatEntityAPI entity, float range,
   boolean sortByDistance)
 - List<MissileAPI> getEnemyMissilesOnMap(CombatEntityAPI entity,
   boolean sortByDistance)
 - List<MissileAPI> getNearbyEnemyMissiles(CombatEntityAPI entity, float range,
   boolean sortByDistance)
Removed from CampaignUtils:
 - List<CampaignFleetAPI> getEnemyFleetsInSystem(CampaignFleetAPI fleet,
   boolean sortByDistance)
 - List<CampaignFleetAPI> getNearbyEnemyFleets(CampaignFleetAPI fleet,
   float range, boolean sortByDistance)
 - List<CampaignFleetAPI> getAlliedFleetsInSystem(CampaignFleetAPI fleet,
   boolean sortByDistance)
 - List<CampaignFleetAPI> getNearbyAlliedFleets(CampaignFleetAPI fleet,
   float range, boolean sortByDistance)
Removed from CollectionUtils:
 - Removed CollectionUtils$SortObjectivesByDistance
   (use SortEntitiesByDistance instead)
 - List<T> weightedRandom(Map<T, Float> pickFrom, int numToPick)
 - T weightedRandom(Map<T, Float> pickFrom)
Removed from CombatUtils:
 - List<DamagingProjectileAPI> getProjectilesWithinRange(Vector2f location,
   float range, boolean sortByDistance)
 - List<MissileAPI> getMissilesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - List<ShipAPI> getShipsWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - List<CombatEntityAPI> getAsteroidsWithinRange(Vector2f location,
   float range, boolean sortByDistance)
 - List<BattleObjectiveAPI> getObjectivesWithinRange(Vector2f location,
   float range, boolean sortByDistance)
 - List<CombatEntityAPI> getEntitiesWithinRange(Vector2f location,
   float range, boolean sortByDistance)
 - CombatEngineAPI getCombatEngine()
 - float getElapsedCombatTimeIncludingPaused()
 - float getElapsedCombatTime()
 - float getTimeSinceLastFrame()
Removed from DefenseUtils:
 - Vector2f getArmorCellAtWorldCoord(ShipAPI ship, Vector2f loc)
Removed from DrawUtils:
 - drawArc(float centerX, float centerY, float radius, float startAngle,
   float arcAngle, int numSegments
Removed from MathUtils:
 - float getFacing(Vector2f vector)
   (moved to VectorUtils)
 - float getAngle(Vector2f from, Vector2f to)
   (moved to VectorUtils)
 - Vector2f getDirectionalVector(Vector2f source, Vector2f destination)
   (moved to VectorUtils)
 - Vector2f getDirectionalVector(CombatEntityAPI source, Vector2f destination)
 - Vector2f getDirectionalVector(CombatEntityAPI source,
   CombatEntityAPI destination)
 - boolean isPointWithinBounds(Vector2f point, CombatEntityAPI entity)
   (moved to CollisionUtils)
Removed from WeaponUtils:
 - float calculateActualDamage(float baseDamage, WeaponAPI weapon)
 - float calculateActualDamage(float baseDamage, WeaponAPI weapon,
   ShipAPI target, DefenseType defense)
 - float calculateDamagePerShot(WeaponAPI weapon)
 - float calculateDamagePerShot(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - float calculateDamagePerSecond(WeaponAPI weapon)
 - float calculateDamagePerSecond(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - float calculateDamagePerBurst(WeaponAPI weapon)
 - float calculateDamagePerBurst(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - List<ShipAPI> getEnemiesInArc(WeaponAPI weapon, boolean sortByDistance)
 - List<MissileAPI> getEnemyMissilesInArc(WeaponAPI weapon,
   boolean sortByDistance)

_______________________________________________________________________________ _


 1.9b (August 27, 2014)
========================
Minor optimizations
Added support for Version Checker update notifications
Added org.lazywizard.lazylib.ModUtils:
 - This class helps with non-gameplay related modding tasks
 - isClassPresent(String classCanonicalName)
Changes to SimpleEntity:
 - Added a constructor for mimicking the location of a ShipEngineAPI
 - Added getEngine() method, returns null if another constructor was used

 1.9 (July 04, 2014)
=====================
The game no longer crashes if a setting is missing from LazyLib's config file
Added org.lazywizard.lazylib.EllipseUtils:
 - By popular request, this includes methods to deal with elliptical shapes
 - Put into its own class to avoid further clutter in MathUtils
 - getPointOnEllipse(Vector2f ellipseCenter, float ellipseWidth,
   float ellipseHeight, float ellipseAngleOffset, float angle)
 - getRandomPointOnEllipse(Vector2f ellipseCenter, float ellipseWidth,
   float ellipseHeight, float ellipseAngleOffset)
 - isPointWithinEllipse(Vector2f point, Vector2f ellipseCenter,
   float ellipseWidth, float ellipseHeight, float ellipseAngleOffset)
Added org.lazywizard.lazylib.campaign.orbits.EllipticalOrbit:
 - Implementation of OrbitAPI that travels along an elliptical path
Added org.lazywizard.lazylib.opengl.ColorUtils:
 - glColor(Color color)
 - glColor(Color color, float alphaMult, boolean overrideOriginalAlpha)
Changes to AIUtils:
 - Added getBestInterceptPoint(Vector2f point, float speed,
   Vector2f targetLoc, Vector2f targetVel) - all credit goes to Dark.Revenant
Changes to CargoUtils:
 - Added moveMothballedShips(CargoAPI from, CargoAPI to)
Changes to CollisionUtils:
 - Fixed getCollisionPoint() not properly updating the bounds facing/position
Changes to CombatUtils:
 - Fixed getFleetMember() returning null when a hulk is passed in
 - Added spawnShipOrWingDirectly(String variantId, FleetMemberType type,
   FleetSide side, float combatReadiness, Vector2f location, float facing)
   NOTE: This does not work in campaign using the vanilla FleetEncounterContext!
Changes to DrawUtils:
 - Added drawEllipse(float centerX, float centerY, float width, float height,
   float angleOffset, int numSegments, boolean drawFilled)
Changes to MathUtils:
 - isPointWithinCircle() now returns true for points along the circumference
 - Optimized getPointsAlongCircumference() and large numbers of points
 - Added getMidpoint(Vector2f point1, Vector2f point2)
Changes to StringUtils:
 - Fixed wrapString() appending a newline when the input string didn't have one
 - Also fixed a rare bug with wrapString() where it wouldn't include the last
   segment of a wrapped word if it was the final word in the entire String

 1.8c (March 07, 2014)
=======================
Changes to VectorUtils:
 - Fixed rotate() and rotateAroundPivot() issues (they were using radians
   instead of degrees like every other Starsector/LazyLib method does)

 1.8b (March 07, 2014)
=======================
Added "enableCaching" to lazylib_settings.json, on by default
Changes to AIUtils:
 - getEnemiesOnMap() will now store the results for faster consecutive calls
   during the same frame if caching is enabled, also affects all other
   enemy-filtering methods as they use getEnemiesOnMap() internally
Changes to CollisionUtils:
 - Fixed getCollisionPoint() actually returning the furthest collision instead
   of the closest (oops)
 - isPointOnSegment() is now only accurate to within 1/3 su,
   use MathUtils.isPointOnLine() if you need strict accuracy
Changes to LazyLib:
 - Added isCachingEnabled()
Changes to WeaponUtils:
 - Fixed an edge case bug with isWithinArc() and entities just outside the arc

 1.8 (February 16, 2014)
=========================
Updated codebase to use Java 7 language features
Log now includes class and line number of caller if 'logDeprecated' is true
Changed all getXInRange()/getNearbyX() to use new MathUtils.isWithinRange()
 - Should provide a noticeable speed boost for those methods dealing with an
   object that has a collision/interaction radius
Added org.lazywizard.lazylib.JSONUtils:
 - toColor(JSONArray array), for reading colors from JSON/CSV files
Added org.lazywizard.lazylib.StringUtils:
 - wrapString(String toWrap, int maxLineLength)
 - indent(String toIndent, String indentWith)
Changes to AIUtils:
 - getNearestEnemy() now includes collision radius in its checks
 - getNearestAlly() now includes collision radius in its checks
 - getNearestShip() now includes collision radius in its checks
Changes to AnchoredEntity:
 - Changed variables from private to protected for easier subclassing
 - Added reanchor(CombatEntityAPI newAnchor, Vector2f newLocation)
Changes to DrawUtils:
 - Added drawFilled boolean parameter to drawArc(), deprecated old version
Changes to MathUtils:
 - Added isWithinRange(SectorEntityToken token1, SectorEntityToken token2,
   float range)
 - Added isWithinRange(SectorEntityToken token, Vector2f loc, float range)
 - Added isWithinRange(CombatEntityAPI entity1, CombatEntityAPI entity2,
   float range)
 - Added isWithinRange(CombatEntityAPI entity, Vector2f loc, float range)
 - Added isWithinRange(Vector2f loc1, Vector2f loc2, float range)
Changes to FleetUtils:
 - Added isShipInFleet(String fleetMemberId, CampaignFleetAPI fleet),
   can be used with FleetMemberAPI.getId() or ShipAPI.getFleetMemberId()
 - getNearestEnemyFleet() now includes interaction radius in its checks
 - getNearestAlliedFleet() now includes interaction radius in its checks
 - getNearestFleet() now includes interaction radius in its checks
Changes to SimpleEntity:
 - Changed variables from private to protected for easier subclassing
Changes to VectorUtils:
 - Added getDirectionalVector(Vector2f source, Vector2f destination)
Changes to WeaponUtils:
 - Fixed bug where isWithinArc() was using double the entity's actual collision
   radius in its calculations
 - getNearestAllyInArc() now includes collision radius in its checks
 - getNearestEnemyInArc() now includes collision radius in its checks
Deprecated in DrawUtils:
 - Deprecated drawArc(float centerX, float centerY, float radius,
   float startAngle, float arcAngle, int numSegments)
Deprecated in MathUtils:
 - Deprecated getDirectionalVector(Vector2f source, Vector2f destination),
   moved to VectorUtils

 1.7 (December 18, 2013)
=========================
Swapped all usages of CombatUtils.getCombatEngine() to Global.getCombatEngine()
Significant JavaDoc expansion, reformatting, and other readability improvements
Deprecated all methods with a sortByDistance parameter
 - Call Collections.sort() using one of CollectionUtils' Comparators instead
Added lazylib_settings.json:
 - "logDeprecated" sets whether to log usage of deprecated LazyLib methods,
   useful for modders since these will eventually be removed from LazyLib
 - "crashOnDeprecated", if true will throw a RuntimeException when a deprecated
   LazyLib method is used (for modders to track down usage via the stacktrace)
Added org.lazywizard.lazylib.opengl.DrawUtils:
 - drawCircle(float centerX, float centerY, float radius, int numSegments)
 - drawArc(float centerX, float centerY, float radius, float startAngle,
   float arcAngle, int numSegments)
Added org.lazywizard.lazylib.VectorUtils:
 - getAngle(Vector2f from, Vector2f to) (moved from MathUtils)
 - getFacing(Vector2f vector) (moved from MathUtils)
 - getCrossProduct(Vector2f vector1, Vector2f vector2)
 - rotate(Vector2f toRotate, float degrees, Vector2f dest)
 - rotateAroundPivot(Vector2f toRotate, Vector2f pivotPoint, float angle,
   Vector2f dest), rotates a Vector2f around another Vector2f
Changes to CollectionUtils:
 - Added CollectionFilter interface, contains accept(Object obj) method
 - Added filter(Collection toFilter, CollectionFilter filter), allows
   predicate-based Collection filtering
 - Added filter(Collection toFilter, List filters), a more efficient way of
   using multiple filters on a Collection at once
 - These methods support generics
Changes to CollisionUtils:
 - Fixed getCollisionPoint() returning null when collision point lies directly
   on the end of a line (this means getCollisionPoint(beam.getFrom(),
   beam.getTo(), beam.getDamageTarget()) actually works again)
 - Fixed getCollides() instantiating a new Line2D object each time it's called
Changes to CombatUtils:
 - No longer implements EveryFrameCombatPlugin (also removed LazyLibCombatHook)
 - Updated getFleetMember() to use DeployedFleetMemberAPI introduced in .6.1a
   (this means it now works in missions, not just in campaign battles)
 - Added isVisibleToSide(CombatEntityAPI entity, int side)
Changes to FleetUtils:
 - Fixed null pointer exception when using these methods in hyperspace
 - Added getRelation(CampaignFleetAPI fleet1, CampaignFleetAPI fleet2)
 - Added getNearbyFleets(CampaignFleetAPI fleet, float range)
Changes to MathUtils:
 - Added getRandomPointInCone(Vector2f center, float radius, float minAngle,
   float maxAngle), returns a random point in a two-dimensional cone
 - Added getShortestRotation(float currAngle, float destAngle), returns the
   smallest difference between two angles. This can also be used to find the
   best turn direction
Changes to SimpleEntity:
 - Added a constructor for mimicking the location of a WeaponAPI w/o reflection
 - Added getWeapon() method, returns null if another constructor was used
 - Added getType() method, returns the type of constructor used for this object
 - Added SimpleEntityType enumeration
Changes to WeaponUtils:
 - Added getAlliesInArc(WeaponAPI weapon)
 - Added getNearestAllyInArc(WeaponAPI weapon)
Deprecated in AIUtils:
 - Deprecated getEnemiesOnMap(CombatEntityAPI entity, boolean sortByDistance)
 - Deprecated getNearbyEnemies(CombatEntityAPI entity, float range,
   boolean sortByDistance)
 - Deprecated getAlliesOnMap(CombatEntityAPI entity, boolean sortByDistance)
 - Deprecated getNearbyAllies(CombatEntityAPI entity, float range,
   boolean sortByDistance)
 - Deprecated getEnemyMissilesOnMap(CombatEntityAPI entity,
   boolean sortByDistance)
 - Deprecated getNearbyEnemyMissiles(CombatEntityAPI entity, float range,
   boolean sortByDistance)
Deprecated in CombatUtils:
 - Deprecated getProjectilesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getMissilesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getShipsWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getAsteroidsWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getObjectivesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getEntitiesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
Deprecated in FleetUtils:
 - Deprecated getEnemyFleetsInSystem(CampaignFleetAPI fleet,
   boolean sortByDistance)
 - Deprecated getNearbyEnemyFleets(CampaignFleetAPI fleet, float range,
   boolean sortByDistance)
 - Deprecated getAlliedFleetsInSystem(CampaignFleetAPI fleet,
   boolean sortByDistance)
 - Deprecated getNearbyAlliedFleets(CampaignFleetAPI fleet, float range,
   boolean sortByDistance)
Deprecated in MathUtils:
 - Deprecated getFacing(Vector2f vector), moved to VectorUtils
 - Deprecated getAngle(Vector2f from, Vector2f to), moved to VectorUtils
 - Deprecated getDirectionalVector(CombatEntityAPI source, Vector2f destination)
 - Deprecated getDirectionalVector(CombatEntityAPI source,
   CombatEntityAPI destination)
Deprecated in WeaponUtils:
 - Deprecated getEnemiesInArc(WeaponAPI weapon, boolean sortByDistance)
 - Deprecated getEnemyMissilesInArc(WeaponAPI weapon, boolean sortByDistance)

 1.6b (September 28, 2013)
===========================
Temporary fix for null pointer exceptions on title screen (fixed in .6.1a)
Changes to CollisionUtils:
 - Added isPointOnSegment(Vector2f point, SegmentAPI segment)
Changes to LazyLib:
 - Added getLogLevel(), returns logger level used by all LazyLib classes
 - setLogLevel() now includes AnchoredEntity and SimpleEntity as well

 1.6 (September 27, 2013)
==========================
Updated the codebase to use the new .6a methods
Deprecated several methods whose functionality is now included within the API
Usage of deprecated methods is now reported in starsector.log if devMode=true
Changes to AIUtils:
 - All methods now only return entities that are visible on the battle map.
   Note: this change may alter the behavior of existing scripts!
   (use CombatUtils if you wish to find ships regardless of fog of war coverage)
 - Changed canUseSystemThisFrame() so it only returns true when the system can
   be toggled (essentially checks if the 'use system' key would do anything).
   This was the intended behavior of this method, but some old scripts might
   rely on the old, broken behavior and need to be changed.
Changes to CollectionUtils:
 - SortXByDistance constructors now have an optional includeRadius parameter
   that sets if collision/interaction radius is considered (defaults to true)
 - implode() now works with any Collection, not just one containing Strings
 - Deprecated CollectionUtils.SortObjectivesByDistance as BattleObjectiveAPI
   now extends CombatEntityAPI (use SortEntitiesByDistance instead)
 - Deprecated weightedRandom(Map pickFrom) in favor of
   com.fs.starfarer.api.util.WeightedRandomPicker
 - Deprecated weightedRandom(Map pickFrom, int numToPick) in favor of
   com.fs.starfarer.api.util.WeightedRandomPicker (call pick() multiple times)
Changes to CombatUtils:
 - Deprecated getCombatEngine() in favor of Global.getCombatEngine()
 - Deprecated getElapsedCombatTime() in favor of
   CombatEngineAPI,getTotalElapsedTime()
 - Deprecated getElapsedCombatTimeIncludingPaused() in favor of
   CombatEngineAPI,getTotalElapsedTime()
 - Deprecated getTimeSinceLastFrame() in favor of
   CombatEngineAPI.getElapsedInLastFrame()
Changes to DefenseUtils:
 - Deprecated getArmorCellAtWorldCoord(ShipAPI ship, Vector2f loc)
   in favor of ArmorGridAPI.getCellAtLocation(Vector2f loc)
Changes to LazyLib:
 - Now logs the current LazyLib version on game load
 - Added setLogLevel(Level level), sets the log level for all utility classes
   (defaults to Level.DEBUG for dev builds, Level.ERROR for main releases)
Changes to MathUtils:
 - Added getRandomPointOnLine(Vector2f lineStart, Vector2f lineEnd)
 - Added isPointOnLine(Vector2f point, Vector2f lineStart, Vector2f lineEnd)
 - The various getDistance() methods involving SectorEntityTokens now
   take interaction radius into account. Note: this change may alter the
   behavior of existing scripts!
 - getDistanceSquared() methods incorporating a radius are no longer marked
   as deprecated, instead the documentation includes a warning that using
   getDistance() may be just as efficient
Changes to WeaponUtils:
 - Fixed inaccuracies with getTimeToAim(), but method doesn't take ship
   turn speed into account anymore
 - All calculateDamage() methods are now marked as deprecated. There are just
   too many factors going into damage for this to be testable (26 MutableStats
   that affect damage dealt/taken as of .6a, let alone armor damage reduction).

 1.5 (August 01, 2013)
=======================
Re-added DefenseType enumeration (contains HULL, ARMOR, SHIELD, PHASE_OR_MISS)
Added org.lazywizard.lazylib.combat.entities.AnchoredEntity:
 - Alternative implementation of CombatEntityAPI that follows and rotates
   alongside another CombatEntityAPI (the 'anchor')
 - Includes a working getVelocity() implementation, unlike SimpleEntity
Added org.lazywizard.lazylib.combat.DefenseUtils:
 - Contains methods to convert between world and armor grid coordinates
 - Can check what DefenseType is present at a specific point on a ship
Changes to AIUtils:
 - Fixed bug with canUseSystemThisFrame() always returning false for
   active toggleable systems that have a cooldown
Changes to CollisionUtils:
 - Fixed bug with isPointInBounds() and points exactly on the boundary edges
Changes to CombatUtils:
 - Added getFleetMember(ShipAPI ship), returns the FleetMemberAPI whose
   id matches this ship (or null if no match was found)
Changes to MathUtils:
 - Added equals(float a, float b), tests for 99.99999+% equality of floats
 - Added getRandom(), returns an instance of java.util.Random
   (this is the RNG used by LazyLib if you wanted to do seed manipulation)
Changes to WeaponUtils:
 - New methods to check how much damage you would deal to a specific target:
 - Added calculateActualDamage(float baseDamage, WeaponAPI weapon,
   ShipAPI target, DefenseType defense)
 - Added calculateDamagePerShot(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - Added calculateDamagePerSecond(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - Added calculateDamagePerBurst(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - These methods are not 100% accurate yet, still tracking down some oddities

 1.4 (May 06, 2013)
====================
Added @since annotations (useful for finding the lowest library version needed)
Miscellaneous other JavaDoc improvements
Minor math optimizations related to the changes made in the 1.3 update
Added SimpleEntity class (barebones implementation of CombatEntityAPI):
 - Useful for spawnEmpArc(), which can target a CombatEntityAPI
 - Has a constructor that takes a Vector2f, for a static location
 - Can also take an Object that has a getLocation() method, for mobile targets
   (useful for targeting a specific WeaponAPI). This uses reflection!
Changes to CombatUtils:
 - Added getTimeSinceLastFrame()
Changes to MathUtils:
 - Circle-based methods support a null center point (acts as a 0, 0 origin)
 - Added getRandomNumberInRange(float min, float max)
 - Added getEquidistantPointsInsideCircle(Vector2f center, float radius,
   float spaceBetweenPoints)
Changes to CollisionUtils:
 - Made isPointWithinBounds() more efficient
 - Added isPointWithinCollisionCircle(Vector2f point, CombatEntityAPI entity)
Changes to AIUtils:
 - Added getEnemyMissilesOnMap(CombatEntityAPI entity, [boolean sortByDistance])
 - Added getNearbyEnemyMissiles(CombatEntityAPI entity, float range,
   [boolean sortByDistance])
 - Added getNearestMissile(CombatEntityAPI entity)
 - Added getNearestEnemyMissile(CombatEntityAPI entity)
Changes to WeaponUtils:
 - Added getEnemiesInArc(WeaponAPI weapon, [boolean sortByDistance])
 - Added getNearestEnemyInArc(WeaponAPI weapon)
 - Added getEnemyMissilesInArc(WeaponAPI weapon, [boolean sortByDistance])
 - Added getNearestEnemyMissileInArc(WeaponAPI weapon)
 - Added aimTowardsPoint(WeaponAPI weapon, Vector2f point, float time)
(method parameters in [brackets] signify optional parameters)


 1.3 (April 10, 2013)
======================
MathUtil's getDistance() methods now include collision radius, if applicable
Note: this change may alter the behavior of existing scripts!
Use the getDistance() methods that take two Vector2f for the old behavior

 1.2 (March 20, 2013)
======================
Greatly expanded FleetUtils (equivalent to AIUtils but for CampaignFleetAPIs)
Added clampAngle() to MathUtils (normalizes angle between 0 and 360 degrees)
Added applyForce() to CombatUtils (basic implementation of Newton's Second Law)
Removed DefenseType and Line classes for now (unused internal data types)

 1.1 (February 27, 2013)
=========================
Added LazyLib class to org.lazywizard.lazylib (contains version information)
Added a few missing JavaDoc entries and updated others for clarity
All getWithinRange() methods now have an optional sort-by-distance parameter
Added Comparators to CollectionUtils for sorting by distance from a Vector
 - SortEntitiesByDistance(Vector2f location): sorts CombatEntityAPIs
 - SortTokensByDistance(Vector2f location): sorts SectorEntityTokens
 - SortObjectivesByDistance(Vector2f location): sorts BattleObjectiveAPIs

 1.0 (February 23, 2013)
=========================
Initial utility mod release, contains 12 classes and 62 methods.
Added JavaDoc (included with mod download)
Changes from bundled jar version:
 - Removed Slick2D classes (save FastTrig)
 - Added CollisionUtils class (bounds checking and collision detection)
 - Rewrote WeaponUtils to use the new CollisionUtils instead of Slick2D
 - Moved FastTrig from org.lazywizard.lazylib.geom to org.lazywizard.lazylib
 - Fixed several bugs (including a broken getRandomPointInCircle())
 - Slight optimization of math-heavy methods
[close]

The FastTrig class used in this mod is taken from the Slick2D (http://slick.cokeandcode.com/static.php?page=about) library. License:
Spoiler
Quote
Copyright (c) 2007, Slick 2D
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.
 * Neither the name of the Slick 2D nor the names of its contributors may be
   used to endorse or promote products derived from this software without
   specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
[close]
Title: Re: LazyLib, a library for modders (0.1b, still a WIP)
Post by: LazyWizard on January 19, 2013, 10:23:57 PM
(reserved for code examples)
Title: Re: LazyLib, a library for modders (0.1b released 2013-01-20)
Post by: Romeo_One on January 20, 2013, 02:30:03 AM
Very good! Thanks for this awesome contribution to the community!
Title: Re: LazyLib, a library for modders (0.1b released 2013-01-20)
Post by: sdmike1 on January 22, 2013, 07:30:30 AM
LazyWizard once again proving what can be done with the API
Title: Re: LazyLib, a library for modders (0.1b released 2013-01-20)
Post by: gruntmaster1 on January 23, 2013, 03:01:31 PM
I think a nice addition to this library would be some form of logging for debugging (global.getSector().addMessage has its limits >_<).
Title: Re: LazyLib, a library for modders (0.1b released 2013-01-20)
Post by: CrashToDesktop on January 23, 2013, 03:31:10 PM
Posting to watch this. :)
Title: Re: LazyLib, a library for modders (0.1b released 2013-01-20)
Post by: LazyWizard on January 23, 2013, 10:28:14 PM
I think a nice addition to this library would be some form of logging for debugging (global.getSector().addMessage has its limits >_<).

Unfortunately we can't write directly to the log. If you run the game from the command line you can use System.out.println() to have text appear in the console window, though.

You also might have luck with MessageUtils.showMessage(). That allows sector messages with line-wrapping and newline support, which alleviates some of the headache of using them. :)
Title: Re: LazyLib, a library for modders (0.1b released 2013-01-20)
Post by: gruntmaster1 on January 25, 2013, 03:17:19 AM
I think a nice addition to this library would be some form of logging for debugging (global.getSector().addMessage has its limits >_<).

Unfortunately we can't write directly to the log. If you run the game from the command line you can use System.out.println() to have text appear in the console window, though.

You also might have luck with MessageUtils.showMessage(). That allows sector messages with line-wrapping and newline support, which alleviates some of the headache of using them. :)

Would it be possible to have your own log file and say initialize the logger with the path it should write to?.
Title: Re: LazyLib, a library for modders (last update 2013-02-07)
Post by: LazyWizard on February 07, 2013, 08:57:04 PM
LazyLib has been updated. Two new classes: WeaponUtils and FleetUtils (barely started). Aside from that, this update also brings heavy optimizations to MathUtils and AIUtils. The download is at the top of the first post.

I would appreciate it if the more math-inclined would check out the source to WeaponUtils. I haven't thoroughly tested it, and I'm not certain it's 100% accurate yet.
Title: Re: LazyLib v1.0 (.54.1a, released 2013-02-23) - MODDERS, CHECK MAIN POST
Post by: LazyWizard on February 23, 2013, 10:01:52 PM
A new release is up. Check the main post (http://fractalsoftworks.com/forum/index.php?topic=5444.0) for the download link.

There are three important things to note with this release;

The reasons for and ramifications of this change can be found in the main post (http://fractalsoftworks.com/forum/index.php?topic=5444.0). All mods that used this library previously should remove LazyLib.jar from their mod folder and mod_info.json, as well as delete data/scripts/plugins/LazyLibPlugin.java if they have it.

Changelog:
Quote
1.0 (February 23, 2013)
=========================
Initial utility mod release, contains 12 classes and 62 methods.
Added JavaDoc (included with mod download)
Changes from bundled jar version:
 - Removed Slick2D classes (save FastTrig)
 - Added CollisionUtils class (bounds checking and collision detection)
 - Rewrote WeaponUtils to use the new CollisionUtils instead of Slick2D
 - Moved FastTrig from org.lazywizard.lazylib.geom to org.lazywizard.lazylib
 - Fixed several bugs (including a broken getRandomPointInCircle())
 - Slight optimization of math-heavy methods
Title: Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
Post by: LazyWizard on February 26, 2013, 10:49:37 PM
1.1 has been released. Get it in the main post (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

Changelog:
Quote
1.1 (February 27, 2013)
=========================
Added LazyLib class to org.lazywizard.lazylib (contains version information)
Added a few missing JavaDoc entries and updated others for clarity
All getWithinRange() methods now have an optional sort-by-distance parameter
Added Comparators to CollectionUtils for sorting by distance from a Vector
 - SortEntitiesByDistance(Vector2f location): sorts CombatEntityAPIs
 - SortTokensByDistance(Vector2f location): sorts SectorEntityTokens
 - SortObjectivesByDistance(Vector2f location): sorts BattleObjectiveAPIs
Title: Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
Post by: jasomnie on February 27, 2013, 11:35:56 PM
good very good
Title: Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
Post by: theSONY on March 08, 2013, 02:35:07 AM
umm... is this supose be a .rar file ? becouse all i got is strange nondescript file & i'm confused   :-\

ok ok falstart, i opened that damn thing, BUT just to be sure, where should i put the extracted folder ?

OK OK i got everything , My Bad... can't think straight without my "morning coffee"
move along,nothing to see here
Title: Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
Post by: Shield on March 09, 2013, 04:44:47 PM
I am still confused as to where this file goes, or maybe I am looking at it the wrong way
Title: Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
Post by: LazyWizard on March 09, 2013, 04:46:30 PM
It's just like a normal mod, you need to extract the zip into the mods folder.
Title: Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
Post by: theSONY on March 09, 2013, 05:15:48 PM
I am still confused as to where this file goes, or maybe I am looking at it the wrong way

extract it first then its like any normal mod, you put this in the mod folder as lazy already wrote & activate the mod
Title: Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
Post by: Shield on March 09, 2013, 05:24:13 PM
I am still confused as to where this file goes, or maybe I am looking at it the wrong way

extract it first then its like any normal mod, you put this in the mod folder as lazy already wrote & activate the mod

Thats the problem, I am just getting a file I can't unzip the file.

Guess I will just have to rename it with .zip at the end.
Title: Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
Post by: LazyWizard on March 09, 2013, 05:26:00 PM
That shouldn't be happening. Try downloading from here: http://www.mediafire.com/file/rna6p26a8o51kue/LazyLib_1.1.zip
Title: Re: LazyLib v1.2 (.54.1a, released 2013-03-20)
Post by: LazyWizard on March 20, 2013, 04:38:23 PM
1.2 has been released, get it in the main post.

Changelog:
Quote
1.2 (March 20, 2013)
======================
Greatly expanded FleetUtils (equivalent to AIUtils but for CampaignFleetAPIs)
Added clampAngle() to MathUtils (normalizes angle between 0 and 360 degrees)
Added applyForce() to CombatUtils (basic implementation of Newton's Second Law)
Removed DefenseType and Line classes for now (unused internal data types)
Title: Re: LazyLib v1.2 (.54.1a, released 2013-03-20)
Post by: theSONY on March 22, 2013, 04:08:32 AM
Spoiler
598187 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.lang.ArithmeticException: / by zero
java.lang.ArithmeticException: / by zero
   at data.scripts.world.OmniFac$WeaponData.<init>(OmniFac.java:812)
   at data.scripts.world.OmniFac.checkCargo(OmniFac.java:521)
   at data.scripts.world.OmniFac.advance(OmniFac.java:601)
   at com.fs.starfarer.campaign.BaseLocation.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.A.super(Unknown Source)
   at com.fs.starfarer.A.ร–ร–?000(Unknown Source)
   at com.fs.A.A.new(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
[close]
Uomoz's collection so i don't know wich ver of your mode is this
Title: Re: LazyLib v1.2 (.54.1a, released 2013-03-20)
Post by: LazyWizard on March 22, 2013, 10:08:27 PM
Spoiler
598187 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.lang.ArithmeticException: / by zero
java.lang.ArithmeticException: / by zero
   at data.scripts.world.OmniFac$WeaponData.<init>(OmniFac.java:812)
   at data.scripts.world.OmniFac.checkCargo(OmniFac.java:521)
   at data.scripts.world.OmniFac.advance(OmniFac.java:601)
   at com.fs.starfarer.campaign.BaseLocation.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.A.super(Unknown Source)
   at com.fs.starfarer.A.ร–ร–?000(Unknown Source)
   at com.fs.A.A.new(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
[close]
Uomoz's collection so i don't know wich ver of your mode is this

This is actually a bug in the version of the Omnifactory mod included in Uomoz's Corvus, and will be fixed in the next release. You can manually fix it by downloading the latest Omnifactory version here (http://fractalsoftworks.com/forum/index.php?topic=5199.0) and moving Omnifactory.jar into UC's jar folder.
Title: Re: LazyLib v1.3 (.54.1a, released 2013-04-10)
Post by: LazyWizard on April 10, 2013, 12:10:46 PM
1.3 is up, get it in the main post.

This update will change the behavior of existing mods! It fixes a bug where the getDistance() methods (and all other methods that rely on getDistance()) didn't take collision radii into account, meaning distances were calculated from the center of entities. Now the distance is calculated from the closest point of that entity's collision radius. This should fix the bug where certain AI scripts that used LazyLib didn't work properly with supercapital ships (*cough* Valkyrians), as they were never considered "in range". :)

If you want to keep the old behavior use the version of getDistance() that takes two vectors as arguments, as the behavior of that method is unchanged.

Also with this change, getDistanceSquared() is no longer more efficient than getDistance(), as there is no way to avoid a square root while including the collision radius. The version that takes two Vector2fs as an argument is an exception, obviously.

Changelog:
Quote
1.3 (April 10, 2013)
======================
MathUtil's getDistance() methods now include collision radius, if applicable
Note: this change may alter the behavior of existing scripts!
Title: Re: LazyLib v1.3 (.54.1a, released 2013-04-10)
Post by: LazyWizard on April 20, 2013, 08:20:25 PM
I'm working on 1.4 right now. To make up for 1.3 being a simple bugfix patch, this next update will be much larger than usual.

Here's the changelog so far (items starting with X have not been finished yet):
Quote
1.4 (April xx, 2013)
======================
Added @since annotations (useful for finding the lowest library version needed)
Minor math optimizations to deal with the changes made in the 1.3 update
Changes to MathUtils:
 - Circle-based methods can now have null centers passed in for a 0, 0 origin
 - Added getRandomNumberInRange(float min, float max)
Changes to AIUtils:
 - Added getEnemyMissilesOnMap(CombatEntityAPI entity, [boolean sortByDistance])
 - Added getNearbyEnemyMissiles(CombatEntityAPI entity, float range,
      [boolean sortByDistance])
 - Added getNearestMissile(CombatEntityAPI entity)
 - Added getNearestEnemyMissile(CombatEntityAPI entity)
Changes to WeaponUtils:
 - Added getEnemiesInArc(WeaponAPI weapon, [boolean sortByDistance])
 - Added getNearestEnemyInArc(WeaponAPI weapon)
 - Added getEnemyMissilesInArc(WeaponAPI weapon, [boolean sortByDistance])
 - Added getNearestEnemyMissileInArc(WeaponAPI weapon)
 - Added aimTowardsPoint(WeaponAPI weapon, Vector2f point, float time)
XAdded KeyHandler class (abstract, must be subclassed):
X - Can see what keys were pressed or released this frame
X - Can get a list of all keys that are currently pressed
X - Can check how long a key has been pressed for
Added AnimatedWeapon class (abstract, must be subclassed):
 - Used for weapons that need complex animations
 - Can set a custom framerate and tell it to pause on certain frames
X - Can set frame ranges to be played when firing, disabled, charging, etc
Added SimpleEntity class (barebones implementation of CombatEntityAPI):
 - Useful for spawnEmpArc(), which can target a CombatEntityAPI
 - Has a constructor that takes a Vector2f, for a static location
 - Can also take an Object that has a getLocation() method, for mobile targets
   (useful for targeting a specific WeaponAPI). This uses reflection!

If there are any other features you would like to see added, let me know. :)
Title: Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
Post by: LazyWizard on May 06, 2013, 04:55:19 PM
1.4 is up, get it here (http://www.mediafire.com/file/e2sfsfems6lih57/LazyLib_1.4.zip).

KeyHandler and AnimatedWeapon have been deferred until 1.5, my apologies to anyone who was waiting for them. :)

Changelog:
Quote
1.4 (May 06, 2013)
====================
Added @since annotations (useful for finding the lowest library version needed)
Miscellaneous other JavaDoc improvements
Minor math optimizations related to the changes made in the 1.3 update
Changes to CombatUtils:
 - Added getTimeSinceLastFrame()
Changes to MathUtils:
 - Circle-based methods support a null center point (acts as a 0, 0 origin)
 - Added getRandomNumberInRange(float min, float max)
 - Added getEquidistantPointsInsideCircle(Vector2f center, float radius,
   float spaceBetweenPoints)
Changes to CollisionUtils:
 - Made isPointWithinBounds() more efficient
 - Added isPointWithinCollisionCircle(Vector2f point, CombatEntityAPI entity)
Changes to AIUtils:
 - Added getEnemyMissilesOnMap(CombatEntityAPI entity, [boolean sortByDistance])
 - Added getNearbyEnemyMissiles(CombatEntityAPI entity, float range,
   [boolean sortByDistance])
 - Added getNearestMissile(CombatEntityAPI entity)
 - Added getNearestEnemyMissile(CombatEntityAPI entity)
Changes to WeaponUtils:
 - Added getEnemiesInArc(WeaponAPI weapon, [boolean sortByDistance])
 - Added getNearestEnemyInArc(WeaponAPI weapon)
 - Added getEnemyMissilesInArc(WeaponAPI weapon, [boolean sortByDistance])
 - Added getNearestEnemyMissileInArc(WeaponAPI weapon)
 - Added aimTowardsPoint(WeaponAPI weapon, Vector2f point, float time)
Added SimpleEntity class (barebones implementation of CombatEntityAPI):
 - Useful for spawnEmpArc(), which can target a CombatEntityAPI
 - Has a constructor that takes a Vector2f, for a static location
 - Can also take an Object that has a getLocation() method, for mobile targets
   (useful for targeting a specific WeaponAPI). This uses reflection!
(method parameters in [brackets] signify optional parameters)
Title: Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
Post by: silentstormpt on May 06, 2013, 04:57:36 PM
Oh been waiting for this, thanks, also were any methods/classes moved around that require change?
Title: Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
Post by: LazyWizard on May 06, 2013, 06:06:31 PM
You won't need to make any changes to existing code. There is a bug in WeaponUtils.getTimeToAim() that I haven't fixed yet, but I don't think any mods use that method.
Title: Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
Post by: xenoargh on June 18, 2013, 11:08:30 AM
Heyas.  Just wanted to say that this is amazing.  The amount of work you must have put into the documentation alone deserves a cookie. 

Stuff like isPointWithinBounds() totally changes my outlook on what's possible to get done- between that and the stellar work Alex put in to allow us to create / manipulate various objects, I have all sorts of crazy ideas now  ;D

Now if only there was a UI lib that we could use to make alternative dialogs and suchlike with...

BTW, did the console ever get working with full-screen?
Title: Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
Post by: LazyWizard on June 18, 2013, 11:52:55 AM
Heyas.  Just wanted to say that this is amazing.  The amount of work you must have put into the documentation alone deserves a cookie.

Stuff like isPointWithinBounds() totally changes my outlook on what's possible to get done- between that and the stellar work Alex put in to allow us to create / manipulate various objects, I have all sorts of crazy ideas now  ;D

Thanks for the praise, and I'm glad to hear this mod is fulfilling its intended purpose of making crazy ideas possible. If there's anything you think I should add to the library, let me know! :)

I tried to make the documentation as thorough as possible, though I think I might have gone a bit overboard - according to CLOC (http://cloc.sourceforge.net/), 40% of LazyLib's codebase is comments!

Quote
Now if only there was a UI lib that we could use to make alternative dialogs and suchlike with...

BTW, did the console ever get working with full-screen?

I have tenuous plans for UI classes, but I'll have to wait until .6a is released to see what is actually needed. I'm definitely planning on writing a basic dialog system (including conditionally appearing responses and on-chosen scripts). The logic parts of that are already written, I'm just waiting for .6a to be released so I can hook it into the game and see if it all works. :)

The Console mod doesn't have fullscreen support yet, but it will be rewritten to use the new CustomUIPanelPlugin after .6a is released. That means no more separate input threads or JOptionPane popups (though popups might have to remain for combat commands if we can't create UI panels there).
Title: Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
Post by: xenoargh on June 18, 2013, 03:54:07 PM
The main thing that I see a real need for is some stuff handling Station interaction.

For example, it would be nice to have solid methods to:

1.  Cause Faction to assume control over Stations if <event>, with full handling of things like Cargo changing hands.  I know that this is pretty straightforward in some ways and as my post about taking static Stations out of the framework may have indicated, I hope that the future of these hack-arounds is limited.  But that really depends on what Alex wants to do with these areas (I presume he's got a lot of ideas but it's still very fluid). 

I don't suppose you've figured out any practical way to destroy Stations? 

That is one of the things where I got stuck, since so much code tends to presume the existence of those Objects.  I can see that the functions you've built basically allow re-writing of the strategic AI using dynamic logic, so maybe the key is just me being un-lazy and building some spawn events that use LazyLib to scan for appropriate places and targets?  I presume that's how Excerin works; I haven't tried it out yet, but it makes sense.

2.  Some simple way (i.e., call a function that checks states) to make battles between player-AI / AI-AI cause <events>. 

Again, we have had this done in various ways; it'd be nice to have a nice neat function that we can call that checks for <events> and executes <stuff>.  Like I said in a Suggestion post, there really should be something in the framework for that, but we don't know if / when that will arrive.

Other than that, practically everything I could ask for in a package like this is in the realm of, "probably shouldn't bother until Alex makes his mind up about a bunch of stuff".  I hate to ask for things that might get broken or irrelevant or whatnot, like some sort of UI toolkit, y'know?   Like, for example, the SimpleEntity could use some physics besides just position (giving it a velocity vector would be nice, so it could smoothly interpolate and not have to call every frame, for example).

At the same time, this is one of the areas where, if such things existed, most of the limitations on the gameplay just flat-out go away; if there was a way to make non-clunky interfaces for Ye Typical Player, I'd be quite tempted to go ahead and try and build some empire-management prototypes and RPG-like elements, like basic FedEx questing.

But what you've gotten done allows for so many cool options with weapon systems that I can probably have fun just messing about.  I'd already developed Beams that do Hard Flux, variants on Projectile behavior (for example, I built a crude "heat gun" that partially bypasses Shields through re-purposed EMP arcs) but I can see how some of the functions you've built make that kind of thing almost trivial. 

Not having to mess with as much trig, just gamecode, makes it almost too easy to do stuff like indeterminate flak, AOE systems, weapons that do EMP-like behaviors but then Do Something Different, physics toys, etc.  So hopefully I'll be able to get a few things knocked out and people can use 'em to extend the combat gameplay in all sorts of fun ways.
Title: Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
Post by: xenoargh on June 19, 2013, 08:30:08 PM
OK, got a couple of suggested features, both totally related.

I'd like GetEnemyStations(Fleet) (sorted by range from Fleet) and GetFriendlyStations(ditto).

I'm pretty frustrated trying to get this built.  I built a crude version of this for the first builds of Vacuum that auto-targets certain SystemEntities if I get a name match, but I'd really like a generic function for this, so that writing some strategic AI gets a little easier.
Title: Re: LazyLib v1.5 (.54.1a/.6a, released 2013-08-01)
Post by: LazyWizard on August 01, 2013, 01:34:13 PM
1.5 is up, get it here (http://www.mediafire.com/download/v272i545x9wv3za/LazyLib_1.5.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%201.5.zip)).

Aside from some important bugfixes, the big additions are DefenseUtils (lets you check what defense is present at a location, or convert between armor grid and world coordinates) and AnchoredEntity (which allows for things like incendiary/acid weapons that stick to a target). There's also a few new methods in WeaponUtils to calculate how much damage a specific weapon would do to a specific target after all MutableStats are factored in. These methods aren't 100% accurate yet (I must be missing a stat somewhere), but they should be much closer than what you'd get through DerivedWeaponStatsAPI.

Regarding world coordinate -> armor grid conversions: if a modded ship has a center point that's not the center of the sprite there might be problems. There's no method in the current API that would allow me to compensate for this, unfortunately.

Changelog:
Quote
1.5 (August 01, 2013)
=======================
Re-added DefenseType enumeration (contains HULL, ARMOR, SHIELD, PHASE_OR_MISS)
Added AnchoredEntity:
 - Alternative implementation of CombatEntityAPI that follows and rotates
   alongside another CombatEntityAPI (the 'anchor')
 - Includes a working getVelocity() implementation, unlike SimpleEntity
Added DefenseUtils:
 - Contains methods to convert between world and armor grid coordinates
 - Can check what DefenseType is present at a specific point on a ship
Changes to AIUtils:
 - Fixed bug with canUseSystemThisFrame() always returning false for
   active toggleable systems that have a cooldown
Changes to CollisionUtils:
 - Fixed bug with isPointInBounds() and points exactly on the boundary edges
Changes to CombatUtils:
 - Added getFleetMember(ShipAPI ship), returns the FleetMemberAPI whose
   id matches this ship (or null if no match was found)
Changes to MathUtils:
 - Added equals(float a, float b), tests for 99.99999+% equality of floats
 - Added getRandom(), returns an instance of java.util.Random
   (this is the RNG used by LazyLib if you wanted to do seed manipulation)
Changes to WeaponUtils:
 - New methods to check how much damage you would deal to a specific target:
 - Added calculateActualDamage(float baseDamage, WeaponAPI weapon,
   ShipAPI target, DefenseType defense)
 - Added calculateDamagePerShot(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - Added calculateDamagePerSecond(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - Added calculateDamagePerBurst(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - These methods are not 100% accurate yet, still tracking down some oddities
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: xenoargh on August 02, 2013, 01:23:49 AM
Quote
getFleetMember(ShipAPI ship)
I don't suppose that means we can get the Variant id from the FleetMember then???  You know why, and I'm like, on the last 1% of the Rest of It :D

Quote
Re-added DefenseType enumeration (contains HULL, ARMOR, SHIELD, PHASE_OR_MISS)
Help me out- what is this good for?  I take it you use it with a Vector2f and this:
Quote
Can check what DefenseType is present at a specific point on a ship

Quote
Regarding world coordinate -> armor grid conversions: if a modded ship has a center point that's not the center of the sprite there might be problems. There's no method in the current API that would allow me to compensate for this, unfortunately.
Is it just going to be off the pixels of offset, or have more serious problems?  I often have centers offset on Y... if yes, guess I can just live with some inconsistencies.

Also, can we get a random armor grid and the location?  Sorry, that's probably really silly to ask, and if you've managed to solve this already, it's probably too trivial to ask, but I wanted to do something with ships occasionally catching on fire and stuff and taking long-term damage with some FX.

Quote
Fixed bug with isPointInBounds() and points exactly on the boundary edges
I forgot to mention I've been using CollisionUtils.getCollisionPoint() a lot, but I'm seeing a lot of null results even though the target is a valid CombatEntity.  This happens most often with little things like drones.  Any idea?

Oh, and I have a few requests, hopefully not stupid / too hard:

1.  Vector2f RandomPointOnLineSegment(Vector2f start, Vector2f end) - self-explanatory, want to use it for various FX things.
2.  Boolean ShipDeadThisFrame() - I've found that while I can get the hull and if < threshold I get a good result... but with Hulks I am not seeing them return any values as to hitpoints and suchlike.  They're also no longer reporting isFighter() etc., as normal.  Probably need to direct that at Alex.
3.  Vector2f RandomConeVector(Vector2f startingVector, degrees) - would return a new Vector2f that randomly differs from the startingVector (for example, the vector pointing from a weapon's point location along the current velocity) by degrees +/-.  Would be very useful for impact FX stuff, etc., etc.
4.  Vector2f RandomCircularVelocity(Vector2f point, minMagnitude, maxMagnitude) - a nice, newbie-friendly method for making dispersion patterns that use circles for random distribution.
5.  Vector2f nextPointonVector(Vector2f start, amount) A way to translate something's velocity vector into a point +/- along the Y.  For example, that cannon that shoots "through" things uses a method like that, where it extended the line and then backtracked to a collision and so forth.  It'd be nice to have that consolidated in a LazyLib routine- just put 10000f into amount, then CollisionUtils.getCollisionPoint()...

Anyhow, very sorry if any of this is too stupid to bother with, I need some sleep and I'm very excited about what's going to be possible with all of this :)
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: xenoargh on August 02, 2013, 07:52:03 PM
Quote
I don't suppose that means we can get the Variant id from the FleetMember then???  You know why, and I'm like, on the last 1% of the Rest of It
Nevermind about all that- I got the problem solved  :D
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: xenoargh on August 03, 2013, 12:08:06 AM
Sorry for the triple-post.  Here is a solution for the random velocity vector pointing away from a given point (generally, we need this for random velocities in special effects, where this comes up a lot, because square distributions are ugly and circular distributions may not be what we need, because we need precise control over speeds).  Feel free to use it, I know it was fairly trivial but it's probably something a lot of people are going to need :)

Code
		
/**
* Returns a {@link Vector2f} velocity vector pointing from {@code position}
*
* @param position -- The origin of the vector.
* @param velocity -- the velocity we wish to have going randomly away from the origin.
* @return newVel -- A {@link Vector2f} pointing at {@code destination} that is the velocity.
*/
public static Vector2f randomCircularVelocity(Vector2f position,float velocity)
{
Vector2f velPos = MathUtils.getRandomPointOnCircumference(position, velocity);
Vector2f newVel = Vector2f.sub(velPos,position,null);
return newVel;
}
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: Okim on September 14, 2013, 12:23:31 AM
Hi.

Just informing you that LazyLib causes problems with the new 0.6a. The issue is in missing sound files and their new IDs.
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: LazyWizard on September 14, 2013, 12:36:14 AM
LazyLib doesn't use any sounds. The problem would have to be with another mod you're running - sounds.json changed a lot in .6a, and most mods that used vanilla sounds will need an update to be compatible.
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: Okim on September 14, 2013, 11:39:30 PM
Hm. That`s odd as i got errors with LazyLib shown in it as  source.
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: LazyWizard on September 14, 2013, 11:44:12 PM
Did the error look something like this?

Code
21408 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.RuntimeException: Error loading [sounds/fx/beams/fire_beam_burst03.ogg] resource, not found in [C:\Users\Rob\Programs\Starfarer\starsector-core\..\mods\Exerelin,C:\Users\Rob\Programs\Starfarer\starsector-core\..\mods\LazyLib,../starfarer.res/res,CLASSPATH]
java.lang.RuntimeException: Error loading [sounds/fx/beams/fire_beam_burst03.ogg] resource, not found in [C:\Users\Rob\Programs\Starfarer\starsector-core\..\mods\Exerelin,C:\Users\Rob\Programs\Starfarer\starsector-core\..\mods\LazyLib,../starfarer.res/res,CLASSPATH]
at com.fs.util.C.ร’00000(Unknown Source)
at com.fs.util.C.ร“00000(Unknown Source)
at com.fs.starfarer.loading.OooO.super(Unknown Source)
at com.fs.oOOO.super.new(Unknown Source)
at com.fs.starfarer.combat.D.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

If it does, LazyLib is listed because the game searches every mod folder for resources before giving up. All active mods should be included in that error message.
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: Okim on September 15, 2013, 02:34:16 AM
Ah. I see. And due to LazyLib being the last in my list - it roars on it.

Sorry :)
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: x Daedalus on September 23, 2013, 06:39:24 AM
- About to start work on a mod of my very own

- Start looking into LazyLib

- Cry with joy.
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: redshiprader on September 23, 2013, 07:21:13 PM
When are u updating?
Title: Re: LazyLib v1.5 (.54.1a, released 2013-08-01)
Post by: ValkyriaL on September 23, 2013, 10:46:44 PM
He just did... 1.5
Title: Re: LazyLib v1.5 (.54.1a/.6a, released 2013-08-01)
Post by: LazyWizard on September 25, 2013, 02:30:12 AM
When are u updating?

I'll release the next version after .6.1a, as there's a bug in .6a that can cause crashes with some of the changes I've made. Luckily, 1.5 seems to be completely compatible with .6a. :)

The changes in 1.6 are mostly deprecating everything that is now included in the API, although there are a few changes that are important:

Here's the changelog so far:
Quote
1.6 (soon)
============
Updated the codebase to use the new .6a methods
Deprecated several methods whose functionality is now included within the API
Usage of deprecated methods is now reported in starsector.log
Changes to AIUtils:
 - All methods now only return entities that are visible on the battle map.
   Note: this change may alter the behavior of existing scripts!
   (use CombatUtils if you wish to find ships regardless of fog of war coverage)
Changes to CollectionUtils:
 - SortXByDistance constructors now have an optional includeRadius parameter
   that sets if collision/interaction radius is considered (defaults to true)
 - implode() works with any Collection, not just one containing Strings
 - Deprecated CollectionUtils.SortObjectivesByDistance as BattleObjectiveAPI
   now extends CombatEntityAPI (use SortEntitiesByDistance instead)
 - Deprecated weightedRandom(Map pickFrom) in favor of
   com.fs.starfarer.api.util.WeightedRandomPicker
 - Deprecated weightedRandom(Map pickFrom, int numToPick) in favor of
   com.fs.starfarer.api.util.WeightedRandomPicker (call pick() multiple times)
Changes to CombatUtils:
 - No longer implements EveryFrameCombatPlugin
 - Deprecated getCombatEngine() in favor of Global.getCombatEngine()
 - Deprecated getElapsedCombatTime() in favor of
   CombatEngineAPI,getTotalElapsedTime()
 - Deprecated getElapsedCombatTimeIncludingPaused() in favor of
   CombatEngineAPI,getTotalElapsedTime()
 - Deprecated getTimeSinceLastFrame() in favor of
   CombatEngineAPI.getElapsedInLastFrame()
Changes to DefenseUtils:
 - Deprecated getArmorCellAtWorldCoord(ShipAPI ship, Vector2f loc)
   in favor of ArmorGridAPI.getCellAtLocation(Vector2f loc)
Changes to MathUtils:
 - Added getRandomPointOnLine(Vector2f lineStart, Vector2f lineEnd)
 - Added isPointOnLine(Vector2f point, Vector2f lineStart, Vector2f lineEnd)
 - The various getDistance() methods involving SectorEntityTokens now
   take interaction radius into account. Note: this change may alter the
   behavior of existing scripts!
 - getDistanceSquared() methods incorporating a radius are no longer marked
   as deprecated, instead the documentation includes a warning that using
   getDistance() may be just as efficient
Changes to WeaponUtils:
 - All calculateDamage() methods are now marked as deprecated. There are just
   too many factors going into damage for this to be testable (26 MutableStats
   that affect damage dealt/taken as of .6a, let alone armor damage reduction).
Title: Re: LazyLib v1.5 (.54.1a/.6a, released 2013-08-01)
Post by: Zaphide on September 25, 2013, 08:55:47 PM
MathUtil's getDistance() methods involving SectorEntityTokens take interaction radius into account - meaning two fleets whose circles are overlapping are now considered at 0 distance from each other.

How much (or is it) more 'expensive' performance-wise is this over getDistanceSquared()?

It would be a great solution to the 'hover' on SectorEntityToken issue with my mining code :)
Title: Re: LazyLib v1.5 (.54.1a/.6a, released 2013-08-01)
Post by: LazyWizard on September 25, 2013, 09:04:24 PM
MathUtil's getDistance() methods involving SectorEntityTokens take interaction radius into account - meaning two fleets whose circles are overlapping are now considered at 0 distance from each other.

How much (or is it) more 'expensive' performance-wise is this over getDistanceSquared()?

It would be a great solution to the 'hover' on SectorEntityToken issue with my mining code :)

The only major difference is that getDistance() has to calculate a square root. So while it's much slower than getDistanceSquared(), it's still not really _that_ expensive unless you go crazy with it.

getDistance():
Code
    public static float getDistance(SectorEntityToken token1, SectorEntityToken token2)
    {
        return Math.max(0f, getDistance(token1.getLocation(), token2.getLocation())
                - (token1.getRadius() + token2.getRadius()));
    }

    public static float getDistance(Vector2f vector1, Vector2f vector2)
    {
        float a = vector1.x - vector2.x;
        float b = vector1.y - vector2.y;
        return (float) Math.hypot(a, b);
    }

getDistanceSquared():
Code
    public static float getDistanceSquared(Vector2f vector1, Vector2f vector2)
    {
        float a = vector1.x - vector2.x, b = vector1.y - vector2.y;
        return (a * a) + (b * b);
    }
Title: Re: LazyLib v1.6 (.6a, released 2013-09-27)
Post by: LazyWizard on September 27, 2013, 10:01:10 PM
So remember when I said 1.6 wouldn't be released until after .6.1a?

I lied. ;D

1.6 is up, get it here (http://www.mediafire.com/download/4suol4rwo4y44nl/LazyLib_1.6.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%201.6.zip)).

Changelog:
Quote
1.6 (September 27, 2013)
==========================
Updated the codebase to use the new .6a methods
Deprecated several methods whose functionality is now included within the API
Usage of deprecated methods is now reported in starsector.log if devMode=true
Changes to AIUtils:
 - All methods now only return entities that are visible on the battle map.
   Note: this change may alter the behavior of existing scripts!
   (use CombatUtils if you wish to find ships regardless of fog of war coverage)
 - Changed canUseSystemThisFrame() so it only returns true when the system can
   be toggled (essentially checks if the 'use system' key would do anything).
   This was the intended behavior of this method, but some old scripts might
   rely on the old, broken behavior and need to be changed.
Changes to CollectionUtils:
 - SortXByDistance constructors now have an optional includeRadius parameter
   that sets if collision/interaction radius is considered (defaults to true)
 - implode() now works with any Collection, not just one containing Strings
 - Deprecated CollectionUtils.SortObjectivesByDistance as BattleObjectiveAPI
   now extends CombatEntityAPI (use SortEntitiesByDistance instead)
 - Deprecated weightedRandom(Map pickFrom) in favor of
   com.fs.starfarer.api.util.WeightedRandomPicker
 - Deprecated weightedRandom(Map pickFrom, int numToPick) in favor of
   com.fs.starfarer.api.util.WeightedRandomPicker (call pick() multiple times)
Changes to CombatUtils:
 - Deprecated getCombatEngine() in favor of Global.getCombatEngine()
 - Deprecated getElapsedCombatTime() in favor of
   CombatEngineAPI,getTotalElapsedTime()
 - Deprecated getElapsedCombatTimeIncludingPaused() in favor of
   CombatEngineAPI,getTotalElapsedTime()
 - Deprecated getTimeSinceLastFrame() in favor of
   CombatEngineAPI.getElapsedInLastFrame()
Changes to DefenseUtils:
 - Deprecated getArmorCellAtWorldCoord(ShipAPI ship, Vector2f loc)
   in favor of ArmorGridAPI.getCellAtLocation(Vector2f loc)
Changes to LazyLib:
 - Now logs the current LazyLib version on game load
 - Added setLogLevel(Level level), sets the log level for all utility classes
   (defaults to Level.DEBUG for dev builds, Level.ERROR for main releases)
Changes to MathUtils:
 - Added getRandomPointOnLine(Vector2f lineStart, Vector2f lineEnd)
 - Added isPointOnLine(Vector2f point, Vector2f lineStart, Vector2f lineEnd)
 - The various getDistance() methods involving SectorEntityTokens now
   take interaction radius into account. Note: this change may alter the
   behavior of existing scripts!
 - getDistanceSquared() methods incorporating a radius are no longer marked
   as deprecated, instead the documentation includes a warning that using
   getDistance() may be just as efficient
Changes to WeaponUtils:
 - Fixed inaccuracies with getTimeToAim(), but method doesn't take ship
   turn speed into account anymore
 - All calculateDamage() methods are now marked as deprecated. There are just
   too many factors going into damage for this to be testable (26 MutableStats
   that affect damage dealt/taken as of .6a, let alone armor damage reduction).
Title: Re: LazyLib v1.6 (.6a, released 2013-09-27)
Post by: MShadowy on September 27, 2013, 10:30:37 PM
Ah hell yeah.  Good news to see right before bed.
Title: Re: LazyLib v1.6 (.6a, released 2013-09-27)
Post by: xenoargh on September 27, 2013, 11:54:38 PM
Quote
getRandomPointOnLine
Yay!
Title: Re: LazyLib v1.6 (.6a, released 2013-09-27)
Post by: Gotcha! on September 28, 2013, 07:09:51 AM
Hi LazyWizard,

Apparently my Bushi mod stopped functioning with LazyLib 1.6.

The menu appears and then the game crashes, giving this error:

Code
28916 [Thread-6] ERROR com.fs.starfarer.combat.D  - java.lang.NullPointerException
java.lang.NullPointerException
at org.lazywizard.lazylib.combat.CombatUtils.getShipsWithinRange(CombatUtils.java:176)
at org.lazywizard.lazylib.combat.CombatUtils.getShipsWithinRange(CombatUtils.java:208)
at data.scripts.plugins.BushiLightningGunEffect.advance(BushiLightningGunEffect.java:34)
at com.fs.starfarer.combat.entities.ship.A.G.advance(Unknown Source)
at com.fs.starfarer.combat.systems.void.?0000(Unknown Source)
at com.fs.starfarer.combat.systems.void.advance(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.advance(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
at com.fs.starfarer.title.B.super(Unknown Source)
at com.fs.starfarer.new.????00(Unknown Source)
at com.fs.oOOO.super.new(Unknown Source)
at com.fs.starfarer.combat.D.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)

Line 34 in BushiLightningGunEffect.java is this:
Code
List nearbyEnemies = CombatUtils.getShipsWithinRange(beam.getTo(), 750f);

Help plx!
Title: Re: LazyLib v1.6b (.6a, released 2013-09-28)
Post by: LazyWizard on September 28, 2013, 07:26:41 AM
1.6b is up, get it here (http://www.mediafire.com/download/5lzbcn4w9xsodxb/LazyLib_1.6b.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%201.6b.zip)).

This reverts some changes in 1.6 that caused a null pointer exception if you tried to use certain methods on the main title screen.
Title: Re: LazyLib v1.6b (.6a, released 2013-09-28)
Post by: Gotcha! on September 28, 2013, 07:37:39 AM
Wow, that was fast. Thanks! That did the trick.
Title: Re: LazyLib v1.6b (.6a, released 2013-09-28)
Post by: TimeDiver on September 28, 2013, 10:44:42 PM
LazyWizard, using v1.6b, my 'starsector.log' file is being spammed with thousands of instances of the recurring line:

Code
147289 [Thread-5] WARN  org.lazywizard.lazylib.combat.CombatUtils  - Using deprecated method getCombatEngie()

According to your changelog, this kind of output should only be logged if 'devMode=true', and a quick check of my 'starsector-core\data\config\settings.json' file confirms that devMode is set to false.

It's more than a tad annoying, and the .log file is nearly well into the double-megabytes file size range after a good half-hour of gameplay.
Title: Re: LazyLib v1.6b (.6a, released 2013-09-28)
Post by: MesoTroniK on September 28, 2013, 11:52:14 PM
I'm having the same issue as TimeDiver, went to look at my log and it was 140 megabytes.
Title: Re: LazyLib v1.6b (.6a, released 2013-09-28)
Post by: LazyWizard on September 29, 2013, 12:22:15 AM
Oops, forgot to set a flag before releasing 1.6b. Try re-dowloading and see if it's fixed.

Edit: also changed it so calling CombatUtils.getCombatEngine() isn't logged since that's still used internally due to the fix necessary for 1.6b.
Title: Re: LazyLib v1.6b (.6a, released 2013-09-28)
Post by: TimeDiver on September 29, 2013, 01:02:32 AM
Confirmed; revised v1.6b no longer bloats the starsector.log file, regardless of devMode being disabled.

Thanks for the prompt response, and for definitely not giving credence to your chosen user name!
Title: Re: LazyLib v1.6b (.6a, released 2013-09-28)
Post by: Uomoz on October 07, 2013, 05:57:32 AM
It's amazing how important this mod is to code in an efficient manner. Kudos again, LW.
Title: Re: LazyLib v1.6b (.6a, released 2013-09-28)
Post by: Deathven on November 11, 2013, 03:41:49 PM
Shows how important the work of a single person can be! Thanks LazyWizard for all of your hard work to allow us to play mods and create them!  ;D
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on December 18, 2013, 08:03:46 PM
1.7 is up, get it in the main post (http://fractalsoftworks.com/forum/index.php?topic=5444.0).

A lot of new things have been added, a few bugs were squashed, some old methods were shuffled around, and loads of existing methods have been marked deprecated.

Here's the obscenely long list of changes:
Spoiler
Quote
1.7 (December 18, 2013)
=========================
Swapped all usages of CombatUtils.getCombatEngine() to Global.getCombatEngine()
Significant JavaDoc expansion, reformatting, and other readability improvements
Deprecated all methods with a sortByDistance parameter
 - Call Collections.sort() using one of CollectionUtils' Comparators instead
Added lazylib_settings.json:
 - "logDeprecated" sets whether to log usage of deprecated LazyLib methods,
   useful for modders since these will eventually be removed from LazyLib
 - "crashOnDeprecated", if true will throw a RuntimeException when a deprecated
   LazyLib method is used (for modders to track down usage via the stacktrace)
Added DrawUtils (in new org.lazywizard.lazylib.opengl package):
 - drawCircle(float centerX, float centerY, float radius, int numSegments)
 - drawArc(float centerX, float centerY, float radius, float startAngle,
   float arcAngle, int numSegments)
Added VectorUtils:
 - getAngle(Vector2f from, Vector2f to) (moved from MathUtils)
 - getFacing(Vector2f vector) (moved from MathUtils)
 - getCrossProduct(Vector2f vector1, Vector2f vector2)
 - rotate(Vector2f toRotate, float degrees, Vector2f dest)
 - rotateAroundPivot(Vector2f toRotate, Vector2f pivotPoint, float angle,
   Vector2f dest), rotates a Vector2f around another Vector2f
Changes to CollectionUtils:
 - Added CollectionFilter interface, contains accept(Object obj) method
 - Added filter(Collection toFilter, CollectionFilter filter), allows
   predicate-based Collection filtering
 - Added filter(Collection toFilter, List filters), a more efficient way of
   using multiple filters on a Collection at once
 - These methods support generics
Changes to CollisionUtils:
 - Fixed getCollisionPoint() returning null when collision point lies directly
   on the end of a line (this means getCollisionPoint(beam.getFrom(),
   beam.getTo(), beam.getDamageTarget()) actually works again)
 - Fixed getCollides() instantiating a new Line2D object each time it's called
Changes to CombatUtils:
 - No longer implements EveryFrameCombatPlugin (also removed LazyLibCombatHook)
 - Updated getFleetMember() to use DeployedFleetMemberAPI introduced in .6.1a
   (this means it now works in missions, not just in campaign battles)
 - Added isVisibleToSide(CombatEntityAPI entity, int side)
Changes to FleetUtils:
 - Fixed null pointer exception when using these methods in hyperspace
 - Added getRelation(CampaignFleetAPI fleet1, CampaignFleetAPI fleet2)
 - Added getNearbyFleets(CampaignFleetAPI fleet, float range)
Changes to MathUtils:
 - Added getRandomPointInCone(Vector2f center, float radius, float minAngle,
   float maxAngle), returns a random point in a two-dimensional cone
 - Added getShortestRotation(float currAngle, float destAngle), returns the
   smallest difference between two angles. This can also be used to find the
   best turn direction
Changes to SimpleEntity:
 - Added a constructor for mimicking the location of a WeaponAPI w/o reflection
 - Added getWeapon() method, returns null if another constructor was used
 - Added getType() method, returns the type of constructor used for this object
 - Added SimpleEntityType enumeration
Changes to WeaponUtils:
 - Added getAlliesInArc(WeaponAPI weapon)
 - Added getNearestAllyInArc(WeaponAPI weapon)
Deprecated in AIUtils:
 - Deprecated getEnemiesOnMap(CombatEntityAPI entity, boolean sortByDistance)
 - Deprecated getNearbyEnemies(CombatEntityAPI entity, float range,
   boolean sortByDistance)
 - Deprecated getAlliesOnMap(CombatEntityAPI entity, boolean sortByDistance)
 - Deprecated getNearbyAllies(CombatEntityAPI entity, float range,
   boolean sortByDistance)
 - Deprecated getEnemyMissilesOnMap(CombatEntityAPI entity,
   boolean sortByDistance)
 - Deprecated getNearbyEnemyMissiles(CombatEntityAPI entity, float range,
   boolean sortByDistance)
Deprecated in CombatUtils:
 - Deprecated getProjectilesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getMissilesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getShipsWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getAsteroidsWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getObjectivesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - Deprecated getEntitiesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
Deprecated in FleetUtils:
 - Deprecated getEnemyFleetsInSystem(CampaignFleetAPI fleet,
   boolean sortByDistance)
 - Deprecated getNearbyEnemyFleets(CampaignFleetAPI fleet, float range,
   boolean sortByDistance)
 - Deprecated getAlliedFleetsInSystem(CampaignFleetAPI fleet,
   boolean sortByDistance)
 - Deprecated getNearbyAlliedFleets(CampaignFleetAPI fleet, float range,
   boolean sortByDistance)
Deprecated in MathUtils:
 - Deprecateded getFacing(Vector2f vector), moved to VectorUtils
 - Deprecated getAngle(Vector2f from, Vector2f to), moved to VectorUtils
 - Deprecated getDirectionalVector(CombatEntityAPI source, Vector2f destination)
 - Deprecated getDirectionalVector(CombatEntityAPI source,
   CombatEntityAPI destination)
Deprecated in WeaponUtils:
 - Deprecated getEnemiesInArc(WeaponAPI weapon, boolean sortByDistance)
 - Deprecated getEnemyMissilesInArc(WeaponAPI weapon, boolean sortByDistance)
[close]
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: xenoargh on December 19, 2013, 05:02:11 PM
Wow, nice!  I still think my random circular velocity code would be a nice utility addition, though :)
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on December 19, 2013, 05:08:41 PM
Wouldn't that be identical to getRandomPointOnCircumference(point, getRandomNumberInRange(minMagnitude, maxMagnitude))? Or am I misunderstanding what you asked for?
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: xenoargh on December 19, 2013, 08:38:54 PM
No, it's very simple, but a little different :)

Here is what I'm talking about:
Code: java
	public static Vector2f randomCircularVelocity(Vector2f position,float velocity)
{
Vector2f velPos = MathUtils.getRandomPointOnCircumference(position, velocity);
Vector2f newVel = Vector2f.sub(velPos,position,null);
return newVel;
}

Which is really really useful for building special-effects stuff, like particle-system bursts, where we want to create a particle with a true-circular random velocity (using two Math.randoms() gives us a square pattern, which looks horrible).  It's what I used to do all the neato explosion effects with in Vacuum- very simple code but very powerful.

Here is an example of it being used:

Spoiler
Code: java
package data.scripts.weapons;

import java.awt.Color;

import org.lwjgl.util.vector.Vector2f;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.CombatEntityAPI;
import com.fs.starfarer.api.combat.DamagingProjectileAPI;
import com.fs.starfarer.api.combat.OnHitEffectPlugin;
import org.lazywizard.lazylib.MathUtils;

public class ExplosiveOnHitEffect implements OnHitEffectPlugin {

public static Vector2f randomCircularVelocity(Vector2f position,float velocity)
{
Vector2f velPos = MathUtils.getRandomPointOnCircumference(position, velocity);
Vector2f newVel = Vector2f.sub(velPos,position,null);
return newVel;
}

        @Override
public void onHit(DamagingProjectileAPI projectile, CombatEntityAPI target,
  Vector2f point, boolean shieldHit, CombatEngineAPI engine) {

float emp = projectile.getEmpAmount();
float dam = projectile.getDamageAmount();
int repeat = Math.max(6,(int) ((dam / 100f) + 10f));
int repeatTwo = repeat / 3;
for(int i = 0; i < repeat; i++)
{
Vector2f randPoint = MathUtils.getRandomPointInCircle(point,dam/35f);
float randSize = MathUtils.getRandomNumberInRange(dam/25f,Math.max(dam / 20f,15f));
Vector2f randVec = randomCircularVelocity(randPoint,MathUtils.getRandomNumberInRange(30f,Math.max(dam / 50f,31f)));
float randDur = 0.1f + MathUtils.getRandomNumberInRange(0.0f,0.3f);
int yelVal = (int) (Math.random() * 200f + 32f);
int randTrans = (int) MathUtils.getRandomNumberInRange(64f,128f);

engine.addSmoothParticle(randPoint, randVec, randSize, 1f, randDur, new Color(255,yelVal,0,randTrans));
}
for(int i = 0; i < repeat; i++)
{

int yelVal = (int) (Math.random() * 128f + 64f);
Vector2f randPoint = MathUtils.getRandomPointInCircle(point,dam/100f);

//Random Vectors, in order of speed; generally, we need smoke and central poof to be slower than others
Vector2f randVecFast = randomCircularVelocity(randPoint,MathUtils.getRandomNumberInRange(30f,Math.max(dam / 2f,31f)));
Vector2f randVecFastTwo = randomCircularVelocity(randPoint,MathUtils.getRandomNumberInRange(30f,Math.max(dam / 2f,31f)));
Vector2f randVec = randomCircularVelocity(randPoint,MathUtils.getRandomNumberInRange(30f,Math.max(dam / 25f,31f)));
Vector2f randVecTwo = randomCircularVelocity(randPoint,MathUtils.getRandomNumberInRange(30f,Math.max(dam / 35f,31f)));
Vector2f randVecThree = randomCircularVelocity(randPoint,MathUtils.getRandomNumberInRange(15f,Math.max(dam / 40f,16f)));

float randSize = MathUtils.getRandomNumberInRange(10f,Math.max(dam / 50f,15f));
float randSizeTwo = MathUtils.getRandomNumberInRange(5f,10f);
float randDur = 1f + MathUtils.getRandomNumberInRange(-0.5f,3f);
float randDurTwo = MathUtils.getRandomNumberInRange(0.5f,1f);
int randTrans = (int) MathUtils.getRandomNumberInRange(32f,200f);
int randGray = (int) MathUtils.getRandomNumberInRange(32f,64f);

engine.addHitParticle(point, randVecFast, randSizeTwo, 1f, randDurTwo * 0.5f, new Color(255,yelVal + 64,0,randTrans + 55));
engine.addHitParticle(point, randVecFastTwo, randSizeTwo, 1f, randDurTwo * 0.65f, new Color(255,yelVal + 64,0,randTrans + 55));
engine.addHitParticle(point, randVec, randSize, 1f, randDurTwo, new Color(255,yelVal-64,0,randTrans));
engine.addHitParticle(point, randVecTwo, randSize, 1f, randDurTwo * 0.75f, new Color(255,yelVal-32,0,randTrans));
engine.addHitParticle(point, randVecThree, randSize, 1f, randDurTwo * 0.5f, new Color(255,yelVal,0,randTrans));

engine.addSmokeParticle(point, randVecThree, MathUtils.getRandomNumberInRange(dam / 100f,dam / 50f), MathUtils.getRandomNumberInRange(0.5f,1f), randDur, new Color(randGray,randGray,randGray,randTrans));
}
}
}

[close]
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on December 19, 2013, 08:45:40 PM
If you're getting a random point around position, then subtracting position from it, then wouldn't that be the same as MathUtils.getRandomPointOnCircumference(null, velocity), which uses a {0, 0} origin?
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: xenoargh on December 19, 2013, 08:55:35 PM
Ah, I didn't think using null there was safe.  Sorry, I wrote that fairly early on, guess I can lose a few ops! 

Anyhow, yeah, that'd be a more efficient way to express it.  Point's still the same; it's a non-trivial use of the concept of vectors that extends getRandomPointOnCircumference that is something a lot of people need and would love a simple plug-and-play expression for :)
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on December 19, 2013, 09:10:28 PM
Yeah, accepting a null isn't very intuitive, but it's useful to avoid instantiating an extra Vector2f. It's mentioned in the JavaDoc, but usually under the @params tag instead of the main method description. :)

For the record, the following methods in MathUtils will assume a {0, 0} origin if null is passed in for the center argument:
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: xenoargh on December 19, 2013, 09:14:25 PM
Aha.  Useful to know that, I usually don't presume null is acceptable input to a function in this language :)

BTW, thanks very, very much for the random point on line function, that's another relatively-simple thing but it's very useful for Beam SFX stuff. 

The Cone stuff looks super-useful as well, that makes it easy to do things like directional devices (rams, for example) and all sorts of SFX applications!
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: xenoargh on December 19, 2013, 09:18:58 PM
Oh, and!

Where does that JSON go?
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on December 20, 2013, 01:09:28 PM
Aha.  Useful to know that, I usually don't presume null is acceptable input to a function in this language :)

I'm sure this kind of thing probably drives purists insane. :D

Oh, and!

Where does that JSON go?

lazylib_settings.json? It's in the base mod folder. If you still include LazyLib in your Vacuum mod, you'll also want to delete data/scripts/plugins/LazyLibCombatPlugin.java as it's no longer used.
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: xenoargh on January 08, 2014, 11:15:12 PM
Code: java
//Rotates a line segment of length offset around the Vector2f origin using the angle (in degrees).  
//Very useful for anything where we need A-to-B line segments, but we only have one point to work with and a length.
//Many thanks to Louis Wasserman for his example of simple line segment rotation on Stack Overflow, from which this example was derived.

public Vector2f RotateLineSegment(Vector2f origin, float offset, float angle){            
  double[] pt = {(double) offset, (double) 0f};
   // rotates the line segment from 0,0 to offset, 0 to angle
  AffineTransform.getRotateInstance(Math.toRadians(angle), 0, 0).transform(pt, 0, pt, 0, 1);
  //Cast result back to float to get back to Vector2f here, now that we don't need the precision
  float newX = (float) pt[0];
  float newY = (float) pt[1];
  return new Vector2f(origin.getX() + newX, origin.getY() + newY);
}
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: Himntor on January 09, 2014, 08:46:45 PM
Hey, I'm using the LazyLib mod for the UomozSector mods, and every time I start up the game with both it gives me this error:

(http://i.imgur.com/s92VHUl.png)

No idea how to fix it.
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: xenoargh on January 09, 2014, 09:45:25 PM
Sounds like Uomoz needs to update his mod.  LazyLibCombatPlugin is deprecated.
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on January 10, 2014, 02:05:41 AM
You can fix it by opening the US mod folder, going to data/scripts/plugins and deleting LazyLibCombatPlugin.java.
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: Uomoz on January 10, 2014, 02:16:11 AM
Sounds like Uomoz needs to update his mod.  LazyLibCombatPlugin is deprecated.

It's not present in the current release, as far as i know.
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on January 10, 2014, 02:32:13 AM
It's not present in the current release, as far as i know.

I was wondering about that. I know the vast majority of crashes go unreported, but to only get a report about my mod causing a guaranteed crash in one of the most popular mods on the forum a month later? :P

Also, is it weird to say I found the history of this particular crash fascinating? That plugin is a relic from the pre-1.0 (http://fractalsoftworks.com/forum/index.php?topic=5444.msg88929#msg88929)
version of LazyLib, and was probably only there because your compilation was one of the mods to use the old bundled version of LazyLib and keeping the plugin around wouldn't have caused any problems until 1.7 was released. :)
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: Himntor on January 10, 2014, 12:34:35 PM
Fixed it, but there wasn't a LazyLib combat plugin file where you said. Had to delete the one that was in the LL mod file, not the US. Thanks though! Still helped.
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on January 10, 2014, 12:58:50 PM
Ah, glad to hear you got it fixed.

You should always delete a mod's old folder before installing a new version (this goes for any mod). If you don't, files that were removed in the new version will be left floating around and can cause errors. :)
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: Az the Squishy on January 12, 2014, 01:19:33 PM
Hail the mighty Lazy!

(awesome code~!)

But i'm having an issue with the Vacuum mod with LazyLib, it tries toload but stops mid way stating an errror similar Himntor's,

I look in the log an THIS, is what I get.
Spoiler
Code
Caused by: org.codehaus.commons.compiler.CompileException: File data/scripts/plugins/LazyLibCombatHook.java, Line 5, Column 13: No applicable constructor/method found for zero actual parameters; candidates are: "org.lazywizard.lazylib.combat.CombatUtils()"
at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:9403)
at org.codehaus.janino.UnitCompiler.findMostSpecificIInvocable(UnitCompiler.java:6994)
at org.codehaus.janino.UnitCompiler.invokeConstructor(UnitCompiler.java:5975)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2524)
at org.codehaus.janino.UnitCompiler.access$24(UnitCompiler.java:2503)
at org.codehaus.janino.UnitCompiler$5.visitSuperConstructorInvocation(UnitCompiler.java:942)
at org.codehaus.janino.Java$SuperConstructorInvocation.accept(Java.java:2798)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:946)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2071)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:539)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:421)
at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java:376)
at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:765)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:383)
at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:352)
at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:210)
... 5 more
[close]
So i'm going to try an delete the flie see if that works, or Wait for Vacuum to update.

Az out. :P
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on January 12, 2014, 01:28:18 PM
The latest Vacuum should include 1.7. Are you sure you're running the latest build, and did you delete your old mod folder before upgrading?

Either way, deleting the file should fix it. :)
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: Az the Squishy on January 12, 2014, 01:49:37 PM
Huh, okay... it works, i think?... I'm going to have to take a look at the forums and see if i'm missing anythingin particular, the game doesn't show the ships correctly... and I go at a bun of 14~!!... ... Not normal as far as i can tell.
But it works, kind'a, now.
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: LazyWizard on January 12, 2014, 01:58:56 PM
You may want to check with xenoargh about that. LazyLib doesn't actually change anything in your game, it's just a collection of methods that modders can call to avoid writing massive amounts of code themselves. :)
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: Trylobot on January 15, 2014, 08:05:58 AM
I'm sure this kind of thing probably drives purists insane. :D

In all seriousness, LazyWizard, there's no such thing as a purist in the context we are programming in. If you think about it for a moment, There really were no 3D-accelerated Java games before LWJGL came along. And while I'm certain that it's been around for a while, I'd never even heard of it until Minecraft. Point being? Java programmers aren't really used to being on what I'll call the razor's edge of performance that is video game programming, arguably the hardest kind of programming. It requires us to not only be thorough and impartial computer scientists, but also requires an extensive base of domain-specific knowledge and current techniques from academia. I might be overdramatizing, but the purists should learn from us.
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: xenoargh on January 15, 2014, 08:56:41 AM
Well, I hope they aren't learning from me, hah!
Title: Re: LazyLib v1.7 (.6.1a, released 2013-12-18)
Post by: Farlarzia on January 18, 2014, 01:18:37 PM
Just wondering does this work for 0.6.2a? The combat radar is for 0.6.2a, and requires Lazylib that states its for 0.6.1a, so im just wondering if it works.
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: LazyWizard on January 18, 2014, 01:23:06 PM
It works. LazyLib should work with any new version as long as the API didn't have a breaking change. :)
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: Farlarzia on January 18, 2014, 01:26:19 PM
Ok then thanks, just checking  :)
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: TheNewCongalala on January 29, 2014, 07:16:03 AM
heya,

i have been using some mods, mainly stuff that is compatible with exerelin. but now almost every time i go into combat it crashes and this error comes up

102172 [Thread-5] ERROR com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.NoSuchMethodError: org.lazywizard.lazylib.MathUtils.isPointOnLine(Lorg/lwjgl/util/vector/Vector2f;Lorg/lwjgl/util/vector/Vector2f;Lorg/lwjgl/util/vector/Vector2f;)Z
java.lang.NoSuchMethodError: org.lazywizard.lazylib.MathUtils.isPointOnLine(Lorg/lwjgl/util/vector/Vector2f;Lorg/lwjgl/util/vector/Vector2f;Lorg/lwjgl/util/vector/Vector2f;)Z
   at org.lazywizard.lazylib.CollisionUtils.getCollisionPoint(CollisionUtils.java:90)
   at org.lazywizard.lazylib.CollisionUtils.getCollisionPoint(CollisionUtils.java:53)
   at data.scripts.plugins.WraithiiOnHitEffect.onHit(WraithiiOnHitEffect.java:35)
   at com.fs.starfarer.combat.entities.Missile.notifyDealtDamage(Unknown Source)
   at com.fs.starfarer.combat.o0OO.A.String.o00000(Unknown Source)
   at com.fs.starfarer.combat.o0OO.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.o0OO.B.o00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.G.ร˜ร“ร’000(Unknown Source)
   at com.fs.oOOO.A.ร’00000(Unknown Source)
   at com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

(even stopped most of the mods to see if it was some sort of compatibility issue). here is the list i run on starsector 0.6.2A
Exerelin 0.631 (i did update this from 0.63 but i did what the guide said so that shouldn't be a problem i hope)
Galatia Complete
Gedune
Interstellar federation V1.2.7
Omni complex 1.21
TuP V5a
Nomands mod
Hiigaran Descendants 1.1.0
Neutrion Corp. 1.75
Tradewinds 0.3
and last but not least Lazy Lib 1.7
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: xenoargh on January 29, 2014, 08:20:45 AM
It's not Lazylib's fault, though; if I'm reading the crash log correctly, WraithiiOnHitEffect sent over 3 Vector2fs to LazyLib's isPointOnLine, which only takes two Vector2fs (2 points on a line segment, duh).  

It's basically a problem with somebody else's code there :)
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: Hyph_K31 on January 29, 2014, 08:55:42 AM
That'd be mine! That on hit effect is simply a renamed copy of Xeno's heat projectile plugin, all I've done to it is change a few number values. So, if anyone knows how to fix it, Xeno does ;)

That said though, I've never come across this bug myself... Something else may be at play.

Edit:

Just re-downloaded LazyLib, and ran the game only with that and my mod. Shot a fair number of the missiles that use the plugin in question. No problems here.
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: xenoargh on January 29, 2014, 09:12:36 AM
Which "heat" weapon are you referring to?  HellBoreOnHitEffect or the Melter / MegaBeam scripts? 

The current (unreleased) version of the HellBoreOnHitEffect does something new now that more-accurately reflects what it said on the tin, but it only did basic checks to get a point within the bounds of the ShipAPI before. 

It's perhaps possible that there's a bug in isPointWithinBounds that might feed in 3 Vector2fs under weird circumstances, but I can't imagine what, and I've never seen this error before.

Anyhow, LazyWizard, here's the implementation of that, the way the Melter does it- it's worked without errors forever, though, so I'm pretty sure it's not something in my code, unless Gedune's using a really old version or something really weird is happening.

Spoiler
Code: java
			if (target != null && beam.getBrightness() >= 1f) 
{
WeaponAPI weapon = beam.getWeapon();
if(weapon == null) return;
DerivedWeaponStatsAPI stats = weapon.getDerivedStats();
float dam = stats.getBurstDamage();
DamageType damType = weapon.getDamageType();
int heatMe = (int) Math.max(6f,dam / 2500f);
//Damage is now reduced, now that we have the "coverage"
dam  *= 0.25f;

Vector2f targLoc = target.getLocation();
for(int i = 0; i < heatMe; i++)
{
//Gets a point far, far away and uses it as our ray-test point.  Long distances work better than shorter ones.
Vector2f cloneLoc = MathUtils.getRandomPointInCircle(targLoc, target.getCollisionRadius() * 1.25f);
Vector2f colPoint;
//Are we in the bounds?
if(!CollisionUtils.isPointWithinBounds(cloneLoc, target))
{
//Try to get a valid collision point between our explosion's point source and the Entity.
colPoint = CollisionUtils.getCollisionPoint(cloneLoc, targLoc, target);
} else {
colPoint = cloneLoc;
}


//If we can't get a good collision point, use the center of the target Entity.  This is potentially a balance issue (hits all going to one armor cell are pretty OP lol), but this case mainly covers little teeny drones and suchlike that should be registering hits from giant explosions nearby, but often don't, for whatever reason.  Bigger things rarely fail, so it usually works out.
if(colPoint == null) colPoint = targLoc;
if(colPoint != null)//Must check this, getCollisionPoint returns null fairly frequently and that's a wrap
{
engine.applyDamage(
target, //enemy Entity
colPoint, //Our 2D vector to the exact world-position of the collision
dam, //DPS modified by the damage multiplier
damType, //Using the damage type here, so that Kinetic / Explosive / Fragmentation AOE works.
0f, //EMP (if any)
false, //Does not bypass shields.
false, //Does not do Soft Flux damage (unless you want it to for some strange reason)
beam.getSource()  //Who owns this projectile?
);
}
}
}
[close]

Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: Hyph_K31 on January 29, 2014, 09:20:03 AM
"Heat" special projectile type.  
When it (beam / projectile) hits, it generates multiple sub-hits around the target, potentially bypassing the shields.  Thus it can knock out engines even as the target attempts to retreat and other Fun Things.  
It's insidiously powerful; feel free to combine it with AOE for the ultimate in "crisping" fun.  Space napalm, baby.
Requires LazyLib.

First page of the radioactive code dump.
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: xenoargh on January 29, 2014, 09:31:14 AM
OK, that's basically the same code, and I've seen it in action... er... thousands of times, probably, without having it ever crash.

So long as all you changed in the "numbers" was the basic balance stuff (i.e., the damage dealt, or the repeats) it shouldn't be doing that, period.  I don't think it's there or in LazyLib then, but that's basically what the error appears to be saying here:

Code
java.lang.NoSuchMethodError: org.lazywizard.lazylib.MathUtils.isPointOnLine(Lorg/lwjgl/util/vector/Vector2f;Lorg/lwjgl/util/vector/Vector2f;Lorg/lwjgl/util/vector/Vector2f;)Z

So I'm kind of perplexed.  I'll go check and see where isPointOnLine gets invoked there.

Hrmm.  Even more confused; isPointOnLine expects 3 Vector2fs, but it's saying that there's no such method?  Weird.
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: xenoargh on January 29, 2014, 09:42:33 AM
Hmm.

Maybe it's that call within isPointWithinBounds(), then?

But if that's it... it means one of your mods you're playing must have a ship that doesn't have proper Bounds set up.  But to cause the issue, based on what I'm seeing there, it'd need to have Bounds with only one line segment defined (because if it's only a point, it should be returning null when it checks for whether the ship has bounds at all, which it checks for), which is absurd, but vaguely possible.  I'd be surprised if that didn't cause an engine crash on load, though; I don't think Ships are allowed if they don't have Bounds... or are they?

There's no way I'm going to check every single one of those ships in all those mods out just to verify that its due to somebody being amazingly sloppy, though.  Can you reproduce this error consistently with any particular ships?
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: LazyWizard on January 29, 2014, 02:45:06 PM
It's caused by the Omni Complex mod. That has an old version (0.1b?!) of LazyLib included, and it's loading that mod's version of MathUtils instead of LazyLib's. Hence the game not finding a method that clearly exists. :)

(this would be why I don't like other mods including LazyLib in their download unless they are a total conversion, btw)

Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: xenoargh on January 29, 2014, 02:58:46 PM
Ah, makes sense.  In fact, it makes me think I should re-label LazyLib in Vacuum to make sure that can't even happen, but I'd have to do it every time you update.  But it raises a question:  shouldn't your latest version overwrite the old versions?  If not, that sounds like a feature request to me.
Title: Re: LazyLib v1.7 (.6.2a, released 2013-12-18)
Post by: TheNewCongalala on January 29, 2014, 05:10:39 PM
It's caused by the Omni Complex mod. That has an old version (0.1b?!) of LazyLib included, and it's loading that mod's version of MathUtils instead of LazyLib's. Hence the game not finding a method that clearly exists. :)

(this would be why I don't like other mods including LazyLib in their download unless they are a total conversion, btw)



Thank you. i didn't realize that was the problem.
Title: Re: LazyLib v1.8 (.6.2a, released 2014-02-16)
Post by: LazyWizard on February 16, 2014, 10:31:52 AM
1.8 is up, get it here (http://www.mediafire.com/download/klyy77id9tf48es/LazyLib_1.8.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%201.8.zip)).

There's not much in the way of new features in this one, but there has been a lot of optimization and bugfixing in the months since 1.7. Modders, the behavior of the getNearestX() methods has been altered. They now include radius in their check, so a small fighter next to a large capital ship won't register as closer anymore. You shouldn't have to change anything in your code, it will just be more accurate now. :)


Important notice for modders using this library:
Soon after the next major Starsector version is released, I will be bumping this library's version to 2.0 and removing all deprecated methods from the code. I've included some functionality to help modders root out any usages of these methods - you can enable these tools in lazylib_settings.json.

As of 1.8 there are just over 40 deprecated methods in this library. For a complete list of these methods and their replacements, open index.html in Javadoc.zip and click on 'Deprecated' at the top of the page.

If you aren't confident in your Java skills or just don't want to bother, you can send me a copy of your mod's code and I'll do the work for you. :)


Full changelog:
Quote
1.8 (February 16, 2014)
=========================
Updated codebase to use Java 7 language features
Log now includes class and line number of caller if 'logDeprecated' is true
Changed all getXInRange()/getNearbyX() to use new MathUtils.isWithinRange()
 - Should provide a noticeable speed boost for those methods dealing with an
   object that has a collision/interaction radius
Added org.lazywizard.lazylib.JSONUtils:
 - toColor(JSONArray array), for reading colors from JSON/CSV files
Added org.lazywizard.lazylib.StringUtils:
 - wrapString(String toWrap, int maxLineLength)
 - indent(String toIndent, String indentWith)
Changes to AIUtils:
 - getNearestEnemy() now includes collision radius in its checks
 - getNearestAlly() now includes collision radius in its checks
 - getNearestShip() now includes collision radius in its checks
Changes to AnchoredEntity:
 - Changed variables from private to protected for easier subclassing
 - Added reanchor(CombatEntityAPI newAnchor, Vector2f newLocation)
Changes to DrawUtils:
 - Added drawFilled boolean parameter to drawArc(), deprecated old version
Changes to MathUtils:
 - Added isWithinRange(SectorEntityToken token1, SectorEntityToken token2,
   float range)
 - Added isWithinRange(SectorEntityToken token, Vector2f loc, float range)
 - Added isWithinRange(CombatEntityAPI entity1, CombatEntityAPI entity2,
   float range)
 - Added isWithinRange(CombatEntityAPI entity, Vector2f loc, float range)
 - Added isWithinRange(Vector2f loc1, Vector2f loc2, float range)
Changes to FleetUtils:
 - Added isShipInFleet(String fleetMemberId, CampaignFleetAPI fleet),
   can be used with FleetMemberAPI.getId() or ShipAPI.getFleetMemberId()
 - getNearestEnemyFleet() now includes interaction radius in its checks
 - getNearestAlliedFleet() now includes interaction radius in its checks
 - getNearestFleet() now includes interaction radius in its checks
Changes to SimpleEntity:
 - Changed variables from private to protected for easier subclassing
Changes to VectorUtils:
 - Added getDirectionalVector(Vector2f source, Vector2f destination)
Changes to WeaponUtils:
 - Fixed bug where isWithinArc() was using double the entity's actual collision
   radius in its calculations
 - getNearestAllyInArc() now includes collision radius in its checks
 - getNearestEnemyInArc() now includes collision radius in its checks
Deprecated in DrawUtils:
 - Deprecated drawArc(float centerX, float centerY, float radius,
   float startAngle, float arcAngle, int numSegments)
Deprecated in MathUtils:
 - Deprecated getDirectionalVector(Vector2f source, Vector2f destination),
   moved to VectorUtils
Title: Re: LazyLib v1.8 (.6.2a, released 2014-02-16)
Post by: Uomoz on February 16, 2014, 10:47:24 AM
Hi there LW. I still use the CollectionUtils weighted random deprecated method in UsS as it's a bit different from the one in vanilla (as far as I understand). Would it be fair to ask you to keep that?

EDIT: belay that! Fixed my code to use vanilla implementation.
Title: Re: LazyLib v1.8 (.6.2a, released 2014-02-16)
Post by: Debido on February 23, 2014, 03:45:55 AM
Thank you for the new release Lazy Wizard, a fantastic contribution to the community.
Title: Re: LazyLib v1.8b (.6.2a, released 2014-03-07)
Post by: LazyWizard on March 07, 2014, 06:06:03 PM
1.8b is up, get it here (http://www.mediafire.com/download/ob1mc3l0uvuhnd1/LazyLib_1.8b.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%201.8b.zip)).

This is just a minor bugfix patch. Thanks to xenoargh and Dark.Revenant for pointing out a few problem areas. :)

Changelog:
Quote
1.8b (March 07, 2014)
=======================
Added "enableCaching" to lazylib_settings.json, on by default
Changes to AIUtils:
 - getEnemiesOnMap() will now store the results for faster consecutive calls
   during the same frame if caching is enabled, also affects all other
   enemy-filtering methods as they use getEnemiesOnMap() internally
Changes to CollisionUtils:
 - Fixed getCollisionPoint() actually returning the furthest collision instead
   of the closest (oops)
 - isPointOnSegment() is now only accurate to within 1/3 su,
   use MathUtils.isPointOnLine() if you need strict accuracy
Changes to LazyLib:
 - Added isCachingEnabled()
Changes to WeaponUtils:
 - Fixed an edge case bug with isWithinArc() and entities just outside the arc


And again, an important notice for modders using this library:
Quote
Soon after the next major Starsector version is released, I will be bumping this library's version to 2.0 and removing all deprecated methods from the code. I've included some functionality to help modders root out any usages of these methods - you can enable these tools in lazylib_settings.json.

As of 1.8 there are just over 40 deprecated methods in this library. For a complete list of these methods and their replacements, open index.html in Javadoc.zip and click on 'Deprecated' at the top of the page.

If you aren't confident in your Java skills or just don't want to bother, you can send me a copy of your mod's code and I'll do the work for you. :)

I've uploaded a version of 1.8b that has all the deprecated methods removed. Modders who want to make absolutely sure their mod is ready can download that version here (http://www.mediafire.com/download/fx1epnyg0ueaa45/LazyLib_1.8b_nodeprecated.zip) (you will need to untag the regular version of LazyLib and tag this one in the launcher).
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: LazyWizard on March 07, 2014, 09:04:35 PM
1.8c is up (already), get it here (http://www.mediafire.com/download/di7yxv3hjpee7lw/LazyLib_1.8c.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%201.8c.zip)).

Looks like I missed a bug. Thanks again to Dark.Revenant for pointing this one out. :)

Changelog:
Quote
1.8c (March 07, 2014)
=======================
Changes to VectorUtils:
 - Fixed rotate() and rotateAroundPivot() issues (they were using radians
   instead of degrees like every other Starsector/LazyLib method does)


And again, an important notice for modders using this library:
Quote
Soon after the next major Starsector version is released, I will be bumping this library's version to 2.0 and removing all deprecated methods from the code. I've included some functionality to help modders root out any usages of these methods - you can enable these tools in lazylib_settings.json.

As of 1.8 there are just over 40 deprecated methods in this library. For a complete list of these methods and their replacements, open index.html in Javadoc.zip and click on 'Deprecated' at the top of the page.

If you aren't confident in your Java skills or just don't want to bother, you can send me a copy of your mod's code and I'll do the work for you. :)

I've uploaded a version of 1.8c that has all the deprecated methods removed. Modders who want to make absolutely sure their mod is ready can download that version here (http://www.mediafire.com/download/fjywky27x6v57a6/LazyLib_1.8c_nodeprecated.zip) (you will need to untag the regular version of LazyLib and tag this one in the launcher).

Please note that only loose scripts will cause a crash on startup if they are using a deprecated method, as the compilation step will fail. Pre-compiled code (jars, in other words) will only crash when their script tries to call the non-existent method.
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: Debido on April 23, 2014, 03:26:36 AM
getFleetMember(ShipAPI ship) is returning a null pointer for some reason. This is version 1.8c whilst in a campaign combat scenario.

Anyone else experiencing this?
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: LazyWizard on April 23, 2014, 04:40:13 AM
As in the method itself causes a null pointer exception, or it's returning a null value?
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: Debido on April 23, 2014, 06:33:36 PM
I'll let this picture show you what I mean. I think it is returning a null value.

In the instance below reviveTarget is a valid ship and FleetAPIData is me calling with the util.


Spoiler
(http://s5.postimg.org/v0lqszd6f/Fleet_Member_Bug.png)
[close]
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: LazyWizard on April 26, 2014, 10:40:07 AM
Is this the same code from this bug report (http://fractalsoftworks.com/forum/index.php?topic=7941.0)? As far as I know, if you spawned the ship in battle there wouldn't be a fleet member registered for it.
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: Debido on April 27, 2014, 07:34:52 AM
Although the combat engine is just...bizarre when it comes to registering fleet members, at that particular stage in the script a ship that has not yet been spawned (an original fleet ship) is being used.
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: KBP on May 06, 2014, 02:13:34 PM
so can someone help me with this

53622 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.UnsupportedClassVersionError: org/lazywizard/lazylib/CollectionUtils : Unsupported major.minor version 51.0
java.lang.UnsupportedClassVersionError: org/lazywizard/lazylib/CollectionUtils : Unsupported major.minor version 51.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at org.codehaus.janino.ClassLoaderIClassLoader.findIClass(ClassLoaderIClassLoader.java:80)
   at org.codehaus.janino.IClassLoader.loadIClass(IClassLoader.java:158)
   at org.codehaus.janino.IClassLoader.loadIClass(IClassLoader.java:124)
   at org.codehaus.janino.UnitCompiler.loadFullyQualifiedClass(UnitCompiler.java:9121)
   at org.codehaus.janino.UnitCompiler.import2(UnitCompiler.java:254)
   at org.codehaus.janino.UnitCompiler.access$0(UnitCompiler.java:240)
   at org.codehaus.janino.UnitCompiler$1.visitSingleTypeImportDeclaration(UnitCompiler.java:230)
   at org.codehaus.janino.Java$CompilationUnit$SingleTypeImportDeclaration.accept(Java.java:170)
   at org.codehaus.janino.UnitCompiler.<init>(UnitCompiler.java:228)
   at org.codehaus.janino.JavaSourceIClassLoader.findIClass(JavaSourceIClassLoader.java:154)
   at org.codehaus.janino.IClassLoader.loadIClass(IClassLoader.java:158)
   at org.codehaus.janino.UnitCompiler.findClassByName(UnitCompiler.java:6333)
   at org.codehaus.janino.UnitCompiler.getType2(UnitCompiler.java:4834)
   at org.codehaus.janino.UnitCompiler.access$108(UnitCompiler.java:4764)
   at org.codehaus.janino.UnitCompiler$17.visitReferenceType(UnitCompiler.java:4704)
   at org.codehaus.janino.Java$ReferenceType.accept(Java.java:2026)
   at org.codehaus.janino.UnitCompiler.getType(UnitCompiler.java:4743)
   at org.codehaus.janino.UnitCompiler.getLocalVariable(UnitCompiler.java:1680)
   at org.codehaus.janino.UnitCompiler.buildLocalVariableMap(UnitCompiler.java:2310)
   at org.codehaus.janino.UnitCompiler.access$37(UnitCompiler.java:2302)
   at org.codehaus.janino.UnitCompiler$7.visitLocalVariableDeclarationStatement(UnitCompiler.java:2225)
   at org.codehaus.janino.Java$LocalVariableDeclarationStatement.accept(Java.java:1767)
   at org.codehaus.janino.UnitCompiler.buildLocalVariableMap(UnitCompiler.java:2228)
   at org.codehaus.janino.UnitCompiler.buildLocalVariableMap(UnitCompiler.java:2189)
   at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:2039)
   at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:851)
   at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:832)
   at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:528)
   at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:421)
   at org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java:376)
   at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:765)
   at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:383)
   at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:352)
   at org.codehaus.janino.JavaSourceClassLoader.generateBytecodes(JavaSourceClassLoader.java:210)
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:164)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:247)
   at com.fs.starfarer.loading.scripts.ScriptStore.o00000(Unknown Source)
   at com.fs.starfarer.launcher.ModManager.รด00000(Unknown Source)
   at com.fs.starfarer.loading.null.super(Unknown Source)
   at com.fs.super.oOOO.ร’00000(Unknown Source)
   at com.fs.starfarer.combat.String.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: LazyWizard on May 06, 2014, 02:37:25 PM
Are you running an outdated version of Starsector? The latest SS release (.6.2a, found here (http://fractalsoftworks.com/preorder/)) changed the bundled JRE to Java 7 (it was 6), so the newer versions of LazyLib require Java 7.
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: KBP on May 06, 2014, 02:42:17 PM
yah sorry i was running an outdated version ;D sorry to have bother you
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: KBP on May 06, 2014, 02:55:03 PM
Now i could use your help, whenever i increase my vmparams higher than 2048-2048 it won't even open the little launcher
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: LazyWizard on May 06, 2014, 03:04:27 PM
The Java version bundled with Starsector is 32-bit. If you have a 64-bit system and want to use more memory, you'll need to download/point SS at a 64-bit version of Java.

There are instructions on how to do this in the Exerelin thread (http://fractalsoftworks.com/forum/index.php?topic=6053.0) (under Important Mod Requirements).
Title: Re: LazyLib v1.8c (.6.2a, released 2014-03-07)
Post by: KBP on May 06, 2014, 03:12:26 PM
Thanks yet again ;D
Title: Re: LazyLib v1.9 (.6.2a, released 2014-07-04)
Post by: LazyWizard on July 04, 2014, 04:36:29 PM
1.9 is up, get it here (http://www.mediafire.com/download/5ft5ki86i55l116/LazyLib_1.9.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%201.9.zip)).

This will be the last major LazyLib release until after the next Starsector update. Bugfixes are still possible, of course. :)

Changelog:
Quote
1.9 (July 04, 2014)
=====================
The game no longer crashes if a setting is missing from LazyLib's config file
Added org.lazywizard.lazylib.EllipseUtils:
 - By popular request, this includes methods to deal with elliptical shapes
 - Put into its own class to avoid further clutter in MathUtils
 - getPointOnEllipse(Vector2f ellipseCenter, float ellipseWidth,
   float ellipseHeight, float ellipseAngleOffset, float angle)
 - getRandomPointOnEllipse(Vector2f ellipseCenter, float ellipseWidth,
   float ellipseHeight, float ellipseAngleOffset)
 - isPointWithinEllipse(Vector2f point, Vector2f ellipseCenter,
   float ellipseWidth, float ellipseHeight, float ellipseAngleOffset)
Added org.lazywizard.lazylib.campaign.orbits.EllipticalOrbit:
 - Implementation of OrbitAPI that travels along an elliptical path
Added org.lazywizard.lazylib.opengl.ColorUtils:
 - glColor(Color color)
 - glColor(Color color, float alphaMult, boolean overrideOriginalAlpha)
Changes to AIUtils:
 - Added getBestInterceptPoint(Vector2f point, float speed,
   Vector2f targetLoc, Vector2f targetVel) - all credit goes to Dark.Revenant
Changes to CargoUtils:
 - Added moveMothballedShips(CargoAPI from, CargoAPI to)
Changes to CollisionUtils:
 - Fixed getCollisionPoint() not properly updating the bounds facing/position
Changes to CombatUtils:
 - Fixed getFleetMember() returning null when a hulk is passed in
 - Added spawnShipOrWingDirectly(String variantId, FleetMemberType type,
   FleetSide side, float combatReadiness, Vector2f location, float facing)
   NOTE: This does not work in campaign using the vanilla FleetEncounterContext!
Changes to DrawUtils:
 - Added drawEllipse(float centerX, float centerY, float width, float height,
   float angleOffset, int numSegments, boolean drawFilled)
Changes to MathUtils:
 - isPointWithinCircle() now returns true for points along the circumference
 - Optimized getPointsAlongCircumference() and large numbers of points
 - Added getMidpoint(Vector2f point1, Vector2f point2)
Changes to StringUtils:
 - Fixed wrapString() appending a newline when the input string didn't have one
 - Also fixed a rare bug with wrapString() where it wouldn't include the last
   segment of a wrapped word if it was the final word in the entire String


And once again, an important notice for modders using this library:
Quote
Soon after the next major Starsector version is released, I will be bumping this library's version to 2.0 and removing all deprecated methods from the code. I've included some functionality to help modders root out any usages of these methods - you can enable these tools in lazylib_settings.json.

As of 1.9 there are just over 40 deprecated methods in this library. For a complete list of these methods and their replacements, open index.html in javadoc.zip and click on 'Deprecated' at the top of the page.

If you aren't confident in your Java skills or just don't want to bother, you can send me a copy of your mod's code and I'll do the work for you. :)

I've uploaded a version of 1.9 that has all the deprecated methods removed. Modders who want to make absolutely sure their mod is ready can download that version here (http://www.mediafire.com/download/cbrswxnbl9mj5xz/LazyLib_1.9_nodeprecated.zip) (you will need to untag the regular version of LazyLib and tag this one in the launcher).

Please note that only loose scripts will cause a crash on startup (when compilation fails). If you're using jars, you'll need to swap out the LazyLib.jar you're using as a library in your IDE with the nodep version and do a clean build.
Title: Re: LazyLib v1.9 (.6.2a, released 2014-07-04)
Post by: Dark.Revenant on July 05, 2014, 09:56:12 PM
I believe you forgot to update the javadoc in the download.
Title: Re: LazyLib v1.9 (.6.2a, released 2014-07-04)
Post by: LazyWizard on July 06, 2014, 04:46:52 AM
Re-uploaded with the new Javadoc, thanks for informing me.

I did update the Javadoc, actually, but a symbolic link broke somewhere and my mod folder didn't reflect the changes.
Title: Re: LazyLib v1.9 (.6.2a, released 2014-07-04)
Post by: Dark.Revenant on July 06, 2014, 04:58:48 AM
Alright, groovy.
Title: Re: LazyLib v1.9b (.6.2a, released 2014-08-27)
Post by: LazyWizard on August 27, 2014, 01:24:43 AM
1.9b is up, get it here (http://www.mediafire.com/download/dq0xfb9mhsxy7cc/LazyLib_1.9b.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%201.9b.zip)).

This release is mostly an excuse to add support for the new Version Checker mod (http://fractalsoftworks.com/forum/index.php?topic=8181.0). With that mod you'll be notified when a new LazyLib is released instead of waiting until a mod starts crashing to find out. ;)

Changelog:
Quote
1.9b (August 27, 2014)
========================
Minor optimizations
Added support for Version Checker update notifications
Added org.lazywizard.lazylib.ModUtils:
 - This class helps with non-gameplay related modding tasks
 - isClassPresent(String classCanonicalName)
Changes to SimpleEntity:
 - Added a constructor for mimicking the location of a ShipEngineAPI
 - Added getEngine() method, returns null if another constructor was used


And once again, an important notice for modders using this library:
Quote
Soon after the next major Starsector version is released, I will be bumping this library's version to 2.0 and removing all deprecated methods from the code. I've included some functionality to help modders root out any usages of these methods - you can enable these tools in lazylib_settings.json.

As of 1.9b there are just over 40 deprecated methods in this library. For a complete list of these methods and their replacements, open index.html in javadoc.zip and click on 'Deprecated' at the top of the page.

If you aren't confident in your Java skills or just don't want to bother, you can send me a copy of your mod's code and I'll do the work for you. :)

I've uploaded a version of 1.9b that has all the deprecated methods removed. Modders who want to make absolutely sure their mod is ready can download that version here (http://www.mediafire.com/download/oawj8qez1scxghd/LazyLib_1.9b_nodeprecated.zip) (you will need to untag the regular version of LazyLib and tag this one in the launcher).

Please note that only loose scripts will cause a crash on startup (when compilation fails). If you're using jars, you'll need to swap out the LazyLib.jar you're using as a library in your IDE with the nodep version and do a clean build.
Title: Re: LazyLib v1.9b (.6.2a, released 2014-08-27)
Post by: LazyWizard on October 02, 2014, 07:42:02 AM
Another important notice for modders using this library:

Since the majority of its methods will become useless with the addition of reputation levels in .65a, I'm planning on removing FleetUtils and replacing it with a more general class named CampaignUtils.

I apologize for the relatively short notice on this. Luckily, to the best of my knowledge absolutely nobody is using FleetUtils, which should tell you all you need to know about how useful it was. ;)

...

Oh, and I should also mention that other warning for those who haven't already seen it a dozen times.
Quote
And once again, an important notice for modders using this library:
Quote
Soon after the next major Starsector version is released, I will be bumping this library's version to 2.0 and removing all deprecated methods from the code. I've included some functionality to help modders root out any usages of these methods - you can enable these tools in lazylib_settings.json.

As of 1.9b there are just over 40 deprecated methods in this library. For a complete list of these methods and their replacements, open index.html in javadoc.zip and click on 'Deprecated' at the top of the page.

If you aren't confident in your Java skills or just don't want to bother, you can send me a copy of your mod's code and I'll do the work for you. :)

I've uploaded a version of 1.9b that has all the deprecated methods removed. Modders who want to make absolutely sure their mod is ready can download that version here (http://www.mediafire.com/download/oawj8qez1scxghd/LazyLib_1.9b_nodeprecated.zip) (you will need to untag the regular version of LazyLib and tag this one in the launcher).

Please note that only loose scripts will cause a crash on startup (when compilation fails). If you're using jars, you'll need to swap out the LazyLib.jar you're using as a library in your IDE with the nodep version and do a clean build.
Title: Re: LazyLib v1.9b (.6.2a, released 2014-08-27)
Post by: xenoargh on October 02, 2014, 10:01:57 AM
Quote
absolutely nobody is using FleetUtils
I used getEnemyFleetsInSystem() when I developed the new fleet AI stuff.  I don't think I used any of it otherwise :)  Anyhow, ported it out, so no need to worry about whether any of those methods still exist :)
Title: Re: LazyLib v1.9b (.6.2a, released 2014-08-27)
Post by: LazyWizard on October 02, 2014, 10:14:40 AM
Methods like that will still exist, they will just be in CampaignUtils, take SectorEntityTokens instead of CampaignFleetAPIs (no idea why I limited FleetUtils like that), and include RepLevels as an argument.

So the new equivalent would be something like CampaignUtils.getFleetsBelowRep(player, RepLevel.NEUTRAL)
Title: Re: LazyLib v1.9b (.6.2a, released 2014-08-27)
Post by: xenoargh on October 02, 2014, 10:19:07 AM
CampaignFleetAPI is not going away, though, right?  Haven't had a chance to diff the new API...
Title: Re: LazyLib v1.9b (.6.2a, released 2014-08-27)
Post by: LazyWizard on October 02, 2014, 10:41:25 AM
CampaignFleetAPI is still there. I meant that I changed the method arguments to use SectorEntityToken instead of only allowing CampaignFleetAPIs (which is a subinterface of SectorEntityToken).

That just means that you can pass in fleets, stations, asteroids, jump points, etc; allowing for things like getNearbyFleets(station, 500f). Restricting the methods to fleets was a bad design decision, so I'm taking the opportunity to fix it. :)
Title: Re: LazyLib v2.0 (.65a, released 2014-10-20)
Post by: LazyWizard on October 20, 2014, 01:47:15 PM
2.0 is up, get it here (http://www.mediafire.com/download/d59ew5qv6g5xc0q/LazyLib_2.0.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.0.zip)).

This release mostly removes all the deprecated methods that have been cluttering this library for the last several versions. It also expands campaign functionality to support custom entities and the new .65a faction relationship system, as well as fixes a few bugs.

I should note that this hasn't been thoroughly tested yet (.65a was only released half an hour ago), so a patch might be coming soon if something doesn't work properly. I felt it was more important to get a release out quickly so other modders could update their own mods. :)

If you're waiting on any of my other mods, those will probably be updated tomorrow.

Changelog:
Spoiler
Quote
2.0 (October 20, 2014)
========================
Updated to be compatible with Starsector .65a
Renamed FleetUtils to CampaignUtils
Changes to CampaignUtils:
 - Changed all method arguments to use a SectorEntityToken instead of a
   CampaignFleetAPI wherever applicable
 - Removed methods that RepLevel now handles
 - Removed methods that search for a specific subclass of SectorEntityToken
   in favor of more generic methods
 - Removed areAllies(CampaignFleetAPI fleet1, CampaignFleetAPI fleet2)
 - Removed areEnemies(CampaignFleetAPI fleet1, CampaignFleetAPI fleet2)
 - Removed areNeutral(CampaignFleetAPI fleet1, CampaignFleetAPI fleet2)
 - Removed getNearestFleet(CampaignFleetAPI fleet)
 - Removed getNearestAlliedFleet(CampaignFleetAPI fleet)
 - Removed getNearbyAlliedFleets(CampaignFleetAPI fleet, float range)
 - Removed getAlliedFleetsInSystem(CampaignFleetAPI fleet)
 - Renamed getNearestEnemyFleet() to getNearestHostileFleet(), only returns
   fleets who will actively attack on sight
 - Renamed getNearbyEnemyFleets() to getNearbyHostileFleets(), only returns
   fleets who will actively attack on sight
 - Renamed getEnemyFleetsInSystem() to getHostileFleetsInSystem(), only returns
   fleets who will actively attack on sight
 - Removed getNearestStation(CampaignFleetAPI fleet)
 - Removed getEnemyFleetsInSystem(CampaignFleetAPI)
 - Added areSameFaction(SectorEntityToken token1, SectorEntityToken token2)
 - Added areAtRep(SectorEntityToken token1, SectorEntityToken token2,
   IncludeRep include, RepLevel rep)
 - Added getReputation(SectorEntityToken token1, SectorEntityToken token2)
 - Added getNearestEntityOfType(SectorEntityToken token, Class entityType)
 - Added getNearbyEntitiesOfType(SectorEntityToken token, float range,
   Class entityType)
 - Added getNearestEntityByRep(SectorEntityToken token, Class entityType,
   IncludeRep include, RepLevel rep)
 - Added getEntitiesByRep(SectorEntityToken token, Class entityType,
   IncludeRep include, RepLevel rep)
 - Added getNearbyEntitiesByRep(SectorEntityToken token, float range,
   Class entityType, IncludeRep include, RepLevel rep)
Changes to CargoUtils:
 - Added isShipInMothballed(String fleetMemberId, CargoAPI cargo)
Changes to CombatUtils:
 - Added centerViewport(Vector2f newCenter)
Changes to DefenseUtils:
 - Added hasHullDamage(ShipAPI ship)
 - Added hasArmorDamage(ShipAPI ship)
 - Added getMostDamagedArmorCell(ShipAPI ship)
Changes to EllipseUtils:
 - Added Vector2f getRandomPointInEllipse(Vector2f ellipseCenter,
   float ellipseWidth, float ellipseHeight, float ellipseAngleOffset)
Changes to MathUtils:
 - Added int getRandomNumberInRange(int min, int max)
Changes to VectorUtils:
 - Added List<Vector2f> rotate(List<Vector2f> toRotate, float angle)
 - Added List<Vector2f> rotateAroundPivot(List<Vector2f> toRotate,
   Vector2f pivotPoint, float angle)
Changes to WeaponUtils:
 - Fixed getNearestAllyInArc() returning the host ship
 - Fixed getAlliesInArc() including the host ship
Removed all pre-existing deprecated methods from the code
Removed all methods with a 'sortByDistance' parameter
 - Use Collections.sort(list, new CollectionUtils.SortXByDistance(location))
   instead
Removed from AIUtils:
 - List<ShipAPI> getEnemiesOnMap(CombatEntityAPI entity, boolean sortByDistance)
 - List<ShipAPI> getNearbyEnemies(CombatEntityAPI entity, float range,
   boolean sortByDistance)
 - List<ShipAPI> getAlliesOnMap(CombatEntityAPI entity, boolean sortByDistance)
 - List<ShipAPI> getNearbyAllies(CombatEntityAPI entity, float range,
   boolean sortByDistance)
 - List<MissileAPI> getEnemyMissilesOnMap(CombatEntityAPI entity,
   boolean sortByDistance)
 - List<MissileAPI> getNearbyEnemyMissiles(CombatEntityAPI entity, float range,
   boolean sortByDistance)
Removed from CampaignUtils:
 - List<CampaignFleetAPI> getEnemyFleetsInSystem(CampaignFleetAPI fleet,
   boolean sortByDistance)
 - List<CampaignFleetAPI> getNearbyEnemyFleets(CampaignFleetAPI fleet,
   float range, boolean sortByDistance)
 - List<CampaignFleetAPI> getAlliedFleetsInSystem(CampaignFleetAPI fleet,
   boolean sortByDistance)
 - List<CampaignFleetAPI> getNearbyAlliedFleets(CampaignFleetAPI fleet,
   float range, boolean sortByDistance)
Removed from CollectionUtils:
 - Removed CollectionUtils$SortObjectivesByDistance
   (use SortEntitiesByDistance instead)
 - List<T> weightedRandom(Map<T, Float> pickFrom, int numToPick)
 - T weightedRandom(Map<T, Float> pickFrom)
Removed from CombatUtils:
 - List<DamagingProjectileAPI> getProjectilesWithinRange(Vector2f location,
   float range, boolean sortByDistance)
 - List<MissileAPI> getMissilesWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - List<ShipAPI> getShipsWithinRange(Vector2f location, float range,
   boolean sortByDistance)
 - List<CombatEntityAPI> getAsteroidsWithinRange(Vector2f location,
   float range, boolean sortByDistance)
 - List<BattleObjectiveAPI> getObjectivesWithinRange(Vector2f location,
   float range, boolean sortByDistance)
 - List<CombatEntityAPI> getEntitiesWithinRange(Vector2f location,
   float range, boolean sortByDistance)
 - CombatEngineAPI getCombatEngine()
 - float getElapsedCombatTimeIncludingPaused()
 - float getElapsedCombatTime()
 - float getTimeSinceLastFrame()
Removed from DefenseUtils:
 - Vector2f getArmorCellAtWorldCoord(ShipAPI ship, Vector2f loc)
Removed from DrawUtils:
 - drawArc(float centerX, float centerY, float radius, float startAngle,
   float arcAngle, int numSegments
Removed from MathUtils:
 - float getFacing(Vector2f vector)
   (moved to VectorUtils)
 - float getAngle(Vector2f from, Vector2f to)
   (moved to VectorUtils)
 - Vector2f getDirectionalVector(Vector2f source, Vector2f destination)
   (moved to VectorUtils)
 - Vector2f getDirectionalVector(CombatEntityAPI source, Vector2f destination)
 - Vector2f getDirectionalVector(CombatEntityAPI source,
   CombatEntityAPI destination)
 - boolean isPointWithinBounds(Vector2f point, CombatEntityAPI entity)
   (moved to CollisionUtils)
Removed from WeaponUtils:
 - float calculateActualDamage(float baseDamage, WeaponAPI weapon)
 - float calculateActualDamage(float baseDamage, WeaponAPI weapon,
   ShipAPI target, DefenseType defense)
 - float calculateDamagePerShot(WeaponAPI weapon)
 - float calculateDamagePerShot(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - float calculateDamagePerSecond(WeaponAPI weapon)
 - float calculateDamagePerSecond(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - float calculateDamagePerBurst(WeaponAPI weapon)
 - float calculateDamagePerBurst(WeaponAPI weapon, ShipAPI target,
   DefenseType defense)
 - List<ShipAPI> getEnemiesInArc(WeaponAPI weapon, boolean sortByDistance)
 - List<MissileAPI> getEnemyMissilesInArc(WeaponAPI weapon,
   boolean sortByDistance)
[close]
Title: Re: LazyLib v2.0b (.65a, released 2014-10-20)
Post by: LazyWizard on October 20, 2014, 03:58:33 PM
2.0b is up, get it here (http://www.mediafire.com/download/jqz24xqsya7cv9h/LazyLib_2.0b.zip) (mirror (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.0b.zip)).

Changelog:
Quote
2.0b (October 20, 2014)
=========================
Changes to CampaignUtils:
 - Added getNearestEntityFromFaction(SectorEntityToken token, Class entityType,
   FactionAPI faction)
 - Added getNearbyEntitiesFromFaction(SectorEntityToken token, float range,
   Class entityType, FactionAPI faction)
 - Added getEntitiesFromFaction(LocationAPI location, Class entityType,
   FactionAPI faction)
 - Renamed getXByRep() methods to getXWithRep(), also made them no longer
   include members of the passed in token's faction in their results
Title: Re: [0.65.1a] LazyLib v2.0b (released 2014-10-20)
Post by: Codyrex123 on November 13, 2014, 06:58:48 PM
Errr, Well, i get this error, (seeing as i dont know how to show it other wise) Fatal: org/lazywizard/lazylib/LazyLib : Usupported major.minor version 51.0 Check starsector.log for more info. I havent looked at the log, But anyways, I made sure i capped all that was set capped, so yea,
Title: Re: [0.65.1a] LazyLib v2.0b (released 2014-10-20)
Post by: LazyWizard on November 13, 2014, 07:04:17 PM
Errr, Well, i get this error, (seeing as i dont know how to show it other wise) Fatal: org/lazywizard/lazylib/LazyLib : Usupported major.minor version 51.0 Check starsector.log for more info. I havent looked at the log, But anyways, I made sure i capped all that was set capped, so yea,

I'm guessing you have Starsector set to use your system's java? You probably have an older JRE, Starsector uses Java 7.
Title: Re: [0.65.1a] LazyLib v2.0b (released 2014-10-20)
Post by: Codyrex123 on November 13, 2014, 08:52:41 PM
You mean Lazylib uses Java 7, Becuase when am running lazylib it shows up, not when it unmodded,
Title: Re: [0.65.1a] LazyLib v2.0b (released 2014-10-20)
Post by: LazyWizard on November 13, 2014, 08:59:04 PM
Starsector upgraded the bundled JRE to Java 7 in version 0.6.2a (http://fractalsoftworks.com/forum/index.php?topic=7279.0), but the base game continues to work with 6 just fine. I started using the Java 7 language features because it's the version the game ships with. :)
Title: Re: [0.65.1a] LazyLib v2.0b (released 2014-10-20)
Post by: Codyrex123 on November 14, 2014, 09:27:40 PM
Guess i gota look for teh java then
Title: Re: [0.65.1a] LazyLib v2.0b (released 2014-10-20)
Post by: Codyrex123 on November 15, 2014, 01:04:54 PM
Ive been lookin, and i cant find a single java 7 download that is from the site, i got java 8, So wtf? why is java 7 not there?
Title: Re: [0.65.1a] LazyLib v2.0b (released 2014-10-20)
Post by: Midnight Kitsune on November 15, 2014, 01:11:51 PM
Ive been lookin, and i cant find a single java 7 download that is from the site, i got java 8, So wtf? why is java 7 not there?
Here is a link to java 7 https://java.com/en/download/manual_java7.jsp
Title: Re: [0.65.1a] LazyLib v2.0b (released 2014-10-20)
Post by: Nanao-kun on November 15, 2014, 01:47:20 PM
Doesn't Starsector and Lazylib work just fine with Java 8? It's what I use and I haven't had any problems.
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: Nemerid on February 15, 2015, 12:32:42 PM
Is this mod backwards compatible? I use mods that only work on 0.6.a yet need this to work...
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: Nemerid on February 15, 2015, 12:33:32 PM
Is this mod backwards compatible? I use mods that only work on 0.6.a yet need this to work...
0.6.2a*
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: Nemerid on February 15, 2015, 12:38:04 PM
Is this mod backwards compatible? I use mods that only work on 0.6.a yet need this to work...
0.6.2a*
Never mind my comments, iI figured it out myself.
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: DefiasOne on March 03, 2015, 06:51:18 AM
While trying to revamp the Bushi mod I've come across this little problem in some of the weapon scripts:

Code
 float damage = timeSinceLastArc
                * WeaponUtils.calculateDamagePerSecond(beam.getWeapon());
/////
 activeArc = CombatUtils.getCombatEngine().spawnEmpArc(
                    beam.getSource(), source,
                    currentEmitter, currentVictim,
                    DamageType.ENERGY, damage, emp, range,
                    "tachyon_lance_emp_impact", 15f,
                    FRINGE_COLOR, CORE_COLOR);

CalculateDamagerPerSecond and getCombatEngine() is an unknown symbol, is there any equivalent function to this or is it deprecated now ? If not I will scrap the script for later reimplementation.
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: LazyWizard on March 03, 2015, 11:51:05 AM
CombatUtils.getCombatEngine() was removed after Global.getCombatEngine() was added to the API. You can switch to the latter with no problems.

The damage calculations in WeaponUtils were removed because at that time a lot of new mutable stats were being added to weapons, and it was a colossal pain to add support for and test all of them. Luckily the API also seems to support this sort of thing now. It'd be something along these lines:
Code: java
float damage = beam.getWeapon().getDamage().computeDamageDealt(timeSinceLastArc);

If that doesn't work, you can fall back to this line of code (which won't take stat bonuses into effect):
Code: java
float damage = beam.getWeapon().getDerivedStats().getDps() * timeSinceLastArc;
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: DefiasOne on March 03, 2015, 12:40:38 PM
CombatUtils.getCombatEngine() was removed after Global.getCombatEngine() was added to the API. You can switch to the latter with no problems.

The damage calculations in WeaponUtils were removed because at that time a lot of new mutable stats were being added to weapons, and it was a colossal pain to add support for and test all of them. Luckily the API also seems to support this sort of thing now. It'd be something along these lines:
Code: java
float damage = beam.getWeapon().getDamage().computeDamageDealt(timeSinceLastArc);

If that doesn't work, you can fall back to this line of code (which won't take stat bonuses into effect):
Code: java
float damage = beam.getWeapon().getDerivedStats().getDps() * timeSinceLastArc;

Awesome, that helped me a lot. Thanks  ;D
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: Nemerid on June 03, 2015, 07:16:40 PM
Can someone point me to a place where I can a earlier version (6.2a) of LazyLib? This is a very useful and time-saving mod btw :D
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: agigabyte on September 17, 2015, 02:53:14 PM
With both Shader and Lazy I'm getting this crash whenever I start up the game with them enabled. I have reinstalled both.
Spoiler
(http://i.imgur.com/z6s0yHY.png)
[close]
Title: Re: [0.65.2a] LazyLib v2.0b (released 2014-10-20)
Post by: LazyWizard on October 28, 2015, 08:28:49 PM
Important heads up to any modders who use CampaignUtils: in the upcoming version of LazyLib, all CampaignUtils methods that take a "Class entityClass" argument will have it replaced with "String entityTag". If you're confused as to what this means, just know that calls that used to look like this:
Code: java
List<SectorEntityToken> nearbyFriendlyStations = CampaignUtils.getNearbyEntitiesWithRep(player, 1500f, OrbitalStationAPI.class, IncludeRep.AT_OR_HIGHER, RepLevel.NEUTRAL);
now look like this:
Code: java
List<SectorEntityToken> nearbyFriendlyStations = CampaignUtils.getNearbyEntitiesWithRep(player, 1500f, Tags.STATION, IncludeRep.AT_OR_HIGHER, RepLevel.NEUTRAL);

The vanilla tags are found in com.fs.starfarer.api.impl.campaign.ids.Tags. Using tags instead of the base class means custom campaign entities will actually work with these methods.

I apologize for the extremely short notice of this change. I honestly thought I had fixed this in 2.0b over a year ago (within hours of those methods being introduced), and didn't realize I hadn't until updating this library for 0.7a just now.
Title: Re: [0.7a] LazyLib v2.1 (released 2015-11-19)
Post by: LazyWizard on November 19, 2015, 12:46:15 PM
LazyLib 2.1 is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.1.zip) (mirror (http://www.mediafire.com/download/9f6xh3flb2axni8/LazyLib_2.1.zip)).

I'm releasing this as soon as possible so other modders can update their own mods. A lot of these new methods haven't been tested in 0.7a, so I might have to release another update if/when any bugs pop up.

Changelog:
Quote
2.1 (November 19, 2015)
=========================
Changes to AnchoredEntity:
 - getLocation() no longer returns a direct reference to the anchor's location
   when the anchored entity shares the same location
Changes to CampaignUtils:
 - Added addShipToFleet(String wingOrVariantId, FleetMemberType type,
   CrewXPLevel level, CampaignFleetAPI fleet)
 - Removed all getXOfType() methods, replaced with getXWithTag() (was filtering
   using class, now uses entity tags)
 - All methods that took a "Class entityClass" argument have had said argument
   replaced with "String tag"
 - getNearbyFleets(), getNearbyHostileFleets(), get NearestHostileFleet(),
   and getHostileFleetsInSystem() only include fleets that are visible to the
   sensors of the token passed in to the method
 - Fixed a few getNearbyX() methods potentially including the token they are
   searching around
Changes to CollectionUtils:
 - Added combinedList() and combinedSet() to simplify creating a List/Set from
   multiple source Collections, take any number of Collections as arguments
Changes to ColorUtils:
 - Fixed: glColor() alphaMult value isn't multiplied correctly when argument
   "overrideOriginalAlpha" is true
Title: Re: [0.7a] LazyLib v2.1 (released 2015-11-19)
Post by: gofastskatkat on November 19, 2015, 01:07:34 PM
I'll get to looking at it right now.
EDIT: So far so good, just need to figure out why I'm getting 20 fps max...
EDIT 2: Also command console default key combo, ctrl+backspace, isnt working.... though i have a feeling that deals with the mod/tool/whatev itself
Title: Re: [0.7a] LazyLib v2.1 (released 2015-11-19)
Post by: shuul on November 30, 2015, 06:21:06 AM
Hey, I believe there is no javadoc folder in latest patch, is it intended?
Title: Re: [0.7a] LazyLib v2.1 (released 2015-11-19)
Post by: LazyWizard on November 30, 2015, 02:24:57 PM
My apologies, it looks like I forgot a step when packaging the mod. I blame the thirteen months between 2.0b and 2.1 (so, myself).

I updated the downloads to include the documentation. You can also download the latest javadoc directly from this link (https://bitbucket.org/LazyWizard/lazylib/downloads/javadoc.zip).
Title: Re: [0.7a] LazyLib v2.1 (released 2015-11-19)
Post by: shuul on November 30, 2015, 11:21:46 PM
My apologies, it looks like I forgot a step when packaging the mod. I blame the thirteen months between 2.0b and 2.1 (so, myself).

I updated the downloads to include the documentation. You can also download the latest javadoc directly from this link (https://bitbucket.org/LazyWizard/lazylib/downloads/javadoc.zip).

Thanks! This will help a lot. Diving into SS modding from scratch is not easy though. :)
Title: Re: [0.7a] LazyLib v2.1 (released 2015-11-19)
Post by: ciago92 on December 06, 2015, 08:33:12 PM
Is this good for .7.1a? It's not in the title so I'd assume not, but several mods that rely on this are marked as ready for .7.1a. I suppose I'll find out shortly when I attempt to run it, just curious. Thanks!
Title: Re: [0.7.1a] LazyLib v2.1 (released 2015-11-19)
Post by: LazyWizard on December 06, 2015, 08:49:21 PM
It is compatible with 0.7.1a, I just hadn't updated my thread's titles yet. :)
Title: Re: [0.7.1a] LazyLib v2.1 (released 2015-11-19)
Post by: Golol on December 18, 2015, 06:45:55 AM
hey,
I wanted to get console commands because I was smart enough to save right when a hostile fleet emergency burned me...
So installed Lazylib but when I have Lazylib enabled I can't load my saves.
When I click on "load game" in the main menu, the game crashes with the Error Fatal: Null. Here's the last bit of the log when that happens:

Code
14975 [Thread-5] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/buffalo/buffalo_pirates.png (using cast)
14976 [Thread-5] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ships/hound/hound_substandard.png (using cast)
14992 [Thread-5] INFO  org.lazywizard.lazylib.LazyLib  - Running LazyLib v2.1 for Starsector 0.7a
14992 [Thread-5] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [lazylib_settings.json]
15006 [Thread-5] WARN  com.fs.starfarer.loading.SpecStore  - Description with id flarelauncher_fighter_SHIP_SYSTEM not found
15006 [Thread-5] WARN  com.fs.starfarer.loading.SpecStore  - Description with id traveldrive_SHIP_SYSTEM not found
15006 [Thread-5] WARN  com.fs.starfarer.loading.SpecStore  - Description with id inferniuminjector_SHIP_SYSTEM not found
15006 [Thread-5] WARN  com.fs.starfarer.loading.SpecStore  - Description with id skimmer_drone_SHIP_SYSTEM not found
15009 [Thread-5] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/particlealpha32sq.png (using cast)
15025 [Thread-11] INFO  sound.oo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - Creating streaming player for music with id [miscallenous_main_menu.ogg]
15026 [Thread-11] INFO  sound.H  - Playing music with id [miscallenous_main_menu.ogg]
15036 [Thread-9] INFO  sound.F  - Creating music buffer #1
16373 [Thread-5] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Reading save data from [..\saves\save_ADMKarpov_3332573060079872227\descriptor.xml]
16394 [Thread-5] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Reading save data from [..\saves\save_AdmKingston_2093127268273572182\descriptor.xml]
16406 [Thread-5] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Reading save data from [..\saves\save_AdmTripshore_7729020884772380354\descriptor.xml]
16408 [Thread-5] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Reading save data from [..\saves\save_CptCUie_2414757829677731390\descriptor.xml]
16409 [Thread-5] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Reading save data from [..\saves\save_CptCUie_2953172373566174271\descriptor.xml]
16410 [Thread-5] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Reading save data from [..\saves\save_CptCUie_6938502034617090140\descriptor.xml]
16411 [Thread-5] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Reading save data from [..\saves\save_Golol_4340986767572239102\descriptor.xml]
16413 [Thread-5] INFO  com.fs.starfarer.campaign.save.CampaignGameManager  - Reading save data from [..\saves\save_NewCorvusInc_2096498756251732626\descriptor.xml]
16527 [Thread-11] INFO  sound.oo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - Creating streaming player for music with id [miscallenous_main_menu.ogg]
16527 [Thread-11] INFO  sound.H  - Playing music with id [miscallenous_main_menu.ogg]
16652 [Thread-5] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.campaign.save.LoadGameDialog.o00000(Unknown Source)
at com.fs.starfarer.campaign.save.LoadGameDialog$1.o00000(Unknown Source)
at com.fs.starfarer.campaign.save.LoadGameDialog$1.compare(Unknown Source)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.legacyMergeSort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at java.util.ArrayList.sort(Unknown Source)
at java.util.Collections.sort(Unknown Source)
at com.fs.starfarer.campaign.save.LoadGameDialog.<init>(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.showLoadGameDialog(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.menuItemSelected(Unknown Source)
at com.fs.starfarer.title.ooOO.actionPerformed(Unknown Source)
at com.fs.starfarer.ui.interfacesuper.o00000(Unknown Source)
at com.fs.starfarer.ui.null.processInput(Unknown Source)
at com.fs.starfarer.ui.U.o00000(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$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I can post more of the log or upload it if that isn't the relevant part. I CAN create a game which includes saving a game though...
thx for any help
Title: Re: [0.7.1a] LazyLib v2.1 (released 2015-11-19)
Post by: LazyWizard on December 18, 2015, 07:42:31 PM
Do you still have saves from an old version of Starsector? The game sometimes crashes when old modded saves are present, deleting or moving them elsewhere should fix it.
Title: Re: [0.7.1a] LazyLib v2.1 (released 2015-11-19)
Post by: Golol on December 19, 2015, 05:54:27 AM
yea I have outdated and modded saves.
I can't test if it works without those right now but I'm sure it will.
thx!
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: hqz on March 15, 2016, 08:01:10 AM
Is there a version of the LazyLib javadoc publicly available on the Web somewhere?
If not, do you mind if I put one up myself?
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: LazyWizard on March 15, 2016, 03:49:37 PM
Is there a version of the LazyLib javadoc publicly available on the Web somewhere?
If not, do you mind if I put one up myself?

There's not, and feel free! :)
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: hqz on March 16, 2016, 05:26:19 PM
Is there a version of the LazyLib javadoc publicly available on the Web somewhere?
If not, do you mind if I put one up myself?

There's not, and feel free! :)

Here it is: http://trancecode.github.io/apidocs/lazylib/2.1.0/index.html

I generated it with cross-references to other API documentations, e.g. you can get from a LazyLib class to the Starsector API or LWJGL API in just one click.

I would suggest adding the link to the original post.
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: LazyWizard on March 20, 2016, 05:46:43 PM
Added a link in the OP. Thanks for hosting!
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: DrakonST on November 09, 2016, 01:49:34 AM
I don't know what the this error.
Spoiler
2028707 [Thread-8] INFO  sound.O  - Cleaning up music with id [Panic.ogg]
2028938 [Thread-10] INFO  sound.O  - Creating streaming player for music with id [UndyingLegacy.ogg]
2028963 [Thread-10] INFO  sound.H  - Playing music with id [UndyingLegacy.ogg]
2029419 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at org.lazywizard.lazylib.MathUtils.getDistanceSquared(MathUtils.java:183)
   at org.lazywizard.lazylib.MathUtils.isWithinRange(MathUtils.java:292)
   at org.lazywizard.lazylib.MathUtils.isWithinRange(MathUtils.java:275)
   at org.lazywizard.lazylib.combat.CombatUtils.getShipsWithinRange(CombatUtils.java:198)
   at data.shipsystems.scripts.ai.hauberk_fieldai.advance(hauberk_fieldai.java:41)
   at com.fs.starfarer.loading.specs.N$1.o00000(Unknown Source)
   at com.fs.starfarer.combat.ai.BasicShipAI.advance(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$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Launcher start log:
Spoiler
0    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Starting Starsector 0.7.2a-RC3 launcher
2    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Running in D:\GAMES\STARSECTOR\starsector-core
2    [main] INFO  com.fs.starfarer.StarfarerLauncher  - OS: Windows 7 6.1
7    [main] INFO  com.fs.starfarer.StarfarerLauncher  - Java version: 1.8.0_102 (64-bit)
54   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: audio_plus [D:\GAMES\STARSECTOR\starsector-core\..\mods\Audio Plus]
56   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: autonomous_ships [D:\GAMES\STARSECTOR\starsector-core\..\mods\Autonomous Ships]
57   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: blackrock_driveyards [D:\GAMES\STARSECTOR\starsector-core\..\mods\Blackrock Drive Yards]
58   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: bushi [D:\GAMES\STARSECTOR\starsector-core\..\mods\Bushi]
59   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: lw_radar [D:\GAMES\STARSECTOR\starsector-core\..\mods\Common Radar]
60   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: istl_dam [D:\GAMES\STARSECTOR\starsector-core\..\mods\Dassault-Mikoyan Engineering]
61   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: diableavionics [D:\GAMES\STARSECTOR\starsector-core\..\mods\DIABLEAVIONICS]
62   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: dynasector [D:\GAMES\STARSECTOR\starsector-core\..\mods\DynaSector]
62   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: elizaLib [D:\GAMES\STARSECTOR\starsector-core\..\mods\ElizaLib]
63   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: extra_system [D:\GAMES\STARSECTOR\starsector-core\..\mods\Extra System]
64   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: shaderLib [D:\GAMES\STARSECTOR\starsector-core\..\mods\GraphicsLib]
65   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: hiigaran_descendants [D:\GAMES\STARSECTOR\starsector-core\..\mods\Hiigaran Descendants]
65   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: nbj_ice [D:\GAMES\STARSECTOR\starsector-core\..\mods\ICE]
69   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: Imperium [D:\GAMES\STARSECTOR\starsector-core\..\mods\Interstellar Imperium]
70   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: junk_pirates_release [D:\GAMES\STARSECTOR\starsector-core\..\mods\JP_RC_255]
70   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: kadurtheocracy [D:\GAMES\STARSECTOR\starsector-core\..\mods\Kadur Theocracy]
71   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: lw_lazylib [D:\GAMES\STARSECTOR\starsector-core\..\mods\LazyLib]
71   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: mayorate [D:\GAMES\STARSECTOR\starsector-core\..\mods\mayorate]
73   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: metelson_release [D:\GAMES\STARSECTOR\starsector-core\..\mods\mi]
74   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: Neutrino [D:\GAMES\STARSECTOR\starsector-core\..\mods\Neutrino corp]
74   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: new_galactic_order [D:\GAMES\STARSECTOR\starsector-core\..\mods\New Galactic Order 1.04c]
75   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: nexerelin [D:\GAMES\STARSECTOR\starsector-core\..\mods\Nexerelin]
76   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: pbc [D:\GAMES\STARSECTOR\starsector-core\..\mods\pbc]
77   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: Piratos_noSS+ [D:\GAMES\STARSECTOR\starsector-core\..\mods\Piratos_noSS+]
77   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: pn [D:\GAMES\STARSECTOR\starsector-core\..\mods\pn_v0.48]
78   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: portrait [D:\GAMES\STARSECTOR\starsector-core\..\mods\Portrait pack]
78   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: SCY [D:\GAMES\STARSECTOR\starsector-core\..\mods\SCY]
79   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: shadow_ships [D:\GAMES\STARSECTOR\starsector-core\..\mods\shadow_ships]
80   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: swp [D:\GAMES\STARSECTOR\starsector-core\..\mods\Ship and Weapon Pack]
80   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: Templars [D:\GAMES\STARSECTOR\starsector-core\..\mods\Templars]
81   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: THI [D:\GAMES\STARSECTOR\starsector-core\..\mods\Tiandong Heavy Industries 1.1]
82   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: Torchships [D:\GAMES\STARSECTOR\starsector-core\..\mods\TORCHSHIPS]
82   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: toreupplenty [D:\GAMES\STARSECTOR\starsector-core\..\mods\Tore Up Plenty V7d]
83   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: ztwiglib [D:\GAMES\STARSECTOR\starsector-core\..\mods\TwigLib]
83   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: underworld [D:\GAMES\STARSECTOR\starsector-core\..\mods\Underworld]
84   [main] INFO  com.fs.starfarer.launcher.ModManager  - Found mod: valkyrian [D:\GAMES\STARSECTOR\starsector-core\..\mods\valkyrians]
91   [main] INFO  com.fs.starfarer.settings.StarfarerSettings  - Loading settings
92   [main] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [ABSOLUTE_AND_CWD: null (data/config/settings.json)]
444  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 640x480, 60Hz, 32bpp
446  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 640x480, 60Hz, 16bpp
446  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 640x480, 75Hz, 16bpp
446  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 640x480, 75Hz, 32bpp
446  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x576, 75Hz, 32bpp
446  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x576, 72Hz, 32bpp
446  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x480, 75Hz, 16bpp
446  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x480, 72Hz, 16bpp
446  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x480, 75Hz, 32bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x480, 72Hz, 32bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x576, 75Hz, 16bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x576, 72Hz, 16bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x576, 60Hz, 16bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x576, 56Hz, 16bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x480, 60Hz, 32bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x480, 56Hz, 32bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x480, 60Hz, 16bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x480, 56Hz, 16bpp
447  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x576, 60Hz, 32bpp
448  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 720x576, 56Hz, 32bpp
448  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 60Hz, 32bpp
448  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 56Hz, 32bpp
448  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 60Hz, 16bpp
448  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 56Hz, 16bpp
450  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 75Hz, 16bpp
450  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 72Hz, 16bpp
450  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 75Hz, 32bpp
450  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 800x600, 72Hz, 32bpp
450  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1024x768, 75Hz, 32bpp
450  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1024x768, 70Hz, 32bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1024x768, 75Hz, 16bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1024x768, 70Hz, 16bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1024x768, 60Hz, 16bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1024x768, 60Hz, 32bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1152x864, 75Hz, 16bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1152x864, 75Hz, 32bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x720, 60Hz, 16bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x960, 60Hz, 16bpp
451  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x1024, 75Hz, 32bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x960, 60Hz, 32bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x1024, 75Hz, 16bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x720, 60Hz, 32bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x800, 60Hz, 32bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x1024, 60Hz, 16bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x768, 60Hz, 16bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x1024, 60Hz, 32bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x768, 60Hz, 32bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1280x800, 60Hz, 16bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1360x768, 60Hz, 16bpp
452  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1360x768, 60Hz, 32bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1366x768, 60Hz, 16bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1366x768, 60Hz, 32bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1440x900, 60Hz, 32bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1440x900, 60Hz, 16bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1600x900, 59Hz, 16bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1600x1024, 60Hz, 16bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1600x1024, 59Hz, 16bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1600x900, 60Hz, 16bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1600x900, 59Hz, 32bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1600x1024, 60Hz, 32bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1600x1024, 59Hz, 32bpp
453  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1600x900, 60Hz, 32bpp
454  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1680x1050, 60Hz, 16bpp
454  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1680x1050, 59Hz, 16bpp
454  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1680x1050, 60Hz, 32bpp
454  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1680x1050, 59Hz, 32bpp
454  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1920x1080, 60Hz, 32bpp
454  [main] INFO  com.fs.starfarer.launcher.opengl.GLLauncher  - Found display mode: 1920x1080, 60Hz, 16bpp
1424 [Thread-2] INFO  com.fs.graphics.L  - Using refresh rate:60
1903 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ui/launcher_bg.jpg (using cast)
1929 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ui/launch_button_bg.png (using cast)
1938 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ui/play_button0.png (using cast)
1971 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ui/play_button1.png (using cast)
1975 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ui/buttons/toggleA20x_on.png (using cast)
2000 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ui/buttons/toggleA20x_off.png (using cast)
2004 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/ui/buttons/arrow_down.png (using cast)
2007 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/fx/scanline11.png (using cast)
2028 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/fonts/orbitron24aabold_0.png (using cast)
2057 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/fonts/orbitron20aa_0.png (using cast)
2087 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/fonts/insignia15LTaa_0.png (using cast)
2138 [Thread-2] INFO  com.fs.graphics.TextureLoader  - Cleaned buffer for texture graphics/fonts/orbitron12_0.png (using cast)
[close]

Also - enabled officers level 36.
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: Histidine on November 09, 2016, 03:18:32 AM
It's a bug with Kadur Theocracy (http://fractalsoftworks.com/forum/index.php?topic=10555.msg187912#msg187912).
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: DrakonST on November 09, 2016, 04:03:24 AM
It's a bug with Kadur Theocracy (http://fractalsoftworks.com/forum/index.php?topic=10555.msg187912#msg187912).
Thanks.
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: Orikson on November 09, 2016, 04:49:44 AM
@DrakonST I think you have to remove some of the mods.

Buggy:

- Bushi.
- Hiigaran Descendants.
- Kadur Theocracy.
- New Galactic Order (Have you implemented the fix for it that you have made?).
- Templars (There is an error with colour boundaries, I have a fix for that if you want).
- Project Valkyrie (It is outdated).

.

Other questionable mods in terms of stability & compatibility:

- ICE (I had a crash with it a few times, don't know why).
- Autonomous Ship.
- Piratos_noSS+ (What is this? Is it Extra Salvage / Boarding?)

.

Aside from these mods, you should be fine.
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: DrakonST on November 09, 2016, 05:47:31 AM
@DrakonST I think you have to remove some of the mods.

Buggy:

- Bushi.
- Hiigaran Descendants.
- Kadur Theocracy.
- New Galactic Order (Have you implemented the fix for it that you have made?).
- Templars (There is an error with colour boundaries, I have a fix for that if you want).
- Project Valkyrie (It is outdated).

.

Other questionable mods in terms of stability & compatibility:

- ICE (I had a crash with it a few times, don't know why).
- Autonomous Ship.
- Piratos_noSS+ (What is this? Is it Extra Salvage / Boarding?)

.

Aside from these mods, you should be fine.
Histidine has already given the answer. He was true.
Title: Re: [0.7.2a] LazyLib v2.1 (released 2015-11-19)
Post by: Midnight Kitsune on November 09, 2016, 04:56:35 PM
@DrakonST I think you have to remove some of the mods.

Buggy:

- Bushi.
- Hiigaran Descendants.
- Kadur Theocracy.
- New Galactic Order (Have you implemented the fix for it that you have made?).
- Templars (There is an error with colour boundaries, I have a fix for that if you want).
- Project Valkyrie (It is outdated).

.

Other questionable mods in terms of stability & compatibility:

- ICE (I had a crash with it a few times, don't know why).
- Autonomous Ship.
- Piratos_noSS+ (What is this? Is it Extra Salvage / Boarding?)

.

Aside from these mods, you should be fine.
Histidine has already given the answer. He was true.
I would still listen to him though as most if not all of those mods are buggy and crash prone
Title: Re: [0.7.2a] LazyLib v2.1b (released 2017-03-16)
Post by: LazyWizard on March 16, 2017, 09:04:44 PM
Version 2.1b is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.1b.zip) (mirror (http://www.mediafire.com/file/rvebwe9n8qa1m99/LazyLib_2.1b.zip)).

This update adds no new features and only fixes the version file hosting. If you don't use Version Checker you don't need to download this.
Title: Re: [0.8a] LazyLib v2.2 (released 2017-04-21)
Post by: LazyWizard on April 21, 2017, 10:17:19 AM
Version 2.2 is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.2.zip) (mirror) (http://www.mediafire.com/file/91l333vzou6ddhu/LazyLib_2.2.zip).

Changelog:
Quote
2.2 (April 21, 2017)
=======================
Updated to be compatible with Starsector 0.8a
LazyLib Javadoc now links to LWJGL, Starsector, and JSON Javadocs
Changes to CampaignUtils:
 - Removed crew XP level argument from addShipToFleet()
Title: Bug encountered *Error* //Bugspray// location unidentified!
Post by: Daquan_Baton on April 22, 2017, 09:28:45 PM
So I've encountered an error here...

Code
116621 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Filenames are case-sensitive, [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\LazyLib\jars\LazyLib.jar] vs [C:\Program Files (x86)\Fractal Softworks\Starsector\mods\LazyLib\jars\LazyLib.jar]
java.lang.RuntimeException: Filenames are case-sensitive, [C:\Program Files (x86)\Fractal Softworks\Starsector\starsector-core\..\mods\LazyLib\jars\LazyLib.jar] vs [C:\Program Files (x86)\Fractal Softworks\Starsector\mods\LazyLib\jars\LazyLib.jar]
at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

No mods activated or anything, I just wanted to run it without any and this popped up right after the loading bar maxed out and crashed... halp D:
Title: Re: [0.8a] LazyLib v2.2 (released 2017-04-21)
Post by: Histidine on April 22, 2017, 09:39:42 PM
Redownload Starsector to get the newest hotfix version (RC19).
Title: Re: [0.8a] LazyLib v2.2 (released 2017-04-21)
Post by: Daquan_Baton on April 23, 2017, 05:58:55 AM
Redownload Starsector to get the newest hotfix version (RC19).

Thanks I got it now.
Title: Re: [0.8.1a] LazyLib v2.2 (released 2017-04-21)
Post by: LazyWizard on October 23, 2018, 07:40:12 PM
So, I have a favor to ask of my fellow modders:

Several months ago I mentioned adding bitmap font support to LazyLib. I'm uploading a dev version of LazyLib that includes that feature here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.3-dev.zip). I'd appreciate it if any modders who are interested in using text rendering in their mods could try it out and let me know of any problems, whether it be bugs, performance issues on your hardware, or even just methods that are awkwardly named, before the full release. This dev version has a different folder name and mod ID from regular LazyLib, so there shouldn't be any problems installing it alongside it (just remember to only have one checked in the launcher).

The JavaDoc for the new font classes isn't complete yet, but the major methods have been documented and it should hopefully be simple to use anyway. Here's a sample plugin that draws some text under the mouse position in combat (also available in the javadoc):
Spoiler
Code: java
package data.scripts.plugins;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.combat.BaseEveryFrameCombatPlugin;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.ViewportAPI;
import org.lazywizard.lazylib.ui.FontException;
import org.lazywizard.lazylib.ui.LazyFont;
import org.lwjgl.input.Mouse;

import java.awt.*;

public class LazyFontExample extends BaseEveryFrameCombatPlugin
{
    private LazyFont.DrawableString toDraw;

    // Set up the font and the DrawableString; only has to be done once
    @Override
    public void init(CombatEngineAPI engine)
    {
        // Load the chosen .fnt file
        // Fonts are cached globally, so it's acceptable for each class using the same
        // font to request their own copy of it - they will all share the underlying data
        final LazyFont font;
        try
        {
            font = LazyFont.loadFont("graphics/fonts/insignia15LTaa.fnt");
        }
        // FontException is thrown if the .fnt file does not exist or has malformed data
        catch (FontException ex)
        {
            Global.getLogger(this.getClass()).error("Failed to load font", ex);
            engine.removePlugin(this);
            return;
        }

        // Create a renderable block of text (in this case, will be yellow with font size 15)
        toDraw = font.createText("This is some sample text.", Color.YELLOW, 15f);

        // Enable line wrapping when text reaches 400 pixels wide
        toDraw.setMaxWidth(400f);

        // If you need to add text to the DrawableString, do so like this:
        toDraw.appendText("\nThis is a second line of sample text.");
        toDraw.appendText("\nThis is a third line of sample text that shows off the automatic" +
                " word wrapping when a line of text reaches the maximum width you've chosen.");
    }

    @Override
    public void renderInUICoords(ViewportAPI view)
    {
        // Call draw() once per frame to render the text
        // In this case, draw the text slightly below the mouse cursor
        // The draw point is the top left corner of the textbox, so we adjust the X
        // position to center the text horizontally below the mouse cursor
        if (Global.getCombatEngine() != null)
        {
            toDraw.draw(Mouse.getX() - (toDraw.getWidth() / 2f), Mouse.getY() - 30f);
        }
    }
}

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

If you've downloaded one of the Console mod dev versions I posted on the Discord, it's possible there will be a class conflict that will cause a crash. In that case, a more up-to-date console dev can be downloaded here (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20dev%202018_10_23.zip).
Title: Re: [0.8.1a] LazyLib v2.3 (released 2018-11-12)
Post by: LazyWizard on November 12, 2018, 06:11:49 PM
LazyLib 2.3 is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.3.zip) (mirror (http://www.mediafire.com/file/4k4cub4c8jc41mw/LazyLib_2.3.zip)).

Important note: if you're using one of the dev versions of the console mod that are floating around, those dev versions may conflict with this LazyLib release. You can update to this dev version (https://bitbucket.org/LazyWizard/console-commands/downloads/Console%20Commands%20dev%202018_10_23.zip) from last month to avoid the issue.

The big new feature in this update is sprite font rendering. You've probably seen this in the console mod if you use it, but now it's available for all mods. Enjoy!

Spoiler
(https://i.imgur.com/9zH6UUd.png)
[close]

This release also includes the usual bugfixes and performance improvements, as well as some new methods for modders. Also more javadoc. so much javadoc...

Full changelog:
Quote
2.3 (November 12, 2018)
=========================
Bundled the Kotlin runtime library (v1.3.0) with LazyLib:
 - Kotlin is an alternate JVM language that is 100% interoperable with Java
 - "Core" LazyLib is and always shall be written in Java, though some features
   such as the font classes are written in Kotlin for convenience's sake
 - Kotlin extension methods can be found within the org.lazywizard.lazylib.ext
   package in jars/LazyLib-Kotlin.jar (Java users can safely ignore this jar)
Added @Nullable and @NotNull annotations where appropriate
Added org.lazywizard.lazylib.ui.LazyFont:
 - Represents a bitmap font (the same type Starsector itself uses)
 - Load a font using the static method loadFont(String fontPath)
 - Use createText() to create a reusable DrawableString, which can draw a
   block of text repeatedly and very efficiently
 - Use drawText() to manually draw text into a VBO or display list
 - See LazyFont's javadoc for example usage
Changes to CampaignUtils:
 - Added getEntitiesWithRep(SectorEntityToken token, String entityTag,
   IncludeRep include, RepLevel rep)
 - Added toWorldCoordinates(Vector2f screenCoordinates)
 - Added toScreenCoordinates(Vector2f worldCoordinates)
Changes to CollectionUtils:
 - Added implode(Enum toImplode)
 - Added implode(Enum toImplode, String separator)
Changes to CollisionUtils:
 - Added getNearestPointOnBounds(Vector2f source, CombatEntityAPI entity)
Changes to ColorUtils:
 - Added glColor(Color color, float alpha)
Changes to CombatUtils:
 - Added toWorldCoordinates(Vector2f screenCoordinates)
 - Added toScreenCoordinates(Vector2f worldCoordinates)
Changes to FastTrig:
 - Added atan() and atan2() that are much faster (though less accurate)
   than the implementations in Java's core Math class
   (roughly 5-20x faster; accurate to within 0.005 radians/~0.29 degrees)
Changes to MathUtils:
 - Added FPI and FTAU constants, contain Math.PI and Math.PI * 2 as floats
 - Added clamp(float/int toClamp, float/int min, float/int max). This clamps
   the passed value within the given range. Variants are provided for both
   integers and floats.
 - Added getNearestPointOnLine(Vector2f source, Vector2f lineStart,
   Vector2f lineEnd)
 - Added getPoint(Vector2f center, float radius, float angle). This acts as an
   alias for the existing getPointOnCircumference(), which is both the most
   commonly used method in LazyLib as well as one of the most awkwardly named
Changes to ModUtils:
 - Added isModEnabled(String modId)
 - Added loadClassesIfClassIsPresent(String classCanonicalName,
   List<String> classesToLoadCanonicalNames, boolean initializeClasses)
 - Added getEnabledModIds()
 - Added getOverrides(), returns vanilla files explicitly overridden by any
   mod (ie: in that mod's mod_info.sjon 'replace' section)
Changes to VectorUtils:
 - getFacing() and getAngle() now use FastTrig's new atan2() implementation
 - Added getFacingStrict() and getAngleStrict(), which are slower but more
   accurate (these use the old pre-2.3 atan2() implementations)
 - Added isZeroVector(Vector2f vector)
 - Added resize(Vector2f vector, float length)
 - Added resize(Vector2f vector, float length, Vector2f dest)
 - Added clampLength(Vector2f vector, float maxLength)
 - Added clampLength(Vector2f vector, float maxLength, Vector2f dest)
 - Added clampLength(Vector2f vector, float minLength, float maxLength)
 - Added clampLength(Vector2f toClamp, float minLength, float maxLength,
   Vector2f dest)
 - Added rotate(Vector2f toRotate, float angle), convenience method that
   stores the result in toRotate
 - Added rotateAroundPivot(Vector2f toRotate, Vector2f pivotPoint,
   float angle), convenience method that stores the result in toRotate
Removed from LazyLib:
 - Removed isDevBuild()
Removed from SimpleEntity:
 - Removed Object constructor (it used reflection, which is now blocked;
   remaining options are Vector2f, WeaponAPI, and ShipEngineAPI)
Miscellaneous Javadoc improvements
Title: Re: [0.8.1a] LazyLib v2.3 (released 2018-11-12)
Post by: Nicke535 on November 13, 2018, 06:38:51 AM
Nice! A lot of good improvements across the board, and quite a lot of practical additions as well. Definitely gonna try and put this to use as soon as I can.
Title: Re: [0.9a] LazyLib v2.4 (released 2018-11-16)
Post by: LazyWizard on November 16, 2018, 11:01:57 AM
LazyLib 2.4 is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.4.zip) (mirror (http://www.mediafire.com/file/aj3mcr5zas7gn8p/LazyLib_2.4.zip)).

Changelog:
Quote
2.4 (November 16, 2018)
=========================
Updated to be compatible with Starsector 0.9a
Updated bundled Kotlin runtime library to v1.3.10
Added org.lazywizard.lazylib.JSONUtils.CommonDataJSONObject:
 - Provides a wrapper around a standard JSONObject
 - save() method saves JSON to common data folder (saves/common), which will
   persist between saves (and presumably survive Starsector updates)
 - Constructor takes the filename under saves/common to save the data to
Changes to JSONUtils:
 - Added clear(JSONObject toClear)
 - Added loadCommonJSON(String filename)
   (if file does not exist, returns an empty CommonDataJSONObject)
 - Added loadCommonJSON(String filename, String defaultJSONPath)
   (if file does not exist, copies existing data from defaultJSONPath)
Title: Re: [0.9a] LazyLib v2.4b (released 2018-11-16)
Post by: LazyWizard on November 16, 2018, 08:52:14 PM
LazyLib 2.4b is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.4b.zip) (mirror (http://www.mediafire.com/file/w87l4lejmv4dj4y/LazyLib_2.4b.zip)).

Changelog:
Quote
2.4b (November 16, 2018)
==========================
Changes to JSONUtils:
 - loadCommonJSON(String filename, String defaultJSONPath) will save the newly
   created CommonDataJSONObject to disk immediately if defaultJSONPath exists
   and filename does not
Title: Re: [0.9a] LazyLib v2.4b (released 2018-11-16)
Post by: Shrugger on November 25, 2018, 09:16:35 AM
Getting an error here. Was just watching the title menu, and it went

Code
242012 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: org.lazywizard.lazylib.MathUtils.getPoint(Lorg/lwjgl/util/vector/Vector2f;FF)Lorg/lwjgl/util/vector/Vector2f;
java.lang.NoSuchMethodError: org.lazywizard.lazylib.MathUtils.getPoint(Lorg/lwjgl/util/vector/Vector2f;FF)Lorg/lwjgl/util/vector/Vector2f;
at data.scripts.ai.SCY_arcMissileAI.advance(SCY_arcMissileAI.java:197)
at com.fs.starfarer.combat.entities.Missile$GuidedMissileAIWrapper.advance(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
242013 [Thread-10] INFO  sound.null  - Playing music with id [064.ogg]

Maybe it's SCY that does it, but I've no idea.
Title: Re: [0.9a] LazyLib v2.4b (released 2018-11-16)
Post by: LazyWizard on November 25, 2018, 09:19:27 AM
Do you have LazyLib enabled in the launcher?
Title: Re: [0.9a] LazyLib v2.4b (released 2018-11-16)
Post by: Shrugger on November 25, 2018, 09:35:25 AM
Yes.
Title: Re: [0.9a] LazyLib v2.4b (released 2018-11-16)
Post by: LazyWizard on November 25, 2018, 09:39:58 AM
Are you running an old version of LazyLib? Make sure you're using the latest version (2.4b). There was never a 0.9a-compatible version without getPoint().

If you do have 2.4b, then some other mod must be including an old version of LazyLib for some reason.
Title: Re: [0.9a] LazyLib v2.4b (released 2018-11-16)
Post by: Shrugger on November 25, 2018, 09:42:25 AM
Damn, you're right. I thought I had updated all my mods, but LL must've slipped through somehow - I was still running 2.2.

Sorry for the bother. Next time we get an update, I'll nuke my mods folder straight away.
Title: Re: [0.9a] LazyLib v2.4c (released 2019-03-01)
Post by: LazyWizard on March 01, 2019, 05:59:35 PM
LazyLib 2.4c is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.4c.zip) (mirror (https://www.nexusmods.com/starsector/mods/1?tab=files)).

Changelog:
Quote
2.4c (March 01, 2019)
=======================
Updated bundled Kotlin runtime library to v1.3.21
Changes to CombatUtils:
 - All getXWithinRange() methods have been updated to use 0.9a's new
   CollisionGridAPI, which should improve performance
 - getEntitiesWithinRange() now includes BattleObjectiveAPIs
Changes to LazyFont:
 - Fixed text blending issue
 - Blend mode is no longer automatically enabled during rendering - if you want
   your text to be drawn blended, you must ensure GL_BLEND is enabled and set
   the blend func (usually glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA))
Title: Re: [0.9a] LazyLib v2.4c (released 2019-03-01)
Post by: Fantastic Chimni on March 03, 2019, 02:39:52 PM
So the new getEntitiesWithinRange() has some... Interesting effects when paired with code that has a knockback. https://imgur.com/3na0tLa

It WAS a nice planet.
Title: Re: [0.9a] LazyLib v2.4d (released 2019-03-03)
Post by: LazyWizard on March 03, 2019, 04:35:22 PM
LazyLib 2.4d is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.4d.zip) (mirror (https://www.nexusmods.com/starsector/mods/1?tab=files)).

Changelog:
Quote
2.4d (March 03, 2018)
=======================
Changes to CombatUtils:
 - Reverted changes to getEntitiesWithinRange() (it now only returns ships,
   projectiles, missiles and asteroids as it did pre-2.4c)
Title: Re: [0.9a] LazyLib v2.4e (released 2019-04-21)
Post by: LazyWizard on April 21, 2019, 06:29:59 AM
Version 2.4e is up, get it here (https://bitbucket.org/LazyWizard/lazylib/downloads/LazyLib%202.4e.zip) (mirror (https://www.nexusmods.com/starsector/mods/1?tab=files)).

This update reverts CombatUtils' getXInRange() methods to their pre-2.4c versions (thanks to Dark.Revenant for reporting their buggy behavior). It also adds coroutine support for those of you who use Kotlin.

In other news, I've put LazyLib's Javadoc online. It can now be viewed here (https://lazywizard.org/doc/lazylib/index.html).
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: Irlbbbagt on October 15, 2019, 02:34:45 AM
Okay I am probably being an idiot but I cannot get this to run.  I have extracted it into my mods folder but when I try to run it I get a fatal error compiling org.lazywizard.lazylib.LazyLib

Looking at the mod_info.json I see that I might have to modify the MOD_ID at that location to fix the issue but there does not seem to be a MOD_ID file.

So I am a bit lost.  Any help would be greatly appreciated.  Thanks!
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: Midnight Kitsune on October 15, 2019, 02:31:00 PM
Did you download the source by mistake? Or did you forget to unzip the file into the mods folder?
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: Dwarden on November 08, 2019, 06:14:00 PM
just for reference: got all of sudden crash on Starsector startup load

Spoiler
236946 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: kotlin.text.StringsKt.trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
java.lang.NoSuchMethodError: kotlin.text.StringsKt.trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
   at org.lazywizard.console.ConsoleModPlugin.migrateSettings(ConsolePlugins.kt:22)
   at org.lazywizard.console.ConsoleModPlugin.onApplicationLoad(ConsolePlugins.kt:37)
   at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Spoiler
the only `kotlin.text` reference i found is in LazyLib
the only `StringsKt.trim` reference i found are in LazyLib and [0.9.1a] Kiith Nabaal Shipyard 1.2 - Vaygr Destroyer )

thanks for any tips what could be the issue

crossposted into KNS too : https://fractalsoftworks.com/forum/index.php?topic=16360.msg271226#msg271226
note: the crash is triggered by KNS mod as disabling it allows StarSector to load w/o issue
[close]


fixed
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: Ethanrainbows on November 19, 2019, 03:42:00 AM
I'm not sure how to get it it to work, but v2.4e is not functioning with the game version 0.9.1a for me. I have made sure all my mod files are in the right place, made sure I don't have old versions of mods in the Starsector/mods folder. It tells me I may need to adjust MOD_ID through org.lazywizard.lazylib.LazyLib, but following that directory brings me to a google chrome link to a site with a bunch of classes and information. I'm not sure what to do, what sort of troubleshooting I may need to do. Help a poor vanilla player out.
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: LazyWizard on November 19, 2019, 03:52:14 AM
In mod_info.json in the LazyLib Mod folder, id should be "lw_lazylib".
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: Ethanrainbows on November 19, 2019, 03:57:04 AM
file ID is "lw_lazylib" , file name is LazyLib, not sure what I'm doing wrong
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: LazyWizard on November 19, 2019, 03:58:26 AM
What's the exact error you're getting? Could you paste the end of starsector-core/starfarer.log after a crash?
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: Ethanrainbows on November 19, 2019, 04:00:50 AM
java.lang.RuntimeException: Error compiling [org.lazywizard.lazylib.LazyLib]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.lazylib.LazyLib
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: LazyWizard on November 19, 2019, 04:01:57 AM
The file structure is <install directory>/mods/LazyLib/mod_info.json? And you tagged LazyLib in the launcher?
Title: Re: [0.9.1a] LazyLib v2.4e (released 2019-04-21)
Post by: Ethanrainbows on November 19, 2019, 04:05:26 AM
Never mind, I've figured it out. I had extracted the files into a new folder in the /mods/ folder, and moved only the .json file into the /LazyLib/. Moving everything into /LazyLib/ has fixed my crash on startup issue
Title: Re: [0.9.1a] LazyLib v2.4f (released 2020-01-31)
Post by: LazyWizard on January 31, 2020, 12:03:27 AM
Version 2.4f is up, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.4f/LazyLib_2.4f.zip).

This update adds no new features, and is purely a housekeeping release due to the upcoming deletion of the repository on Bitbucket (https://fractalsoftworks.com/forum/index.php?topic=8181.msg279873#msg279873). Hosting has been switched to GitHub, which as a bonus means the Javadoc is available online (https://lazywizard.github.io/lazylib/) again.

Changelog:
Quote
2.4f (January 31, 2020)
=========================
Updated bundled Kotlin runtime library to v1.3.61
Javadoc is now available online at https://lazywizard.github.io/lazylib
Moved .version file hosting to GitHub
Title: Re: [0.9.1a] LazyLib v2.4f (released 2020-01-31)
Post by: DonW427 on February 08, 2020, 05:22:32 PM
It still says 2.4e in the Mods screen
Title: Re: [0.9.1a] LazyLib v2.4f (released 2020-01-31)
Post by: jn_xyp on July 19, 2020, 07:51:11 AM
Hi,

In order to facilitate Chinese players to download this essential mod, I would like to ask permission to repost this mod on the Starsector Chinese Forum (https://www.fossic.org/).

I will keep all the description and author information, and follow further update of this post.
Title: Re: [0.9.1a] LazyLib v2.4f (released 2020-01-31)
Post by: LazyWizard on July 19, 2020, 11:15:38 AM
Of course you can, that's not a problem. :)
Title: Re: [0.9.1a] LazyLib v2.4g (released 2021-01-18)
Post by: LazyWizard on January 18, 2021, 02:00:55 PM
Version 2.4g is up, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.4g/LazyLib.2.4g.zip) (mirror (https://www.mediafire.com/file/lxs8sswy459chbl/LazyLib+2.4g.zip/file)).

This update fixes a bug with DrawableString that caused text to become corrupted when rendering in the campaign. It also updates the bundled Kotlin libraries to their latest versions.

Changelog:
Quote
Updated bundled libraries:
 - kotlin-stdlib: v1.3.61 -> v1.4.21
 - kotlinx-coroutines: v1.2.0 -> v1.4.2
 - jetbrains-annotations: v13.0 -> v20.1.0
 - removed kotlinx-atomicfu (this was an erroneous dependency added by
   an earlier version of kotlinx-coroutines and wasn't used for anything)
Changes to LazyFont:
 - Rewrote DrawableString to use vertex buffers instead of display lists.
   This should fix a bug that caused text corruption and visual glitches
   when DrawableStrings were rendered in the campaign layer
Deprecated in LazyFont:
 - Deprecated drawText(String text, float x, float y, float fontSize,
   float maxWidth, float maxHeight), use createText() instead
Title: Re: [0.9.1a] LazyLib v2.4g (released 2021-01-18)
Post by: ddbb07 on January 18, 2021, 02:22:43 PM
Thanks for the update
Title: Re: [0.9.1a] LazyLib v2.5b (released 2021-01-20)
Post by: LazyWizard on January 20, 2021, 03:34:19 PM
Version 2.5b is out, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.5b/LazyLib_2.5b.zip) (mirror (https://www.mediafire.com/file/vq22vdykyv8i1s0/LazyLib_2.5b.zip/file)).

This update fixes a rare crash bug when a lengthy word in a DrawableString was word-wrapped with a hyphen. I've also retroactively renamed the previous release, 2.4g, to 2.5.

Full changelog:
Quote
2.5b (January 20, 2021)
=========================
Retroactively renamed v2.4g to v2.5
Changes to LazyFont:
 - Added getFontName()
Changes to LazyFont.DrawableString:
 - Fixed a crash with word-wrapped text that includes a hyphenated line break
 - Added setRenderDebugBounds(), which draws a box showing the text's width,
   height, and position
Title: Re: [0.9.1a] LazyLib v2.5b (released 2021-01-20)
Post by: LazyWizard on January 20, 2021, 03:56:35 PM
There have been a few reports of text corruption with the console mod using the latest LazyLib. Unfortunately this seems to be sporadic and only one person has reported it happening more than once. If anyone is affected, could they please use the BugReport console command and send me the results? That command copies its results to the clipboard, so even if the console is illegible you should be able to paste the output elsewhere.
Title: Re: [0.9.1a] LazyLib v2.5c (released 2021-01-23)
Post by: LazyWizard on January 22, 2021, 10:50:30 PM
Version 2.5c is out, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.5c/LazyLib_2.5c.zip) (mirror (https://www.mediafire.com/file/am5jnujlp3xjizp/LazyLib_2.5c.zip/file)).

This update adds colored substring support to DrawableString, and also should fix the text rendering issues some users were experiencing since v2.5's release. My thanks to Dream from the Discord server for reporting this and helping test the fix.

Full changelog:
Quote
2.5c (January 23, 2021)
=========================
Changes to LazyFont.DrawableString:
 - Fixed rendering issues on some computers (thanks to Dream from the
   Discord server for reporting the bug and testing the fix)
 - Added colored substring support
 - Added appendText(String text, Color color)
 - Added appendText(String text, Color color, int indent)
 - Appending colored text only colors that substring, and all subsequent
   text will return to the base color chosen at DrawableString creation.
   To change the base color, call DrawableString.setColor()
Title: Re: [0.95a] LazyLib v2.6 (released 2021-03-26)
Post by: LazyWizard on March 26, 2021, 11:25:23 AM
Version 2.6 is out, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.6/LazyLib.2.6.zip)!

Changelog:
Quote
2.6 (March 26, 2021)
======================
Updated to be compatible with Starsector 0.95a
Updated bundled libraries:
 - kotlin-stdlib: v1.4.21 -> v1.4.31
 - kotlinx-coroutines: v1.4.2 -> v1.4.3
The Javadoc's index is now one single page
Added org.lazywizard.lazylib.IOUtils:
 - Contains methods to help with reading/writing files using the API
 - byte[] readAllBytes(String filePath), an API-safe port of
   java.nio.Files.readAllBytes()
Changes to LazyFont.DrawableString:
 - Added tab support (2x the base vertical height of the text)
 - Added append(String text)
 - Added append(String text, Color color)
 - Added appendIndented(String text, int indent)
 - Added appendIndented(String text, Color color, int indent)
 - Added getBlendSrc(), setBlendSrc(int blendSrc), getBlendDest(), and
   setBlendDest(int blendDest) to control color blending
Deprecated in LazyFont.DrawableString:
 - Deprecated all appendText() methods in favor of new append() equivalents.
   The append() variants take any object and return the DrawableString so that
   calls can be chained together
Title: Re: [0.95a] LazyLib v2.6 (released 2021-03-26)
Post by: Harmful Mechanic on March 26, 2021, 02:05:10 PM
Thank you for getting this out so fast. It's a big help to getting everything updated and running again in 0.95.
Title: Re: [0.95a] LazyLib v2.6 (released 2021-03-26)
Post by: Fenrrisyyan on April 17, 2021, 04:05:41 AM
Hi !
I'm a huge fan of you're work but, I would like play with a mod (Ship_and_Weapon Pack_1.12.4) but, it is in version 0.9.1a of Starsector, and the mod required LazyLib 2.5c and Graphics Lib 1.4.5

I also would like to play with Dassault-Mikoyan-Engineering v.1.18a mod, and he also need MagicLib in [0.9.1a]

If someone have those mods in there version, can he send me in e-mail at this adress ? :

[email protected]

thanks you very much !
Title: Re: [0.95a] LazyLib v2.6 (released 2021-03-26)
Post by: Gravemind1 on April 24, 2021, 08:07:36 PM
Seem to be getting an error with this and the MagicLib mods, always getting a CTD on launch, I look in the Starsector log and I see this wayyyyy at the bottom

-20003 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: com.fs.starfarer.api.combat.CombatEngineAPI.addLayeredRenderingPlugin(Lcom/fs/starfarer/api/combat/CombatLayeredRenderingPlugin;)Lcom/fs/starfarer/api/combat/CombatEntityAPI;
java.lang.NoSuchMethodError: com.fs.starfarer.api.combat.CombatEngineAPI.addLayeredRenderingPlugin(Lcom/fs/starfarer/api/combat/CombatLayeredRenderingPlugin;)Lcom/fs/starfarer/api/combat/CombatEntityAPI;
   at data.scripts.plugins.MagicTrailPlugin.init(MagicTrailPlugin.java:1321)
   at com.fs.starfarer.title.Object.float$Oo.o00000(Unknown Source)
   at com.fs.starfarer.combat.oOOO.B.รต00000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.init(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.prepare(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)


Also found 2 errors with this:
11330 [Thread-4] ERROR com.fs.starfarer.loading.ShipHullSpreadsheetLoader  - Ship hull spec [flare] not found in ship_data.csv
11330 [Thread-4] ERROR com.fs.starfarer.loading.ShipHullSpreadsheetLoader  - Ship hull spec [module_hightech_decor] not found in ship_data.csv
Sorry if this looks like spam

I may be an idiot, ignore this post for now lol
Title: Re: [0.95a] LazyLib v2.6 (released 2021-03-26)
Post by: HySOqvs0sB8 on May 08, 2021, 08:33:47 AM
I was searching for the root of a memory leak, when I noticed that I'm getting exceptions from Lazyfont.DrawableString.finalize() / stack trace attached

The issue seems to be that the ContextCapabilities objects are stored in ThreadLocals, so code from the finalizer thread won't find anything there, and no cleanup will be performed.





[attachment deleted by admin]
Title: Re: [0.95a] LazyLib v2.6 (released 2021-03-26)
Post by: Morrokain on August 07, 2021, 09:38:28 PM
I've added the jars as a module and global dependency in the project, but when I try and import:

Code
import org.lazywizard.lazylib.ext.combat.CombatExtensionsKt;

 - The IDE can't find it. But it will compile the jar just fine and the code works when I call:

Code
        List<ShipAPI> shipList = CombatExtensionsKt.getNearbyEnemies(ship, nearbyShipAssessmentRange);

 - Even though it shows the kit class as red like it isn't defined. And it works in game and measures nearby ships when I run the jar. However, a user just reported this:

Spoiler
just started a new game, ran into a cryosleeper and attempted to engage it. got this error message a few seconds after starting the fight. here's the log for the crash; tried updating lazylib to the newest version but that didn't fix it so i'm out of ideas

45233 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: org/lazywizard/lazylib/ext/combat/CombatExtensionsKt
java.lang.NoClassDefFoundError: org/lazywizard/lazylib/ext/combat/CombatExtensionsKt
   at data.scripts.shipsystems.ai.AO_FluxConverterAI.assessNearbyThreats(AO_FluxConverterAI.java:166)
   at data.scripts.shipsystems.ai.AO_FluxConverterAI.advance(AO_FluxConverterAI.java:104)
   at com.fs.starfarer.loading.specs.M$1.super(Unknown Source)
   at com.fs.starfarer.combat.ai.BasicShipAI.advance(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(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.lazylib.ext.combat.CombatExtensionsKt
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 12 more
[close]

They say they have v2.6. Any advice for what I am doing wrong? It worked just fine without any errors until about a month or two ago and I myself don't have any errors. Is this perhaps an operating system related thing?

Though it's weird that one day IntelliJ decided it could no longer find the imported class after finding it just fine for iirc over a year now.  :-\

*EDIT*
 Things I've tried:

 - Rebuilding the module.

 - Rebuilding the project.

 - Deleting the module and dependencies and recreating them.

 - Resetting the src folder.

 - Invalidating caches and restarting the IDE.
Title: Re: [0.95a] LazyLib v2.7 (released 2021-10-22)
Post by: LazyWizard on October 22, 2021, 05:47:12 PM
Version 2.7 is out, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.7/LazyLib.2.7.zip)!

This update contains some bug fixes as well as two new features for the library's text rendering: setting the anchor point (https://media.discordapp.net/attachments/139765881986088960/901259718050328586/screenshot161.png) for rendering (so you can tell it to render text above, to the left, to the right and below etc a certain point), and alignment controls (so you can now have centered or right-aligned (https://media.discordapp.net/attachments/139765881986088960/901259152297451550/unknown.png) text). It also fixes a minor memory leak when dispose() was not called on DrawableStrings before garbage collection.

2.7 should be a drop-in replacement for 2.6, with one minor exception for modders: if you're using font rendering in Kotlin with named parameters, color has been renamed to baseColor. Any existing compiled code should continue to work, but if you're using color as a named parameter then your IDE will scream at you until you change it.

There have also been some improvements to the Javadoc (https://lazywizard.github.io/lazylib/), especially regarding font rendering. Let me know if anything is still confusing.

Full changelog:
Quote
2.7 (October 22, 2021)
========================
Fixed links to online Starsector API in javadoc.zip
Updated bundled libraries:
 - kotlin-stdlib: v1.4.31 -> v1.5.31
 - kotlinx-coroutines: v1.4.3 -> v1.5.2
 - jetbrains-annotations: v20.1.0 -> 22.0.0
Changes to CombatUtils:
 - Fixed a bug where ships spawned by spawnShipOrWingDirectly() would
   report the wrong fleet side in some circumstances
Changes to LazyFont:
 - Fixed log spam with some whitespace being considered unsupported characters
Changes to LazyFont.DrawableString:
 - Fixed minor memory leak when dispose() is not called before GC
 - Added TextAlignment, setAlignment(), and getAlignment(). TextAlignment
   controls whether text is drawn left-aligned (the default), right-aligned,
   or centered
 - Added TextAnchor, setAnchor(), and getAnchor(). TextAnchor controls the
   origin when drawing text; for example, TextAnchor.TOP_LEFT (the default)
   will mean draw() will start drawing at the top left, so the text will
   appear below and to the right of the position passed into draw()
 - Added setBaseColor() and getBaseColor() (replace setColor()/getColor())
 - Added isRebuildNeeded() and triggerRebuildIfNeeded() (unnecessary 99% of
   the time as rebuilding happens automatically, but useful in fringe cases)
 - Cleaned up some out-of-date documentation
Deprecated in LazyFont.DrawableString:
 - Deprecated setColor() and getColor(), as users were assuming they set the
   color of the next append. Added setBaseColor() and getBaseColor() as
   replacements that better convey what these methods do (set/get the color of
   all text that _doesn't_ have a color argument passed in)
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: LazyWizard on December 10, 2021, 11:53:19 AM
Version 2.7b is up, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.7b/LazyLib.2.7b.zip).

This is mainly a simple compatibility update for 0.95.1a with one or two minor fixes snuck in.

Changelog:
Quote
2.7b (December 10, 2021)
==========================
Updated to be compatible with Starsector 0.95.1a
Updated bundled libraries:
 - jetbrains-annotations: v22.0.0 -> 23.0.0
Changes to LazyFont.DrawableString:
 - Center/right-aligned text no longer requires maxWidth to be set
 - setRenderDebugBounds() now shows anchor and max size
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Zalpha on December 10, 2021, 07:45:22 PM
I downloaded and installed LazyLib.2.7b.zip but in game with the version check it tells me this mod is outdated at version LazyLib.2.7. I will just manually fix it in the mod_info.json.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Heitomos on December 14, 2021, 09:08:06 AM
Getting an error when attempting to engage a Domain Era Cryosleeper Guardian.

63831 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: org/lazywizard/lazylib/combat/AIUtils
java.lang.NoClassDefFoundError: org/lazywizard/lazylib/combat/AIUtils
   at data.scripts.shipsystems.ai.AO_FluxConverterAI.assessNearbyThreats(AO_FluxConverterAI.java:164)
   at data.scripts.shipsystems.ai.AO_FluxConverterAI.advance(AO_FluxConverterAI.java:102)
   at com.fs.starfarer.loading.specs.M$1.super(Unknown Source)
   at com.fs.starfarer.combat.ai.BasicShipAI.advance(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(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.lazylib.combat.AIUtils
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 12 more

Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: BreenBB on December 15, 2021, 12:21:59 AM
Getting an error when attempting to engage a Domain Era Cryosleeper Guardian.

Judging from log, its Archean Order issue, Flux Converter its its subsystem for it. Probably its got broken due new update, post this log in Archean Order topic.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Heitomos on December 15, 2021, 10:00:03 AM
Getting an error when attempting to engage a Domain Era Cryosleeper Guardian.

Judging from log, its Archean Order issue, Flux Converter its its subsystem for it. Probably its got broken due new update, post this log in Archean Order topic.

Will do! Thank you.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Michigancubed on January 07, 2022, 10:00:16 PM
First poster, downloaded most recent lazylib version to run a new save with AC and its compatible mods (not related in question but I believe its also an issue). Got the game started up and I got a error after loading bar, narrowed the mod list down to just lazylib enabled and got this in the crash log;

82345 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [org.lazywizard.lazylib.LazyLib]
java.lang.RuntimeException: Error loading [org.lazywizard.lazylib.LazyLib]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.lazylib.LazyLib
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more

Any clues?
(Same for AC crash log but for starfarer.combat or the like, don't have the log on hand, I seen one of the most recent bug issues reported to be an AC issue too, so I just threw that in for context)
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Corelious on January 11, 2022, 12:26:16 PM
Any chance of an update for the R6 version of 0.95.1?
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Yunru on January 11, 2022, 05:37:53 PM
Any chance of an update for the R6 version of 0.95.1?
Why would it need one?
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Sutopia on February 17, 2022, 10:12:33 AM
Hello,

Lazyfont loading breaks if the SettingsAPI is wrapped by an overriding shell class.
It will brick any font loading after the SettingsAPI is set by another mod.


NVM I have fat finger
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: MyLittleGrundle on June 05, 2022, 12:15:26 PM
12348 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [org.lazywizard.lazylib.LazyLib]
java.lang.RuntimeException: Error loading [org.lazywizard.lazylib.LazyLib]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.lazylib.LazyLib
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more

I keep getting this and can't figure out what im doing wrong, can anyone help a brother out?
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: SafariJohn on June 05, 2022, 02:47:03 PM
Is LazyLib enabled? Looks like a mod is trying to use it, but it is not loaded.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: MyLittleGrundle on June 05, 2022, 08:11:55 PM
It is enabled.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Histidine on July 25, 2022, 06:15:52 PM
12348 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [org.lazywizard.lazylib.LazyLib]
java.lang.RuntimeException: Error loading [org.lazywizard.lazylib.LazyLib]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.lazylib.LazyLib
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more

I keep getting this and can't figure out what im doing wrong, can anyone help a brother out?
For anyone in the future having trouble running the game with just LazyLib with this error, check your antivirus (https://fractalsoftworks.com/forum/index.php?topic=24928.msg371075#msg371075).
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Gundamfan on July 28, 2022, 04:55:45 AM
Update please
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Ruddygreat on July 28, 2022, 10:43:25 AM
Update please

it doesn't need an update, nothing about the mod broke between release candidates & the game will still allow you to use it so all's good.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Yesnt on October 23, 2022, 02:13:41 AM
It seems my copy ONLY wants a RC6 version of this. How do i take care of this problem? (MIGHT NOT BE A VERSION ISSUE)

Edit: Fatal: error loading [org.lazywizard.lazylib.LazyLib]
Cause: org.lazywizard.lazylib.LazyLib
Check starsector.log for more info. (Thats the error.)

Also this: java.lang.RuntimeException: Error loading [org.lazywizard.lazylib.LazyLib]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.lazywizard.lazylib.LazyLib
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more

Edit 2: Some guy was having the same issue and it was something about the antivirus, i dont have any popups about threats.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: IceXuick on October 30, 2022, 11:14:44 AM
I also cannot seem to start Starsector - LazyLib for RC3 instead of RC6
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: sirskips on January 05, 2023, 10:34:19 AM
getting a weird crash that doesnt gen a log. I notice if I have any mod that is not exactly up to date the game will crash eventually. Not sure if lazylib is also to be honest I am tired of trying to make a stable modded game and just want to play some Starsector. So I will do more testing later, like I said right now I just want to play a game.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: Ruddygreat on January 27, 2023, 05:15:31 AM
downloaded uaf mod and run with new lazylib but it keep crashing,cant get a good mod experience

try to run with other mod but still no working sign,pls fix

this is either the fault of uaf or something else to do with your system, lazylib has been perfectly stable for basically ever.
post your error log (located at <your starsector install>/starsector-core/starsector.log (or just "starsector" if you don't have file extensions showing)) or there's nothing we can help with.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: lol on January 27, 2023, 11:13:15 PM
Solve it, I didn't download the right magiclib mod,i ask in discord they fix my problems


Sorry for the bothering.
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: enderkripi1 on February 10, 2023, 07:02:21 PM
Could someone please post the 2.6 version of this mod ?
Title: Re: [0.95.1a] LazyLib v2.7b (released 2021-12-10)
Post by: umadbro6440752 on May 01, 2023, 08:03:48 PM
Could someone please post the 2.6 version of this mod ?

here you go
https://drive.google.com/file/d/1zEz47e-r98TDY3CCEt54aCNoEw927_fy/view?usp=share_link
Title: Re: [0.96a] LazyLib v2.8 (released 2023-05-05)
Post by: LazyWizard on May 05, 2023, 10:37:40 AM
Version 2.8 is out, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.8/LazyLib.2.8.zip) (mirror (https://www.mediafire.com/file/5n0hwlq3emvrup6/LazyLib_2.8.zip/file)).

Thanks to Liral for contributing the KeplerOrbit class. Um, several months ago. Something something living up to my username...

Changelog:
Quote
2.8 (April 05, 2023)
======================
Updated to be compatible with Starsector 0.96a
Updated bundled libraries:
 - kotlin-stdlib: v1.5.31 -> v1.6.21
 - kotlinx-coroutines: v1.5.2 -> v1.6.4 (custom build)
 - These are the last versions that support Java 7
Added org.lazywizard.lazylib.campaign.orbits.KeplerOrbit:
 - Submitted by Liral, this provides more accurate orbits than EllipticalOrbit
Changes to CombatUtils:
 - Updated to use CombatEngineAPI's bin-lattice system where applicable, as
   requested by several modders since those methods introduction
Title: Re: [0.96a] LazyLib v2.8 (released 2023-05-05)
Post by: Someone432 on June 23, 2023, 11:17:15 PM
Where can I find a version compatible with 0.95? I'm really lost here
Title: Re: [0.96a] LazyLib v2.8 (released 2023-05-05)
Post by: SpaceDrake on June 26, 2023, 05:31:42 AM
Consult LazyWizard's Github. However, unless you're looking to run a game of Starsector with extremely specific un-updated mods, there's no real reason to run .95 anymore; .96 is just .95 But Better. Still, it's up to you.
Title: Re: [0.97a] LazyLib v2.8b (released 2024-02-02)
Post by: LazyWizard on February 02, 2024, 06:02:03 PM
Version 2.8b is out, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.8b/LazyLib.2.8b.zip) (mirror (https://www.nexusmods.com/starsector/mods/1?tab=files)) (mirror 2 (https://www.mediafire.com/file/pr0ycpiipmij8gz/LazyLib_2.8b.zip/file)).

Changelog:
Quote
2.8b (February 02, 2024)
==========================
Updated to be compatible with Starsector 0.97a
Changes to LazyFont:
 - Changed default blendSrc back to GL_SRC_ALPHA (was GL_ONE since 2.4c)
Deprecated org.lazywizard.lazylib.campaign.orbits.KeplerOrbit:
 - Deprecated at the request of its contributor
Title: Re: [0.97a] LazyLib v2.8b (released 2024-02-02)
Post by: Madao on February 03, 2024, 10:49:26 PM
Thank you for your efforts LazyWizard
Title: Re: [0.97a] LazyLib v2.8b (released 2024-02-02)
Post by: Killer of Fate on February 17, 2024, 02:59:10 AM
Version 2.8b is out, get it here (https://github.com/LazyWizard/lazylib/releases/download/2.8b/LazyLib.2.8b.zip) (mirror (https://www.nexusmods.com/starsector/mods/1?tab=files)) (mirror 2 (https://www.mediafire.com/file/pr0ycpiipmij8gz/LazyLib_2.8b.zip/file)).

Changelog:
Quote
2.8b (February 02, 2024)
==========================
Updated to be compatible with Starsector 0.97a
Changes to LazyFont:
 - Changed default blendSrc back to GL_SRC_ALPHA (was GL_ONE since 2.4c)
Deprecated org.lazywizard.lazylib.campaign.orbits.KeplerOrbit:
 - Deprecated at the request of its contributor
holy *** that response time, wtf?
Title: Re: [0.97a] LazyLib v2.8b (released 2024-02-02)
Post by: sanya02 on April 10, 2024, 03:46:26 AM
 If I use version LazyLib v2.8b for 0.95.1. Will there be any problems?
Title: Re: [0.97a] LazyLib v2.8b (released 2024-02-02)
Post by: TimeDiver on April 10, 2024, 04:25:06 AM
If I use version LazyLib v2.8b for 0.95.1. Will there be any problems?
Won't work; newer releases are NOT backwards-compatible with older versions of StarSector.

Having said that, the download for v2.7b is still around and IS explicitly-compatible with 0.95.1a:

The link: https://github.com/LazyWizard/lazylib/releases/download/2.7b/LazyLib.2.7b.zip