Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 460 461 [462] 463 464 ... 467

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

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17403
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6915 on: November 29, 2020, 04:13:03 PM »

IIRC a mirv will split if within a certain range of the target, but not until minTimeToSplit seconds have passed since it was launched.
Logged

passwalker

  • Commander
  • ***
  • Posts: 134
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6916 on: November 29, 2020, 04:55:47 PM »

yes, i thought so too
i tried setting it to 20 and 200 and 2000 and i didn't notice any difference whatsoever, it just splits almost immediately upon launch(or upon being armed?). is it actually seconds?
tried changing hurricane too, directly in vanilla files, no effect as well.
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17403
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6917 on: November 29, 2020, 05:31:08 PM »

Ah - looking at the code, it also checks if the main body of the missile has an eta to target that's less than the remaining "until split" time, and if the eta is less than that, then it can also split.
Logged

passwalker

  • Commander
  • ***
  • Posts: 134
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6918 on: November 29, 2020, 06:02:32 PM »

that's sad. so is there no way to make a mirv missile impact directly if the target is too close? without scripts, i mean.
Logged
Any and ALL sprites i ever posted on this forum are FREE to use. even if i'm using them myself. Don't ever, EVER ask for permission, or i will come to your home and EAT YOUR DOG!!!
i do NOT want to see my name appear in the credits section of any published mod and will consider it a personal insult.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17403
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6919 on: November 29, 2020, 06:08:30 PM »

I don't think so, no - you'd need a custom missile AI. I mean, it's basically coded specifically *not* to do that.
Logged

Sinosauropteryx

  • Commander
  • ***
  • Posts: 227
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6920 on: November 30, 2020, 05:24:29 AM »

I want to make a star system with three equidistant planets, all on the same orbit, and moving at the same speed. Arrayed somewhat like the blades of a fan. Is this possible? I can create the first planet, but how do I make the second and third have the same orbit period and not start in the same location?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17403
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6921 on: November 30, 2020, 12:10:13 PM »

Check the parameters of addPlanet(), one of them is the starting angle.
Logged

Jaghaimo

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6922 on: December 02, 2020, 09:15:17 AM »

I can't seem to get the correct Demand and Available values for commodity. From MarketAPI object I fetch CommodityOnMarketAPI object and then what? Both getDemandValue() and getAvailable() return wrong values (the former is too large, later is usually 0 or some single digit number). I want to have the same values as shown on the tooltip when you F1 over a commodity.
Logged
Stellar Logistics - logistic services
Hyperspace Network - information services
Galactic Markets - economy services

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17403
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6923 on: December 02, 2020, 10:06:39 AM »

You want these:
int getDeficitQuantity();
int getExcessQuantity();
Logged

Jaghaimo

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6924 on: December 02, 2020, 10:53:29 AM »

Right, I do have those. It's the Available and Demand fields that I struggle with:

« Last Edit: December 02, 2020, 12:42:28 PM by Jaghaimo »
Logged
Stellar Logistics - logistic services
Hyperspace Network - information services
Galactic Markets - economy services

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17403
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6925 on: December 02, 2020, 12:43:57 PM »

Ah, right, sorry. Was going too fast and didn't pay enough attention.

For the available value it'd be something like:
int available = OpenMarketPlugin.getApproximateStockpileLimit(com);
available += com.getPlayerTradeNetQuantity();

For demand, it'd be:
int demandIcons = com.getMaxDemand();
if (!com.getCommodity().isPrimary()) {
    CommodityOnMarketAPI primary = market.getCommodityData(com.getCommodity().getDemandClass());
    demandIcons = primary.getMaxDemand();
}
int demand = (int) (com.getCommodity().getEconUnit() * demandIcons);
demand -= com.getPlayerTradeNetQuantity();

Except in the non-dev version, the CommodityIconCounts class isn't exposed, so you'd need to use
Logged

Jaghaimo

  • Commander
  • ***
  • Posts: 128
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6926 on: December 02, 2020, 01:53:13 PM »

Thank you. I wouldn't be able to figure out the logic behind this myself.

Two observations / questions:
- Availability is based on OpenMarket alone, but there MAY be a better place to buy (lower price, see the lower section of the image in the spoiler) in Military or Black markets. You are actively discarding places that have no stock in OpenMarket (in F1 tooltip) - shouldn't it at least consider Military market since it's also a legal source of procurement?
- Demand can be 0 (upper section of the image in the spoiler), and yet market will pay for goods. Not sure how to interpret that, if there is no demand shouldn't market refuse to procure more stock? What happens if I sell enough to cover demand?
- The F1 tooltip sometimes show "Price / 100", "Price / 200" or "Price / 500" - how does the game decide which quantity to use for price approximation?

Spoiler

[close]
« Last Edit: December 02, 2020, 02:09:24 PM by Jaghaimo »
Logged
Stellar Logistics - logistic services
Hyperspace Network - information services
Galactic Markets - economy services

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 17403
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6927 on: December 02, 2020, 03:30:03 PM »

- Availability is based on OpenMarket alone, but there MAY be a better place to buy (lower price, see the lower section of the image in the spoiler) in Military or Black markets. You are actively discarding places that have no stock in OpenMarket (in F1 tooltip) - shouldn't it at least consider Military market since it's also a legal source of procurement?

That's just where the static method happens to live. Open, military, and black markets essentially divvy up this value between them - not explicitly, but based on how their getStockpileLimit() methods are coded. All of them are based on getBaseStockpileLimit() and then get a fraction of that based on stability etc.


- Demand can be 0 (upper section of the image in the spoiler), and yet market will pay for goods. Not sure how to interpret that, if there is no demand shouldn't market refuse to procure more stock? What happens if I sell enough to cover demand?

They'll pay a lot less for it than its value in both of these cases. Basically even if they don't need something, they'll buy it for super cheap (to presumably re-sell?).

- The F1 tooltip sometimes show "Price / 100", "Price / 200" or "Price / 500" - how does the game decide which quantity to use for price approximation?

That value comes from CommoditySpecAPI.getEconUnit(), which is basically how many cargo-units an icon's worth of a commodity corresponds to.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 1586
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6928 on: December 03, 2020, 07:57:59 PM »

Can anyone who has worked with modules tell me if they automatically die if the parent ship dies? Or do they need a hullmod or something for that?

Nvm, it showed a blue circle even without a designated png sprite so I know the module died when the parent ship died. I can just make it never detach to avoid the circles causing confusion. So now the question is what does vast_bulk actually do? Just make the module invincible?
« Last Edit: December 03, 2020, 08:29:06 PM by Morrokain »
Logged

Techpriest

  • Commander
  • ***
  • Posts: 118
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #6929 on: December 07, 2020, 03:12:56 PM »

i'm sory if this is too much to ask but is it possible to modify max relationship points and minimum relationship points? I dislike the idea of -100 / 100 when relationship points can be so easily manipulated and I feel some decimal points are lost when this is done as well. maybe for next update if this is possible ?
Pages: 1 ... 460 461 [462] 463 464 ... 467