Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 320 321 [322] 323 324 ... 459

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17089
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4815 on: August 18, 2019, 08:15:53 AM »

When working with generating fleets using FleetFactoryV3, how are combat points spent? Like does a battleship cost it's fleet points or is it a set cost for each ship class, like a Capital Ship costs 8 or something?

It uses fleet points, yeah.
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 259
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4816 on: August 18, 2019, 01:03:31 PM »

anyone know where is value for a pay for  exploration(scan derelict) missions? I mean for a reward
i want to lower it

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17089
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4817 on: August 18, 2019, 01:12:14 PM »

Hardcoded in the intel, I'm afraid. So: moddable, but not easily, as you'd have to replace the code that generates that intel.
Logged

Kelaris

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4818 on: August 18, 2019, 11:37:22 PM »

Where would I start looking if I wanted to change the quantity/variety of different weapons, fighters, and ships available at markets?

I've been poking at things in com.fs.starfarer.api.impl.campaign.submarkets (BaseSubmarketplugin, BlackMarketPlugin, MilitarySubmarketPlugin, and OpenMarketPlugin) without successfully changing anything, as far as I can tell. I'm not sure if I'm digging in the wrong place, or if I've made some mistake in packaging my mod. First time messing with Starsector modding and I'm a complete novice with java, so any mishap is possible.
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 259
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4819 on: August 19, 2019, 06:56:10 AM »

Hardcoded in the intel, I'm afraid.

Why Alex? Whyyyyy?

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17089
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4820 on: August 19, 2019, 08:30:38 AM »

Where would I start looking if I wanted to change the quantity/variety of different weapons, fighters, and ships available at markets?

I've been poking at things in com.fs.starfarer.api.impl.campaign.submarkets (BaseSubmarketplugin, BlackMarketPlugin, MilitarySubmarketPlugin, and OpenMarketPlugin) without successfully changing anything, as far as I can tell. I'm not sure if I'm digging in the wrong place, or if I've made some mistake in packaging my mod. First time messing with Starsector modding and I'm a complete novice with java, so any mishap is possible.

That's where you'd mess with it, yeah. I'd suggest trying to do something drastic (such as say always clearing the cargo in the updateBeforePlayerInteraction method) just to make sure your code is running and actually doing *something*. Or printing stuff or running with a debugger etc...

Why Alex? Whyyyyy?

:(
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 4863
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4821 on: August 19, 2019, 03:21:53 PM »

Soooo... what controls Travel Drive, exactly?

I changed it a bit, and the results were... odd.  What I want:  setting Retreat activates the Travel Drive after X seconds of being unable to accelerate / decelerate.  Then the ships get to zip off the battlefield.  That... kind of works.  But somewhere along the way, I broke the Travel-Drive-Onto-Battlefield.

Seems that it expects to be a toggled System and it's turned on at the start of play... but it's not clear at all where the toggles are controlled from.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17089
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4822 on: August 19, 2019, 03:26:20 PM »

It's toggled from core code.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 4863
  • naively breaking things!
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4823 on: August 19, 2019, 03:47:23 PM »

Okie doke; I'll try and work around that then :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack

nights

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4824 on: August 19, 2019, 10:57:23 PM »

Is it possible to change the reputation gains from mission?
Been trying to find out for quite a bit.
Logged

TrashMan

  • Admiral
  • *****
  • Posts: 1314
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4825 on: August 20, 2019, 03:16:59 AM »

Question I haven't been able to figure out.

So I have code for creating fleets and assigments, the problem is actually triggering that code. Since I don't need that during sectorgen, like most mods that add remnant-like enemies do, but rather periodically.

Basically, every 30-60 days check to see if the number of fleets with tag "X" is less than Y, and if it is, spawn more fleets. There can also be other checks (for example, number of alien motherships still active limits the amount of fleets to spawn), but those are easy to add.

how do I make that periodical check? From where do I call it?

Can I use CoreCampaignPluginImpl.onNewGameAfterTimePass()  .. or maybe  EveryFrameScript?
What the most efficient way to do it?

I'm a Java scrub and I'm cobbling together code from studying what other mods did, but none actually covers the specific case I'm considering.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17089
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4826 on: August 20, 2019, 07:25:08 AM »

Is it possible to change the reputation gains from mission?
Been trying to find out for quite a bit.

Not very easily - you'd have to change the code for that mission and then change the intel creator for that mission to create your version of the mission instead of the vanilla one. This probably means setting up an IDE and digging into the game's internals a fair bit.

Question I haven't been able to figure out.

So I have code for creating fleets and assigments, the problem is actually triggering that code. Since I don't need that during sectorgen, like most mods that add remnant-like enemies do, but rather periodically.

Basically, every 30-60 days check to see if the number of fleets with tag "X" is less than Y, and if it is, spawn more fleets. There can also be other checks (for example, number of alien motherships still active limits the amount of fleets to spawn), but those are easy to add.

how do I make that periodical check? From where do I call it?

Can I use CoreCampaignPluginImpl.onNewGameAfterTimePass()  .. or maybe  EveryFrameScript?
What the most efficient way to do it?

I'm a Java scrub and I'm cobbling together code from studying what other mods did, but none actually covers the specific case I'm considering.

An EveryFrameScript with an IntervalUtil to keep track of the interval seems like the way to go here. Probably use Global.getSector().addScript() to add it.

See: MilitaryBase.advance() for an example using IntervalUtil (the tracker variable). It's not an EveryFrameScript, but that portion of the code is the same.
Logged

nights

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4827 on: August 20, 2019, 08:35:30 AM »

Is it possible to change the reputation gains from mission?
Been trying to find out for quite a bit.

Not very easily - you'd have to change the code for that mission and then change the intel creator for that mission to create your version of the mission instead of the vanilla one. This probably means setting up an IDE and digging into the game's internals a fair bit.



Thanks for the reply! Was hoping is was an easy change cause the reward was always +5 rep!
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 1771
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4828 on: August 20, 2019, 05:38:21 PM »

I copied the Mining industry, but my industry doesn't produce any ore/etc. Everything else works as expected. Am I just going to have to define all the supply of ore/etc. myself?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17089
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #4829 on: August 20, 2019, 05:48:26 PM »

Yeah, I think so. Looking at the ResourceDepositsCondition code, it's not really set up to handle multiple industries producing resources from the same kinds of deposits. In fact, it's even got a hack in it to support Aquaculture working.
Logged
Pages: 1 ... 320 321 [322] 323 324 ... 459