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.

Topics - MShadowy

Pages: [1]
1
So recently I ended up having to reinstall my operating system, and in the process upgraded from Ubuntu 18.04 to 20.04; since it was a new set up I figured I'd try the default .sh script that comes with starsector to see if it worked properly, since it wasn't working before. Previously it would crash instantly upon trying to launch, something about being unable to find the java classpath iirc. This has improved since I last tested it! It loads... and then crashes when trying to get to the main menu.

Inexplicably the error is that it cannot find the packaged xstream, which... well I'd have expected it to crash earlier if that were the case. This seems even more odd because both versions of the shell script I'm using point at the same spot, and the version of the script which uses the system default java runs just fine.

Spoiler
Code
64624 [Thread-5] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoClassDefFoundError: com/thoughtworks/xstream/XStreamException
java.lang.NoClassDefFoundError: com/thoughtworks/xstream/XStreamException
at com.fs.starfarer.title.ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.updateContinueButtonState(Unknown Source)
at com.fs.starfarer.title.ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.float.public(Unknown Source)
at com.fs.starfarer.title.ooOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.<init>(Unknown Source)
at com.fs.starfarer.title.OoOO.<init>(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.createUI(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)
Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.XStreamException
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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 11 more
[close]

Anyway, while this has been worked around I figured I might as well report it since having to tinker with this kind of thing to resolve it seems like a potential future problem.

2
Modding / Getting custom commodities to export questions
« on: November 21, 2018, 02:22:41 PM »
This may warrant a separate thread here in Modding - too many details and too many potential complications.

One key thing to note, however, is for something to be exported, there must be demand for it. So if you're just adding a new commodity, that might be an issue.

Generally speaking, adding new commodities could be trouble; the UI space to handle them is fairly limited.

Alright, so following Alex's advice I've opened a new thread specifically about trying to figure out ways to get custom commodities to interact nicely with the standard economy present in Starsector. So far this presents two possibilities, at least that I can think of; the first and simplest is just adding an economic building which requires one of the goods made to function. The second is a system of partial substitution for an existing demanded good.

For an example of the we'll look at the Batteries coming from the planet Lambent (technically High Capacitance Storage but I'm not typing that more than once); we can set these up as a trade good that mostly is moved around internally, being used in SRA modular fabricators which benefit from backup power supplies with something like:

Spoiler
Code: java
package data.campaign.econ

import com.fs.starfarer.api.campaign.econ.CommodityOnMarketAPI;
import com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry;
import com.fs.starfarer.api.impl.campaign.ids.Commodities;
import com.fs.starfarer.api.util.Pair;
import data.campaign.econ.MS_commodities;

public class thisClass extends BaseIndustry {

   @Override
   public void apply() {
      super.apply(true);
      int size = market.getSize();

      demand(MS_commodities.BATTERIES, size -x);
      supply(Stuff.STUFF, size);

      Pair<String, Integer>deficit = getMaxDeficit(MS_commodities.BATTERIES);

      applyDeficitToProduction(1, deficit, Stuff.STUFF);

      if (!isFunctional()) {
         supply.clear();
      }
   }

   @Override
   public void unapply() {
      super.unapply();
   }
}
[close]

However on it's own this does not appear sufficient to actually get the batteries to export. As we can see here, the Fabricators are placing a demand for the Capacitors, but they're not being shipped:

Spoiler
[close]

A line of potential solution for this problem might look something like this (but is definitely not this):

Spoiler
Code: java
package data.campaign.econ;

import com.fs.starfarer.api.impl.campaign.econ.BaseMarketConditionPlugin;

public class MS_batteryExporter extends BaseMarketConditionPlugin {
 
    @Override
    public void apply(String id) {
        super.apply(id);
       
        if (market.hasIndustry(MS_industries.SOLAR)) {
            market.getCommodityData(MS_commodities.BATTERIES).getDemand();
            market.getCommodityData(MS_commodities.BATTERIES).getExportIncome();
        }
    }
 
    @Override
    public void unapply(String id) {
        super.unapply(id);
    }
}
[close]

The other and more complex and probably finicky option is partial substitution; in this case we'll look at the Med Center and the cloned organs it produces. While currently not in any kind of demand the plan for something like these would be to modify demand so that they are substituted in for another item of supply, in this case harvested organs. Presumably we would work this out by looking through connected markets and, up to a certain limit, substituting the cloned bits for the less savory bits.

Given how confounded I am by the simpler problem on this issue, I'm not even going to being to speculate on how this issue might be resolved. Sorry again for all the trouble; any help would be appreciated.

3
Already started off with this in the Misc Modding Questions thread, so I'll spare to much of the song and dance routine; custom Heavy Industry type; it applies the bonuses correctly but while it opens up the dialogue for installation the modules do not appear in the dialogue. Below is the code, largely just modified version of the default HeavyIndustry and NanoforgeInstallableItemPlugin scripts:

MS_modularFac.java
Spoiler
Code: java
package data.campaign.econ.industries;

import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.campaign.SpecialItemData;
import com.fs.starfarer.api.campaign.SpecialItemSpecAPI;
import com.fs.starfarer.api.campaign.econ.CommodityOnMarketAPI;
import com.fs.starfarer.api.campaign.econ.Industry;
import com.fs.starfarer.api.campaign.econ.InstallableIndustryItemPlugin;
import com.fs.starfarer.api.campaign.econ.InstallableIndustryItemPlugin.InstallableItemDescriptionMode;
import com.fs.starfarer.api.campaign.econ.MarketAPI.MarketInteractionMode;
import com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry;
import com.fs.starfarer.api.impl.campaign.ids.Commodities;
import com.fs.starfarer.api.impl.campaign.ids.Items;
import com.fs.starfarer.api.impl.campaign.ids.Stats;
import com.fs.starfarer.api.ui.TooltipMakerAPI;
import com.fs.starfarer.api.util.Pair;
import data.campaign.econ.MS_industries;
import data.campaign.econ.industries.MS_NanoforgePlugin.MS_NanoforgeEffect;

public class MS_modularFac extends BaseIndustry {
        
        @Override
        public void apply() {
super.apply(true);
                int size = market.getSize();
                
                boolean works = MS_industries.PARALLEL_PRODUCTION.equals(getId());
                int shipBonus = 0;
                float qualityBonus = 0.1f;
                if (works) {
                    qualityBonus = 0.25f;
                }
                
                demand(Commodities.METALS, size -1);
                demand(Commodities.RARE_METALS, size -3);
                
                supply(Commodities.HEAVY_MACHINERY, size - 3);
supply(Commodities.SUPPLIES, size - 3);
supply(Commodities.HAND_WEAPONS, size - 3);
supply(Commodities.SHIPS, size - 3);
if (shipBonus > 0) {
supply(1, Commodities.SHIPS, shipBonus, "Massively parallel fabricators");
}
                
                Pair<String, Integer> deficit = getMaxDeficit(Commodities.METALS, Commodities.RARE_METALS);
int maxDeficit = size -4;
                if (deficit.two > maxDeficit) deficit.two = maxDeficit;

applyDeficitToProduction(2, deficit,
Commodities.HEAVY_MACHINERY,
Commodities.SUPPLIES,
Commodities.HAND_WEAPONS,
Commodities.SHIPS);

                applyNanoforgeEffects();
                
if (qualityBonus > 0) {
market.getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD).modifyFlat(getModId(1), qualityBonus, "Massively parallel fabricators");
}

float stability = market.getPrevStability();
if (stability < 5) {
float stabilityMod = (stability - 5f) / 5f;
stabilityMod *= 0.5f;
//market.getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD).modifyFlat(getModId(0), stabilityMod, "Low stability at production source");
market.getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD).modifyFlat(getModId(0), stabilityMod, getNameForModifier() + " - low stability");
}

if (!isFunctional()) {
supply.clear();
unapply();
}
        }
        
        @Override
        public void unapply() {
super.unapply();
                
                if (nanoforge != null) {
MS_NanoforgeEffect effect = MS_NanoforgePlugin.NANOFORGE_EFFECTS.get(nanoforge.getId());
if (effect != null) {
effect.unapply(this);
}
}

market.getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD).unmodifyFlat(getModId(0));
market.getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD).unmodifyFlat(getModId(1));
        }
        
        @Override
protected void upgradeFinished(Industry previous) {
super.upgradeFinished(previous);

if (previous instanceof MS_modularFac) {
setNanoforge(((MS_modularFac) previous).getNanoforge());
}
}
        
        protected void applyNanoforgeEffects() {

if (nanoforge != null) {
MS_NanoforgeEffect effect = MS_NanoforgePlugin.NANOFORGE_EFFECTS.get(nanoforge.getId());
if (effect != null) {
effect.apply(this);
}
}
}
        
        protected SpecialItemData nanoforge = null;
        
        public void setNanoforge(SpecialItemData nanoforge) {
if (nanoforge == null && this.nanoforge != null) {
MS_NanoforgeEffect effect = MS_NanoforgePlugin.NANOFORGE_EFFECTS.get(this.nanoforge.getId());
if (effect != null) {
effect.unapply(this);
}
}
this.nanoforge = nanoforge;
}

public SpecialItemData getNanoforge() {
return nanoforge;
}

        @Override
public SpecialItemData getSpecialItem() {
return nanoforge;
}

        @Override
public void setSpecialItem(SpecialItemData special) {
nanoforge = special;
}

@Override
public boolean wantsToUseSpecialItem(SpecialItemData data) {
if (nanoforge != null && Items.CORRUPTED_NANOFORGE.equals(nanoforge.getId()) &&
data != null && Items.PRISTINE_NANOFORGE.equals(data.getId())) {
return true;
}

return nanoforge == null &&
data != null &&
MS_NanoforgePlugin.NANOFORGE_EFFECTS.containsKey(data.getId());
}

@Override
protected void addPostSupplySection(TooltipMakerAPI tooltip, boolean hasSupply, IndustryTooltipMode mode) {
super.addPostSupplySection(tooltip, hasSupply, mode);
}
        
        @Override
public void notifyBeingRemoved(MarketInteractionMode mode, boolean forUpgrade) {
super.notifyBeingRemoved(mode, forUpgrade);
if (nanoforge != null && !forUpgrade) {
CargoAPI cargo = getCargoForInteractionMode(mode);
if (cargo != null) {
cargo.addSpecial(nanoforge, 1);
}
}
}
        
        @Override
protected boolean addNonAICoreInstalledItems(IndustryTooltipMode mode, TooltipMakerAPI tooltip, boolean expanded) {
if (nanoforge == null) return false;

float opad = 10f;

FactionAPI faction = market.getFaction();
Color color = faction.getBaseUIColor();
Color dark = faction.getDarkUIColor();


SpecialItemSpecAPI nanoforgeSpec = Global.getSettings().getSpecialItemSpec(nanoforge.getId());

TooltipMakerAPI text = tooltip.beginImageWithText(nanoforgeSpec.getIconName(), 48);
MS_NanoforgeEffect effect = MS_NanoforgePlugin.NANOFORGE_EFFECTS.get(nanoforge.getId());
effect.addItemDescription(text, nanoforge, InstallableItemDescriptionMode.INDUSTRY_TOOLTIP);
tooltip.addImageWithText(opad);

return true;
}

        @Override
public boolean isDemandLegal(CommodityOnMarketAPI com) {
return true;
}

        @Override
public boolean isSupplyLegal(CommodityOnMarketAPI com) {
return true;
}
        
        @Override
public List<InstallableIndustryItemPlugin> getInstallableItems() {
ArrayList<InstallableIndustryItemPlugin> list = new ArrayList<>();
list.add(new MS_NanoforgePlugin(this));
return list;
}

@Override
public void initWithParams(List<String> params) {
super.initWithParams(params);

for (String str : params) {
if (MS_NanoforgePlugin.NANOFORGE_EFFECTS.containsKey(str)) {
setNanoforge(new SpecialItemData(str, null));
break;
}
}
}

@Override
public List<SpecialItemData> getVisibleInstalledItems() {
List<SpecialItemData> result = super.getVisibleInstalledItems();

if (nanoforge != null) {
result.add(nanoforge);
}

return result;
}

        @Override
public float getPatherInterest() {
float base = 2f;
if (nanoforge != null) base += 4f;
return base + super.getPatherInterest();
}
}
[close]

MS_NanoforgePlugin.java
Spoiler
Code: java
package data.campaign.econ.industries;

import java.util.HashMap;
import java.util.Map;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.SpecialItemData;
import com.fs.starfarer.api.campaign.SpecialItemSpecAPI;
import com.fs.starfarer.api.campaign.econ.Industry;
import com.fs.starfarer.api.campaign.econ.InstallableIndustryItemPlugin.InstallableItemDescriptionMode;
import com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry;
import com.fs.starfarer.api.impl.campaign.econ.impl.BaseInstallableIndustryItemPlugin;
import com.fs.starfarer.api.impl.campaign.ids.Commodities;
import com.fs.starfarer.api.impl.campaign.ids.Items;
import com.fs.starfarer.api.impl.campaign.ids.Stats;
import com.fs.starfarer.api.ui.TooltipMakerAPI;
import com.fs.starfarer.api.util.Misc;

public class MS_NanoforgePlugin extends BaseInstallableIndustryItemPlugin {
    
        public static float CORRUPTED_NANOFORGE_BONUS = 0.1f;
        public static float PRISTINE_NANOFORGE_BONUS = 0.25f;

        public static int CORRUPTED_NANOFORGE_PROD = 1;
        public static int PRISTINE_NANOFORGE_PROD = 3;
    
        /**
* Very important for implementations of this to not store *any* references to campaign data in data members, since
* this is stored in a static map and persists between game loads etc.
*/
public static interface MS_NanoforgeEffect {
void apply(Industry industry);
void unapply(Industry industry);
void addItemDescription(TooltipMakerAPI text, SpecialItemData data, InstallableItemDescriptionMode mode);
}
        
        public static Map<String, MS_NanoforgeEffect> NANOFORGE_EFFECTS = new HashMap<String, MS_NanoforgeEffect>() {{
put(Items.CORRUPTED_NANOFORGE, new MS_NanoforgeEffect() {
                        @Override
public void apply(Industry industry) {
SpecialItemSpecAPI spec = Global.getSettings().getSpecialItemSpec(Items.CORRUPTED_NANOFORGE);
industry.getMarket().getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD)
.modifyFlat("nanoforge", CORRUPTED_NANOFORGE_BONUS, Misc.ucFirst(spec.getName().toLowerCase()));

if (industry instanceof BaseIndustry) {
BaseIndustry b = (BaseIndustry) industry;
int bonus = CORRUPTED_NANOFORGE_PROD;
b.supply(3, Commodities.HEAVY_MACHINERY, bonus, Misc.ucFirst(spec.getName().toLowerCase()));
b.supply(3, Commodities.SUPPLIES, bonus, Misc.ucFirst(spec.getName().toLowerCase()));
b.supply(3, Commodities.HAND_WEAPONS, bonus, Misc.ucFirst(spec.getName().toLowerCase()));
b.supply(3, Commodities.SHIPS, bonus, Misc.ucFirst(spec.getName().toLowerCase()));
}
}
                        @Override
public void unapply(Industry industry) {
industry.getMarket().getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD)
.unmodifyFlat("nanoforge");

if (industry instanceof BaseIndustry) {
BaseIndustry b = (BaseIndustry) industry;
b.supply(3, Commodities.HEAVY_MACHINERY, 0, null);
b.supply(3, Commodities.SUPPLIES, 0, null);
b.supply(3, Commodities.HAND_WEAPONS, 0, null);
b.supply(3, Commodities.SHIPS, 0, null);
}
}
                        @Override
public void addItemDescription(TooltipMakerAPI text, SpecialItemData data, InstallableItemDescriptionMode mode) {
SpecialItemSpecAPI spec = Global.getSettings().getSpecialItemSpec(Items.CORRUPTED_NANOFORGE);
String name = Misc.ucFirst(spec.getName().toLowerCase());
String pre = "";
float pad = 0f;
if (mode == InstallableItemDescriptionMode.MANAGE_ITEM_DIALOG_LIST ||
mode == InstallableItemDescriptionMode.INDUSTRY_TOOLTIP) {
pre = name + ". ";
} else if (mode == InstallableItemDescriptionMode.MANAGE_ITEM_DIALOG_INSTALLED ||
mode == InstallableItemDescriptionMode.INDUSTRY_MENU_TOOLTIP) {
pre = name + " currently installed. ";
}
if (mode == InstallableItemDescriptionMode.INDUSTRY_MENU_TOOLTIP ||
mode == InstallableItemDescriptionMode.CARGO_TOOLTIP) {
pad = 10f;
}
text.addPara(pre + "Increases ship and weapon production quality by %s. " +
"Increases production by %s unit.",
pad, Misc.getHighlightColor(),
"" + (int) Math.round(CORRUPTED_NANOFORGE_BONUS * 100f) + "%",
"" + (int) CORRUPTED_NANOFORGE_PROD);
}
});
put(Items.PRISTINE_NANOFORGE, new MS_NanoforgeEffect() {
                        @Override
public void apply(Industry industry) {
SpecialItemSpecAPI spec = Global.getSettings().getSpecialItemSpec(Items.PRISTINE_NANOFORGE);
industry.getMarket().getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD)
.modifyFlat("nanoforge", PRISTINE_NANOFORGE_BONUS, Misc.ucFirst(spec.getName().toLowerCase()));

if (industry instanceof BaseIndustry) {
BaseIndustry b = (BaseIndustry) industry;
int bonus = PRISTINE_NANOFORGE_PROD;
b.supply(3, Commodities.HEAVY_MACHINERY, bonus, Misc.ucFirst(spec.getName().toLowerCase()));
b.supply(3, Commodities.SUPPLIES, bonus, Misc.ucFirst(spec.getName().toLowerCase()));
b.supply(3, Commodities.HAND_WEAPONS, bonus, Misc.ucFirst(spec.getName().toLowerCase()));
b.supply(3, Commodities.SHIPS, bonus, Misc.ucFirst(spec.getName().toLowerCase()));
}
}
                        @Override
public void unapply(Industry industry) {
industry.getMarket().getStats().getDynamic().getMod(Stats.PRODUCTION_QUALITY_MOD)
.unmodifyFlat("nanoforge");

if (industry instanceof BaseIndustry) {
BaseIndustry b = (BaseIndustry) industry;
b.supply(3, Commodities.HEAVY_MACHINERY, 0, null);
b.supply(3, Commodities.SUPPLIES, 0, null);
b.supply(3, Commodities.HAND_WEAPONS, 0, null);
b.supply(3, Commodities.SHIPS, 0, null);
}
}
                        @Override
public void addItemDescription(TooltipMakerAPI text, SpecialItemData data, InstallableItemDescriptionMode mode) {
SpecialItemSpecAPI spec = Global.getSettings().getSpecialItemSpec(Items.PRISTINE_NANOFORGE);
String name = Misc.ucFirst(spec.getName().toLowerCase());
String pre = "";
float pad = 0f;
if (mode == InstallableItemDescriptionMode.MANAGE_ITEM_DIALOG_LIST ||
mode == InstallableItemDescriptionMode.INDUSTRY_TOOLTIP) {
pre = name + ". ";
} else if (mode == InstallableItemDescriptionMode.MANAGE_ITEM_DIALOG_INSTALLED ||
mode == InstallableItemDescriptionMode.INDUSTRY_MENU_TOOLTIP) {
pre = name + " currently installed. ";
}
if (mode == InstallableItemDescriptionMode.INDUSTRY_MENU_TOOLTIP ||
mode == InstallableItemDescriptionMode.CARGO_TOOLTIP) {
pad = 10f;
}
text.addPara(pre + "Increases ship and weapon production quality by %s. " +
"Increases production by %s units.",
pad, Misc.getHighlightColor(),
"" + (int) Math.round(PRISTINE_NANOFORGE_BONUS * 100f) + "%",
"" + (int) PRISTINE_NANOFORGE_PROD);
}
});
}};
    
        private MS_modularFac industry;

public MS_NanoforgePlugin(MS_modularFac industry) {
this.industry = industry;
}
        
        @Override
public String getMenuItemTitle() {
if (getCurrentlyInstalledItemData() == null) {
return "Install nanoforge...";
}
return "Manage nanoforge...";
}

@Override
public String getUninstallButtonText() {
return "Uninstall nanoforge";
}
        
        @Override
public SpecialItemData getCurrentlyInstalledItemData() {
return industry.getNanoforge();
}
        
        @Override
public void setCurrentlyInstalledItemData(SpecialItemData data) {
industry.setNanoforge(data);
}

@Override
public String getNoItemCurrentlyInstalledText() {
return "No nanoforge currently installed";
}

@Override
public String getNoItemsAvailableText() {
return "No nanoforges available";
}

@Override
public String getNoItemsAvailableTextRemote() {
return "No nanoforges available in storage";
}

@Override
public String getSelectItemToAssignToIndustryText() {
return "Select nanoforge to install for " + industry.getCurrentName();
}
        
        @Override
public void addItemDescription(TooltipMakerAPI text, SpecialItemData data,
  InstallableItemDescriptionMode mode) {
MS_NanoforgeEffect effect = NANOFORGE_EFFECTS.get(data.getId());
if (effect != null) {
effect.addItemDescription(text, data, mode);
}
}
        
        @Override
public boolean isMenuItemTooltipExpandable() {
return false;
}

@Override
public float getMenuItemTooltipWidth() {
return super.getMenuItemTooltipWidth();
}

@Override
public boolean hasMenuItemTooltip() {
return super.hasMenuItemTooltip();
}
        
        @Override
public void createMenuItemTooltip(TooltipMakerAPI tooltip, boolean expanded) {
float pad = 3f;
float opad = 10f;

tooltip.addPara("An irreplaceable piece of Domain technology, " +
"a nanoforge improves the quality of ship production by reducing the number of manufacturing defects. It also makes the construction of higher-tier weapons easier.", 0f);

SpecialItemData data = industry.getNanoforge();
if (data == null) {
tooltip.addPara(getNoItemCurrentlyInstalledText() + ".", opad);
} else {
MS_NanoforgeEffect effect = NANOFORGE_EFFECTS.get(data.getId());
effect.addItemDescription(tooltip, data, InstallableItemDescriptionMode.INDUSTRY_MENU_TOOLTIP);
}
}
}
[close]

Many thanks for any assistance that can be offered. Cheers!

4
Modding / The Jangala Test
« on: October 29, 2014, 08:40:00 AM »
Due to economic shennannigans occurring within the Shadowyards mod, I propose a simple, accelerated testing mechanism for those of you who may be experiencing similar difficulties with exorbitantly high prices on necessary goods.  The impetus behind this testing arose due to becoming aware that, when the Shadowyards mod was installed, fuel prices rose sharply (to between ~230 - 300cr/unit) and fuel supply dropped almost as dramatically.

Thus the Jangala Test was born.  The methodology is simple; after acquiring a set of price data (eurgh) from vanilla, load up your mod and then:
  • Create a character as rapidly as is feasible
  • Fly to Jangala
  • Compare prices between Vanilla items (ideally taken right as the simulation starts) and the adjusted prices caused by the presence of your mod.

Unfortunately, getting the prices back in line is just going to require an absolute ton of fiddling with economic conditions; fortunately, these problems seem to largely arise as a result of economic outliers such as Anar, which is an absurd industrial titan by sector standards.

A quick comparison of some Vanilla price sets, and price sets with the SRA enabled.  Prices compared are of necessities (supplies, fuel, and regular crew):

Vanilla prices (Jangala);
  • Set 1 - Supplies: 107 * Fuel: 90 * Crew (Regular): 75
  • Set 2 - Supplies: 102 * Fuel: 94 * Crew (Regular): 77
  • Set 3 - Supplies:  98 * Fuel: 92 * Crew (Regular): 71

SRA present prices (Jangala);
  • Set 1 - Supplies: 95 * Fuel: 100 * Crew (Regular): 68
  • Set 2 - Supplies: 99 * Fuel: 113 * Crew (Regular): 72
  • Set 3 - Supplies: 96 * Fuel: 122 * Crew (Regular): 68

Obviously not a large enough sample to be statistically significant and I am totally not investing the kind of time that would be needed to do that, but it does appear that I've managed to get things more under control.

5
Modding / Mystery bug with settings.json
« on: October 22, 2014, 07:58:40 PM »
Wellp, mystery bugs.  It seems that for... well, I have no idea, Starsector may sometimes be unable to find the settings.json in the config folder.

Code
10537 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.RuntimeException: Error loading [settings.json] resource, not found in [/home/mshadowy/Documents/games/starsector/./mods/LazyLib,/home/mshadowy/Documents/games/starsector/./mods/shadow_ships,../starfarer.res/res,CLASSPATH]
java.lang.RuntimeException: Error loading [settings.json] resource, not found in [/home/mshadowy/Documents/games/starsector/./mods/LazyLib,/home/mshadowy/Documents/games/starsector/./mods/shadow_ships,../starfarer.res/res,CLASSPATH]
at com.fs.util.C.Ó00000(Unknown Source)
at com.fs.util.C.String(Unknown Source)
at com.fs.starfarer.loading.LoadingUtils.Ö00000(Unknown Source)
at com.fs.starfarer.loading.LoadingUtils.o00000(Unknown Source)
at com.fs.starfarer.loading.LoadingUtils.Ø00000(Unknown Source)
at com.fs.starfarer.settings.StarfarerSettings$1.loadJSON(Unknown Source)
at org.dark.shaders.util.ShaderLib.loadSettings(ShaderLib.java:186)
at org.dark.shaders.util.ShaderLib.init(ShaderLib.java:129)
at data.scripts.ShadowyardsModPlugin.onApplicationLoad(ShadowyardsModPlugin.java:68)
at com.fs.starfarer.loading.G.o00000(Unknown Source)
at com.fs.super.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:745)

Managed to "solve" this by putting a copy of the settings.json file in the mods root directory, but I seriously don't even know.

6
Modding / [0.65] Unusual Market Bug - price spike
« on: October 21, 2014, 09:35:42 PM »
This may have something to do with how strong my test economy is.  I dunno.  Still, this seems odd.

Spoiler


[close]

The price starts absurdly low (1 credit per unit of food)  until you reach 20 units, then suddenly it jumps up to what the market probably is supposed to be at.  This appears to also be true of the other way higher quantity than they probably should be items (domestic goods and organics).

This may have to do with putting the population in the hundreds of millions, but I honestly don't know.

7
Well, trying to write more lore and making only very slow progress; we'll begin with the planets of the Anar system.

Anar:
Anar is a sub-giant G class star in the early-mid stage of it's life; surface temperature is in the upper range expected for this type of star, with a mean average of ~5,800 K.  Some spectral peculiarities are present, which often lends a surreal cast to the surfaces of the planets orbiting the star.  Due it's size, the habitable band around Anar has pushed out from the center of the system, when compared to Sol.

Lambence:
A mostly uninteresting ball of dust and silica, Lambence is tidally locked with Anar. Home of a mostly automated power generation facility, this tiny world is both the start and end point of a stable, but very low profit margin, trade route centered on the exchange of high capacity energy storage.
                  
Lambence has only a single settlement of any note, Depl, itself simply the pronounced form of an abbreviated thought common among the locals--DEPLL:
           "Dear Euripides,
                        
           Power.
                        
           Love, Lambence"



Wallow:
Wallow is a midsized terrestrial world with a toxic atmosphere primarily composed of carbon dioxide; surface temperature and pressure prohibits effective exploitation. The SRA has made proposals for permanent aerostat colonies, which would be able to extract valuable gasses from the planets atmosphere, but resource limitations resulting from the numerous small scale conflicts across the Persean Sector has prevented these proposals from moving beyond a very preliminary stage.

Euripides:
When first colonized by the Domain, Euripides was almost entirely desert.  It's magnetic field is strong enough to prevent loss of water to solar wind, and the current theory is that much of the planets  surface water was lost due to repeated major asteroid impacts between 60 and 15 million BCE. Scientific assessment suggests these impacts to be related to the dust ring encircling the planet and its proto-moon Aeschylus, which is believed to have been struck--and effectively obliterated--by a rogue planetoid approximately 60 million BCE.

The relative abundance of water now is the result of what the Domain would doubtlessly consider a very crude method of terraforming--harvesting cometary ice water and landing it on planet through various means.  The indigenous flora and fauna, evolved to survive in a near absence of water and in very sandy soil, has exploded across the northern hemisphere which has accumulated the bulk of the additional water.

These efforts at rendering the world more habitable began shortly after the then Shadowyards Heavy Industries selected the world as their headquarters following being pushed out of Merid, initially as a means of, essentially, bribing the colonists into ignoring the outlaw organization; as Domain assistance failed to materialize and the world was continually ignored, the colonists moved from grudging tolerance to actively aiding Shadowyards in their efforts and widespread popular support.  Much of the water now present on Euripides surface was delivered in the time surrounding the collapse.  Euripides is still barren and dry in its southernmost reaches, and the SRA has not been able to significantly advance their terraforming efforts for the past 140 cycles or so.

Euripides is peppered with well developed cities and towns, particularly around the it's shallow northern Ocean, the Azural Sea, and throughout the Great Basin area.  Its capital, and the capital of the SRA, is the city Marion (pop. 128,545,000).

Theramin:
A stormy terrestrial moon, Theramin is protected from intense gamma radiation from the gas giant Calleach due to Domain era radiation absorbers which the SRA has not been able to replicate. As such, despite the otherwise desirable status of the moon, colonization has been limited to a few areas under the protective veil of these massive, arcane devices.
                  
Beyond the monolithic Absorbers, Theramin requires the aid of a pair of large solar arrays redirecting Anarlight to her surface while the world is in Calleachs shadow, and as a result the moon is temperate, if rainy, at nearly all times of the year.
                  
The moons unusual features, in particular the radiation absorbtion towers, has led to it being the location of several major research facilities, founded to study the interplay of the absorbers and Calleachs tremendous output of deadly cosmic radiation.  As well, it is also one of the largest collections of special forces units in the Sector, as the necessity of the Domains arcane and irreplaceable technology has led to a commensurate security presence--unsurprisingly, Theramin is also a major training facility for SRA ground forces.
                  
Theramin's name is a result of the distinctive humming noise produced by the radiation absorbers while the devices are under stress; the moon's capital is the city Warble, located around the base of the lynchpin absorbtion device near the moons southern pole.
                  
Theramin is essentially the center of the SRA's military forces.

Calleach and her other Moons:
Calleach is avoided aside from automated gas mining platforms. These cheap aerostats can produce significant quantities of valuable volatiles before inevitably being torn apart by the Giants violently churning atmosphere; retrieving the gasses acquired from this process is a risky affair, and generally the domain of the desperate or foolhardy, and nearly a third of all craft that make the attempt never surface.  No attempts at inhabitation have been made.

Cinderbox is in a state of constant volcanic eruption due to her proximity to Calleach; immense tidal forces render the planet an uninhabitable hothouse.  This tiny moon is of little mineral worth and has seen no significant effort at exploitation.

Melancholia is a small moon primarily composed of various cryonic materials; it has a thin atmosphere of methane and argon; while a valuable source of cryogenics the planet has seen no serious effort at colonization and most habitats are of a temporary variety, save for a single mostly permanent settlement, Shanty, which is nestled around a supercooled ground-space rail terminus, and which exists mostly to serve the ever shifting amount of small mining concerns on the moon.

------------------- END OF LINE --------------------

Hopefully I'll get the other stuff finished at some point.

Edited 12/16/17 because the information about Wallow was just totally wrong and the aerostat thing never happened.

8
Bug Reports & Support / Weapon F/S usage display error
« on: September 29, 2013, 09:06:05 PM »
I've noticed a bit of a curious display bug that seems to occur with weapons that fire from multiple barrels simultaneously and also regenerate their ammo stocks.  Specifically their flux usage per second seems to be hugely exaggerated, beyond anything that seems reasonable and which does not in any way match in game behavior.

As an example of this, the 'Scatter' CEPC:



Now this weapon uses 500 flux/shot, with a 0.2 second windup and a cooldown of 3.65 seconds.  While this is really just a nuisance (it's not actually multiplying its flux use by the number of shots it's firing at once) it does make figuring out how much flux you can use in a given time span kind of a pain.  It also does not appear to be correctly accounting for its ammo usage being faster than its regen rate.  And, well, that seems to be all.  Just letting you know.

9
Modding / Custom UI Help
« on: September 22, 2013, 11:20:14 AM »
Seriously I don't even know.

Alright, let's start from the top; I am currently working on an Ancillary Mod to Shadowyards that'll allow you to pick a custom paint style for a ship, if that ship is supported, in exchange for some credits.  Technically speaking I'd like for it to also support other mods, probably by doing "try" calls from the ModInitPlugin, to see if a supported mod is in the load order and get an associated list of supported ships and the directories to look in for their alternate graphics files and then running an addScript (if that would even work) to forward the appropriate lists to the UI.

Unfortunately I completely fail to comprehend how to put together a UI to actually do the setting of sprites.  The example UI given is handy for showing how to track input and rendering, but I'm afraid I'm completely mystified on actually putting together the parts; I end up suffering from choice paralysis and basically have nothing to show on the Interface so far.

Alex mentioned a while back that this would be fairly simple to do, but simple is a relative term.

10
... and current analysis of the captured Rig suggests that this craft is entirely intended to support wings of fighter craft.  The design of the craft is heavily improvised, and while several innovations are present, difference in the crafts docking clamp designs at various points (see reference images disr-01007, 01013, 01030, 01033) suggest that the craft has been modified from an existing small construction ship.  Given the severe lack of combat capability these ships have displayed in all encounters to date, as well as S.H.I.s general reticence towards needless expenditures of manpower, it is the conclusion of this board that the Shadowyards Design Bureau's efforts to design a carrier craft have ended in failure, forcing them to deploy these makeshift support craft.
-Domain Sector Intelligence Service brief , November, pre-cycle 23
4 months before completion of the first Charybdis class Strike-Carrier





Shadowyards 0.9.5-rc4 is available for download!
Please note that updates have a high likelihood of breaking saves
=download=

Shadowyards Requires LazyLib, MagicLib and GraphicsLib to function.

Since 0.6.1 the graphics style of the faction has been changed; for those of you prefer the old look, you can download an optional style pack!
=the classic pack=


Features:

  • A fleet of odd looking vessels for you to fly around/blow up!
  • A general focus on mobility, compromised by weak hulls.
  • Middling to strong shields.
  • Steady and reliable weapons systems
  • Strong and versatile fighters.
  • 16 missions.
  • Integration with Dynasector and support for the Knights Templar boss faction.

Requires LazyLib
Requires GraphicsLib

Ships:

Spoiler
[close]

Screenshots:

Spoiler









[close]

Gifs! Yay gifs!
Spoiler





[close]

Shadowyards vessels are vulnerable to being overwhelmed; if you can corner them and force them to flux or overload you'll put them in critical danger.

These vessels are typically designed to a general assault profile, and are often vulnerable to the rear.

--------------------------------

Note, older change log data has been removed from this post; it is available here if you want to look it over.

Changelog:

Spoiler
0.9.5-rc1 Changelog
   
  • Added the Redwings subfaction to the SRA; their home base is located on Euripides
  • Implemented an item based upgrade system for Fabricator Industries, and expanded the number of industries to four:
    • Modular Fabricators (balanced but not as good as Heavy Industry)
    • Massively Parallel Fabricators (a civilian industrial focus capable of putting out lots of machinery)
    • Military Production Lines (heavy weapons and supplies)
    • Integrated Shipyards (very high quality ships and large quantities of ship hulls)
  • Updated the Shadowyards mod plugin to include warnings for not having required mods and some additional housekeeping in other miscellaneous scripts
  • Fixed an issue where the Shadowyards station type couldn't be built at orbitals in Nexerelin (Probably working)
  • Added Nexerelin diplomatic traits to the SRA
  • Hopefully fixed a bug where joining a battle in which Mimirs were present would sometimes generate a NPE crash
  • Replaced the aging Lance script with a modernized and much less buggy version; everything should work properly now
  • Reduced the range of the Nidhoggr Lance to 1200 (from 2000)
  • Fixed a targeting bug with the Apiary's submunitions which could sometimes cause a NPE crash
  • Fixed an issue with the Commissioned Crews hullmod which could make acquiring it a bit more annoying then necessary
  • Hopefully fixed the "Glowing Shikome" bug and made some improvements to the fighter finagling script
  • Reduced the projectile speed of the Skinwalker and Bit Drone guns to 2000 (from 4000)
  • Added some SRA industries to vanilla markets:
    • Asharu, Nomios, Olinadu, and Tigra City have acquired Orbital Solar Arrays
    • Eldfell has gotten its hands on some Modular Fabricators
  • Adjusted the populations on a few of the markets added by the mod:
    • Euripides has been reduced to size 7 (from size 8 ) - despite being a 75% hazard world with a modest pre-collapse population, that was a bit much
    • Auris' Grip has been reduced to size 3 (from size 5) - given that it's only a few months old such a large population was pretty questionable
    • Hotri has been increased to size 6 (from size 4) - very low hazard, colonized around the collapse
    • Mantra has been reduced to size 5 (from size 6) - somehow colonized well before Hotri, but also a complete hellhole
  • Removed an extra variant of the Odin which, due to sharing the same id, was causing the game to become confused and load the wrong configuration
  • Added the Charge Cycler hullmod, which increased the charge recovery rate for Energy weapons which have that stat by 7.5%
  • Added 2 additional variants to act as CORE variants for each of the High Value Bounty ships
  • Added an additional small composite hardpoint to the Carmine, as well as 5 additional OP, and adjusted the firing angles of a couple of the turrets
  • Added 2 new defense buster beam weapons, the Particle Dart, and Particle Lance, which deal a portion of their overall damage as hard flux immediately upon the first hit
  • Reduced OP cost of Raksasha bombers to 20 OP (from 25)
  • Went over variants and updated them where needed
  • Fixed display bugs that were present with the GAT and Overdrive systems
  • Replaced the Armor Pierce scripts and adjusted color clamps in the Vectored Thrusters script, which should hopefully put an end to the color overflow crash

0.9.5-rc2 Changelog

  • Reduced the cost of Charge Cyclers to 3/6/9/12 OP (from 5/10/15/20) and improved the charge regen rate to 10%
  • Changed the names of the Particle Dart and Lance (to the Kamal Particle Dart and Mughal Particle Lance) and improved their descriptions
  • Additionally the Mughal's range has been increased to 1300 (from 1250)
  • Added a Military Market to Euripides
  • Added a very *extra* player specific portrait
  • Fixed a NPE crash that could sometimes happen in Nexerelin due to not finding a planetary black market somehow
  • Improved the market handling script so that it will now add SRA related special items to their markets occasionally
  • Removed the guaranteed Shadowyards station bp from the Theramin military market
  • Fixed some color problems on the Skadi sprite

0.9.5-rc3 Changelog

  • Fixed a dumb oversight crash with the SWACs system
[close]

Changelog 0.9.5-rc4

  • The Carmine (Redwings) should show up in SRA military and black markets and in Redwings fleets, as in retrospect there wasn't much reason to keep it from showing up while the mission string that would put it in game isn't even implemented yet
  • Finally seem to have resolved the ongoing Mimir vector crash bug, with thanks to President Matt Damon on the discord
  • Redwings Command no longer makes Euripides a military market, and as such its uh... military market has been removed
    • Please note that this will not effect existing saves
  • Some adjustments to Modular Fabricators and their sub industries in order to prevent possible issues with industry ids getting confused
  • Went over the Elysium (P)'s description to make it less clunky
  • Replaced the Potnia-bis' flare launcher with a damper system
  • Fixed an issue with the Tartarus' colission radius being smaller than its shield
  • Shikomes should no longer kill themselves with their mini-lances, and re-added the trails for the shot
  • Gave Theramin a custom planet class, Irradiated Terran, and a matching planet graphic
  • Theramin once again has its Radiation Absorbers, to help deal with it's newly gained Irradiated condition

--------------------------------

ADDITIONAL CREDITS

Spoiler
Core Concepts
MShadowy

Concept Assistance
Cycerin
MesoTroniK
and the Rest of Mod MafiaCrew

Music
Cycerin

Sound Effects and Effect Assistance
Cycerin
MShadowy
MesoTroniK

Graphics
MShadowy
HELMUT

Progamming Assistance
LazyWizard
Dark Revenant
Wyvern
SafariJohn
SirHartley
and MShadowy a little I guess

Featuring the talents of
Tom Baker as Doctor Who
and Gene Wilder as Willy Wonka
[close]

--------------------------------


The mod, as noted, requires the LazyLib package to function: it can be downloaded from it's forum thread here.
Additionally requires MagicLib and GraphicsLib.

11
Modding / New Cruiser-Carrier: Charybdis-class
« on: February 24, 2012, 11:10:47 AM »
As a few of you may have noticed (and probably have not cared) I've been posting the wips for a ship in Avan's ship design thread.

The Charybdis class is a light, fast cruiser carrier with a somewhat potent offensive punch but terribly thin defenses.  Just as planned; treat her gently.  If her shields go own (which isn't that difficult a feat) she's in real trouble.  But if you can keep from getting overwhelmed she'll tear apart (most) faces.  Just... don't get in a slugging match with an Eagle or Aurora.





Looks a bit better in game that I'd been hoping.  Cheers!



-Em Ess

P.S. - As I'm somewhat concerned with balance, I'd appreciate feedback on this ships stats.

P.P.S - Also, now planning on adding more ships in a similar visual vein.

[attachment deleted by admin]

Pages: [1]