Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Updated the Forum Rules and Guidelines (02/29/20); Blog post: GIF Roundup (04/11/20)

Pages: 1 ... 3 4 [5]

Author Topic: [0.9.1] MagicLib v0.29 (2020/04/26)  (Read 123308 times)

Professor Pinkie

  • Ensign
  • *
  • Posts: 22
  • Best cupcakes in a sector!
    • View Profile
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #60 on: July 04, 2020, 12:31:54 PM »

Can anyone tell me any mod using MagicIncompatibleHullmod?

I want to see how it should work.
Logged

Cabbs

  • Ensign
  • *
  • Posts: 16
    • View Profile
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #61 on: July 05, 2020, 01:45:34 PM »

Can anyone tell me any mod using MagicIncompatibleHullmod?

I want to see how it should work.

Don't have a clean example to refer you too, but its super-easy to implement. 

You add code to your applyEffectsBeforeShipCreation like this:

Quote
if(stats.getVariant().getHullMods().contains("swp_shieldbypass")){

 MagicIncompatibleHullmods.removeHullmodWithWarning(stats.getVariant(), "swp_shieldbypass", "CBCC_shieldscaling");

 }

In my example:

1.  applyEffectsBeforeShipCreation runs every time you add a hullmod to a ship, so this check occurs whenever you change something
2.  If the mod with ID "swp_shieldbypass" is present, the IF triggers
3.  'MagicIncompatibleHullmods.removeHullmodWithWarning' removes "swp_shieldbypass" and replaces it with a dummy warning mod that specifies "CBCC_shieldscaling" as the reason, so these two mods can never be present together.


This is how it works as far as I know.
Logged

Professor Pinkie

  • Ensign
  • *
  • Posts: 22
  • Best cupcakes in a sector!
    • View Profile
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #62 on: July 05, 2020, 10:11:11 PM »

Silly me.

This is exactly what I was trying to do. My problem was: "eficiency_overhaul" instead of "efficiency_overhaul" in MagicIncompatibleHullmods.removeHullmodWithWarning(stats.getVariant(), "eficiency_overhaul", "my_hullmod");

In the future, I should read the log before asking people questions.

I apologize most deeply.
Logged

SafariJohn

  • Admiral
  • *****
  • Posts: 1648
    • View Profile
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #63 on: July 06, 2020, 07:14:28 PM »

Don't feel too bad, I thought a typo might be the problem and still missed that.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 1342
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #64 on: July 07, 2020, 01:44:41 PM »

I did as well.  :P
Logged

tokmak333

  • Lieutenant
  • **
  • Posts: 92
    • View Profile
    • Email
Re: [0.9.1] MagicLib v0.29 (2020/04/26)
« Reply #65 on: Today at 01:56:43 AM »

first download link doesnt work and nexusmod requires login to download. First link says ERR_SSL_PROTOCOL_ERROR and its not safe, not sure why

edit: nvm i cant see download pictures with links on them because imgur is not allowed in our country for some reason lol
« Last Edit: Today at 01:58:56 AM by tokmak333 »
Logged
Pages: 1 ... 3 4 [5]