Jump to content

Need help with SUBCOMPONENT, GROUP etc.


jastey

Recommended Posts

Nope, the stupidity is mine -

 

Nythrun set this up economically and beautifully in a closed OUTER_WHILE loop.

The logic that I screwed up in my re-edit for you is that the line *does* play every single time, including the first; it loops back to that line UNLESS the person presses 1, 2, 3, 4, or 5, at which point it proceeds to evaluate and continue....

 

it loops over and over again until the user inputs a valid expected value. :)

 

My silliness. If a chastizing response is wanted, or redirection, then grab Ascension64's edit and use it, or else make the final "looped back always showing" text match something like what she did.

 

Sorry for the confusion.

 

EDIT: Just read Mike1072's post - yep, right - will edit the initial one to make sure folks know for the future!!!

Link to comment

Note that the IS_AN_INT check needs to go first and before any (timer = number) checks, or the component will fail to install with an int_of_string error if someone decides to enter instead of [1].

 

This is mostly cosmetic (the component doesn't install either way) but may be a little less forbidding to the end user :)

Link to comment

The "required file" thing doesn't work for me. The subcomponent installs happily after the core was deinstalled.

 

In the tp2, at the beginning, there is:

 

 

/* Tells other sub mods Ajantis core is installed */

COPY ~C#Ajantis_SvA/Install/component.xx~ ~override/C#AjantisCore.RR~

 

and further down, the sub mod with several options that all go like the first:

 

BEGIN ~Portrait 1 by Plasmocat (blonde Ajantis)~

SUBCOMPONENT ~Ajantis Portrait. Which one do you want to install? (For the default BG portrait press "no")~

REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~C#AjantisCore.RR~ ~This component requires the core component.~

COPY ~C#Ajantis_SvA/Portraits/Plasmocat/Ajantis_blonde~ ~override~

 

 

I don't see the problem.

Link to comment

I think you'll get much more stable results if you replace the

REQUIRE_PREDICATE FILE_EXISTS_IN_GAME ~C#AjantisCore.RR~ ~This component requires the core component.~

with

REQUIRE_COMPONENT ~whatever_your_setup_is_named.tp2~ "0" ~This component requires the core component.~

Link to comment

Hmmm... we used R_P F_E_I_G because it allowed WeiDU to rip out everything including SUBCOMPONENT and FORCED_SUBCOMPONENT while using still using GROUP from the baseline (if you uninstall the core component it tears the rest of the mod out immediately, including all SC and F_SC). Basically, a poor man's way of cheating the default "Ask Every Component" behavior that automatically applies when using GROUP to allow a quick, clean full uninstall of all components.

 

The only time I found problems with this were when I was troubleshooting, and had a failed install - sometimes the flag file was left in the override.

 

Is there a big difference between R_C and R_P F_E_I_G from a stability standpoint?

Link to comment

If it's your own mod, a DESIGNATED should stabilise that (unless you go changing that too...). If it's someone else's, who knows what they're gonna do with their mod's components (or the files copied by the mod for that matter).

Link to comment
REQUIRE_COMPONENT just has the welcome advantage of, you know, actually working :)
Well, not if someone changes the .tp2 name or component number. I don't mean in mid-install... I think A64's point was if you're going to REQUIRE_COMPONENT ~setup-improved_anvil.tp2~ #5 and the author has inserted a new component so it's now #6, the mod won't recognize it.

 

Same goes for ACTION_IF MOD_IS_INSTALLED. I had another situation where a component I'm creating is only installed if setup-unique_artifacts.tp2 is not installed. But, based on which option you choose, that component number is gonna be either #0 or #1 so it got kind of hairy trying to check for the mod, and I think I ended up just going with a F_E_I_G.

Link to comment

Who is changing jastey's .tp2 without telling her about it? She's checking for her own mod.

 

But, based on which option you choose, that component number is gonna be either #0 or #1
Component numbers don't change based on what you have installed: the first component installed need not be 0. If you're not sure which of several (fixed) components might be in place, you use OR. Just like you would with multiple FILE_EXISTS checks. Except FILE_EXISTS doesn't work to prevent partial reinstalls of your own mod, which is what jastey is doing, and was noticing that it didn't work.

 

Sorry, I'm genuinely not seeing a problem here.

Link to comment
Sorry, I'm genuinely not seeing a problem here.
No one said there was, but at some point the discussion shifted from specifics to generalities. But whatever... Yeah, if you're checking for your own mod, then absolutely you want to use REQUIRE_COMPONENT or MOD_IS_INSTALLED rather than gunking up the override with bogus files and checking for them.
Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...