Skip to content

Death Variable, INTER/P/J/D dialogue change via script action, lift the 1-9 limit from random tables

switswit Member, Translator (NDA) Posts: 495
edited March 2015 in Feature Requests
edit: request 3 fulffiled in BG2:EE patch 1.3: http://forum.baldursgate.com/discussion/40332/bg-2-ee-expanded-random-tables-from-iwd-ee

---------

I'd like to request following new features that would make modding more efficient and easier to maintain compatibility between mods.

1. Allow us to change Death Variable via script Action or spell opcode.
Example implementation: add new "8 DV" entry to scrlev.ids and allow "ChangeAIScript" action to accept it. Example usage: ChangeAIScript("IMOEN2",DV)

2. Allow us to change dialogue files normally assigned by pdialog.2da and interdia.2da
Example implementation:
- create a new ids file with following entries:
0 DIALOG //standard dialogue file
1 INTER //inter dialogue normally assigned by interdia.2da
2 POST //post dialogue normally assigned by pdialog.2da
3 JOIN //join dialogue normally assigned by pdialog.2da
4 DREAM //dream dialogue normally assigned by pdialog.2da
- expand upon existing "SetDialog(S:DialogFile*)" Action to accept flags from the above mentioned IDS file. No flag = current behavior (0 in IDS).
Example usage: ChangeAIScript("BIMOEN2",INTER)

3. Also a request that would allow us to make mods that adds truly random generated loot without nasty long scripts. There is a reason why there is no such thing released for all these years (G3 Item Randomizer Mod doesn't count, as it is limited in scope by the current engine). What I would like to see is removing the current random treasures table limit that only accepts 9 rows instead of 99.

Here is how the current random items work:
when a creature or container has item of filename RNDTREx#.ITM, where x=any character (even letters and symbols, and has no bearing on how RNDTREAS.2DA is read), and #=the row number of RNDTREAS.2DA to use (can be 1-9), RNDTREx#.ITM is replaced by the randomly generated item.
How it should work: "x" character should not be ignored, so we could assign rows from 1 to 99 instead of 1-9 (5 of them are already reserved by the vanilla game).

Same deal with other random tables: rndequip.2da, rndmagic.2da, rndscrol.2da, rndwep.2da.
Why it is worth it? The prospect of true random generated loot, unique random loot/weapons/magic for unique monsters, less conflicts between mods etc. How about randomized damage dealt by undroppable weapons assigned to some creatures? As you can imagine removing the 9 rows limit would really open up possibility to add some great stuff to the game.

How feasable are these requests? Any chance for either of them to be implemented? @Dee? @AndreaColombo?
Thanks in advance.
Post edited by swit on

Comments

  • GrammarsaladGrammarsalad Member Posts: 2,582
    I'm not sure I understand what you're taking about, but if it does what you say, I am behind you!
  • CrevsDaakCrevsDaak Member Posts: 7,155
    edited August 2014
    swit said:

    Same deal with other random tables: rndequip.2da, rndmagic.2da, rndscrol.2da, rndwep.2da.
    Why it is worth it? The prospect of true random generated loot, unique random loot/weapons/magic for unique monsters, less conflicts between mods etc. How about randomized damage dealt by undroppable weapons assigned to some creatures? As you can imagine removing the 9 rows limit would really open up possibility to add some great stuff to the game.

    You can randomize stuff inside the game with scripts pretty easily, and there's no limit when you do that (create an item, assign it as if it were a RNDTRE*.ITM and then use TransformItem/TakeItemDestroy and GIveItemCreate/your favorite method. You don't need very long scripts--you could just append to the baldur.bcs (and baldur25.bcs) with one IF THEN END block with lots of different RESPONSE #XXX blocks.
    swit said:

    2. Allow us to change dialogue files normally assigned by pdialog.2da and interdia.2da
    Example implementation:
    - create a new ids file with following entries:
    0 DIALOG //standard dialogue file
    1 INTER //inter dialogue normally assigned by interdia.2da
    2 POST //post dialogue normally assigned by pdialog.2da
    3 JOIN //join dialogue normally assigned by pdialog.2da
    4 DREAM //dream dialogue normally assigned by pdialog.2da
    - expand upon existing "SetDialog(S:DialogFile*)" Action to accept flags from the above mentioned IDS file. No flag = current behavior (0 in IDS).
    Example usage: ChangeAIScript("BIMOEN2",INTER)

    IIRC you can actually change the dialog files even while the .CRE is in the party, but I think that doesn't apply for the stuff in the interdia.2da, since those are for banters only.
    swit said:

    1. Allow us to change Death Variable via script Action or spell opcode.
    Example implementation: add new "8 DV" entry to scrlev.ids and allow "ChangeAIScript" action to accept it. Example usage: ChangeAIScript("IMOEN2",DV)

    Letting death variables be change by scripts could introduce more bugs than what you can imagine, from breaking item usability to actually crashing the game. Also I think it's better to append that to the SetGlobal action--since it already manages 32 char fields.

    Still I find both of the three requests good ideas ;)
  • switswit Member, Translator (NDA) Posts: 495
    edited August 2014
    Thanks for the reply.
    CrevsDaak said:


    You can randomize stuff inside the game with scripts pretty easily, and there's no limit when you do that (create an item, assign it as if it were a RNDTRE*.ITM and then use TransformItem/TakeItemDestroy and GIveItemCreate/your favorite method. You don't need very long scripts--you could just append to the baldur.bcs (and baldur25.bcs) with one IF THEN END block with lots of different RESPONSE #XXX blocks.

    This is a bad advice. You should never bloat BALDUR.BCS like this, unless the effect you want to achieve can't be done in other way. There are more "elegant" approaches, but this is beside the point. I'm not going to write a mod that adds hundreds lines of code, if there won't be a way to achieve this in a sane way via already existing random tables system. What I request is a way for any modder to add randomization whenever they wish, with just a few lines of weidu code, not bloated in-game workarounds.
    CrevsDaak said:

    IIRC you can actually change the dialog files even while the .CRE is in the party, but I think that doesn't apply for the stuff in the interdia.2da, since those are for banters only.

    I'm not requesting an action to change the standard dialog. I proposed additional flags for the existing action to allow changing dialogs that currently can't be changed on the fly (those assigned via pdialog.2da and interdia.2da). Like I said "no flag = current behavior", which means changing standard dialogue. Sorry if this wasn't clear. English is not my first language.
    CrevsDaak said:

    Letting death variables be change by scripts could introduce more bugs than what you can imagine, from breaking item usability to actually crashing the game. Also I think it's better to append that to the SetGlobal action--since it already manages 32 char fields.

    Thank you for the information.
  • CrevsDaakCrevsDaak Member Posts: 7,155
    swit said:

    CrevsDaak said:

    IIRC you can actually change the dialog files even while the .CRE is in the party, but I think that doesn't apply for the stuff in the interdia.2da, since those are for banters only.

    I'm not requesting an action to change the standard dialog. I proposed additional flags for the existing action to allow changing dialogs that currently can't be changed on the fly (those assigned via pdialog.2da and interdia.2da). Like I said "no flag = current behavior", which means changing standard dialogue. Sorry if this wasn't clear. English is not my first language.
    Oh, well, don't worry, I also misunderstood it. that seems a good idea, since it would save lots of more coding, but it still can be done (as you said for the other thing, not in the most elegant way).
    swit said:

    Thanks for the reply.

    CrevsDaak said:


    You can randomize stuff inside the game with scripts pretty easily, and there's no limit when you do that (create an item, assign it as if it were a RNDTRE*.ITM and then use TransformItem/TakeItemDestroy and GIveItemCreate/your favorite method. You don't need very long scripts--you could just append to the baldur.bcs (and baldur25.bcs) with one IF THEN END block with lots of different RESPONSE #XXX blocks.

    This is a bad advice. You should never bloat BALDUR.BCS like this, unless the effect you want to achieve can't be done in other way. There are more "elegant" approaches, but this is beside the point. I'm not going to write a mod that adds hundreds lines of code, if there won't be a way to achieve this in a sane way via already existing random tables system. What I request is a way for any modder to add randomization whenever they wish, with just a few lines of weidu code, not bloated in-game workarounds.
    Yes, it isn't elegant nor the best idea... but it works without patching the .exe ;) I mostly mod for my own game, or just randomize a single item in particular locations (so I used the .AREs scripts instead of the baldur.bcs but I used the same approach), but it would be bad (I admit it) for something huge like a new RANDTRE*.ITM with the same usage.
    Also, I think that to implement this, the C source code of the .exe needs to be edited to support ,ore entries in the RANDTRE*.2DA table besides the way the items are randomized

    If there are any typos... I blame the school's computers for having the autocorrector in spanish and me being lazy to change it.
  • ArdanisArdanis Member Posts: 1,736
    swit said:


    2. Allow us to change dialogue files normally assigned by pdialog.2da and interdia.2da
    Example implementation:
    - create a new ids file with following entries:
    0 DIALOG //standard dialogue file
    1 INTER //inter dialogue normally assigned by interdia.2da
    2 POST //post dialogue normally assigned by pdialog.2da
    3 JOIN //join dialogue normally assigned by pdialog.2da
    4 DREAM //dream dialogue normally assigned by pdialog.2da
    - expand upon existing "SetDialog(S:DialogFile*)" Action to accept flags from the above mentioned IDS file. No flag = current behavior (0 in IDS).
    Example usage: ChangeAIScript("BIMOEN2",INTER)

    Not going to happen.
    What you're asking for is to store an individual set of dialogs per actor in a savegame, essentially changing PDIALOG.2DA's function from a reference sheet to starting values.
    That's a too radical change, the benefits of which are not obvious to me either. It might allow one to replace a standard dialog file reference with another, but the same result can be achieved by setting proper conditions in dialog triggers.
    And lastly, under no circumstance do you want to multiply the dialog files. Three different ones for pre-joined, joined and post-joined are bad enough already. A character can only have one set at any given moment, and the last thing you want is to check which one is active whenever another dialog links to this character.
  • switswit Member, Translator (NDA) Posts: 495
    edited August 2014
    thank you for the reply. Hardcoded stuff like this are annoying but I understand why this change is not necessarily an optimal solution. I'm still backing other 2 requests (or at least the one with random tables expansion, if what CrevsDaak mentioned about DV engine stability is true, which I fail to see why it would be the case).
    Post edited by swit on
Sign In or Register to comment.