Jump to content

[ANSWERED] Part CFG tags - is it possible to use multiple autoLOC entries?


Recommended Posts

I'm currently revamping a docking port part, which has built-in parachutes and lights.

The Part CFG has a tags field which allows keywords to be specified so that players can search for the parts in the VAB/SPH editor. In earlier versions of the game, modders could simply explicitly specify a list of tags, but with the more recent localization updates to the game, these have been replaced with #autoLOC entries containing a premade keyword list.

The stock docking ports have

tags = #autoLOC_500848 //#autoLOC_500848 = berth capture connect couple dock fasten join moor socket

and the stock parachutes have

//#autoLOC_500929 = arrest blue canopy chute decel descen drag entry fall landing re- return safe slow

Since my part is a both a docking port and a parachute container, I thought I'd do this:

tags = #autoLOC_500848 #autoLOC_500929

However, when any of the keywords found in either of those tags are put into the parts list search bars, my custom part doesn't show up as matching the keyword.

How do I combine two or more #autoLOC entries in a PART CFG field?

Link to comment
Share on other sites

You can’t, unfortunately the localization plugin doesn’t work with multiple tags like that. Could be a feature request - as it is possible but would require changes to KSP. For now: You have to create your own tag with all the values of the two tags - for each language. And include it as a localization cfg file with your mod.

Link to comment
Share on other sites

  • 1 year later...
On 7/24/2018 at 3:19 AM, sumghai said:

I'm currently revamping a docking port part, which has built-in parachutes and lights.

The Part CFG has a tags field which allows keywords to be specified so that players can search for the parts in the VAB/SPH editor. In earlier versions of the game, modders could simply explicitly specify a list of tags, but with the more recent localization updates to the game, these have been replaced with #autoLOC entries containing a premade keyword list.

The stock docking ports have


tags = #autoLOC_500848 //#autoLOC_500848 = berth capture connect couple dock fasten join moor socket

and the stock parachutes have


//#autoLOC_500929 = arrest blue canopy chute decel descen drag entry fall landing re- return safe slow

Since my part is a both a docking port and a parachute container, I thought I'd do this:


tags = #autoLOC_500848 #autoLOC_500929

However, when any of the keywords found in either of those tags are put into the parts list search bars, my custom part doesn't show up as matching the keyword.

How do I combine two or more #autoLOC entries in a PART CFG field?

could you do it in two steps?

the part.cfg would have

tags = #autoLOC_500848

then follow that with a simple MM patch (could even be in same file)

@PART[xyz] // pseudo-code

{
	temp = #../tags
	@tags = #autoLOC_500929
	@tags ^= :$: temp:
	!temp
}

you might even be able to just do it this way - 
  @tags ^= :$: #autoLOC_500929 :

I am doing something close now with a mod I just released. Using the stock dictionary localization tags; then coming after and patching


 

Edited by zer0Kerbal
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...