Jump to content

What's a LABEL tag?


Recommended Posts

6 hours ago, Lauriel said:

Ok, I tested this.  Labeling multiple options of the same subcomponent with the same label will make it so that any checks using that label will return false, unfortunately.  That would have been handy in case of subcomponents.  Oh well.

Can still do it the old-fashioned way and leave marker files. 

Link to comment
6 hours ago, Lauriel said:

Ok, I tested this.  Labeling multiple options of the same subcomponent with the same label will make it so that any checks using that label will return false, unfortunately.  That would have been handy in case of subcomponents.  Oh well.

Still, what is the syntax for several LABELs?

Link to comment
6 hours ago, Lauriel said:

Ok, I tested this.  Labeling multiple options of the same subcomponent with the same label will make it so that any checks using that label will return false, unfortunately.  That would have been handy in case of subcomponents.  Oh well.

So did I with IA to check if a creature animation was installed (might be by several different components or sub-components) and it screwed up all checking.

Link to comment
8 minutes ago, subtledoctor said:

Can still do it the old-fashioned way and leave marker files. 

It was just a thought: my EBG1 for example has a component that makes Elminster appear one more time. There are two options concerning the texts. If another mod needs to check whether any of those subcomponents are installed (i.e. whether "the" component "Elminster appears" is installed), being able to use one LABEL to squash all at once would just have been handy.

Link to comment
6 hours ago, jastey said:

It was just a thought: my EBG1 for example has a component that makes Elminster appear one more time. There are two options concerning the texts. If another mod needs to check whether any of those subcomponents are installed (i.e. whether "the" component "Elminster appears" is installed), being able to use one LABEL to squash all at once would just have been handy.

If you want it to cover all subcomponents, you could try applying the LABEL to the main component they are connected to.  But you can apply REQUIRE_PREDICATE to all subcomponents by putting it after the first one. I think MOD_IS_INSTALLED checks return true for the the underlying “component” if any subcomponents is installed. (Someone correct me if I’m wrong?) If so, maybe LABEL works that way. Maybe. 

6 hours ago, jastey said:

Still, what is the syntax for several LABELs?

I think you can just do it repeatedly. 

BEGIN ~comp1~
REQUIRE_PREDICATE MOD_IS_INSTALLED ~othermod.tp2~ ~10~ ~blah~
REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~marker.mark~ ~blah~
REQUIRE_PREDICATE GAME_IS ~eet~ ~blah~
LABEL ~best_component~
LABEL ~fairly_good~
	 
COPY_EXISTING ~yadda~ 

Maybe.

Edited by subtledoctor
Link to comment
49 minutes ago, subtledoctor said:

If you want it to cover all subcomponents, you could try applying the LABEL to the main component they are connected to.

I meant something like this:

BEGIN @5015 /* ~jastey's Version~ */ DESIGNATED 8 LABEL  EBG1_ElminsterAppearance_jastey
SUBCOMPONENT @5007 /* ~Elminster makes an Appearance~ */
[yadda]

BEGIN @5016 /* ~Restored BG1 Text~ */ DESIGNATED 9 LABEL EBG1_ElminsterAppearance_restored
SUBCOMPONENT @5007 /* ~Elminster makes an Appearance~ */
[yadda]

I am not sure what you mean with main component here, unless you mean putting the LABEL behind the actual SUBCOMPONENT declarations?

Link to comment
1 hour ago, jastey said:

Would this be something for a feature request? Or is it an installer restriction? (Does anyone know?)

Well, can always request a feature, no?  The answer might be 'no can do - sorry', but would be worth an ask.

Link to comment

@Lauriel

One of the most valuable feature of LABEL is that it doesn't lock DESIGNATED changes of other mods. So instead of:

REQUIRE_COMPONENT "Mod.tp2" "100" "Require Mod Main Component"

you can use:

REQUIRE_PREDICATE ( MOD_IS_INSTALLED "Mod.tp2" (ID_OF_LABEL "Mod.tp2" "MainComponent") ) "No Mod.tp2 MainComponent"

It can also be used locally for you own mod components. Then you can resign from using "DESIGNATED xxxx ..." entirely.

 

 

Link to comment
3 hours ago, jastey said:

I am not sure what you mean with main component here, unless you mean putting the LABEL behind the actual SUBCOMPONENT declarations?

Yes, that's basically what I meant.  Worth testing... but then the whole way SUBCOMPONENT works is kind of not great. 

Looking at your example, I thought about it for about five minutes and then again came to the conclusion that it's probably best to just drop a marker file and move on to more pressing questions... (I always have more pressing questions, so admittedly my patience for this kind of stuff is limited.)

Link to comment
1 minute ago, subtledoctor said:

came to the conclusion that it's probably best to just drop a marker file and move on

I'm rather pedantic, and really hate marker files.  I understand they're easy to use.  They're messy.  I will do my best to avoid them.  But again, my issue, I realize that.

Link to comment

Trying to use a label in my tp2 file like:

FORBID_COMPONENT ~c#endlessbg1/c#endlessbg1.tp2~ (ID_OF_LABEL "c#endlessbg1/c#endlessbg1.tp2" "EBG1_ElminsterAppearance_jastey") @19

WeiDU doesn't like me using the parenthesis.  It doesn't like me not using the parenthesis.  It doesn't like me using quotes.  It just doesn't like me at all it seems.  How do I do this?  The docs are sparse at best on this subject.

Link to comment

Join the conversation

You are posting as a guest. 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...