Jump to content

Vary Cost of Tech Node Depending on Kopernicus Mod


Probus

Recommended Posts

I would like to vary the cost of each tech node dependant on the Kopernicus mod used. Does anyone know the best way I can accomplish the following (with module manager maybe)?

If stock then multiply the tech node x 1.0

If JNSQ then multiply the tech node x 1.2

If RSS then multiply the tech node x 1.3

If OPM then...

You can't do math in MM, Correct?  Maybe use some kind of replace instead?

Link to comment
Share on other sites

9 hours ago, Probus said:

I would like to vary the cost of each tech node dependant on the Kopernicus mod used. Does anyone know the best way I can accomplish the following (with module manager maybe)?

If stock then multiply the tech node x 1.0

If JNSQ then multiply the tech node x 1.2

If RSS then multiply the tech node x 1.3

If OPM then...

You can't do math in MM, Correct?  Maybe use some kind of replace instead?

Yes you can. RTFM ; )

Something like

@TechTree:NEEDS[JNSQ,!OPM,!RSS]:FINAL{
  @RDNode:HAS[#id[advancedMotors]]{
    @cost *= 1.2
  }
}
@TechTree:NEEDS[RSS,!JNSQ,!OPM]:FINAL{
  @RDNode:HAS[#id[advancedMotors]]{
    @cost *= 1.3
  }
}
@TechTree:NEEDS[OPM,!JNSQ,!RSS]:FINAL{
  @RDNode:HAS[#id[advancedMotors]]{
    @cost *= 1.4
  }
}

might work, no guarantees though.

Edited by Corax
Link to comment
Share on other sites

12 hours ago, Corax said:

Yes you can. RTFM ; )

Something like


@TechTree:NEEDS[JNSQ,!OPM,!RSS]:FINAL{
  @RDNode:HAS[#id[advancedMotors]]{
    @cost *= 1.2
  }
}
@TechTree:NEEDS[RSS,!JNSQ,!OPM]:FINAL{
  @RDNode:HAS[#id[advancedMotors]]{
    @cost *= 1.3
  }
}
@TechTree:NEEDS[OPM,!JNSQ,!RSS]:FINAL{
  @RDNode:HAS[#id[advancedMotors]]{
    @cost *= 1.4
  }
}

might work, no guarantees though.

Avoid the use of FINAL, though. That should be reserved for the user's own MM patches, in my opinion. Use FOR[ETT] or NEEDS[ETT] instead. Using nothing would probably make sense for this patch too.

Link to comment
Share on other sites

12 hours ago, ev0 said:

Avoid the use of FINAL, though. That should be reserved for the user's own MM patches, in my opinion. Use FOR[ETT] or NEEDS[ETT] instead. Using nothing would probably make sense for this patch too.

Agreed, FINAL should in general only be used for "personal" patches, if you will.

On the other hand, FOR should only be used by the author of the mod itself (which, granted, Probus would probably be, in the case of ETT), since it defines that identifier as "existing" in terms of ModuleManager, i.e. if ETT is not installed, but a patch uses FOR[ETT], ModuleManager can't know better than to assume ETT is in fact installed, and all other patches depending on that will get applied too.

Link to comment
Share on other sites

Thanks a bunch!  I will see what I can do.  I have a feeling the initial nodes should probably have static values.  I just need to be careful not to knock a tech level 1 node into level 2 where an upgrade to the science center is required.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...