Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 18 19 [20] 21 22 ... 93

Author Topic: [0.96a] Console Commands v2023.05.05  (Read 1535620 times)

Pyxll

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #285 on: November 22, 2015, 12:18:11 PM »

So I believe I installed the mod correctly, but I get this error when I start the game:

Fatal: org/lazywizard/lazylib/JSONUtils
Cause: org.lazywizard.lazylib.JSONUtils

Let me know if I did something wrong or what I need to do to fix it, thanks!  :)
Logged

Sy

  • Admiral
  • *****
  • Posts: 1225
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #286 on: November 22, 2015, 12:28:07 PM »

sounds like you just need to download and install the LazyLib mod, which is required for Console Commands (and for many other mods). download link is in the opening post, next to the download for Console Commands.
Logged

Schwartz

  • Admiral
  • *****
  • Posts: 1452
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #287 on: November 22, 2015, 12:40:03 PM »

The 'Respec' command gives you way more skill points than you should have. Does it still work off the old progression?
Logged

Aklyon

  • Commander
  • ***
  • Posts: 195
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #288 on: November 22, 2015, 03:45:06 PM »

The 'Respec' command gives you way more skill points than you should have. Does it still work off the old progression?
Are you sure you didn't have that many points in the first place? It worked fine when I used it.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #289 on: November 22, 2015, 04:08:51 PM »

The 'Respec' command gives you way more skill points than you should have. Does it still work off the old progression?

It doesn't use the progression plugin, it counts your spent points and refunds them using the skill/aptitude lists provided by the API. It shouldn't be possible for it to give you more points than you started with.

Spoiler
Code: java
package org.lazywizard.console.commands;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
import org.lazywizard.console.BaseCommand;
import org.lazywizard.console.CommonStrings;
import org.lazywizard.console.Console;

public class Respec implements BaseCommand
{
    @Override
    public CommandResult runCommand(String args, CommandContext context)
    {
        if (!context.isInCampaign())
        {
            Console.showMessage(CommonStrings.ERROR_CAMPAIGN_ONLY);
            return CommandResult.WRONG_CONTEXT;
        }

        Console.showMessage("Performing respec...");

        // Refund aptitudes
        int total;
        final MutableCharacterStatsAPI player
                = Global.getSector().getPlayerFleet().getCommanderStats();
        for (String currId : Global.getSettings().getSortedAbilityIds())
        {
            total = (int) player.getAptitudeLevel(currId);
            if (total > 0)
            {
                Console.showMessage(" - removed " + total + " points from aptitude " + currId);
                player.setAptitudeLevel(currId, 0f);
                player.addAptitudePoints(total);
            }
        }

        // Refund skills
        for (String currId : Global.getSettings().getSortedSkillIds())
        {
            total = (int) player.getSkillLevel(currId);
            if (total > 0)
            {
                Console.showMessage(" - removed " + total + " points from skill " + currId);
                player.setSkillLevel(currId, 0f);
                player.addSkillPoints(total);
            }
        }

        Console.showMessage("Respec complete.");
        return CommandResult.SUCCESS;
    }
}
[close]
Logged

Schwartz

  • Admiral
  • *****
  • Posts: 1452
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #290 on: November 22, 2015, 04:16:05 PM »

I figured it out. It doesn't refund aptitude points. But it gives me the number of aptitude points I've spent and adds them to my skill points.

This is in RC10. Mods're up to date. The save started in RC7, though.
« Last Edit: November 22, 2015, 04:19:08 PM by Schwartz »
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #291 on: November 22, 2015, 04:53:08 PM »

Right. I see what's wrong with it now. It should be fixed for the next release.
Logged

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #292 on: November 23, 2015, 05:19:33 PM »

If possible you might want to update the spawn fleet command to include officers
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

Chronosfear

  • Commander
  • ***
  • Posts: 211
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #293 on: November 27, 2015, 06:22:20 AM »

Hi
Is there a command to reset/set relation of all factions to amount x ( 0 for me )
I only could find the one to change it for one faction a time and only +/- x amount

Since i started using the savetransfer I thought it would be nice to  reset my relations to 0 after "restarting" the game.

Chronosfear

Logged
Be the change that you wish to see in the world.

My words are backed with nuclear weapons
Gandhi (Civ)

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #294 on: November 27, 2015, 03:05:45 PM »

If possible you might want to update the spawn fleet command to include officers

I'll see what I can do. SpawnFleet needs a complete overhaul anyway (again!), since it's still using the old fleet generation methods.

Hi
Is there a command to reset/set relation of all factions to amount x ( 0 for me )
I only could find the one to change it for one faction a time and only +/- x amount

Since i started using the savetransfer I thought it would be nice to  reset my relations to 0 after "restarting" the game.

Chronosfear

There's SetRelationship (sets relation to entered value) and AdjustRelationship (modifies existing relation by what you entered). Both are a pain to use, so I just made some changes for the next version:
  • You can now enter "all" as an argument.
  • If you only enter one faction it assumes the other is "player", since that's 99% of use cases.
  • SetRelationship accepts relationship levels (friendly, inhospitable, etc)
  • I just now renamed the commands to SetRelation/AdjustRelation because they are such a pain to type, and also added sr and ar as aliases.
Logged

Sy

  • Admiral
  • *****
  • Posts: 1225
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #295 on: November 27, 2015, 11:21:26 PM »

those changes sound perfect! i use the AdjustRelationShip command frequently in my current run, and these will safe me a lot of typing :D
Logged

Auraknight

  • Commander
  • ***
  • Posts: 125
  • I am a Knight of Aura.
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #296 on: November 30, 2015, 05:43:38 PM »

is there any way we could get an 'addcommander' or some way to get commanders with specific personalities?
Logged
~Aura be with you

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #297 on: November 30, 2015, 05:53:30 PM »

There will be an AddOfficer command in the next version! :)

I'll try to get the next version out soon. Here is the changelog so far:
Quote
2.6 (December XX, 2015)
=========================
New features:
 - Command tab completion. Press tab to cycle through all matches for the
   current command from the cursor onwards (campaign input dialog only)
New commands:
 - AddOfficer, adds a skilled officer to the player fleet
 - Hide, makes the player fleet invisible to other fleets
 - ListStorage, lists everything you've left in a storage tab and its location
Changes to existing commands:
 - AddShip uses list of all variants added to the API in 0.7a, doesn't care
   about miscapitalizations in variant IDs (requires 0.7a-RC10 hotfix)
 - Jump positions the player fleet a safe distance away from the system's star
 - Jumps to hyperspace in systems without a hyperspace anchor will work,
   teleport you to the center of hyperspace
 - List accepts arguments "planets" and "variants" (VERY spammy), "markets" now
   shows the location, owning faction, and their relationship with the player
 - Respec properly refunds aptitude points again
 - Reveal works on the campaign map, maximizes sensor range and strength
   (both have a hard cap, so revealing the entire map isn't feasible)
 - AdjustRelationship/SetRelationship changes:
   - Renamed to AdjustRelation/SetRelation
   - If only one faction is entered, use player faction as the target
   - If "all" is entered as argument, changes relation with all other factions
   - RepLevels are allowed as an argument ("friendly", "hostile", etc)
 - SpawnFleet adds officers to the created fleet, levels based on quality factor
   (note: SpawnFleet no longer matches vanilla fleet compositions post-0.7a)
New aliases:
 - ar -> AdjustRelation
 - sr -> SetRelation
Logged

Schwartz

  • Admiral
  • *****
  • Posts: 1452
    • View Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #298 on: November 30, 2015, 08:22:34 PM »

Is it possible to add a Respec for officers?

It would also be helpful if a blank Adjust- or SetRelationship command listed all targets for the command. I had to dig around in the Starsector folder last time for the faction names, because the auto-complete mechanic didn't want to pick up on 'Sindrian' or 'Diktat' for some reason.

Anyway, thanks for the update. I love the console.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: [0.7a] Console Commands v2.5 (released 2015-11-19)
« Reply #299 on: November 30, 2015, 08:46:29 PM »

Is it possible to add a Respec for officers?

It's not possible to the best of my knowledge. We don't have the ability to remove levels, so they wouldn't earn their replacement skills properly. I'll mess around with it just in case I'm wrong, though.

Quote
It would also be helpful if a blank Adjust- or SetRelationship command listed all targets for the command. I had to dig around in the Starsector folder last time for the faction names, because the auto-complete mechanic didn't want to pick up on 'Sindrian' or 'Diktat' for some reason.

Added. In the meantime you can use "list factions".

Quote
Anyway, thanks for the update. I love the console.

My pleasure. :)
Logged
Pages: 1 ... 18 19 [20] 21 22 ... 93