Author Topic: weidu Componenet list - include all answers from ACTION_READLN  (Read 1678 times)

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 391
  • Gender: Male
Hi,
What I'm trying to achieve:
Get list of all weidu component numbers and description, do some paring for example  bg1npc.tp2 to became bg1npc.ini via script
This output below allow me to process all standard components (0,1...) and components with subcomponents (#17 + #18)
Code: [Select]
[D:\Gry\BG\BiG World Downloads\BG1NPC-master\setup-bg1npc.exe] WeiDU version 23700
~BG1NPC\BG1NPC.TP2~ #0 #0 // The BG1 NPC Project: Required Modifications: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #1 // The BG1 NPC Project: Banters, Quests, and Interjections: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #2 // The BG1 NPC Project: Give Edwin his BG2 portrait: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #3 // The BG1 NPC Project: Give Imoen her BG2 portrait: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #4 // The BG1 NPC Project: Give Jaheira her BG2 portrait: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #5 // The BG1 NPC Project: Give Minsc his BG2 portrait: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #6 // The BG1 NPC Project: Give Viconia her BG2 portrait: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #7 // The BG1 NPC Project: Kivan's "Kivan and Deheriana Companions" portrait: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #8 // The BG1 NPC Project: Add Non-Joinable NPC portraits to quests and dialogues: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #9 // The BG1 NPC Project: Ajantis Romance Core (teen content): v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #10 // The BG1 NPC Project: Branwen's Romance Core (teen content): v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #11 // The BG1 NPC Project: Coran's Romance Core (adult content): v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #12 // The BG1 NPC Project: Dynaheir's Romance Core (teen content): v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #13 // The BG1 NPC Project: Shar-Teel Relationship Core (adult content): v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #14 // The BG1 NPC Project: Xan's Romance Core (teen content): v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #15 // The BG1 NPC Project: Female Romance Challenges, Ajantis vs Xan vs Coran: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #16 // The BG1 NPC Project: NPCs can be sent to wait in an inn: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #17 // The BG1 NPC Project: Alora's Starting Location -> Alora Starts in the Hall of Wonders: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #18 // The BG1 NPC Project: Alora's Starting Location -> Alora Starts in Gullykin: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #19 // The BG1 NPC Project: Eldoth's Starting Location -> Eldoth Starts in the Cloakwood Forest: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #20 // The BG1 NPC Project: Eldoth's Starting Location -> Eldoth Starts on the Coast Way: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #21 // The BG1 NPC Project: Quayle's Starting Location -> Quayle Starts at the Wyrm's Crossing: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #22 // The BG1 NPC Project: Quayle's Starting Location -> Quayle Starts at the Nashkel Carnival: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #23 // The BG1 NPC Project: Tiax's Starting Location -> Tiax Starts in Baldur's Gate: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #24 // The BG1 NPC Project: Tiax's Starting Location -> Tiax Starts in Beregost: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #25 // Jason Compton's Accelerated Banter Script: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #26 // BGEE Banter Timing Tweak: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #27 // The BG1 NPC Project: Make Shar-Teel Unkillable Until In Party: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #28 // The BG1 NPC Project: Bardic Reputation Adjustment: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #29 // The BG1 NPC Project: Cloakwood areas availability in Chapter One -> Open Cloakwood Lodge (first Cloakwood area only): v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #30 // The BG1 NPC Project: Cloakwood areas availability in Chapter One -> Open four Cloakwood areas (everything but the Mines): v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #31 // The BG1 NPC Project: Sarevok's Diary Adjustments -> SixofSpades Extended Sarevok's Diary: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #32 // The BG1 NPC Project: Sarevok's Diary Adjustments -> Sarevok's Diary Date Changes only: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #33 // The BG1 NPC Project: Check for TutuFix Walking Speeds: v21_20150320
~BG1NPC\BG1NPC.TP2~ #0 #200 // The BG1 NPC Project: Player-Initiated Dialogues: v21_20150320
Press ENTER to exit.

but to be able to process components with user answers like:
BG1NPC\BG1NPC.TP2~ #0 #25 // Jason Compton's Accelerated Banter Script: v21_20150320
BG1NPC\BG1NPC.TP2~ #0 #26 // BGEE Banter Timing Tweak: v21_20150320

I need from weidu a list of coded answers for such components. I suspect that this can be done by determining ACTION_IF answers ( value after '=' character ) after ACTION_READLN for each component. Example code:

Code: [Select]
/* AJANTIS ROMANCE */
BEGIN @1016 /* The BG1 NPC Project: Ajantis Romance Core (teen content) */
  ...
  /* Ajantis' romance timer */
  PRINT @1117

  PRINT @1102

  OUTER_SPRINT ~ajantimer~ ~placeholder_value~
  OUTER_WHILE (!(IS_AN_INT ~ajantimer~) OR (~ajantimer~ > 0x5) OR (~ajantimer~ < 0x1)) BEGIN
    PRINT @1108
    ACTION_READLN ~ajantimer~
  END
        ACTION_IF ("ajantimer" = 1) THEN BEGIN
        APPEND ~gtimes.ids~ ~3600 AJROM_TIMER~
        PRINT @1109
        END
        ACTION_IF ("ajantimer" = 2) THEN BEGIN
        APPEND ~gtimes.ids~ ~2700 AJROM_TIMER~
        PRINT @1110
        END
        ACTION_IF ("ajantimer" = 3) THEN BEGIN
        APPEND ~gtimes.ids~ ~1800 AJROM_TIMER~
        PRINT @1111
        END
        ACTION_IF ("ajantimer" = 4) THEN BEGIN
        APPEND ~gtimes.ids~ ~900 AJROM_TIMER~
        PRINT @1112
        END
        ACTION_IF ("ajantimer" = 5) THEN BEGIN
        APPEND ~gtimes.ids~ ~5400 AJROM_TIMER~
        PRINT @1113
        END
...

This will allow BWS maintainers to speedup process of adding new mods and update BWS *.ini files after mod updates. If something isn't clear, feel free to ask.
« Last Edit: November 13, 2015, 04:42:42 PM by AL|EN »
Project Infinity public BETA - mod manager for Infinity Engine games
Modder's Guide to Github - you cannot have progress without committing changes

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 298
  • Gender: Male
Re: weidu Componenet list - include all answers from ACTION_READLN
« Reply #1 on: November 13, 2015, 05:14:45 PM »
As a general feature, this is not possible.

Without installing the mod, I don't see how you could know how many times input will be requested, let alone what the mod will do with that input.

(Consider a component that checks if you have NPC X installed.  If you do, it asks "Do you want to modify NPC X?".  If you input "Yes", it asks additional questions.  Then it checks if you have NPC Y installed, and does the same thing.)


Plus, even if this could be done for your particular example, all you would learn is that the component accepts options "1", "2", "3", "4", and "5".  That doesn't tell you what those options mean.  To determine that, you would have to look at the code or read the readme.
« Last Edit: November 13, 2015, 05:19:39 PM by Mike1072 »

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 391
  • Gender: Male
Re: weidu Componenet list - include all answers from ACTION_READLN
« Reply #2 on: November 15, 2015, 05:05:30 AM »
I would be pleased if this would work even o 75% of the mods without special care about mods with some complex code (Scales Of Balance uses ACTION_READLN two times for single component) Having a fully prepared list of components and possible answers is still much better than creating whole file by hand. Even such code like this:

Code: [Select]
@14=The BG1 NPC Project: Xan's Romance Core (teen content)
@14?1_1=Answer 1
@14?1_2=Answer 2
@14?1_3=Answer 3
@14?1_4=Answer 4
would still be much helpful for us. wisp, could you please post you opinion about this?
« Last Edit: November 15, 2015, 05:06:37 AM by AL|EN »
Project Infinity public BETA - mod manager for Infinity Engine games
Modder's Guide to Github - you cannot have progress without committing changes

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: weidu Componenet list - include all answers from ACTION_READLN
« Reply #3 on: November 15, 2015, 06:24:22 AM »
What you are asking for is way, way outside WeiDU's capabilities. Sorry.

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 298
  • Gender: Male
Re: weidu Componenet list - include all answers from ACTION_READLN
« Reply #4 on: November 15, 2015, 07:01:52 AM »
If you want help finding those components, though, you can just search for files containing READLN.  That will find all instances of this sort of thing.

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 391
  • Gender: Male
Re: weidu Componenet list - include all answers from ACTION_READLN
« Reply #5 on: November 15, 2015, 03:03:03 PM »
@Mike1072 Ye but also gives me nothing except that "there is ACTION_READLN so you have to create ini manually" :/
@wisp Thanks for clarification.
Project Infinity public BETA - mod manager for Infinity Engine games
Modder's Guide to Github - you cannot have progress without committing changes

 

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.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

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)?: