Author Topic: Different options depending on game?  (Read 194 times)

Offline Andrea C.

  • Planewalker
  • *****
  • Posts: 72
  • Gender: Male
Different options depending on game?
« on: June 05, 2017, 12:56:18 PM »
Hello.

I would like a component of my mod to offer a different set of options (subcomponents) depending on whether the game is SOD or BGII:EE.

The way I originally coded it is:

Code: [Select]
BEGIN ~Restore BG portraits and colors for all~ DESIGNATED 40
SUBCOMPONENT ~Restore BG Portraits & Colors~
REQUIRE_PREDICATE GAME_IS ~bg2ee~ ~This component is only intended for BGII:EE~

(code that does stuff)

BEGIN ~Restore BG portraits and colors; SOD for Imoen~ DESIGNATED 41
SUBCOMPONENT ~Restore BG Portraits & Colors~
REQUIRE_PREDICATE GAME_IS ~bg2ee~ ~This component is only intended for BGII:EE~

(etc.)

But when I add the following underneath:

Code: [Select]
BEGIN ~Restore BG portraits and colors for Imoen~ DESIGNATED 44
SUBCOMPONENT ~Restore BG Portraits & Colors~
REQUIRE_PREDICATE GAME_INCLUDES ~sod~ ~This component is only intended for Siege of Dragonspear~

The installer just skips it.

Is it because REQUIRE_PREDICATE won't work with GAME_INCLUDES? Or should I get rid of REQUIRE_PREDICATE altogether and go about this differently?

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 883
Re: Different options depending on game?
« Reply #1 on: June 05, 2017, 05:43:53 PM »
Code: [Select]
SUBCOMPONENT ~foo~ GAME_INCLUDES sod

However, this stuff is rather half-baked. The value for SUBCOMPONENT is not installation-blocking, it just hides it from interactive view. The value for GROUP is not even really implemented. Things get set but are never checked.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: