Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 221 222 [223] 224 225 ... 711

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

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3330 on: May 18, 2017, 01:30:43 PM »

Soooo...
Code
Global.getSector().getCampaignUI().addMessage(system.getName());
Should do that, right?
Logged
Please check out my SS projects :)
Xeno's Mod Pack

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3331 on: May 18, 2017, 07:48:35 PM »

Nope, that doesn't work.  I think I need a little more detail here; it's really unclear how the mechanism in Messages works, too...
Logged
Please check out my SS projects :)
Xeno's Mod Pack

c0nr4d1c4l

  • Commander
  • ***
  • Posts: 103
  • Local forum transient
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3332 on: May 18, 2017, 08:32:00 PM »

I have no idea what I did wrong  ??? but every time I try to make a description for this mod it hates it. Fixed: Apparently the type of .csv file you save it as matters.



« Last Edit: May 18, 2017, 09:45:13 PM by c0nr4d1c4l »
Logged
"Slap slap slap, clap clap clap"

Head salesman and CEO of the Discount Shipyard

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24151
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3333 on: May 18, 2017, 11:12:58 PM »

Nope, that doesn't work.  I think I need a little more detail here; it's really unclear how the mechanism in Messages works, too...

Take a look at com.fs.starfarer.api.util.FleetLog - I think that'll answer a lot of questions.

Of particular note for your use case:
message.setStarSystemId(target.getContainingLocation().getId());
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3334 on: May 18, 2017, 11:25:33 PM »

Spoiler
For know,
He exists many interface or abstract to implement or extended for a campaign plugin.

If I put that on the settings.json:
"plugins":{
     "Looter_Name_Plugin": "src.lt.data.scripts.plugins.Looter_Name_Plugin",
    },


There are call every frame, so I guess. But only for plugin who implement a class who implement EveryFrameScript or also a extend of BaseEventPlugin ?(Like he implements a CampaignEventListener, so I guess than yes but not sure)

This is for know if I can "add" bounty or just modify bounty without touch too for just than bounty mission take also my faction, and not just pirates factions ships. I maybe go on the wrong implement/Extends, this is maybe BountyPirateFleetManager ?


Thank for your help!
[close]
Edit: Well, I will go use BountyPirateFleetManager,  on the plugin settings, i go probably found how.(With the exemple java code on starfarer who contains the means for add bounty fleet, this is probably gonna go easy)

Edit: Auto-solved.
« Last Edit: May 19, 2017, 02:33:45 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.

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3335 on: May 19, 2017, 01:04:34 PM »

Easy minor one:

Is the rarity value in weapons.csv a percentage reduction of the base drop chance, or a value that determines "effective rarity" as in  .7 > .5 > .3 on how "rare" the weapon is?

Cursory glance didn't bring this up, so sorry if it should be self-explanatory. I would have thought higher numbers equals higher rarity due to the .8 on AM Blaster but then Tachyon Lance remains at .5 while Ion Pulser is .6 and Plasma Cannon is .3 ... so idk. lol
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24151
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3336 on: May 19, 2017, 01:49:57 PM »

@Snarsha: plugins are NOT auto-added in the campaign, but I guess you already figured that out :)

Is the rarity value in weapons.csv a percentage reduction of the base drop chance, or a value that determines "effective rarity" as in  .7 > .5 > .3 on how "rare" the weapon is?

It's a multiplier for the probability a given weapon will show up when an item in drop_data can have multiple weapons. For example:

wpn_:{weaponType:ENERGY}

Will pick from all energy weapons, modified by rarity.
Logged

Snrasha

  • Admiral
  • *****
  • Posts: 705
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3337 on: May 19, 2017, 01:54:42 PM »

@Snarsha: plugins are NOT auto-added in the campaign, but I guess you already figured that out :)

Is the rarity value in weapons.csv a percentage reduction of the base drop chance, or a value that determines "effective rarity" as in  .7 > .5 > .3 on how "rare" the weapon is?

It's a multiplier for the probability a given weapon will show up when an item in drop_data can have multiple weapons. For example:

wpn_:{weaponType:ENERGY}

Will pick from all energy weapons, modified by rarity.

Well, i have try many things:
Put a Bounty of Looters on event.json:
Quote
   "Looters_bounty":{
      "probabilityMult":1,
      "script":"src.lt.data.scripts.campaign.events.Looters_Bounty",
   },
Do not seems work.

Or put that on: BaseModPlugin     based of other mod.
Quote
    public void onGameLoad(boolean newGame) {
       
        if (!Global.getSector().hasScript(LootersEventProbabilityManager.class)) {
            LootersEventProbabilityManager eventStarter = new LootersEventProbabilityManager();
            Global.getSector().addScript(eventStarter);
        }
    }

    @Override
    public void configureXStream(XStream x) {
        x.alias("LootersEventProbabilityManager", LootersEventProbabilityManager.class);
        x.alias("Looters_Bounty", Looters_Bounty.class);
        x.alias("Looters_FleetFactory", Looters_FleetFactory.class);

Without real succes,  the second spawn many Looters fleets(I have put the max to 20 with x4 payement for be sure), but bounty are not available on the player logs, and when player kill them, he do not receive money. I found just their fleets with a yellow warning of quest when i go check a pirate bounty.

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.

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3338 on: May 19, 2017, 02:06:40 PM »

Quote
Take a look at com.fs.starfarer.api.util.FleetLog - I think that'll answer a lot of questions.
Will do, thank you!  The new Intel systems are pretty confusing atm, lol.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3339 on: May 19, 2017, 02:54:31 PM »

Help me out here.

Trying to troubleshoot the latest crash for my mod and I'm getting this:

Code
4267 [Thread-4] INFO  com.fs.starfarer.loading.ShipHullSpecLoader  - Loading ship hull [G:\GAMES\Starsector\starsector-core\..\mods\Steelclad\data\hulls\isa4-cr-lexington.ship]
4267 [Thread-4] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [G:\GAMES\Starsector\starsector-core\..\mods\Steelclad\data\hulls\isa4-cr-lexington.ship]

4944 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.loading.ShipHullSpecLoader.super(Unknown Source)
at com.fs.starfarer.loading.ShipHullSpecLoader.?00000(Unknown Source)
at com.fs.starfarer.loading.SpecStore.OO0000(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$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

It seems to be caused by a new ship I added, but I can't find anything wrong with the ship itself.




Code
{
  "bounds": [
    -227.5,
    -33.5,
    -218,
    -70.5,
    -206.5,
    -85.5,
    -113.5,
    -89.5,
    -106,
    -75,
    -78,
    -77.5,
    -68,
    -69,
    -33.5,
    -91.5,
    30.5,
    -85,
    28,
    -54.5,
    41.5,
    -47,
    59.5,
    -57.5,
    146.5,
    -57,
    209.5,
    -26.5,
    209.5,
    26.5,
    146.5,
    57,
    59.5,
    57.5,
    41.5,
    47,
    28,
    54.5,
    30.5,
    85,
    -33.5,
    91.5,
    -68,
    69,
    -78,
    77.5,
    -106,
    75,
    -113.5,
    89.5,
    -206.5,
    85.5,
    -218,
    70.5,
    -227.5,
    33.5
  ],
  "center": [
    105.5,
    225.5
  ],
  "collisionRadius": 231,
  "engineSlots": [
    {
      "angle": 180,
      "contrailSize": 19,
      "length": 47.5,
      "location": [
        -217,
        65
      ],
      "style": "MID_TECH",
      "width": 19
    },
    {
      "angle": -180,
      "contrailSize": 19,
      "length": 47.5,
      "location": [
        -217,
        -65
      ],
      "style": "MID_TECH",
      "width": 19
    },
    {
      "angle": 180,
      "contrailSize": 24,
      "length": 82.5,
      "location": [
        -226.5,
        14
      ],
      "style": "MID_TECH",
      "width": 24
    },
    {
      "angle": -180,
      "contrailSize": 24,
      "length": 82.5,
      "location": [
        -226.5,
        -14
      ],
      "style": "MID_TECH",
      "width": 24
    }
  ],
  "height": 451,
  "hullId": "isa4-cr-lexington",
  "hullName": "Lexington",
  "hullSize": "CRUISER",
  "shieldCenter": [
    0,
    0
  ],
  "shieldRadius": 260,
  "spriteName": "graphics/ships/ISA/isa4-cr-lexington2.png",
  "style": "MID_TECH",
  "viewOffset": 0,
  "weaponSlots": [
    {
      "angle": 45,
      "arc": 240,
      "id": "WS0001",
      "locations": [
        58,
        36
      ],
      "mount": "TURRET",
      "size": "MEDIUM",
      "type": "ENERGY"
    },
    {
      "angle": -45,
      "arc": 240,
      "id": "WS0002",
      "locations": [
        58,
        -36
      ],
      "mount": "TURRET",
      "size": "MEDIUM",
      "type": "ENERGY"
    },
    {
      "angle": 90,
      "arc": 180,
      "id": "WS0003",
      "locations": [
        6,
        31
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "ENERGY"
    },
    {
      "angle": -90,
      "arc": 180,
      "id": "WS0004",
      "locations": [
        6,
        -31
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "ENERGY"
    },
    {
      "angle": 0,
      "arc": 0,
      "id": "WS0005",
      "locations": [
        -24,
        21
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "BALLISTIC"
    },
    {
      "angle": -0,
      "arc": 0,
      "id": "WS0006",
      "locations": [
        -24,
        -21
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "BALLISTIC"
    },
    {
      "angle": 0,
      "arc": 0,
      "id": "WS0007",
      "locations": [
        119,
        36
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "BALLISTIC"
    },
    {
      "angle": -0,
      "arc": 0,
      "id": "WS0008",
      "locations": [
        119,
        -36
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "BALLISTIC"
    },
    {
      "angle": 90,
      "arc": 180,
      "id": "WS0009",
      "locations": [
        -84,
        66
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "ENERGY"
    },
    {
      "angle": -90,
      "arc": 180,
      "id": "WS0010",
      "locations": [
        -84,
        -66
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "ENERGY"
    },
    {
      "angle": 180,
      "arc": 0,
      "id": "WS0011",
      "locations": [
        -210,
        41
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "BALLISTIC"
    },
    {
      "angle": -180,
      "arc": 0,
      "id": "WS0012",
      "locations": [
        -210,
        -41
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "BALLISTIC"
    },
    {
      "angle": 0,
      "arc": 0,
      "id": "WS0013",
      "locations": [
        17,
        -0
      ],
      "mount": "TURRET",
      "size": "SMALL",
      "type": "BALLISTIC"
    },
    {
      "angle": 180,
      "arc": 270,
      "id": "WS0014",
      "locations": [
        -151.5,
        -0
      ],
      "mount": "TURRET",
      "size": "MEDIUM",
      "type": "BALLISTIC"
    },
    {
      "angle": 0,
      "arc": 360,
      "id": "LB 1",
      "locations": [
        53.5,
        10,
        53.5,
        -7.5,
        87,
        10.5,
        86.5,
        -8.5
      ],
      "mount": "HIDDEN",
      "size": "LARGE",
      "type": "LAUNCH_BAY"
    },
    {
      "angle": 0,
      "arc": 360,
      "id": "LB 2",
      "locations": [
        5.5,
        62,
        -24,
        61.5
      ],
      "mount": "HIDDEN",
      "size": "LARGE",
      "type": "LAUNCH_BAY"
    },
    {
      "angle": 0,
      "arc": 360,
      "id": "LB 3",
      "locations": [
        6,
        -60.5,
        -24,
        -60.5
      ],
      "mount": "HIDDEN",
      "size": "LARGE",
      "type": "LAUNCH_BAY"
    },
    {
      "angle": 0,
      "arc": 360,
      "id": "LB 4",
      "locations": [
        -68.5,
        -10,
        -68,
        9
      ],
      "mount": "HIDDEN",
      "size": "LARGE",
      "type": "LAUNCH_BAY"
    }
  ],
  "width": 211
}
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24151
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3340 on: May 19, 2017, 02:59:10 PM »

It's MIDLINE, not MID_TECH, unless you have a MID_TECH style defined in your hull_styles.json.
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3341 on: May 19, 2017, 03:39:07 PM »

Is the rarity value in weapons.csv a percentage reduction of the base drop chance, or a value that determines "effective rarity" as in  .7 > .5 > .3 on how "rare" the weapon is?

It's a multiplier for the probability a given weapon will show up when an item in drop_data can have multiple weapons. For example:

wpn_:{weaponType:ENERGY}

Will pick from all energy weapons, modified by rarity.

Ah, so lower decimals are more rare? Darn it, I had it backwards. XD

Further question then, are weapons without a rarity value counted as rarity "1" by default?
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1325
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3342 on: May 19, 2017, 03:42:51 PM »

Stupid, stupid, so stupid!
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24151
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3343 on: May 19, 2017, 04:33:20 PM »

Further question then, are weapons without a rarity value counted as rarity "1" by default?

Yep.

Stupid, stupid, so stupid!

Happens to everyone now and again :)
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #3344 on: May 19, 2017, 05:02:22 PM »

Further question then, are weapons without a rarity value counted as rarity "1" by default?

Yep.

Awesome, thanks.  ;D
Logged
Pages: 1 ... 221 222 [223] 224 225 ... 711