Jump to content

Getting USAF Orion into the Community Tech Tree


fallingphoenix

Recommended Posts

As of now, near as I can tell, the Orion drive doesn't show up anywhere on the tech tree, so I tried adding a MM config in the mod's folder, but it doesn't seem to be working. Here is a sample of the format I'm using for each part in the .cfg.

@PART[USAFOrion3Engine]:FOR[USAFOrion]:NEEDS[CommunityTechTree]
{
	@TechRequired = improvedNuclearPropulsion
}

The name in brackets for the PART should be the 'name = x' from the part's config, right? And the FOR piece should be the...name of the mod's .dll? Does it matter where in the mod folder in gamedata that you put the .cfg with this bit in it? Am I doing anything obviously wrong?

Link to comment
Share on other sites

  • 2 weeks later...

Welcome to the forums!

I believe that the name of the mod, in clauses such as FOR and AFTER, is the name of the GameData subfolder where it lives. (DLL name wouldn't work, since a mod can include multiple DLLs. TweakableEverything is a notable example.)

You're correct about the "name" field.

Note that the @ operator is only for modifying an existing value. If the part does not already have a TechRequired node, then @TechRequired will do nothing.  Try leaving off the @ (which means "add new") or replacing it with a % (which means "add new or edit existing").

It doesn't matter where in GameData you put your .cfg. In fact, for the sake of maintainability, I'd recommend not putting it in the mod's folder; make your own folder in GameData and put all your own .cfg files there, that way they don't get disturbed when you update the mod.

Do you really need the FOR clause here?

 

Edited by Snark
Link to comment
Share on other sites

21 hours ago, Snark said:

Do you really need the FOR clause here?

It's proper form, I believe. It declares that this config should be loaded during the load phase of this mod in particular. Configs without load pass clause will get sorted into a legacy pass, where you can't really be sure of the order the configs will get loaded in. Which is sometimes not an issue, but sometimes can be, if there are multiple configs trying to edit the same values.

Even more proper form, however, is to not use the FOR[mod] pass for your own tweaks. It's meant to be used for the mod itself - for example, RemoteTech ships a whole lot of incomplete part files and then applies a number of conditional config patches at startup during the FOR[mod] pass that complete the configs. As a user writing a custom tweak, you're better off using the AFTER[mod] pass, to ensure that your config gets loaded afterwards and thus remains the last writer (because last writer wins). Or even better: use the FINAL pass, which applies your config after absolutely everything else has loaded. It also doesn't require you to target any mod, meaning it removes a source of errors. ;)

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...