Skip to content

Player how-to: Getting mods to work on BGEE

1234579

Comments

  • ErgErg Member Posts: 1,756
    @Davide,

    EscapeAreaMove() works fine on BG:EE. You can check the full list of actions valid for the different versions of the infinity engine on the IESDP website. In particular, this is the full list of actions for the enhanced editions. As you can see EscapeAreaMove() is there too.

    Parsing errors are usually due to trivial mistakes like missing or misplaced commas, quotation marks, etc. or errors like having an IF without an END, or missing a BEGIN somewhere, this kind of mistakes.

    The parsing error gives you a line number. Check around that line, usually the problem is on the line just above or nearby.
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698
    Thanks, I counted on the fact that you might answer... :wink:

    As a matter of fact, there were no trivial errors: in the meantime, I tried to add an "IF ~~ THEN" before the action, and it worked (but with another function, maybe EscapeArea). So, apparently, it needs the condition: something that was not evident at all to me, by looking at the examples I mentioned (but they are from BG2, maybe something changed?).

    I also found the list on that IESDP site, but I was rather looking for an equivalent of MoveToArea, applied to all the party members (plus the NPC). This is where I am not sure how to do that. I think I tried MoveToArea, but with no success. Now I can try again with EscapeAreaMove, by giving as argument the new area and the location. Unfortunately, I am at work now, so I cannot check again on my laptop.
    Would this command work also on the party members? Or, should I use some form of ActionOverride instead?
  • ErgErg Member Posts: 1,756
    Davide said:

    As a matter of fact, there were no trivial errors: in the meantime, I tried to add an "IF ~~ THEN" before the action, and it worked (but with another function, maybe EscapeArea). So, apparently, it needs the condition: something that was not evident at all to me, by looking at the examples I mentioned (but they are from BG2, maybe something changed?)

    Yes, it needs a condition and that's the same in both BG:EE and BG2.
    Davide said:

    I also found the list on that IESDP site, but I was rather looking for an equivalent of MoveToArea, applied to all the party members (plus the NPC). This is where I am not sure how to do that. I think I tried MoveToArea, but with no success. Now I can try again with EscapeAreaMove, by giving as argument the new area and the location. Unfortunately, I am at work now, so I cannot check again on my laptop.
    Would this command work also on the party members? Or, should I use some form of ActionOverride instead?

    Maybe LeaveAreaLUA() is what you are looking for and, as you suspected, you need ActionOverride() for the party members (otherwise the action is applied only to the current speaker).
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698
    Great, thank you, I'll try it tonight or tomorrow and let you know.
  • ErgErg Member Posts: 1,756
    @Davide,

    I performed some tests and it looks like LeaveAreaLUA() works only for the party members. However a combination of LeaveAreaLUA() for the party members and MoveBetweenAreas() for the NPC did the trick.

    I'm assuming that you just want them to teleport (as opposed to walk) to the new location. Let me know if this is not the case.
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698
    @Erg Eventually I had time to try it, and it worked as I intended, thanks. :smile:
  • evildevil97evildevil97 Member Posts: 93
    I'm really confused. Using Windows 10, I use the command prompt in step #3 to get to the folder with dialog.tlk, and it keeps telling me that access is denied. Not sure how to fix that. Any assistance would be greatly appreciated.
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698
    Hello, I have another problem to solve. I need to make some NPCs interject during a dialogue (the PC doesn't say anything in the meantime), with a reply from the person we are speaking with. After that, the PC should have his/her options to answer the question.

    The structure is like this:

    IF ~~ THEN FirstDialoguewithAedan1-9
    SAY ~Blablabla~
    = ~Blablabla~
    = ~Se vuoi, posso portarti da loro. Sarà divertente, credimi!~
    IF ~~ THEN REPLY ~D’accordo, ti seguo. Procedi.~ GOTO FirstDialoguewithAedan1-10
    IF ~~ THEN REPLY ~Magari un’altra volta.~ GOTO FirstDialoguewithAedan1-11
    END

    I tried with this piece of code, but it doesn't work.

    INTERJECT_COPY_TRANS AEDAN FirstDialoguewithAedan1-9 AedanJaheira
    == JAHEIRAJ IF ~IsValidForPartyDialogue("Jaheira")~ THEN
    ~Blablabla~
    == AEDAN IF ~IsValidForPartyDialogue("Jaheira")~ THEN
    ~Blablabla~
    END

    I even tried with CHAIN, but it doesn't work either.

    CHAIN
    IF ~IsValidForPartyDialogue("Jaheira")~ THEN AEDAN AedanJaheira
    // DO ~SetGlobal("AedanJaheira","GLOBAL",1)~
    == JAHEIRAJ IF ~IsValidForPartyDialogue("Jaheira")~ THEN
    ~Blablabla~
    == AEDAN IF ~IsValidForPartyDialogue("Jaheira")~ THEN
    ~Blablabla~
    EXIT

    Do you have any idea how to do that? Please keep in mind that, after Jaheira, many other NPCs would have their line.
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698
    Sorry, I would need a help, I am tagging some persons: @Erg @AstroBryGuy @Avenger_teambg @AlexT @Troodon80
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    Jaheira's "Joined Dialog" file is JAHEIJ, not JAHEIRAJ.
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698

    Jaheira's "Joined Dialog" file is JAHEIJ, not JAHEIRAJ.

    Thank you, I'll try that this evening and let you know. :smile:
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698
    Ok, I tried, but I get the same error. Maybe giving more information would help, so I am attaching a screeshot of the error and of the piece of code.
    Looking at it, it seems as if a scope (the one before the error, i.e. the INTERJECT one) hasn't been closed.
    image
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    edited December 2015
    Before line 82, is there an APPEND or BEGIN command? ICT doesn't need APPEND, but you would need one before the adding the new states at line 82.

    If you had an APPEND open already, try moving the ICT outside the scope of the APPEND. If the ICT targets the states you are appending, use APPEND_EARLY.

    http://www.weidu.org/~thebigg/README-WeiDU.html#APPEND

    Also, what's between lines 73 and 81? Is that all comments?
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698
    edited December 2015
    I only have one main BEGIN at the fist line. After that, I didn't use any APPEND (and the other BEGINs are all after the IF THEN that start the dialogue blocks).

    The block I want to interject in is the one above the INTERJECT, before line 60, so it is not clear to me why should I append the following one... In any case, if I enclose the block starting at 82 into an APPEND ... END, the parse error gets shifted to the start of the next block.

    Ps: yes, I minimised the lines 73-81 because they are commented (that's the trial with CHAIN).
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    I'm not a weidu expert, but what Astro says seems to be correct. I'm pretty sure that orphaned END after ICT causes the trouble.
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698

    I'm not a weidu expert, but what Astro says seems to be correct. I'm pretty sure that orphaned END after ICT causes the trouble.

    Uhm, but that END closes the ICT, doesn't it? Also in other examples, like in the WeiDU readme page or among the examples contained in the package downloaded to install WeiDU, there is always one.
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    Close the BEGIN before doing the I_C_T. The I_C_T should not be inside the scope of the BEGIN.
  • DavideDavide Member, Moderator, Translator (NDA) Posts: 1,698
    Oh, I see. Actually, now it works, thank you! :smile:
  • AedanAedan Member, Translator (NDA) Posts: 8,551
    I have a question.
    Weidu guide explains how to add an item in one of the game stores (for instance, Ribald's store).
    What if I want to create a brand-new store? How can I create a new file .sto?
  • ErgErg Member Posts: 1,756
    Aedan said:

    What if I want to create a brand-new store? How can I create a new file .sto?

    Select an existing store, ideally one that is as close as possible to the one you want to create, make a copy of that with a different name (for example using "Add copy of" in NearInfinity), then use WeiDU (or NI itself, I suppose) to modify the copy.

    Alternatively, you can also create a new store from scratch in NI (menu File > New Resource > STO).
  • AedanAedan Member, Translator (NDA) Posts: 8,551
    edited March 2016
    @Erg
    Very helpful. Thanks a lot!

    (@Davide, it seems pretty easy :)).
  • ReallyHairyDaveReallyHairyDave Member Posts: 1
    mor said:


    1. Your game directory is where the 'chitin.key' file is located, which is either in:
    C:\..\Baldur's Gate - Enhanced Edition\data\00766\ - beamdog install
    or
    C:\..\Baldur's Gate - Enhanced Edition\
    copy this path and just the path, without the file.(iirc you can copy it from the top of the explorer window)

    2. open the command prompt i.e. the link or the ALR+R cmd, whatever just make sure you have the black window opened.

    3. If the bottom line in the black window is not the same as your game directory path, change it by typing "cd *pasting your game* i.e.:
    cd "C:\..\Baldur's Gate - Enhanced Edition\data\00766\"
    or
    cd "C:\..\Baldur's Gate - Enhanced Edition\"
    you should see the game directory path. **

    4. copy/paste mklink /H dialog.tlk .\lang\en_US\dialog.tlk per first post. ***

    @mor
    With this I was able to get igi's mod learn through use working on EE, thank you :)
  • AedanAedan Member, Translator (NDA) Posts: 8,551
    I have another question.
    When I create an item, can I rename the itm file as I want or should I follow some rules?
    Also, do I have to use my prefix when I rename my new item? The same prefix I use for the globals of my mod?
  • The user and all related content has been deleted.
  • AedanAedan Member, Translator (NDA) Posts: 8,551
    @subtledoctor
    Noted. Thank you very much!
  • mashedtatersmashedtaters Member Posts: 2,266
    Hey, @bengoshi or @CamDawg
    Is there anyway we could get this thread stickied? I refer to it pretty frequently.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    Hey, what does this button do?
  • mashedtatersmashedtaters Member Posts: 2,266
    @CamDawg
    Thanks, you ROCK!!
  • AedanAedan Member, Translator (NDA) Posts: 8,551
    I wrote a quest for Xzar & Montaron.
    I have some questions:

    - Xzar & Montaron get the quest from a half-orc called Sharsek. I created the .cre file and chose the prefix (RASHARS). Since Sharsek speak most of the time with them, I should use CHAIN instead of SAY, right?

    - Most of the dialogue is build in this way:
    Sharsek: blablabla
    Xzar: blablabla
    Montaron: blablabla
    Sharsek: blablabla
    Xzar: blablabla
    Montaron: blablabla
    CHARNAME REPLY 1: blablabla
    CHARNAME REPLY 2: blablabla
    CHARNAME REPLY 3: blablabla

    Should I use XZARJ and MONTAJ or BXZAR e BMONTA?

    - If I use CHAIN, should I use EXTERN in this way?

    Sharsek: blablabla
    Xzar: blablabla
    Montaron: blablabla
    Sharsek: blablabla
    Xzar: blablabla
    Montaron: blablabla
    CHARNAME REPLY 1: blablabla EXTERN MONTAJ bla1
    CHARNAME REPLY 2: blablabla EXTERN MONTAJ bla2
    CHARNAME REPLY 3: blablabla EXTERN MONTAJ bla2

    CHAIN MONTAJ bla1
    ~Blabla!~
    END
    IF ~~ EXTERN RASHARS

    CHAIN MONTAJ bla2
    ~Blablabla!~
    END
    IF ~~ EXTERN RASHARS

    CHAIN MONTAJ bla3
    ~Blablablabla!~
    END
    IF ~~ EXTERN RASHARS

    If Xzar has something different to say for each of Montaron's replies, what should I do?
    This:

    CHAIN MONTAJ bla1
    ~Blabla!~
    XZARJ ~Blabla, yes!~
    END
    IF ~~ EXTERN RASHARS bla4

    Or this:

    CHAIN MONTAJ bla1
    ~Blabla!~
    END
    IF ~~ EXTERN XZARJ bl3.1

    ?


    - At one point, all the NPCs should interject. Now, some of them will just say one line, so I will use

    == NEERAJ IF ~IsValidForPartyDialogue("Neera") !StateCheck("Neera",CD_STATE_NOTVALID)~ THEN ~Yeah, blabla!~

    Some NPCs, instead, have more to say and CHARNAME must reply to them. Is it correct if I write in this way?

    BRANCH ~InParty("Yeslick") !StateCheck("Yeslick",CD_STATE_NOTVALID)~ BEGIN
    YESLIJ ~BLA? HELL TO THE NO!~
    IF ~~ THEN REPLY ~Bla~ EXTERN YESLIJ bla10
    IF ~~ THEN REPLY ~Blabla~ EXTERN YESLIJ bla10
    IF ~~ THEN REPLY ~Blablabla~ EXTERN YESLIJ bla11

    CHAIN IF ~~ THEN YESLIJ bla10
    ~Okay, bla!~
    END

    CHAIN IF ~~ THEN YESLIJ bla11
    ~No way, bla!~
    END

    What can I do if there are other NPCs that must interact after Yeslick? After Yeslick block, can I just add them in this way?
    == QUAYLJ IF ~IsValidForPartyDialogue("Quayle") !StateCheck("Quayle",CD_STATE_NOTVALID)~ THEN ~BLA IS NOT SMART!~
    == SKIEJ IF ~IsValidForPartyDialogue("Skie") !StateCheck("Skie",CD_STATE_NOTVALID)~ THEN ~Aww, bla?~


    Thanks in advance for the help and for the attention. I am moving my first steps into the modding world and I really need some help for complex things :)
  • AedanAedan Member, Translator (NDA) Posts: 8,551
    Can someone help me, please?
Sign In or Register to comment.