temnix Posted July 27, 2021 Share Posted July 27, 2021 One of the items I'm working on has a property which, according to Near Infinity, only applies if the mod is installed on an Enhanced Edition or ToB Extender - "Toggle critical hits." I have never used ToBEx for anything, because I play EE versions, but I try to make my items compatible with the "classic" engine - Shadows of Amn and its reverse application, Tutu. Well, it is easy to put in a check for SoA and Tutu, for ToB as well, and install a less sophisticated version of the item, but how can I write in a condition for ToBEx? It's not one of the GAME_IS constants, and though I could simply check this box in both versions, there is no harm in that, only the games where this property does anything (ToBEx and EE) should mention it in the item description. Quote Link to comment
Salk Posted July 28, 2021 Share Posted July 28, 2021 (edited) Rather than have a condition for ToBEx you should just include it in your modification for non-EE. This is from my own Tweaks: //////////////////////// /// Include ToBEX /// /////////////////////// OUTER_SPRINT ~TOBEX_MOD_DIRECTORY~ ~stweaks~ LOAD_TRA ~stweaks/tobex_redist/tobex.tra~ INCLUDE ~stweaks/tobex_redist/tobex.tpa~ COPY ~tobex_ini/tobexcore.ini~ ~tobex_ini/tobexcore.ini~ REPLACE_TEXTUALLY ~Expanded Triggers=0~ ~Expanded Triggers=1~ REPLACE_TEXTUALLY ~Enable PickpocketFailed Trigger=0~ ~Enable PickpocketFailed Trigger=1~ COPY ~tobex_ini/tobextweak.ini~ ~tobex_ini/tobextweak.ini~ REPLACE_TEXTUALLY ~Engine:Disable Silence On Charm=0~ ~Engine:Disable Silence On Charm=1~ BUT_ONLY Edited July 28, 2021 by Salk Quote Link to comment
Gwendolyne Posted July 28, 2021 Share Posted July 28, 2021 (edited) First, you need to detect if the game is EE or if TobEx is installed. Then, you patch the item. Edited July 28, 2021 by Gwendolyne Quote Link to comment
AL|EN Posted July 28, 2021 Share Posted July 28, 2021 @temnix Just as any other component of a mod: REQUIRE_PREDICTATE MOD_IS_INSTALLED ~TobEx.tp2~ ~100~ ~ToBEx required~ This will check if ToBEx core component is installed and all other components require core component so you can check the single one. Quote Link to comment
temnix Posted July 28, 2021 Author Share Posted July 28, 2021 (edited) So it's a mod. I thought it was some kind of special program. All right, thanks. The condition FILE_EXISTS ~tobex_ini/tobexcore.ini should do it. Edited July 28, 2021 by temnix Quote Link to comment
Recommended Posts
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.