AL|EN Posted October 1, 2018 Share Posted October 1, 2018 (edited) Hi, I'm ready to have discussion about biggest issue when it comes to deal with mod installation without pausing for user input: READLN. I can offer modders existing solution which can overcome such problem and new solution which will fits modders needs. But no matter how good a solution might be, it requires effort over modders side or accepting contributions for their mods (but only once!) Lucky, some modders already declared the will to remove ACTION_READLN like AstroBryGuy for bg1npc (many thanks!). My wish would be that other modders will follow but they must know about the ACTION_READLN issue. Example: Worldmap, currently as TOP1 at SHS downloads, summary of bad READLN things: impossible to present ACTION_READLN choices (input and description) for GUI installation will be paused and wait for manual user input impossible to save such mod configuration so every installation, user need to repeat providing manual input, can't use weidu commandline player choices are also not included inside weidu installation log so debbug information is lost impossible to use weidu LABEL and other functions Example of player complains: "I cannot select Worldmap mod choices and the installation is paused!" What is the problem? The player can't choose those two choices which mod provides. I'm bringing this topic again because after the release of my install tool, you can be pretty sure that complaints like this will occur. And when they do: Q1. What's modder answer regarding feedback, to the the one who send such complains? Q2. What should be MY answer if any player will come to me and report such complaints as a BUG of the install tool? How to solve above problems? There are 3 solutions currently available. Please keep in mind that none of the proposed solution are "BWS-Exclusive" etc: 1. Instead of using READLN, use SUBCOMPONENT or FORCED_SUBCOMPONENT functionality in WeiDU This is the best solution for such problem but it doesn't cover every cases. It require rewrite mod component logic. Using SUBCOMPONENTS is always the best and preferred way to handle removal of ACTION_READLN because unlike to INI file with settings, it can interact with other mods/components and be a foundation for internal/external dependence and conflicts. 2. READLN sometimes is used to read for eg: "Familiar Name" so SUBCOMPONENT can't be used For such cases, using config-default.ini + config.ini approach should solve the problem. Good adoption of Solution 2 can provide both ways of providing value: from user input or from actual configuration made by player itself. You can even display additional info during console installation: "The config.ini file not detected, read config-default.ini to change default configuration" - player will be aware how to use ini files even if he won't use any install tool at all. Any more thoughts? Spoiler Not implemented, use SUBCOMPONENT/FORCED_SUBCOMPONENT feature, keep for historical purpose 3. Custom ini file, this one need feedback from modders who don't want to change weidu tp2 code Forget about BWS and it's cryptic @0?0_1. I think I make the new format much more clear and understandable. For Worldmap mod, it looks like this: File name schema: bp-bgt-worldmap-action_readln=0.ini the '=' character acts as a separator for modname and component number for the ACTION_READLN extra Input-Description data File Location: inside mod itself, side by side with mod tp2 Only one language entry is required, all missing ones will be shown as the default one, so if mod have English and German and you put only English section, English will be displayed at treeview the advantage is: it doesn't require weidu code modification disadvantage: require custom ini file for each component which has ACTION_READLN, modder needs to understand it, needs to be updated when ACTION_READLN actions/description changes I'm open to discussing anything related to the format/definition/usage of such ini file. Selected Modders who have used ACTION_READLN: @Tash @wisp @Pecca @argent77 @jastey @berelinde @Ulb @LavaDelVortel Any chance to remove READLN from you mods, using proposed solutions? @wisp, can you mark READLN as "DEPRECATED" and display warring? Edited May 28, 2021 by AL|EN fixed image link Quote Link to comment
lynx Posted October 1, 2018 Share Posted October 1, 2018 Well, having to use inis is a pain for users, though of course it hampers automation. Expect was invented for a reason though. I only used it once, for a 1-10 choice in the 10 pc party mod, but while absurd, could easily be converted to subcomponents. There is a more serious problem — input verification. If you just read it from an ini, what do you do about typos? READLN can handle it nicely: ACTION_READLN ~newmax~ OUTER_WHILE NOT(IS_AN_INT %newmax% && %newmax% > 0 && %newmax% <= 10) BEGIN PRINT ~Enter a whole number between 1 and 10 silly. What should the new maximum party size be? [1-10]~ ACTION_READLN ~newmax~ END Quote Link to comment
AL|EN Posted October 1, 2018 Author Share Posted October 1, 2018 (edited) @lynx Well, having to use inis is a pain for users, though of course it hampers automation Not if mod install tool have a nice "Mod Config" button which will open such ini for the player and can save edits. Solution 1: user dosen't see choices at the treeview, must edit ini files - load "10p\config-default.ini, set newmax to the value from ini - load "10p\config.ini (the user one, not included in mod itself), set newmax to the value from ini - preform check, if it fail then execute ACTION_READLN Solution 2: custom ini to display additional choices inside mod treeview: 10p\10p-READLN=0.ini [English:Q1] 1 = Set maximum party size to: 1 2 = Set maximum party size to: 2 3 = Set maximum party size to: 3 4 = Set maximum party size to: 4 5 = Set maximum party size to: 5 6 = Set maximum party size to: 6 7 = Set maximum party size to: 7 8 = Set maximum party size to: 8 9 = Set maximum party size to: 9 10 = Set maximum party size to: 10 The advantage of the second solution is: user is able to choose only one from pre-defined choices, defined by you so there cannot be any mistakes. Edited October 1, 2018 by ALIENQuake Quote Link to comment
jastey Posted October 1, 2018 Share Posted October 1, 2018 What would I use for bg1re to replace the functionality. In bg1re, the first ("0.") component determins which of the other components get shown / installed by setting marker files, and also installs ingame scripts to toggle the amount of so called description texts. The player makes the choices by selecting via ACTION_READLN two times accordingly. I need the marker files installed by this first component for the rest of the components. Having the option to [n]ot install this required component should lead to quitting the installation as all other components would be skipped. Quote Link to comment
subtledoctor Posted October 1, 2018 Share Posted October 1, 2018 (edited) Well, having to use inis is a pain for users, though of course it hampers automationNot if mod install tool have a nice "Mod Config" button which will open such ini for the player and can save edits. Not everyone can use your install tool ... and different people might use different install tools. Mods are designed for the game, not for the install tool. What would I use for bg1re to replace the functionality. In bg1re, the first ("0.") component determins which of the other components get shown / installed by setting marker files, and also installs ingame scripts to toggle the amount of so called description texts. The player makes the choices by selecting via ACTION_READLN two times accordingly. I need the marker files installed by this first component for the rest of the components. Having the option to [n]ot install this required component should lead to quitting the installation as all other components would be skipped. Could probably be done just with SUBCOMPONENT, no? I did something like that once upon a time, to simulate-but-avoid using GROUP. Make the first component consist of several permutations of install options, install marker files for the choices, then proceed with the rest of the mod according to the marker files. Edited October 1, 2018 by subtledoctor Quote Link to comment
argent77 Posted October 1, 2018 Share Posted October 1, 2018 Removing READLN completely and using .ini files or a similar approach might be acceptable for a mod manager. But at the same time it will pose an unacceptable obstacle for players who want to install mods manually (which I usually do). Moreover, WeiDU can be used for all kinds of applications. I'm using it a lot internally, e.g. as debugging tool or to get something done quickly. READLN is a good (and currently only) method to add some kind of interaction to the installation procedure.Apart from that, I'm using READLN sparingly in my mods, and only in situations where it doesn't make sense to provide any kind of presets or default values. None of these components are crucial parts of the mod, and may be omitted in a mod manager. Quote Link to comment
AL|EN Posted October 1, 2018 Author Share Posted October 1, 2018 (edited) Well, having to use inis is a pain for users, though of course it hampers automationNot if mod install tool have a nice "Mod Config" button which will open such ini for the player and can save edits. Not everyone can use your install tool ... and different people might use different install tools. Mods are designed for the game, not for the install tool. Replace 'can' with 'willing to' All of my proposed solution (even 3 with custom ini/json) are not dependent from the install tool type and can be implemented via any install tool. Solution 1 and 2 already exist. For solution 2, you can even display additional info during console installation: "The config.ini file not detected, read config-default.ini to change default configuration" - player will be aware how to use ini files even if he won't use any install tool at all. It's all about removing ACTION_READLN by any means necessary, not to exclusively support preferred install tool. Edited October 1, 2018 by ALIENQuake Quote Link to comment
AL|EN Posted October 1, 2018 Author Share Posted October 1, 2018 Removing READLN completely and using .ini files or a similar approach might be acceptable for a mod manager. But at the same time it will pose an unacceptable obstacle for players who want to install mods manually (which I usually do).... READLN is a good (and currently only) method to add some kind of interaction to the installation procedure. Apart from that, I'm using READLN sparingly in my mods, and only in situations where it doesn't make sense to provide any kind of presets or default values. None of these components are crucial parts of the mod, and may be omitted in a mod manager. If mod components with READLN can be omitted by player, it's not too much of the problem. But if READLN are part of the main component, it makes player life miserable. Good adoption of Solution 2 can provide both ways of providing value: from user input or from actual configuration made by player itself. Apart from LightingPack which use ACTION_READLN to read custom gamma value, is there any other mod which use ACTION_READLN? Quote Link to comment
Jarno Mikkola Posted October 1, 2018 Share Posted October 1, 2018 Apart from LightingPack which use ACTION_READLN to read custom gamma value, is there any other mod which use ACTION_READLN? I don't know if this was aimed at everyone, but like you know(if you can remember) my mod does ... for now. I will .. make it optionally non placent, aka the player can use either that or a input file instead of the readln actions, to do the very same action. Quote Link to comment
subtledoctor Posted October 1, 2018 Share Posted October 1, 2018 Jarno your READLN just sets a bunch of variables, no? Surely that could be replicated with 10-12 options via SUBCOMPONENT... Quote Link to comment
lynx Posted October 1, 2018 Share Posted October 1, 2018 Well, having to use inis is a pain for users, though of course it hampers automationNot if mod install tool have a nice "Mod Config" button which will open such ini for the player and can save edits. Not everyone can use your install tool ... and different people might use different install tools. Mods are designed for the game, not for the install tool. Replace 'can' with 'willing to' All of my proposed solution (even 3 with custom ini/json) are not dependent from the install tool type and can be implemented via any install tool. Solution 1 and 2 already exist. For solution 2, you can even display additional info during console installation: "The config.ini file not detected, read config-default.ini to change default configuration" - player will be aware how to use ini files even if he won't use any install tool at all. It's all about removing ACTION_READLN by any means necessary, not to exclusively support preferred install tool. That's a useless argument if such tools don't exist. Make my life worse and claim someone can make it better? That's still a regression. What subtledoctor was probably aiming at is that this (nonexisting?) tool likely doesn't work on non-windows systems (mobile hw, linux, macs, bsds ...). I mentioned verification for the free-form entry use case, of course it's not much of a problem when you only have a discreet list of options. The install will have to be aborted and the tool probably can't know that beforehand, as the code needs to be executed first (Halting problem). Quote Link to comment
Jarno Mikkola Posted October 1, 2018 Share Posted October 1, 2018 (edited) Jarno your READLN just sets a bunch of variables, no? Surely that could be replicated with 10-12 options via SUBCOMPONENT...Well, yeah, but see... see I don't want to ALWAYS anything, nor limit the player to 5 to 20 possibilities. As I can also do it like this: ACTION_IF (%function% = 4) THEN BEGIN RANDOM_SEED ~d~ PRINT @12 OUTER_SET timer1 = RANDOM(1 100) OUTER_SET timer2 = RANDOM(2 300) OUTER_SET timer3 = RANDOM(40 482) OUTER_SET timer4 = RANDOM(115 198) OUTER_SET timer5 = RANDOM(350 400) OUTER_SET timer6 = RANDOM(235 727) OUTER_SET timer7 = RANDOM(140 1000) END If the player wanted to "randomize" the variables.If they don't, they choose a different answers/component, related to the function variable. And nope, that's not the end, one also needs to choose if they want to refresh the spells up on successful casting the spells or even when it fails. And in one of the options, they can set the variables manually... or in the next version automatically from a predefined .ini -file NAND it's default player replacement file. Aka, the mod has grown from one variable to multiple for different ones for different purposes. So you can't just commit a set of variables ... without knowing what those variables are ... as the mod differes between given answers. Just like the Level1NPCs. Where you can make Imoen to be a mage the same way you can make Minsc a mage(with the same inputs inside a different component), but you can't assume to be able to make her a thief with an alteration of a single insert. Edited October 2, 2018 by Jarno Mikkola Quote Link to comment
subtledoctor Posted October 1, 2018 Share Posted October 1, 2018 Replace 'can' with 'willing to' I don't follow. Quote Link to comment
Jarno Mikkola Posted October 1, 2018 Share Posted October 1, 2018 This: Not everyone is willing to use your install tool But you do have an argument with being on a different OS, so like lynx said... Quote Link to comment
argent77 Posted October 1, 2018 Share Posted October 1, 2018 Removing READLN completely and using .ini files or a similar approach might be acceptable for a mod manager. But at the same time it will pose an unacceptable obstacle for players who want to install mods manually (which I usually do).... READLN is a good (and currently only) method to add some kind of interaction to the installation procedure. Apart from that, I'm using READLN sparingly in my mods, and only in situations where it doesn't make sense to provide any kind of presets or default values. None of these components are crucial parts of the mod, and may be omitted in a mod manager. If mod components with READLN can be omitted by player, it's not too much of the problem. But if READLN are part of the main component, it makes player life miserable. Good adoption of Solution 2 can provide both ways of providing value: from user input or from actual configuration made by player itself. Apart from LightingPack which use ACTION_READLN to read custom gamma value, is there any other mod which use ACTION_READLN? Not many. And as I mentioned before, all of the relevant components can be safely omitted in a mod manager: 1. Banter Accelerator: Provides a component where you can enter custom banter frequency and probability values as simple integers. 2. Lighting Pack: Provides a component where you can enter custom values for brightness, contrast and gamma as real numbers within specific ranges. 3. DLC Builder: Requires user input for the DLC filename. This mod is not intended for regular gameplay. 4. DLC Merger: Provides a component, where you can specify the DLC archive you want to merge. This component is mainly intended to merge custom DLCs created by DLC Builder. 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.