Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Painting the Stars (02/07/20)

Pages: 1 [2] 3 4 ... 13

Author Topic: [0.9.1a] LazyLib v2.4f (released 2020-01-31)  (Read 340086 times)

theSONY

  • Admiral
  • *****
  • Posts: 673
  • Not a single Flux given
    • View Profile
Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
« Reply #15 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
Logged
-the ABOMINATION - in progress

Shield

  • Commander
  • ***
  • Posts: 205
    • View Profile
Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
« Reply #16 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.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1291
    • View Profile
    • GitHub Profile
Re: LazyLib v1.1 (.54.1a, released 2013-02-27)
« Reply #17 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
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1291
    • View Profile
    • GitHub Profile
Re: LazyLib v1.2 (.54.1a, released 2013-03-20)
« Reply #18 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)
Logged

theSONY

  • Admiral
  • *****
  • Posts: 673
  • Not a single Flux given
    • View Profile
Re: LazyLib v1.2 (.54.1a, released 2013-03-20)
« Reply #19 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
Logged
-the ABOMINATION - in progress

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1291
    • View Profile
    • GitHub Profile
Re: LazyLib v1.2 (.54.1a, released 2013-03-20)
« Reply #20 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 and moving Omnifactory.jar into UC's jar folder.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1291
    • View Profile
    • GitHub Profile
Re: LazyLib v1.3 (.54.1a, released 2013-04-10)
« Reply #21 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!
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1291
    • View Profile
    • GitHub Profile
Re: LazyLib v1.3 (.54.1a, released 2013-04-10)
« Reply #22 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. :)
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1291
    • View Profile
    • GitHub Profile
Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
« Reply #23 on: May 06, 2013, 04:55:19 PM »

1.4 is up, get it here.

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)
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1057
    • View Profile
Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
« Reply #24 on: May 06, 2013, 04:57:36 PM »

Oh been waiting for this, thanks, also were any methods/classes moved around that require change?
« Last Edit: May 06, 2013, 05:03:39 PM by silentstormpt »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1291
    • View Profile
    • GitHub Profile
Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
« Reply #25 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.
« Last Edit: May 06, 2013, 06:08:19 PM by LazyWizard »
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 4854
  • naively breaking things!
    • View Profile
Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
« Reply #26 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?
Logged
Please check out my SS projects :)
Xeno's Mod Pack

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1291
    • View Profile
    • GitHub Profile
Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
« Reply #27 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, 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).
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 4854
  • naively breaking things!
    • View Profile
Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
« Reply #28 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.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

xenoargh

  • Admiral
  • *****
  • Posts: 4854
  • naively breaking things!
    • View Profile
Re: LazyLib v1.4 (.54.1a, released 2013-05-06)
« Reply #29 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.
Logged
Please check out my SS projects :)
Xeno's Mod Pack
Pages: 1 [2] 3 4 ... 13