Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 224 225 [226] 227 228 ... 462

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

AxleMC131

  • Admiral
  • *****
  • Posts: 1707
  • Amateur World-Builder
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3375 on: May 22, 2017, 04:11:15 PM »

I want update some thing on wikipedia, but I have not idea for somethings:
Wing_data.csv:

Tag:
ex:"interceptor1, interceptor, low"

AttackRunRange is always more low than range, they attack always when ennemi is in the range?

Rarity: Chance on the market, no problem, I think.
Tier: For know, they change something on the game? (Or maybe just when you auto-fit?)

8/6/5/4%: Alex answer always to that, but for be sure, what is this?


@Snrasha,

The tags for fighter wings in wing_data.csv are used by the Autofit system. Usually, the first word is the fighter's primary role and how good it is, so "interceptor4" is a better interceptor than "interceptor3", which is better than "interceptor2" and so forth. The second word I believe is an alternative role. It may be the same as the first, or different. If different, it means the fighter can be used as something else if it really needs to be. The third word I believe is the tech level, so "low-tech", "midline", and "high-tech".

I think AttackRunRange is approximately how far out from a target fighters will open fire. This is important for bombers with torpedoes and such, to make sure the fighters get close enough to be most effective without getting destroyed by point defence.

Rarity is market chance, yes. As I was recently informed, it is a decimal multiplier of the normal spawn rate, so "0.1" means the item is 10 times rarer than a default rarity item. The smaller the number, the more rare the item is.

Tier is a more rough estimation of the item's tech level, although I believe the game treats this value differently to the "low/mid/high" bit in the "tags" column. From what I have gathered, Tier portrays where items can spawn in markets - you won't get really high-tech items spawning in the Jangala open market, for instance.

The last one I can never remember, but it has something to do with flux capacity. If you're in doubt, just set its value to the same as the ship's flux capacity.
Logged

SainnQ

  • Commander
  • ***
  • Posts: 219
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3376 on: May 23, 2017, 03:56:34 AM »

Would anyone know what is required to see changes made to a fighter wing reflect themselves in the Campaign?

I decided to root around and make some basic changes to fighter wing resupply cost & fighters per wing, the game runs fine, until I move to the main system associated with the manufacturer of said fighter wings.

I get a Fatal Error 10
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1314
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3377 on: May 23, 2017, 05:37:37 AM »

Question - I want to make a booster module. As in, attach a solid fuel rocket to your ship for a temporary speed boost. The idea is that it would give you +X speed for Y seconds in battle.

Making a hullmod to give extra speed it easy. But how to turn it off after Y seconds?
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 668
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3378 on: May 23, 2017, 05:47:40 AM »

Question - I want to make a booster module. As in, attach a solid fuel rocket to your ship for a temporary speed boost. The idea is that it would give you +X speed for Y seconds in battle.

Making a hullmod to give extra speed it easy. But how to turn it off after Y seconds?
Quote
private IntervalUtil time_off = new IntervalUtil(1,1);
public void advanceInCombat(ShipAPI ship, float amount){
  // Code for active the flag "active" and put more speed to ship
     if(active){
          time_off.advance(amount);
          if(time_off.intervalElapsed()){
            //Code for put per default the speed of the ship.
           // And put the flag active to false;
    }
 }
}
Maybe that? I am maybe on wrong.  Amount  per frame is between 0.017 and 0.023 so put more than that on the intervalutil.
For enable per a button the flag "active", I do not know, sorry.
« Last Edit: May 23, 2017, 05:49:30 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 Anarchistic Defectors A fan-mod of Shadowyard.

Clockwork Owl

  • Admiral
  • *****
  • Posts: 752
    • View Profile
    • Starsector South Korean Community
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3379 on: May 24, 2017, 08:24:59 PM »

Which part in the script/data file is responsible for spawnimg high-tech [REDACTED]s?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17261
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3380 on: May 24, 2017, 08:27:27 PM »

Which part in the script/data file is responsible for spawnimg high-tech [REDACTED]s?

com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantThemeGenerator.java
Logged

Clockwork Owl

  • Admiral
  • *****
  • Posts: 752
    • View Profile
    • Starsector South Korean Community
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3381 on: May 24, 2017, 09:14:15 PM »

Thanks for the prompt reply!

Aaaaand... which part is responsible for their behavior? Like, engage even when severely outnumbered, no jump to Hyperspace, etc.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17261
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3382 on: May 24, 2017, 09:38:50 PM »

com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantSeededFleetManager
initRemnantFleetProperties()
addRemnantInteractionConfig()
addRemnantAICoreDrops()
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1314
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3383 on: May 24, 2017, 11:10:04 PM »

Question - is that AI hard-coded for a faction "remnant" or can it be used on others?
Logged

c0nr4d1c4l

  • Commander
  • ***
  • Posts: 103
  • Local forum transient
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3384 on: May 25, 2017, 10:12:09 PM »

How does one make a ship NPC only?
Logged
"Slap slap slap, clap clap clap"

Head salesman and CEO of the Discount Shipyard

AxleMC131

  • Admiral
  • *****
  • Posts: 1707
  • Amateur World-Builder
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3385 on: May 26, 2017, 01:19:49 AM »

How does one make a ship NPC only?

Like the Remnant droneships? They have an "UNBOARDABLE" tag in the ship_data.csv.

Only works for factions that don't have markets though. If you had a faction with an unboardable ship, but an accessible market there's a chance the ship could spawn in the market and be purchaseable.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 2822
    • View Profile
    • Bitbucket profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3386 on: May 26, 2017, 09:02:24 AM »

Is there a case where BattleAPI.getPlayerSideSnapshot() should/would be null? I'm getting an NPE with my custom FleetInteractionDialogPluginImpl after an engagement round in a battle.

Code
320436 [Thread-5] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl.backFromEngagement(FleetInteractionDialogPluginImpl.java:431)
at exerelin.campaign.NexFleetInteractionDialogPluginImpl.backFromEngagement(NexFleetInteractionDialogPluginImpl.java:62)
at com.fs.starfarer.campaign.CampaignState.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)

Question - is that AI hard-coded for a faction "remnant" or can it be used on others?
The AI flags can be set for any fleet in a mod's code.
(You could even call initRemnantFleetProperties directly, but since it also causes AI core drops you probably don't want to do this)

Spoiler
Code: java
public static void initRemnantFleetProperties(Random random, CampaignFleetAPI fleet, boolean dormant) {
fleet.removeAbility(Abilities.EMERGENCY_BURN);
fleet.removeAbility(Abilities.SENSOR_BURST);
fleet.removeAbility(Abilities.GO_DARK);

// to make sure they attack the player on sight when player's transponder is off
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_SAW_PLAYER_WITH_TRANSPONDER_ON, true);
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_PATROL_FLEET, true);

fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_AGGRESSIVE, true);
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_NO_JUMP, true);

if (dormant) {
fleet.setTransponderOn(false);
// fleet.getMemoryWithoutUpdate().unset(MemFlags.MEMORY_KEY_PATROL_FLEET);
// fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_PIRATE, true); // so they don't turn transponder on
// fleet.addAssignment(FleetAssignment.HOLD, null, 1000000f, "dormant");
fleet.getMemoryWithoutUpdate().set(MemFlags.MEMORY_KEY_MAKE_ALLOW_DISENGAGE, true);
fleet.setAI(null);
fleet.setNullAIActionText("dormant");
}

addRemnantInteractionConfig(fleet);
addRemnantAICoreDrops(random, fleet, 1f);
}
[close]
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17261
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3387 on: May 26, 2017, 06:37:37 PM »

Is there a case where BattleAPI.getPlayerSideSnapshot() should/would be null? I'm getting an NPE with my custom FleetInteractionDialogPluginImpl after an engagement round in a battle.

Took a quick look - looks like only if there is no player side in the battle, i.e. if neither side has the player fleet in it.
Logged

Clockwork Owl

  • Admiral
  • *****
  • Posts: 752
    • View Profile
    • Starsector South Korean Community
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3388 on: May 27, 2017, 02:54:25 AM »

In combat, can I spawn:

1. Empty CombatEntity, with location and initial velocity vector defined
2. A ship
3. a drone, not defined by ship system(though technically same as 2)

via script?
« Last Edit: May 27, 2017, 02:56:43 AM by Aron0621 »
Logged

PCCL

  • Admiral
  • *****
  • Posts: 1996
  • still gunnyfreak
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3389 on: May 28, 2017, 01:23:47 PM »

what's the difference between the weapon hints? Specifically:

PD vs PD_ALSO VS ANTI_FTR, PD

STRIKE VS STRIKE, USE_VS_FRIGATES (now that ships use strike weapons on frigates anyway, right?)

also how is FIRE_WHEN_INEFFICIENT calculated?


also: How does the lion's guard subfaction work internally? I can't seem to figure it out by looking at the source files. If I'm say trying to make a sub faction for pirates, how would I go about doing that?
« Last Edit: May 28, 2017, 03:12:40 PM by PCCL »
Logged
mmm.... tartiflette
Pages: 1 ... 224 225 [226] 227 228 ... 462