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] 2 3

Author Topic: [OUTDATED] Respec Mod v2.1 (released 2014-01-04)  (Read 34697 times)

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
[OUTDATED] Respec Mod v2.1 (released 2014-01-04)
« on: February 07, 2013, 01:06:59 PM »

This mod is outdated and no longer supported. Use the "respec" command in the Console Commands mod instead.

Spoiler


Have you ever reached a high level in Starsector and decided you want to try something new, but don't want to spend the time and effort required to grind up a new character? Then this mod might be for you. It allows you to keep your current level, but resets all skills and attributes to 0 and refunds the points you spent on them - for a price, of course.

Using this mod:
To respec your character you need to find and buy the 'ThinkTank' item, found in any station that acts as a store. The price of a respec is a number of credits equal to 1/5 the experience required for your current level. This cost does not increase past level 60 (5,913,450 credits). Respeccing can't remove any skills or aptitudes added by mods at this time.

This mod will automatically activate itself when you start a new game or load an old one, and can be safely untagged in the launcher without preventing you from loading your saves.

Changelog:
Spoiler
Quote
2.1 (January 4, 2014)
=======================
(this version is not save compatible with earlier versions)
This mod can now be safely untagged during an active game
Aptitudes and skills are now loaded from the CSV instead of hard-coded
Respec check is now per-hour instead of per-day
Increased efficiency of station and player cargo checks
Fixed respec item showing up for free in neutral stations

 2.0 (September 25, 2013)
==========================
(this version is not save compatible with earlier versions)
Rewrote mod to use EveryFrameScript and ModPlugin, code moved inside a jar
Supports multiple systems, respec item appears in all non-free transfer station
The respec item's icon is now level-based (white -> silver -> gold -> black)
Does NOT support being removed from an active game yet

 1.2b (February 12, 2013)
==========================
Fixed respec item not being removed from player fleet after a respec

 1.2 (February 7, 2013)
========================
(this version is not save compatible with earlier versions)
This mod is now a utility mod, can be run alongside total conversions
This mod will now auto-activate itself when you load an old save
Reduced the cost of respeccing (1/5 the XP required for your current level)
Renamed and added a description to the respec item

 1.1 (February 7, 2013)
========================
The cost of respeccing no longer increases past level 60
New inventory icon (thanks to Gothars)

 1.0 (February 7, 2013)
========================
Initial version, no icon
[close]

Thanks to Gothars for the inventory icon and description. :)
[close]
« Last Edit: October 23, 2015, 04:14:55 PM by LazyWizard »
Logged

GUNINANRUNIN

  • Admiral
  • *****
  • Posts: 719
  • Let's do it!
    • View Profile
Re: Respec Mod v1.0 (.54.1a, released 2013-02-07)
« Reply #1 on: February 07, 2013, 01:43:37 PM »

Why do you have to be so pro at the modding scene?

Honest! :D
Logged
In short, if you throw a stone out of the rear window of your spaceship you will go faster.

Pelly

  • Admiral
  • *****
  • Posts: 757
    • View Profile
Re: Respec Mod v1.0 (.54.1a, released 2013-02-07)
« Reply #2 on: February 07, 2013, 01:47:55 PM »

You want a logo for respec, here you go :D

[attachment deleted by admin]
Logged

Romeo_One

  • Captain
  • ****
  • Posts: 393
  • "Let me do the german dance for you..."
    • View Profile
    • Rejection - The Fight for Unity
Re: Respec Mod v1.0 (.54.1a, released 2013-02-07)
« Reply #3 on: February 07, 2013, 01:50:10 PM »

Will try my hands on this ^^
Logged

theSONY

  • Admiral
  • *****
  • Posts: 673
  • Not a single Flux given
    • View Profile
Re: Respec Mod v1.0 (.54.1a, released 2013-02-07)
« Reply #4 on: February 07, 2013, 04:00:42 PM »

that was damn quick :D
Logged
-the ABOMINATION - in progress

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4403
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: Respec Mod v1.0 (.54.1a, released 2013-02-07)
« Reply #5 on: February 07, 2013, 04:30:47 PM »

Very nice, added to the index.


Here's my attempt at a sprite:



The Neuroventure Corp. "ThinkTank" was developed with one bold goal in mind: to make traditional learning superfluous. It has stored in it's memory bank neuronal patterns worth hundredths of years of human experience, ready to be implanted in a subjects brain within hours. While the imprinting technique on basis of neuro-equivalent nano robotics was initially promising, unforeseen side effects prevented a full success. The sudden increase in neuronal density and pattern diversity in the subjects brain proofed to be too much for the human consciousness, it came to cases of dementia, psychosis and in in some instances even to the death of the test subjects.

Having invested enormous capital into the development of the ThinkTank, Neuroventure refused to give up the project but instead took refuge in a lower level form of tank-learning. The only save implementation of the technique required a consistent level of neuronal complexity - i.e. a subject can learn new skills only for the price of forgetting old ones. Neuroventure thus marketed the ThinkTank not as a primary learning device, but as a way to shift a high level of experience from one specialization to another.

Note: The Neuroventure ThinkTank is available in many colors, please ask if you have a preference.


[attachment deleted by admin]
« Last Edit: February 07, 2013, 10:11:35 PM by Gothars »
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: Respec Mod v1.1 (.54.1a, released 2013-02-07)
« Reply #6 on: February 07, 2013, 05:03:58 PM »

Version 1.1 is out. Get it here. Two changes: the cost of a respec stops increasing once you reach level 60 (as otherwise the cost rapidly goes into the tens/hundreds of millions past this point), and the respec item now has an inventory icon (thank you, Gothars).


Spoiler
The Neuroventure Corp. "ThinkTank" was developed with one bold goal in mind: to make traditional learning superfluous. It has stored in it's memory bank neuronal patterns worth hundredths of years of human experience, ready to be implanted in a subjects brain within hours. While the imprinting technique on basis of neuro-equivalent nano robotics was initially promising, unforeseen side effects prevented a full success. The sudden increase in neuronal density and pattern diversity in the subjects brain proofed to be too much for the human consciousness, it came to cases of dementia, psychosis and in in some instances even to the death of the test subjects.

Having invested enormous capital into the development of the ThinkTank, Neuroventure refused to give up the project but instead took refuge in a lower level form of tank-learning. The only save implementation of the technique required a consistent level of neuronal complexity - i.e. a subject can learn new skills only for the price of forgetting old ones. Neuroventure thus marketed the ThinkTank not as a primary learning device, but as a way to shift a high level of experience from one specialization to another.

Note: The Neuroventure ThinkTank is available in many colors, please ask if you have a preference.
[close]

I like this. :) Unfortunately, it doesn't fit in the description text very well.
Logged

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4403
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: Respec Mod v1.1 (.54.1a, released 2013-02-07)
« Reply #7 on: February 07, 2013, 05:22:03 PM »

Yeah, that was more for fun :)  Or for the codex if it can display cargo items one day.

Maybe this fits better:
ThinkTank
The Neuroventure ThinkTank will rearrange neuronal connections and thus allows to shift character abilities from one specialization to another. A more experienced user requires a more complex level of rearrangement, only provided by higher prized versions of the ThinkTank.



Oh, and @ Romeo_One: Don't let this stop you from making another sprite, I don't mind at all if yours is used if it turns out better.
« Last Edit: February 07, 2013, 05:26:32 PM by Gothars »
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: Respec Mod v1.1 (.54.1a, released 2013-02-07)
« Reply #8 on: February 07, 2013, 05:36:53 PM »

Maybe this fits better:
ThinkTank
The Neuroventure ThinkTank will rearrange neuronal connections and thus allows to shift character abilities from one specialization to another. A more experienced user requires a more complex level of rearrangement, only provided by higher prized versions of the ThinkTank.

Not quite yet. It gets cut off at "a more complex level of r".

Also, I might be the laziest person ever. If you check the source code of the mod, I wrote a method to create the resources.csv and descriptions.csv for me. It definitely makes this part easier! :D
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: Respec Mod v1.2 (.54.1a, released 2013-02-07)
« Reply #9 on: February 07, 2013, 08:28:36 PM »

Version 1.2 is up, get it here. With this version, you can add this mod to existing saves - simply get into a non-refit fight and the mod will be activated. This update also renames and adds a description to the respec item (it's now called a ThinkTank).

Unfortunately, this update is not save-compatible with 1.0 or 1.1. If you want to continue using a save that has a prior version of this mod activated, open up your save's campaign.xml and delete any reference to RespecPlugin. For example:
Code
      <data.scripts.respec.RespecPlugin>
        <lastCheck>-55669226400000</lastCheck>
        <firstSetup>true</firstSetup>
      </data.scripts.respec.RespecPlugin>


I can release three updates in a day if I want to...
Logged

Romeo_One

  • Captain
  • ****
  • Posts: 393
  • "Let me do the german dance for you..."
    • View Profile
    • Rejection - The Fight for Unity
Re: Respec Mod v1.2 (.54.1a, released 2013-02-07)
« Reply #10 on: February 07, 2013, 09:06:58 PM »

You ain't no LAZY wizard!
Logged

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4403
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: Respec Mod v1.2 (.54.1a, released 2013-02-07)
« Reply #11 on: February 07, 2013, 10:17:33 PM »

Adding it to existing saves is just perfect, respecing is something you rarely plan ahead. I didn't even know that was possible.

I cleaned up the sprites btw, you should re-download before the next update.
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: Respec Mod v1.2 (.54.1a, released 2013-02-07)
« Reply #12 on: February 07, 2013, 10:54:27 PM »

Adding it to existing saves is just perfect, respecing is something you rarely plan ahead. I didn't even know that was possible.

It's a really hacky solution. The respec plugin stores the StarSystemAPI used by the last save that had this mod active, and there's a combat plugin that checks if this is the same as the current star system. If not, then this save doesn't have the mod activated and it adds the spawn point.

I haven't run into any problems with it yet, but there will be bugs if a later update adds a 'save as' option to the game.

Here's the basic code that allows this:

data/scripts/plugins/CheckAddRespec.java
Code
package data.scripts.plugins;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.EveryFrameCombatPlugin;
import data.scripts.respec.RespecPlugin;
import java.util.List;

public class CheckAddRespec implements EveryFrameCombatPlugin
{
    @Override
    public void advance(float amount, List events)
    {
    }

    @Override
    public void init(CombatEngineAPI engine)
    {
        if (engine.isInCampaign())
        {
            List systems = Global.getSector().getStarSystems();
            if (systems.isEmpty())
            {
                throw new RuntimeException("No starsystems found!");
            }

            StarSystemAPI system = (StarSystemAPI) systems.get(0);
            if (system != RespecPlugin.getLastSystem())
            {
                system.addSpawnPoint(new RespecPlugin(system));
            }
        }
    }
}

data/scripts/respec/RespecPlugin.java
Code
package data.scripts.respec;

import com.fs.starfarer.api.campaign.SpawnPointPlugin;
import com.fs.starfarer.api.campaign.StarSystemAPI;

public class RespecPlugin implements SpawnPointPlugin
{
    private static StarSystemAPI lastSystem = null;
    private StarSystemAPI system;

    public RespecPlugin(StarSystemAPI system)
    {
        RespecPlugin.lastSystem = this.system = system;
    }

    public Object readResolve()
    {
        RespecPlugin.lastSystem = this.system;
        return this;
    }

    public static StarSystemAPI getLastSystem()
    {
        return lastSystem;
    }
}
« Last Edit: February 07, 2013, 11:07:00 PM by LazyWizard »
Logged

DelicateTask

  • Commander
  • ***
  • Posts: 223
    • View Profile
Re: Respec Mod v1.2 (.54.1a, released 2013-02-07)
« Reply #13 on: February 10, 2013, 02:08:28 PM »

After this mod, you could say I have a lot of :) > 8) respec for you.
YEAAAAAAAAAAAAAAAAAAAAAA

Can't wait to try it out.
Logged

LazyWizard

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1363
    • View Profile
    • GitHub Profile
Re: Respec Mod v1.2b (.54.1a, released 2013-02-12)
« Reply #14 on: February 12, 2013, 11:11:42 AM »

I uploaded a minor bugfix patch, get it here. This update is save-compatible.
Logged
Pages: [1] 2 3