Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - tomatopaste

Pages: 1 ... 17 18 [19] 20
271
Sorry to double post, but are there any considerations I need for the custom drone AI? Possible pitfalls, requirements etc. (Maybe even a peek at the source :DDD)

272
IIRC it's the drone AI doing this, not the ship system AI, so you could get whatever behavior you wanted by providing a custom one for your drones via ModPlugin.pickDroneAI().
Oh fantastic, cheers  ;D

273
Is there some AI override for the DRONE_LAUNCHER shipsystem? It's completely closed source and the DroneLauncherShipSystemAPI has no functionality for moving drones around (or other states like my post in the API suggestions thread). The image shows what I'm talking about, the drones are snapped every frame with the code below. The actual snapTo vector is just a point on circumference with a desired angle. As far as I can tell, the shipsystem script is trying to pull the drones back to their target location as defined in JSON. Free roam being on or off does not effect this.


Spoiler
    private void snapTo(
            ShipAPI target,
            float magnitude, //==1f
            ShipAPI drone,
            Vector2f targetPosition
    ) {
        if (null == target) {
            return;
        }

        magnitude = MathUtils.clamp(magnitude, 0F, 1F);

        Vector2f locationDelta = Vector2f.sub(targetPosition, drone.getLocation(), new Vector2f());
        Vector2f velocityDelta = Vector2f.sub(target.getVelocity(), drone.getVelocity(), new Vector2f());
        float facingDelta = target.getFacing() - drone.getFacing();
        float angularVelocityDelta = target.getAngularVelocity() - drone.getAngularVelocity();

        drone.getLocation().x += locationDelta.x * magnitude;
        drone.getLocation().y += locationDelta.y * magnitude;
        drone.getVelocity().x += velocityDelta.x * magnitude;
        drone.getVelocity().y += velocityDelta.y * magnitude;
        drone.setFacing(drone.getFacing() + facingDelta * magnitude);
        drone.setAngularVelocity(drone.getAngularVelocity() + angularVelocityDelta * magnitude);
    }
[close]

274
Suggestions / Re: API request thread (please read OP before posting!)
« on: February 10, 2020, 05:05:39 AM »
boolean DroneLauncherShipSystemAPI.isInHoldingPattern() would be really useful to avoid a workaround I've been using for the DRONE_LAUNCHER shipsystem type (this is even displayed as a status for player ship on the HUD so it's annoying that it can't be gotten in code...) thanks :)

275
I don't think that'd work - iirc this method is provided so that other info that the game isn't directly aware of could be specified by mods. The stuff that's already in there I don't think keeps getting re-read from the json. And, even if it was, that json is shared between all instances of the system, so changing it for one ship would change it for every ship.
That's a bummer, it did seem too sketchy to be useful. I guess I could have better luck with giveCommand? Thanks for the help.

276
Hello, I've been working on a shipsystem of the DRONE_LAUNCHER type, with a BaseEveryFrameCombatPlugin to modify the drones themselves. My question is whether I can modify the .system file JSON during combat using DroneLauncherShipSystemAPI droneSystem.getSpecJson() to modify the preferred position of the deployed drones? Normally the .system JSON specifies their angle but the DroneLauncherShipSystemAPI offers no way to change the position of the drones during combat. Thanks  :)

Example
ShipSystemAPI system = ship.getSystem();
List<ShipAPI> droneList = ship.getDeployedDrones();

            if (ship != null && system != null && system.getId().equals(SYSTEM_ID) && ship.isAlive()) {
                DroneLauncherShipSystemAPI droneSystem = (DroneLauncherShipSystemAPI) system;

                if (droneList != null) {
                    for (ShipAPI drone : droneList) {
                        int droneIndex = droneSystem.getIndex(drone);
                        if (isInFocusMode) {    //what happens if in focus mode and drones not recalled
                            if (droneIndex == 0 && !drone.getSystem().isActive()) {
                                drone.useSystem();
                            } else {
                                try {
                                    JSONArray droneBehaviorJSONArray = droneSystem.getSpecJson().getJSONArray("droneBehavior");
[close]

277
Modding / Re: [0.9.1a] Captain Trek's Guide to the Modiverse
« on: January 31, 2020, 06:27:58 AM »
Any guide inherently creates a visibility divide between mods that are in it and mods that aren't. Because it seems comprehensive, pinning this would not only crush mods that aren't in it, but also new mods that don't make a big enough splash.

I really have to dispute the notion that my guide would be worse than the systems we already have in place in this regard. The biggest reason prv is criminally overlooked is because it doesn't show up in the Mod Index. And indeed, new up-and-coming mods like Gal. Tigers and Kipling don't get placed there until they prove themselves a bit either (and Sozzer's hasn't even made it to the Index yet, but it's already in my guide). Vayra's pin in Modded Relay is anything but comprehensive, and when people ask for recommendations they invariably get told about the popular stuff the people responding to their queries already know that they themselves like. All of those things already serve to "crush" less well-known mods. Quite contrary to your position, I firmly believe my guide can serve to shed more light on mods that people otherwise wouldn't have known about than they currently get.

Agreed. This especially denigrates unique mods that otherwise create new concepts or mess with stats to have fun.

I'd be very interested to know what mods, specifically, that I'm "denigrating" so I can actually correct any such issues, as otherwise this feels rather like an unsubstantiated insult. The overwhelming majority of mods presently missing from the guide are mods I plan on adding in the future. Most particularly Discord-exclusives. What you see here is just version 1. The fruits of several months of labour, but by no means complete.

Trek has a point here, as the author of one of the aforementioned up and coming mods, I agree that any "mod crushing" and "denigration" this post causes is in most cases likely justified (looking at the shelves of low effort portrait packs here...). While I agree with my pin suggestion being a little unnecessary, I think that some claims should be substantiated.

278
Modding / Re: [0.9.1a] Captain Trek's Guide to the Modiverse
« on: January 31, 2020, 04:08:24 AM »
Congrats on finally posting this, and as predicted it's already caused its fair share of controversy - maybe this could end up as a forum/discord pin (my two cents, of course ;D).

Any guide inherently creates a visibility divide between mods that are in it and mods that aren't. Because it seems comprehensive, pinning this would not only crush mods that aren't in it, but also new mods that don't make a big enough splash.

Agreed. This especially denigrates unique mods that otherwise create new concepts or mess with stats to have fun.
You're right, I was very hasty in that assessment heh.

279
Modding / Re: [0.9.1a] Captain Trek's Guide to the Modiverse
« on: January 30, 2020, 07:24:06 PM »
Congrats on finally posting this, and as predicted it's already caused its fair share of controversy - maybe this could end up as a forum/discord pin (my two cents, of course ;D).

280
Modding / Re: [0.9.1a] Ill-Advised Modifications 1.9.5
« on: January 03, 2020, 04:33:37 AM »
download this mod if iq is big

281
Mods / Re: [0.9.1a] Interstellar Imperium 2.1.1
« on: December 10, 2019, 10:27:35 PM »
Small bug(?) report: When the olympus is in the title menu background it can launch the titan missile, playing the sound effect of its launch, which was loud and pretty shocking ;D

282
Suggestions / Re: API request thread (please read OP before posting!)
« on: December 09, 2019, 07:07:36 PM »
This request is prompted by a weapon I recently scripted with custom projectile velocities and motion.
Demonstration
[close]
As you can see the range indicator as defined by the weapon .csv is misleading due to the range calculation being messed up by the non-linear velocity.

My request is DamagingProjectileAPI.setIsFading(boolean fading) or DamagingProjectileAPI.forceStartFading() to be able to make the projectile fade manually without having to mess around with weapon settings, ultimately creating a range indicator that is misleading to the player and the ai  :D

283
Blog Posts / Re: Raiding for Fun and Profit
« on: November 27, 2019, 03:51:34 PM »
 8) 8) 8) Super exciting, tons of new possibilities, love this feature!

284
General Discussion / Re: Hyperspace Storms: Unfun or Necessary?
« on: November 25, 2019, 05:05:25 AM »
I thought I would add my two cents.
Firstly, I agree that hyperspace storms as they are are annoying and unfun to play with. Yes, they can boost speed, but they are unreliable and cause too much CR loss to be especially useful. I think that a good way to change them without implementing the more complex ideas suggested here is to reduce or remove the mechanic that changes your direction on contact with the cloud, possibly as a skill. The speedboost would be way more welcome if it didn't mean possibly sending your fleet flying on a detour, wasting fuel and supplies, where often multiple storms chain together to send the player in a completely different direction to their target destination.

285
Mods / Re: [0.9.1a] Outer Rim Alliance v0.87 (2019/11/18)
« on: November 18, 2019, 05:40:42 AM »


Maintenance update: added compatibility with various campaign mods (Starship Legend, Commissioned Crew etc), new market music courtesy of Tomatopaste, minor campaign tweaks.

This update should not break saves.

Download available in the Original Post


Changelog:
0.87

 - Added Starship Legend compatibility.
 - Added Ruthless Sector compatibility.
 - Added New Beginnings compatibility.
 - Added Vayra Sector compatibility.
 - Added Commissioned Crew compatibility.
 - Improved Nexerelin integration.
 - Added market music, courtesy of Tomatopaste.

BUGFIXES/IMPROVEMENTS:
 - Economy slightly reduced in regard to other larger factions.
 - Added a few custom portraits.

[close]

Sweet  8) 8) 8) Great fun making the tracks

Pages: 1 ... 17 18 [19] 20