Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95.1a is out! (12/10/21); Blog post: The Pilgrim's Path (07/19/22)

Pages: 1 ... 398 399 [400] 401 402 ... 602

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

SafariJohn

  • Admiral
  • *****
  • Posts: 2539
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5985 on: January 24, 2020, 04:15:39 PM »

Or Global.getSector().getCampaignUI().addMessage() for basic messages.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20604
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5986 on: January 24, 2020, 04:18:33 PM »

Oh yeah! (Fun fact: that uses MessageIntel under the hood, but, yeah, a nice shortcut for basic stuff.)
Logged

Timid

  • Captain
  • ****
  • Posts: 491
  • Personal Text
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5987 on: January 24, 2020, 04:42:06 PM »

Hmm? Could you clarify about what context you're working in here? What class has these methods?
Mainly the bar missions and quests itself.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20604
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5988 on: January 24, 2020, 04:45:39 PM »

Then you'd want to check that class/its superclass(es) for additional methods of that nature, either in the javadoc or in the source.
Logged

creature

  • Captain
  • ****
  • Posts: 362
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5989 on: January 24, 2020, 04:59:37 PM »

Or Global.getSector().getCampaignUI().addMessage() for basic messages.
Thank you very much!

Actually, I have another question, and though it's more lore related, I promise it's related to modding - Do Volturnian Lobsters have a spawning season? If so, around which month/s does it happen?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20604
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5990 on: January 24, 2020, 05:05:55 PM »

That information is in a quantum uncertainty state, meaning that since it hasn't been necessary yet, it hasn't been decided.
Logged

Originem

  • Purple Principle
  • Captain
  • ****
  • Posts: 401
  • Dancing like a boss.
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5991 on: January 24, 2020, 05:22:52 PM »

How to get accurate shield efficiency?
damage *= ship.getShield().getFluxPerPointOfDamage();
damage *= ship.getMutableStats().getShieldDamageTakenMult().getModifiedValue();
Is this right?
Logged
My mods


Alex

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

Yeah, I think that's correct.
Logged

creature

  • Captain
  • ****
  • Posts: 362
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5993 on: January 24, 2020, 06:02:25 PM »

That information is in a quantum uncertainty state, meaning that since it hasn't been necessary yet, it hasn't been decided.
Haha, in that case I have no choice but to formulate my own hypethesis!  ;D
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20604
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5994 on: January 24, 2020, 06:02:50 PM »

Indeed :)
Logged

Panpiper

  • Ensign
  • *
  • Posts: 29
    • View Profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5995 on: January 25, 2020, 06:15:20 AM »

Is it possible to place encounters like defended Domain artifacts, and wandering patrols, etc., inside a hand built system? I'd like to add several such to the Sol system https://fractalsoftworks.com/forum/index.php?topic=17711.0 made by Scmp. I don't have the first clue how to mod this game other than hacking from code examples. If it is possible, could someone point me to an example of someone else's code where they have done this successfully so I can learn (IE: blatantly steal code) from them?
Logged

MesoTroniK

  • Admiral
  • *****
  • Posts: 1715
  • I am going to destroy your ships
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5996 on: January 25, 2020, 09:14:18 PM »

Quick and probably stupid question for you Alex.
Code
	/**
* Whether it was spawned by a missile (or by other non-directly-by-weapon means).
* Needed for incoming damage evaluation AI to function properly in these cases.
* @param fromMissile
*/
void setFromMissile(boolean fromMissile);
Should setFromMissile *always* called? Even say on a missile that MIRVs into only a single missile not a spread of several, and the spawned shot does the same damage as the base missile so to speak?

Edit: Or any other weird splitting projectile or missile stuff, that isn't anything like exists in vanilla.
« Last Edit: January 25, 2020, 09:17:48 PM by MesoTroniK »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 20604
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5997 on: January 25, 2020, 09:26:59 PM »

That actually only needs to be set for ballistic projectiles/plasma shots. If a missile launches another missile, this method doesn't need to be called.

Edlt: and also for BALLISTIC_AS_BEAM shots.


Is it possible to place encounters like defended Domain artifacts, and wandering patrols, etc., inside a hand built system? I'd like to add several such to the Sol system https://fractalsoftworks.com/forum/index.php?topic=17711.0 made by Scmp. I don't have the first clue how to mod this game other than hacking from code examples. If it is possible, could someone point me to an example of someone else's code where they have done this successfully so I can learn (IE: blatantly steal code) from them?

Take a look at data.scripts.world.systems.Galatia for an example of a probe being spawned.
« Last Edit: January 26, 2020, 08:02:07 AM by Alex »
Logged

Histidine

  • Admiral
  • *****
  • Posts: 3890
    • View Profile
    • Bitbucket profile
    • Email
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5998 on: January 26, 2020, 01:07:56 AM »

That actually only needs to be set for ballistic projectiles/plasma shots. If a missile launches another missile, this method doesn't need to be called.
Does it also apply to ballistic projectiles spawned from other projectiles?

My current interpretation is:
Use for
  • Ballistic spawned from ballistic
  • Ballistic spawned from missile
Don't use for
  • Missile spawned from ballistic
  • Missile spawned from missile
Logged

cloverstar

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: Misc modding questions that are too minor to warrant their own thread
« Reply #5999 on: January 26, 2020, 03:06:15 AM »

What would be the best way to go about implementing a dynamic upkeep for a structure? I was thinking about calling applyIncomeAndUpkeep() and changing upkeep as I go but I'm not sure how to zero out the upkeep at the beginning of a new month. I've just been creating intel messages but it really clogs up your screen if you have multiple colonies lol
Logged
Pages: 1 ... 398 399 [400] 401 402 ... 602