Jump to content

Wizer13

Members
  • Posts

    28
  • Joined

  • Last visited

Posts posted by Wizer13

  1. Okay maybe I didnt explained clearly what I'm looking for, so bear with me:

    If the player arrives in the area, there are too many objects to load from the script, and it doesn't fully load all of them. The end result is that many appear out of thin air, and it's quite annoying. So, in order to allow the script to entirely load the script, I need to find what code BGEE use to display the "Loading area" screen between two areas. I don't know the code for a loading screen, simply put. 

  2. Hi everyone!

    I know how to set Interject_copy_trans for npc quite well, but when it comes with companions I created and who then joins the party, the interjections never works.

    Let's say I take for example a line from a joined character, PPElros (which line would be located in the PPElrosJ.dlg), interacting with an NPC, PPYor.

    INTERJECT_COPY_TRANS PPYor 23 Nocase
    ==PPElros IF ~Detect("PPYor")!StateCheck("PPYor",CD_STATE_NOTVALID) ~ THEN ~Humph! Of course! Because the Harmonium says so, this is the Rule of Law! Well, I have some news for you, Hard Head: It ain't over 'til I said so.~
    ==PPYor IF ~Detect("PPElros")!StateCheck("PPElros",CD_STATE_NOTVALID) ~ THEN ~Your devotion to your sister is admirable, halfling, but it will not help her in any way. The law is the same for everyone.~
    ==PPElros IF ~Detect("PPYor")!StateCheck("PPYor",CD_STATE_NOTVALID) ~ THEN ~The same, my a**! Is this how you try to justify your guilt? Or, maybe you just don't care since she's affiliated to the Free League.~
    END

    I've tried setting the ID to PPElrosJ in this example instead of PPElros, thinking the issue was the identification of the character, but no avail. Normally I would think the character in presence of the npc at the right paragraph would trigger the banter, so I'm wondering what I am doing wrong.

    Thank you for your time!

  3. Hi everyone,

    Been testing some line of codes for my mod, but it doesn't seem to work.

    Let's say the action in the script is by interacting with an NPC, I want to make a string appear over its head, like it does for some scripts (exemple: *gulps a potion*). They also have this feature in Planescape Torment, BG2EE and Siege of Dragonspear when you click on an area, a string will appear and describe what you see for a few seconds.
    It is because this code don't work in BGEE?

    Here's what i tried:

    IF
    InteractingWith(*Object*)
    THEN
    RESPONSE #100
    DisplayStringHead(*Object*,*Line referenced in my .tra)
    END

    I've also tried

    NumTimesInteractedGT(*Object*,0)

    But it says that my NPC isn't referenced in NPC.ids, so it wont work either.

    I just don't wanna have to create a bunch of .cre with .dlg just for a few lines to settle the mood in Planescape.

    Any pointers would be appreciated. Thx for your time!

  4. Okay, took, me a while, I changed all numbers, rechecked my parsing, named all items in weidu… Still the same bug.

    Is there a limited number of strings we can add to a dialog.tlk? It didn't  do that thing before when I just had 2036 strings in my .tra and my dialogs strings from my .d files. It all happened when I added the strings which weren't showing for items or in my scripts.

    I'll re-test without the  DisplayStringHead() strings off from my .tra, to see if this is the issue.

  5. This is what i learned recently and why i added the strings to the .tra @subtledoctor. Its a mod only used for BGEE. But at first i wanted to implement this campaign in BG2EE (but couldnt resolve the part where it would take the slot of SoD, as suggested by K4thos) so some items came from that game. Would that cause issues also if transferred into BGEE? If so I might have some problems then, although most items are without uses, only for storyline purpose only. 

  6. Yup @kjeron, I edited all items with NearInfinity so all references are already with the right strings. But, you think this could provoke the issue? I added the strings to the .tra because the strings were reported invalid in previous attempts. But after integrating them now it messes all the dialog.tlk. So maybe that's the issue... *sigh* Should have kept the old coding with

    COPY~~ ~~Override\~

    SAY~~ 

    Ill retype the items in their old way and test it out. Thx! 

  7. Hi everyone, another (yet again) problem with the dialog.tlk. 

    Once I try my mod, it now corrupts the dialog.tlk and messes all the entries of NPCs, items, and what not. 

    Before it didn't do that, all entries were working fine up to @ 2035.  I only add recently my other dialogues and item descriptions since they weren't showing with my previous attempts. 

    So, in my file of .tra it goes from @ 2035 to @104385. It was easier for me since those were the # attributed by NearInfinity.

    ---------------------------------------------------------------------------------------------------

    @2032 =  ~Factol Rhys of the Transcendant Order~
    @2033 =  ~Bariaur sedan chair~
    @2034 =  ~Bariaur sedan chair~
    @2035 =  ~Bariaur sedan chair~

    @104385= ~Kamus weapon contraption~

    ---------------------------------------------------------------------------------------------------------

    Could it be that the gap between those referenced lines messes up the dialog.tlk, or that the numbers given by NearInfinity provoked this issue, replacing strings I thought didn't exist? I tried uninstalling the game and reinstalling it, making sure no traces of the mod was left, and tried again, same result. 

    So, do I have to change all references and make sure they follow @2035, @2036, etc? Or is there a way around this issue. Normally, I would think that if you reference in a script @# it would only go to the line referenced, not mess up the whole thing?

    Seriously, I'm being fed up by the whole exercice. Been working two years and a half, and still can't run my mod properly to test it. 

  8. Hi everyone, 

    I tried many things, can't seem to work around this issue. Before you ask, no, I'm no programmer and still working around the logistics.

    I'm only trying to append new strings of dialog with a @reference to the dialog.tlk, so when the mod I'm trying to make loads the right line. 

    Examples from a .tra file I wanna use: 

    ----------------------------------------------------------------------------

    @104385= ~Kamus weapon contraption~

    @104386 = ~This strange apparatus helps to mechanically draw and swing your weapons with a spring, gaining some serious advantage over your opponent.
    STATISTICS:
    -1 to attack speed modifier when worn;

    Weight: 3~

    @104387 = ~ Horace's client list~

    @104388 = ~ This is a simple list of customers who bought the type of bone dagger used in captain Lufer's murder. The names listes are: Gregory Namel, Lukos Tanner, and Jilian Anders.~

    @104389 = ~ Lukos Tanner record~

    @104390 = ~(Summary: Lukos Tanner is referred a few times, nothing more, in various crimes throughout the city in the last four years. Assassin for hire, he participated in the murder of a shady merchant of opium in 126 of Hashkar; a revenge hit on the mob family of the Sharegraves in the Ragpicker's square; there is also a few accounts of larceny, extortion, and thievery.)~

    @104391 = ~Malachia Grimm record~

    @104392= ~(Summary: Malachia Grimm came from the prime world of Oerth, before raising to rank of factor of the Indeps in 125 of Hashkar. Freedom fighter and also suspected of several murders in the Hive, he has a repute of being quite the vigilante. Even his previous friends, Gontram, Fernos of the Sensates and Urim the monk cannot stand his fits anymore. Although he always maintained good relations with the Fated, they suspect he has something to do in the dead of factotum Traviss of the Fated in 127 of Hashkar.)~

    @104393 = ~Factol Hashkar record~

    -----------------------------------------------------------------------------------------------------

    So, I tried the Weidu command STRING_SET, but can't seem to make the most basic commands work in the weidu window. Just for a simple example, couldn't even --traify.tlk dialog .tlk ---out dialog.tra using this code:

     Press Enter For More Options
    C:\Program Files (x86)\GOG Galaxy\Games\Baldur's Gate - Enhanced Edition\> weidu --traify-tlk dialog.tlk --out dialog.tra

    As you can see, i put the path, etc. but the weidu window only gives a list of actions after each attempts, like below. And yes I used the latest version of weidu.

      --yes         answer all TP2 questions with 'Yes'
      --uninstall   answer all TP2 questions with 'Uninstall'
      --reinstall   reinstall all installed TP2 components
      --language X  Set the language to X
      --force-install       X installs component X number (cumulative)
      --force-uninstall     X uninstalls component X number (cumulative)
      --force-install-rest  X Y... installs component number X, Y... (cumulative)
      --force-install-list  X Y... installs component number X, Y... (cumulative)
      --force-uninstall-rest        X Y... uninstalls component number X, Y... (cumulative)
      --force-uninstall-list        X Y... uninstalls component number X, Y... (cumulative)
      --quick-menu  X installs the quick menu selection X
    
                    Press Enter For More Options

    After this failure, I tried .TP2 commands like EXTEND_BOTTOM but it doesn't work. The dialog.tlk won't accept changes from my dialog.tra.

    Tried COPY_EXISTING ~dialog.tlk~ ~override~
            APPEND_FILE ~dialog.tlk~ ~FactionWar/dialog.tra~

    Same results. 

    So, if anyone knows how to add new strings with a @ ref. I would really appreciate. Thank you

     

     

  9. Well, hello all!

    First a big thanks to @K4thos for providing insightful suggestions to my problem, and suggested I discussed it on a public topic since the interest of many people. So here is the gist:

    I'm trying to add a new campaign to BGEE. If this doesn't work out I'll try the alternative route proposed in a previous topic here

     

     

    The solution proposed is taking up the slot attributed to SoD, so here is the coding I tried to used, which seems to install, but provokes an issue. Be mindful that I am no programmer and still learning how, so if you see my errors, please point it out. 

    ----------------------------------------------------------------------------------------------------------------------------------------------

    // This section is needed to be added to Campaign.2da. Basically you can replace the worldmap if you need to, as I did since my campaign is set in Planescape. 

    APPEND ~CAMPAIGN.2DA~ ~            WORLDSCRIPT            DESCRIPTION ICON       INTERDIA   LOADHINT   MASTAREA   MUSIC      NAME       NPCLEVEL   TBPPARTY   PDIALOG    SAVE_DIR   STARTARE   STRTGOLD   STARTPOS   STWEAPON   25STWEAP   XPCAP      XPLIST     WORLDMAP   WORLDSCRIPT MAP_DROPSHADOW MAP_FONTCOLOR      KEEP_POWERS   INTRO_MOVIE    IMPORT     INTERACT        YEARS      REPUTATION        CLASTEXT   RACETEXT 
                                        PP          BDBALDUR    104978         1         BDBANTER     *          SODMAREA     74      44685        NPCLVLDS   *          BDDIALOG      sodsave    SODSTRTA   STRTGOLD   sodstpos     SODWEAP    BDSTWEAP    161000     *          SIGILMAP       BDBALDUR          1          0xFFFFFFFF             1        SODCIN01       PARTY       SODINTER         SODYEARS    SODREPUTATI         SODCLTXT    SODRACE~

    // K4thos provided this patch to do REPLACE_TEXTUALLY action used in EET.

    COPY_EXISTING ~UI.MENU~ ~override~
        DEFINE_PATCH_FUNCTION 
        REPLACE_MULTILINE
        INT_VAR
            num = "-1"     //amount of times the pattern should be replaced with string (-1 by default which is at least 1 but without max limit)
            strict = 0     //set to 1 to enable strict checking (auto escapes $^.*+?[]\ special characters)
            verbose = 1    //set to 0 to skip printing patching message
            warn = 1       //set to 0 to skip printing warning message if the function can't do what you ask it to do
            only_count = 0 //set to to 1 to skip pattern replacing and just return num_matches (COUNT_REGEXP_INSTANCES alternative)
        STR_VAR
            pattern = ""   //pattern that you want to replace
            string = ""    //string that the pattern will be replaced with
        RET
            num_matches    //amount of times the pattern has been found
        BEGIN
        TEXT_SPRINT percent ~%~ // Below is the line of code in UI.Menu that starts the SoD campaign
        INNER_PATCH_SAVE textToReplace ~function onCampaignButton(buttonNum)
            local campaign = startEngine:GetCampaign()
            local clickedCampaign = startButtons[campaign][buttonNum]
            if(clickedCampaign == const.START_CAMPAIGN_SOD) then
                startEngine:OnCampaignButtonClick('SOD',true)
            elseif(clickedCampaign == const.START_CAMPAIGN_BP) then
                startEngine:OnTBPButtonClick(true)
            elseif(clickedCampaign == const.START_CAMPAIGN_BG) then
                startEngine:OnSoAButtonClick(true)
            end
        end~ BEGIN
                SET num_matches = num_matches + 1 // Replacing the code by starting the new campaign instead of Sod. Mine for example is PP for Project Planescape.
                INNER_PATCH_SAVE string ~function onCampaignButton(buttonNum)
            if buttonNum == 3 then
                startEngine:OnCampaignButtonClick('START_CAMPAIGN_PP',true)
            else
                local campaign = startEngine:GetCampaign()
                local clickedCampaign = startButtons[campaign][buttonNum]
                if(clickedCampaign == const.START_CAMPAIGN_SOD) then
                    startEngine:OnCampaignButtonClick('SOD',true)
                elseif(clickedCampaign == const.START_CAMPAIGN_BP) then
                    startEngine:OnTBPButtonClick(true)
                elseif(clickedCampaign == const.START_CAMPAIGN_BG) then
                    startEngine:OnSoAButtonClick(true)
                end
            end
        end~ BEGIN
            PATCH_IF strict = 1 BEGIN
                REPLACE_TEXTUALLY ~\\~ ~\\\\~
                REPLACE_TEXTUALLY ~\[~ ~\[~
                REPLACE_TEXTUALLY ~\]~ ~\]~
                REPLACE_EVALUATE ~\([\$\^\.\*\+\?]\)~ BEGIN END ~\%MATCH1%~
            END
            REPLACE_TEXTUALLY ~[%WNL%%LNL%%MNL%%TAB% ]+~ ~[%WNL%%LNL%%MNL%%TAB% ]+~
        END
        SET num_matches = 0
        PATCH_IF only_count = 0 BEGIN
            REPLACE_EVALUATE CASE_INSENSITIVE ~function onCampaignButton(buttonNum)
            local campaign = startEngine:GetCampaign()
            local clickedCampaign = startButtons[campaign][buttonNum]
            if(clickedCampaign == const.START_CAMPAIGN_SOD) then
                startEngine:OnCampaignButtonClick('SOD',true)
            elseif(clickedCampaign == const.START_CAMPAIGN_BP) then
                startEngine:OnTBPButtonClick(true)
            elseif(clickedCampaign == const.START_CAMPAIGN_BG) then
                startEngine:OnSoAButtonClick(true)
            end
        end~ BEGIN
                SET num_matches = num_matches + 1
                INNER_PATCH_SAVE string ~function onCampaignButton(buttonNum)
            if buttonNum == 3 then
                startEngine:OnCampaignButtonClick('START_CAMPAIGN_PP',true)
            else
                local campaign = startEngine:GetCampaign()
                local clickedCampaign = startButtons[campaign][buttonNum]
                if(clickedCampaign == const.START_CAMPAIGN_SOD) then
                    startEngine:OnCampaignButtonClick('SOD',true)
                elseif(clickedCampaign == const.START_CAMPAIGN_BP) then
                    startEngine:OnTBPButtonClick(true)
                elseif(clickedCampaign == const.START_CAMPAIGN_BG) then
                    startEngine:OnSoAButtonClick(true)
                end
            end
        end~ BEGIN
                    REPLACE_TEXTUALLY ~%percent%MATCH\([0-9]+\)%percent%~ ~%MATCH\1%~
                END
            END ~function onCampaignButton(buttonNum)
            if buttonNum == 3 then
                startEngine:OnCampaignButtonClick('START_CAMPAIGN_PP',true)
            else
                local campaign = startEngine:GetCampaign()
                local clickedCampaign = startButtons[campaign][buttonNum]
                if(clickedCampaign == const.START_CAMPAIGN_SOD) then
                    startEngine:OnCampaignButtonClick('SOD',true)
                elseif(clickedCampaign == const.START_CAMPAIGN_BP) then
                    startEngine:OnTBPButtonClick(true)
                elseif(clickedCampaign == const.START_CAMPAIGN_BG) then
                    startEngine:OnSoAButtonClick(true)
                end
            end
        end~
            SET warned = 0
            PATCH_IF num_matches != num BEGIN
                PATCH_IF num_matches = 0 BEGIN
                    PATCH_IF warn = 1 BEGIN
                        PATCH_WARN ~WARNING %SOURCE_FILESPEC% - pattern not found:%LNL%%pattern%~
                    END
                    SET warned = 1
                END ELSE PATCH_IF num >= 0 AND (num_matches > num OR num_matches < num) BEGIN
                    PATCH_IF warn = 1 BEGIN
                        PATCH_WARN ~WARNING %SOURCE_FILESPEC% - pattern replaced %num_matches% time(s) instead of %num%:%LNL%%pattern%~
                    END
                    SET warned = 1
                END
            END
            PATCH_IF verbose = 1 AND warned = 0 BEGIN
                PATCH_PRINT ~Patching %SOURCE_FILESPEC% - pattern replaced %num_matches% time(s):%LNL%%pattern% => function onCampaignButton(buttonNum)
            if buttonNum == 3 then
                startEngine:OnCampaignButtonClick('START_CAMPAIGN_PP',true)
            else
                local campaign = startEngine:GetCampaign()
                local clickedCampaign = startButtons[campaign][buttonNum]
                if(clickedCampaign == const.START_CAMPAIGN_SOD) then
                    startEngine:OnCampaignButtonClick('SOD',true)
                elseif(clickedCampaign == const.START_CAMPAIGN_BP) then
                    startEngine:OnTBPButtonClick(true)
                elseif(clickedCampaign == const.START_CAMPAIGN_BG) then
                    startEngine:OnSoAButtonClick(true)
                end
            end
        end~
            END
        END ELSE BEGIN
            COUNT_REGEXP_INSTANCES ~function onCampaignButton(buttonNum)
            local campaign = startEngine:GetCampaign()
            local clickedCampaign = startButtons[campaign][buttonNum]
            if(clickedCampaign == const.START_CAMPAIGN_SOD) then
                startEngine:OnCampaignButtonClick('SOD',true)
            elseif(clickedCampaign == const.START_CAMPAIGN_BP) then
                startEngine:OnTBPButtonClick(true)
            elseif(clickedCampaign == const.START_CAMPAIGN_BG) then
                startEngine:OnSoAButtonClick(true)
            end
        end~ num_matches
        END

        SET num_matches = 0
        PATCH_IF only_count = 0 BEGIN // This part is to replace the button appearance on the starting screen. He told me I have to change the area and bam in order to alter the presentation, but I still haven't figured out the new emplacement for now, since I didn't get it to work yet. 
            REPLACE_EVALUATE CASE_INSENSITIVE ~text
        {
            bam "CMPGSML"
            sequence lua 'getCampaignIcon(2)'
            frame lua "getCampaignHighlight(2)"
            area 865 490 116 116
            align center center
            tooltip lua "getCampaignTooltip(2)"
            enabled "not e:IsTouchUI()"
            action 
            "
                onCampaignButton(2)
            "
            actionEnter
            "
                highlightedCampaign = 2
            "
            actionExit
            "
                highlightedCampaign = nil
            "
        }~ BEGIN
                SET num_matches = num_matches + 1
                INNER_PATCH_SAVE string ~text
        {
            bam "FWLOGO" //The bam I'm using 
            sequence lua 'getCampaignIcon(2)'
            frame lua "getCampaignHighlight(2)"
            area 865 490 116 116 // should alter these coordinates
            align center center
            tooltip lua "getCampaignTooltip(2)"
            enabled "not e:IsTouchUI()"
            action 
            "
                onCampaignButton(3)
            "
            actionEnter
            "
                highlightedCampaign = 2
            "
            actionExit
            "
                highlightedCampaign = nil
            "
        }~ BEGIN
                    REPLACE_TEXTUALLY ~%percent%MATCH\([0-9]+\)%percent%~ ~%MATCH\1%~
                END
            END ~text
        {
            bam "FWLOGO" //The bam I'm using 
            sequence lua 'getCampaignIcon(2)'
            frame lua "getCampaignHighlight(2)"
            area 865 490 116 116 // should alter these coordinates
            align center center
            tooltip lua "getCampaignTooltip(2)"
            enabled "not e:IsTouchUI()"
            action 
            "
                onCampaignButton(3)
            "
            actionEnter
            "
                highlightedCampaign = 2
            "
            actionExit
            "
                highlightedCampaign = nil
            "
        }~
            SET warned = 0
            PATCH_IF num_matches != num BEGIN
                PATCH_IF num_matches = 0 BEGIN
                    PATCH_IF warn = 1 BEGIN
                        PATCH_WARN ~WARNING %SOURCE_FILESPEC% - pattern not found:%LNL%%pattern%~
                    END
                    SET warned = 1
                END ELSE PATCH_IF num >= 0 AND (num_matches > num OR num_matches < num) BEGIN
                    PATCH_IF warn = 1 BEGIN
                        PATCH_WARN ~WARNING %SOURCE_FILESPEC% - pattern replaced %num_matches% time(s) instead of %num%:%LNL%%pattern%~
                    END
                    SET warned = 1
                END
            END
            PATCH_IF verbose = 1 AND warned = 0 BEGIN
                PATCH_PRINT ~Patching %SOURCE_FILESPEC% - pattern replaced %num_matches% time(s):%LNL%%pattern% => text
        {
            bam "FWLOGO"
            sequence lua 'getCampaignIcon(2)'
            frame lua "getCampaignHighlight(2)"
            area 865 490 116 116
            align center center
            tooltip lua "getCampaignTooltip(2)"
            enabled "not e:IsTouchUI()"
            action 
            "
                onCampaignButton(3)
            "
            actionEnter
            "
                highlightedCampaign = 2
            "
            actionExit
            "
                highlightedCampaign = nil
            "
        }~
            END
        END ELSE BEGIN
            COUNT_REGEXP_INSTANCES ~text
        {
            bam "CMPGSML"
            sequence lua 'getCampaignIcon(2)'
            frame lua "getCampaignHighlight(2)"
            area 865 490 116 116
            align center center
            tooltip lua "getCampaignTooltip(2)"
            enabled "not e:IsTouchUI()"
            action 
            "
                onCampaignButton(2)
            "
            actionEnter
            "
                highlightedCampaign = 2
            "
            actionExit
            "
                highlightedCampaign = nil
            "
        }~ num_matches
        END
    END
    END

    -------------------------------------------------------------------------------------------------------------------

    So, first I cleaned up the BGEE fold of override content, unistall and reinstalling the game to make sure there were no mod left to alter the original content and the game starts fine. I get the presentation screen, with the icon proposing SoD, like it normally would. 

    Once I install my campaign mod, the game launches but without the DLC SoD content, making it impossible to access the DLC, which I need to start my mod. I only get the basic screen of BGEE. 

    I have tried only the part of the coding changing the starting button on click, leaving the part that changes the icon, but it does the same problem. 

    This is the part I'm trying to resolve. I'm pretty much left dumbfunded at this point. Any insight would be greatly appreciated. 

  10. Hi everyone,

    Is there a tool that compiles a set of files of a document into a DLC friendly-user?

    I need to convert my campaign into a .mod to use ModMerge, in order to be able to apply it to BGEE

     

    If such a tool exists I would be really grateful. Thanks for your time!

×
×
  • Create New...