Jump to content

Photo

Mod ACTION_READLN removal - brainstorming


75 replies to this topic

#1 ALIENQuake

ALIENQuake
  • Modders
  • 631 posts
  • Gender:Male
  • Location:Poland

Posted 01 October 2018 - 07:52 AM

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.
 
First, let me demonstrate an example:
 
Mod: 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!"
V1bomf-8QZej6Xr5RsySXg.png
 
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 functionality in WeiDU
This is the best solution for such problem but it doesn't cover every cases. It require rewrite mod component logic.
 
2. READLN sometimes is used to read for eg: "Familiar Name" so SUBCOMPONENT can't be used
For such components, 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?
 
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 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 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 show as the default one, so if mod have Englsh and German and you put only English section, English will be displayed at treeview
[ACTION_READLN]
# declaration of the first question possible input values and descriptions, section declaration without language is used as default for no language, English of for missing other entry's
[Q1]
# the number is the user input which will be send to console window, the description will be displayed as subnodes of the treeview
1 = Original Travel Times and Area Visibility
2 = Revised Travel Times and Area Visibility

[Q2]
1 = Large Worldmap 4900x3500
2 = Huge Worldmap 8000x4600

[German:Q1]
1 = Originale Reisezeiten und Aufdeckung der Gebiete
2 = Überarbeitete Reisezeiten und Aufdeckung der Gebiete

[German:Q2]
1 = Große Weltkarte 4900x3500
2 = Riesige Weltkarte 8000x4600

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 discuss 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 by ALIENQuake, 04 October 2018 - 04:31 AM.


#2 lynx

lynx
  • Modders
  • 3157 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 01 October 2018 - 08:16 AM

Well, having to use inis is a pain for users, though of course it hampers automation. Expect was invented for a reason though. :devlook:

 

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

GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Play android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...


#3 ALIENQuake

ALIENQuake
  • Modders
  • 631 posts
  • Gender:Male
  • Location:Poland

Posted 01 October 2018 - 08:38 AM

@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 by ALIENQuake, 01 October 2018 - 08:46 AM.


#4 jastey

jastey
  • Gibberlings
  • 7549 posts
  • Gender:Female

Posted 01 October 2018 - 10:43 AM

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.



#5 subtledoctor

subtledoctor
  • Modders
  • 2856 posts
  • Gender:Male

Posted 01 October 2018 - 10:50 AM

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.


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 by subtledoctor, 01 October 2018 - 10:53 AM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#6 argent77

argent77
  • Modders
  • 826 posts
  • Gender:Male

Posted 01 October 2018 - 11:32 AM

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.
 



#7 ALIENQuake

ALIENQuake
  • Modders
  • 631 posts
  • Gender:Male
  • Location:Poland

Posted 01 October 2018 - 11:34 AM

 

 

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.

 


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 by ALIENQuake, 01 October 2018 - 11:44 AM.


#8 ALIENQuake

ALIENQuake
  • Modders
  • 631 posts
  • Gender:Male
  • Location:Poland

Posted 01 October 2018 - 11:43 AM

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?



#9 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6831 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 01 October 2018 - 12:26 PM

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.


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#10 subtledoctor

subtledoctor
  • Modders
  • 2856 posts
  • Gender:Male

Posted 01 October 2018 - 01:23 PM

Jarno your READLN just sets a bunch of variables, no? Surely that could be replicated with 10-12 options via SUBCOMPONENT...

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#11 lynx

lynx
  • Modders
  • 3157 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 01 October 2018 - 02:13 PM

 

 

 

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.

 


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).


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Play android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...


#12 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6831 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 01 October 2018 - 02:15 PM

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 by Jarno Mikkola, 01 October 2018 - 11:27 PM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#13 subtledoctor

subtledoctor
  • Modders
  • 2856 posts
  • Gender:Male

Posted 01 October 2018 - 02:18 PM

Replace 'can' with 'willing to' 


I don't follow.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#14 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6831 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 01 October 2018 - 02:52 PM

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...
Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#15 argent77

argent77
  • Modders
  • 826 posts
  • Gender:Male

Posted 01 October 2018 - 02:57 PM

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.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users