Skip to content

Having some issues with near infinity

seraglioseraglio Member Posts: 122
Not sure how to ask or phrase this question without being too longwinded, but I've been happily using NI to mess around with BG2, making my own items and spells for years w/o any issues I really noticed, or at least thought were due to NI. I have a massive, old, buggy installations filled with pretty much every mod ever released, all of which has been further modded over the years, so I expect problems. I always have a few issues here and there with bad .tlk references...I usually just find the correct ones and move on, its annoying but not game breaking. I chalked up most issues to the mods.

However recently I've noticed that when SEARCHING through the tlk file with NI, it sometimes somehow actually changes the "hits" on a search. Like if I search for the word "brine", I am finding later that some or all of the entries with that word in it get changed, even though I am just looking and never commit or save anything. At least this is what feels like is happening. Entries I know I've seen while doing a search, later wind up changed, moved, even with text mangled. I can post more details if someone wants but thats the gist of it. every time i see a bad reference and go to change it, several other references get messed up...even though, again, i just search and replace the reference/description on the .itm, not changing or adding anything to the talk file.

Anyone else had this sort of behavior? Its a new version, still on BG2.5, regular windows yada, yada. Nothing obvious. is there a better tool I should be using to just search/edit .tlk files when i need to? I find DLTCEP's interface difficult , but maybe there's something else. or maybe theres something I don't understand about how talk files work?

Also I'm close to 180k entries in the tlk file...is there a limit maybe I hit?

Comments

  • ThacoBellThacoBell Member Posts: 12,235
    I've never heard of this happening with NI. 99% of time, issues with a modded game is a mod issue. The more mods you install, the more you're playing with explosives.
  • argent77argent77 Member Posts: 3,478
    @seraglio Difficult to say what's wrong. It's certainly not the size of the dialog.tlk. I've tested NI on game installations with well over 400k string entries without problems.

    Are you using a recent NI version (check menu Help > About Near Infinity)? Does the debug console show anything unusual (menu Tools > Show Debug Console)? Can you reproduce this issue or does it happen randomly?
  • seraglioseraglio Member Posts: 122
    NI version is 2.2-20210501. I am running eeex, might have gotten a branch specific for it

    There is nothing in the debug console.

    I don't think I can directly reproduce the problems... I don't notice anything wrong happened until I run across an item, spell, or dialog entry that has suddenly changed to another dialog that happens to be something with a keyword I searched for one time.

    For instance weeks ago I added some elven chain armors I created into the game. I did a search for the word "elven" to get the current text entries, which I cut and pasted into notepad and used to create BRAND NEW entries with just the AC and what not changed. I didn't modify any of those original entries, nor items, just find string. Now recently, I've looked at some of the original chain armors in the game and most of them have multiple erroneous entries in the general description and identified description. One weird common denominator is that these new entries always have the word "elven" in them. So when I did the "find string", it seems to have chosen to replace the descriptions of .itm's I wasn't even looking at with the results of the search. As a rule I rarely change existing original itm's spells etc(I will directly change mod content tho), I almost always make a new copy, same with a dialog entry, I make new ones. I have no idea what's going on here.
  • argent77argent77 Member Posts: 3,478
    Maybe you have accidentally overwritten or updated the original game strings when you performed the search? If you zip and attach the dialog.tlk I could check whether the file is corrupted or otherwise modified.
  • seraglioseraglio Member Posts: 122
    Yes somehow that is what is happening I think, but how? I am not touching the original assets and I'm not, as far as I'm aware, choosing to do anything with the dialog entries I'm searching for. Thanks do much for being willing to assist!

  • seraglioseraglio Member Posts: 122
    On another note I have noticed something that I don't know if it is meaningful but thought I'd mention. There are duplicate entries...a lot in the tlk file. They seem to start at 140kish....which is also about where my own custom content starts. Not sure if there is a relationship, or if this tlk file is a flat file or relational...can it support symbolic links like unix? If one entry can be linked to another by a pointer...maybe that would help explain....I thought it was just a dumb flat file.
  • argent77argent77 Member Posts: 3,478
    edited August 2021
    It looks like the dialog.tlk contains many original strings that were overwritten by modded content. For example, strref 0 is empty in the unmodded game since it's used by many game resources as a placeholder string. The attached dialog.tlk has replaced it with the string "How about a Brine Potion, brewed from a pool of illithid tadpoles?".

    There are also many dialog lines and item names/descriptions replaced by random mod content. Something must have messed up the dialog.tlk to end like this. I'd strongly recommend to create a new mod installation from scratch.

    This is a short excerpt of the diff between unmodded and your modded dialog.tlk (after exporting them to .tra format with NI):
    --- a/dialog.tra	2021-08-20 20:18:02.045016100 +0200
    +++ b/dialog.tra	2021-08-20 20:18:06.078710600 +0200
    @@ -1,4 +1,4 @@
    -@0      = ~<NO TEXT>~
    +@0      = ~How about a Brine Potion, brewed from a pool of illithid tadpoles?~
     @1      = ~No, I'm sorry, none of them sound familiar.~
     @2      = ~You played Elminster?~
     @3      = ~Uh, the yugoloth, was it? Yeah, you stole the show with that one, if I recall.~
    @@ -107,7 +107,17 @@
     @106    = ~And who is it that has you so afraid? Are you so weak that you can be ordered about?~
     @107    = ~I'm sure we can deal. You are an... intelligent creature. You know opportunity when it presents itself.~
     @108    = ~I am quite good at cowing even the strongest creatures with words and guile. What good am I? What good are you?~
    -@109    = ~So you return, and our dark Haer'Dalis, his fetters shattered by your hands, has preceded you. Here is the gold I promised... Have you the gem he spoke of?~ [RAELIS17]
    +@109    = ~Flesh to Stone
    +(Alteration)
    +
    +Level: 6
    +Range: Visual range of the caster
    +Duration: Permanent
    +Casting Time: 6
    +Area of Effect: 1 creature
    +Saving Throw: Neg.
    +
    +This spell turns flesh of any sort to stone. All possessions on the person of the creature likewise turn to stone. The intended subject of the spell receives a Saving Throw vs. Spell to avoid the effect. If a statue created by this spell is subjected to attacks of any sort, it will shatter into tiny pieces, making it impossible for the creature to be returned to flesh. The reverse of this spell may be cast upon the victim in order to restore life, but this is the only way.~ [RAELIS17]
     @110    = ~No, Miss Raelis, but I shall soon return with it.~
     @111    = ~The gem is safe, but first I must know how much you'll give me for it.~
     @112    = ~Aye, here it is, safely delivered.~
    @@ -546,7 +556,22 @@
     @500    = ~Sorry, gnome. I haven't the time to speak with you at present.~
     @501    = ~Hold, gnome, in the name of the Amnian Revenue and Taxation Board.~
     @502    = ~Abjurer~
    -@503    = ~Jan Jansen, gnomish citizen of Amn, you have been charged with tax evasion and the illegal sale of illegal items in an illegal manner.~
    +@503    = ~Abyssal plate armor is the best armor a fiendish warrior can acquire, both in appearance and protection. The perfectly fitted interlocking plates are specially angled to deflect the blows of Baatezu, and the entire suit is carefully adorned with demonic engraving and embossed detail of an unholy nature.
    +
    +STATISTICS:
    +
    +Armor Class: 3
    +Damage Resistance: 20%
    +Dexterity Penalty: -4
    +Arcane Casting Speed Penalty: +6
    +Stealth, Pick Pockets: -60
    +Open Locks, Set Traps: -30
    +Find Traps, Detect Illusion: -30
    +
    +Requires:
    + 15 Strength
    +
    +Weight: 70~
     @504    = ~Conjurer~
     @505    = ~Enough! You'll not sidetrack me with your cursed tales again. I'm smarter than you think!~
     @506    = ~Shut up, you! Latrine duty beckons... that's better. We've been onto you for days, Jansen. We've caught you in the very act of selling your dangerous and illegal contraptions.~
    @@ -917,11 +942,7 @@
     STATISTICS:
     
     Weight: 2~
    -@848    = ~This is Cernd's child. The child is healthy and well fed despite Deril's apparent distaste for the boy.
    -
    -STATISTICS:
    -
    -Weight: 18~
    +@848    = ~~
     @849    = ~Come get some! Booyah!~ [SSWORD23]
     @850    = ~This is the wardstone obtained from Perth the Adept. It should lower the wards that keep you from entering Spellhold.
     
    @@ -1000,11 +1021,22 @@
     Weight: 1~
     @866    = ~BANG!~
     @867    = ~Double Hit Points~
    -@868    = ~A circlet of alien metal that dominates even the most powerful of minds and leaves them defenseless. Perhaps this item could be used to control a mind flayer to make it help you escape from this hellish prison.
    +@868    = ~PALADIN: A Paladin is a warrior bold and pure, the exemplar of everything good and true. Like the Fighter, the Paladin is a person of action and combat. However, the Paladin lives for the ideals of righteousness, justice, honesty, piety, and chivalry and strives to be a living example of these virtues so that others may learn from <PRO_HIMHER> as well as gain by <PRO_HISHER> actions.
     
    -STATISTICS:
    +CLASS FEATURES:
     
    -Weight: 2~
    +– May wear helmets.
    +– May wear any armor and use any weapon.
    +– May not exceed Specialization (two slots) in any weapon class.
    +– May achieve Specialization (two slots) in any fighting style and allocate three slots in Two-Weapon Style.
    +– May use Lay On Hands ability once per day to heal a target for 2 Hit Points per level of the Paladin.
    +– May cast Detect Evil once per day per level (starts at 1st level with 4 uses).
    +– May cast Protection From Evil once per day per level (starts at 1st level with one use).
    +– May Turn Undead as a Cleric two levels lower, starting at level 3.
    +– May cast priest spells starting at level 9.
    +– Receives a +2 bonus to all Saving Throws.
    +– Alignment restricted to lawful good.
    +– Hit Die: d10~
     @869    = ~Choke up, dolt! Your grip's all wrong!~ [SSWORD24]
     @870    = ~These are the eggs of the silver dragon Adalon. They were stolen by the drow for some evil purpose.
    

    There are hundreds more mixed up instances which will probably make the game unplayable.

    The dialog.tlk format is actually just a dumb flat file. However, the strings are all referenced by a global index which can be easily messed up if you're not careful (for example, never install mods or make changes in NI while the game is running).
Sign In or Register to comment.