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 ... 173 174 [175] 176 177 ... 706

Author Topic: Misc modding questions that are too minor to warrant their own thread  (Read 1699642 times)

speeder

  • Captain
  • ****
  • Posts: 364
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2610 on: December 23, 2015, 08:27:56 AM »

In commodities.csv, does a larger number in the decay column mean the commodity decays faster or slower?

Decay formula:

usefulStock = max(supply*utility, demand)

if(usefulStock  <= 0) usefulStock = 1

toDecay = max(stockpile - usefulStock, 0) * min(0.5, decay * DECAY_MULT)

stockpile = stockpile - toDecay


DECAY_MULT is the "economyDecayMult" number in the settings.json, default is 1

So, decay on the commodity, has no effect below 0.5, and it dictates the percentage of the "useless" stockpile that decays.

So at a decay 1, with vanilla economy settings, the market will always have the stockpile cut to the demand, or supply amount of the month.

At decay 0.1 (most of vanilla defaults) means every month 10% of the excess goods are lost.
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2611 on: December 23, 2015, 12:59:23 PM »

What the hell am I looking at here?


IndexOutOfBoundsException: Index: 1, Size: 1

Code
8951 [Thread-5] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [G:\Minigames\Starsector\starsector-core\..\mods\ironclads2\data\weapons\vns_lrg_mis_micro.wpn]
8951 [Thread-5] INFO  com.fs.starfarer.loading.WeaponSpecLoader  - Loading weapon [G:\Minigames\Starsector\starsector-core\..\mods\ironclads2\data\weapons\vns_med_bal1b.wpn]
8952 [Thread-5] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [G:\Minigames\Starsector\starsector-core\..\mods\ironclads2\data\weapons\vns_med_bal1b.wpn]
9067 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [data.scripts.world.FleetSpawner] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9351 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [data.scripts.world.SectorGen] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9357 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Compiling script [data.scripts.world.TimeManager]
9388 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Compiling script [data.scripts.world.BaseSpawnPoint]
9389 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [data.scripts.world.SectorGen] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9490 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [com.fs.starfarer.api.impl.combat.CRPluginImpl] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9491 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [data.scripts.world.SectorGen] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9493 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [com.fs.starfarer.api.impl.campaign.CoreLifecyclePluginImpl] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9493 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [com.fs.starfarer.api.impl.campaign.OfficerLevelupPluginImpl] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9494 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [com.fs.starfarer.api.impl.campaign.NewGameDialogPluginImpl] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9520 [Thread-8] INFO  com.fs.starfarer.loading.scripts.ScriptStore  - Class [data.missions.ironcladsRSF.MissionDefinition] already loaded (perhaps from jar file, or due to a reference from another class), skipping compilation.
9531 [Thread-5] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.remove(Unknown Source)
at com.fs.starfarer.loading.specs.S.addTurretAngleOffset(Unknown Source)
at com.fs.starfarer.loading.WeaponSpecLoader.?00000(Unknown Source)
at com.fs.starfarer.loading.WeaponSpecLoader.?00000(Unknown Source)
at com.fs.starfarer.loading.SpecStore.float(Unknown Source)
at com.fs.starfarer.loading.ResourceLoaderState.init(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


I can't find anything wrong
Logged

Pushover

  • Captain
  • ****
  • Posts: 292
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2612 on: December 23, 2015, 04:55:08 PM »

That error means that somewhere something is trying to access index 1 (the second element) of an array that has 1 element. Something to do with the starting angle of a weapon? Is there a ship with 1 weapon that should start at an offset?
Logged

Runoved

  • Lieutenant
  • **
  • Posts: 62
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2613 on: December 25, 2015, 07:37:47 AM »

Hello everyone.

When I try to create my own market condition I ran into a problem. Why in the code of file "my_mod\data\campaign\econ\my_new_market_condition" the following code works with custom commodity "my_commodity":

Code
market.getCommodityData("my_commodity").getSupply().modifyFlat(id, my_commodity_supply * crewDemandMet);

Where "my_commodity" - are id of my new commodity and "my_commodity_supply" - private static final float indicating the amount of supply.


But the following code almost same essentially unfortunately for some reason it does not work:

Code
market.getCommodityData("my_commodity").getDemand().modifyFlat(id, my_commodity_demand);

Please help to understand what is the problem.

And what are the best ways to set the amount of demand of new custom commodity in market condition file?

Thanks in advance for your help.

Logged

DinoZavarski

  • Lieutenant
  • **
  • Posts: 79
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2614 on: December 27, 2015, 04:26:22 AM »

Is it possible to modify crew experience bonuses with a hullmod? Like increasing bonuses for green to regular crew. decreased for veteran and penalty instead of bonus for elite?
Logged
Me no know, me no understand, me just root...

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2615 on: December 27, 2015, 04:31:09 AM »

Yes, you have a skill for this, so you can go look this skill and transform this thing for a hullmod. This is possible, i have a hullmod who give a supply per day, why not this thing?
Spoiler
Quote
package data.characters.skills.scripts;

import com.fs.starfarer.api.characters.CharacterStatsSkillEffect;
import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;

public class CommandExperienceEffect1 implements CharacterStatsSkillEffect {

   public void apply(MutableCharacterStatsAPI stats, String id, float level) {
      stats.getCrewXPGainMult().modifyPercent(id, SkillData.COMMAND_EXPERIENCE_CREW_XP_BONUS * level);
   }

   public void unapply(MutableCharacterStatsAPI stats, String id) {
      stats.getCrewXPGainMult().unmodify(id);
   }
   
   public String getEffectDescription(float level) {
      return "+" + (int) (SkillData.COMMAND_EXPERIENCE_CREW_XP_BONUS * level) + "% crew experience gained";
   }
   
   public String getEffectPerLevelDescription() {
      return "" + (int) SkillData.COMMAND_EXPERIENCE_CREW_XP_BONUS + "%";
   }

   public ScopeDescription getScopeDescription() {
      return ScopeDescription.FLEET;
   }

}

[close]
After, for penalty for elite, i need research
« Last Edit: December 27, 2015, 04:34:13 AM by Snrasha »
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

c0nr4d1c4l

  • Commander
  • ***
  • Posts: 103
  • Local forum transient
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2616 on: December 27, 2015, 08:13:21 PM »

So what's the difference between a dev mod and a stable mod?
Logged
"Slap slap slap, clap clap clap"

Head salesman and CEO of the Discount Shipyard

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2617 on: December 28, 2015, 02:06:00 AM »

For me:

A dev mod: You can have very bug (very long to repair)(so instable version), not balanced value( X50 extra salvage, because you want test)
And, can have very many update fastly , maybe...


A stable mod: A mod who can launch without problem if all conditions are made.(This mod is not compatible with SS+, per example) And have balanced value with this mod and starsector (Ex: Templars is a overpower faction, so it is normal, EX2: A frigate(Of your mod) who kill a Templar cruiser, it is not normal, except if you play very good))
Logged
I am pretty bad on english. So, sorry in advance.

Gladiator Society
Add battle options on Com Relay/ Framework for modders for add their own bounty.

Sanguinary Autonomist Defectors A fan-mod of Shadowyard.

StarSchulz

  • Captain
  • ****
  • Posts: 458
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2618 on: December 30, 2015, 12:39:06 PM »

How do the luddic path fleets spawn? they have no station or market anywhere that i can see. [ i want to replicate this sort of behavior in my own mod if at all possible ]

nuclear_ash

  • Ensign
  • *
  • Posts: 4
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2619 on: December 30, 2015, 01:49:25 PM »

Where is the code for fleet deployment window? Is it obfuscated? I'm trying to make a skill which decreases ship deployment cost.
Logged

Caricature

  • Ensign
  • *
  • Posts: 3
  • Four.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2620 on: December 30, 2015, 02:30:27 PM »

How do the luddic path fleets spawn? they have no station or market anywhere that i can see. [ i want to replicate this sort of behavior in my own mod if at all possible ]

Luddic Path fleets have their source market chosen from Luddic Church markets. LuddicPathFleetManager calls up FleetFactoryV2 to make the fleets, and one of the parameters determines the faction to choose the source market from (apparently). More relevant to your question, the code calls CampaignFleetAPI.setLocation to choose where the fleet actually gets spawned in at. (If the player is closer to the market the fleet is targeting, it gets spawned near the player instead of at its home base.) The Misc class has a couple of methods for getting locations near to the player. Hope this helps.
Logged

Jay2Jay

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2621 on: December 30, 2015, 11:23:28 PM »

Query: Would it be possible to make a ship that has all built in weapons but can use a hullmod to convert it to using all weapons?
Logged
"The greatest pleasure is to vanquish your enemies and chase them before you, to rob them of their wealth and see those dear to them bathed in tears, to ride their horses and clasp to your bosom their wives and daughters." ~Ghengis Khan

gruberscomplete

  • Captain
  • ****
  • Posts: 253
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2622 on: December 31, 2015, 08:58:29 AM »

is there a mod that increases the number/amount in stock at an open market, including ships?
Logged
Click here for FREE ships!               Plentysector               Robots With Souls

Lucian Greymark

  • Captain
  • ****
  • Posts: 274
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2623 on: January 01, 2016, 12:33:31 AM »

Hi, while working on my mod I set up a (pretty standard) burst pd laser. The only problem is that it refuses to target missiles and fighters, even when I add the 'hints' it still focuses fire on whatever my target is, or even just the biggest threat (as I imagine most weapons do)

I'll post the data line here in case I've made some massive *** up but I have no idea where to look at this.

Panacles BPD,scion_panacles,1,0,500,300,,,1,90,6,20,2,,ENERGY,,40,,0.1,0.1,,,,,,10000,,,,,,"PD,ANTI_FTR",
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #2624 on: January 01, 2016, 01:00:51 AM »

I'm trying to make a skill which decreases ship deployment cost.
The deploy cost as seen in the deploy window (and which the battle size setting restricts) is the same as the ship's supplies/deploy value.
Logged
Pages: 1 ... 173 174 [175] 176 177 ... 706