I'm playing revamp and tried to update the localization (Russian). Existing localization (from the first post) is very outdated and only for the base version.
1. I fixed the incorrect "*.str" and "*.txt" from "*LocRU.*T.lod" based on samples from the latest ".T.lod". For example, in localized NPCtext.txt (from "*LocRU.T.lod" ) there are now 2797 lines (I took a sample from revamp.t.lod).
After renaming "02 LocRU.EnglishT.lod" to "n02LocRU.T.lod" there are no errors, but NPCtext.txt from this archive is not used - the texts of the quests are in English.
I assumed that the game reads the archives "*.lod" alphabetically and I renamed "n02LocRU.T.lod" to "revamp_02Loc_RU.T.lod" to read after "revamp.T.lod" (adding prefixes "x","y" or "z" did not fix the problem).
Now when I loading game save (or starting a new game) I see index error messages from Scripts\Global\PromotionTopics.lua (lines 10-21).
It is reported that in NPCText.txt only 2715 lines and an error when calling Game.NPCText[2782], Game.NPCText[2783] etc.
But NPCText.txt both "revamp_02Loc_RU.T.lod" and "revamp.T.lod" contain 2797 lines!
Where does PromotionTopics.lua read the NPCText that is in the Game.NPCText?
Code: Select all
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
C:\games\m&m\MM_678_eng\Scripts\Global\PromotionTopics.lua:10: array index (2782) out of bounds [1, 2715]
stack traceback:
[C]: in function 'error'
C:\games\m&m\MM_678_eng\Scripts/Core/RSMem.lua:1426: in function '__index'
C:\games\m&m\MM_678_eng\Scripts\Global\PromotionTopics.lua:10: in main chunk
arguments of '__index':
t = (table: 0x06507660)
a = 2782
v = nil
local variables of '__index':
aorig = 2782
a1 = 2781
n = 2715
upvalues of '__index':
ptr = nil
u4 = (table: 0x014b8520)
GetPtr = (function: 0x01490618)
obj = (table: 0x041dccf8)
o = 61823932
assertnum = (function: 0x0148e330)
error = (function: 0x011b4108)
type = (function: builtin#3)
SetLen = nil
low = 1
GetLen = (function: 0x0148d098)
lenP = nil
lenA = nil
size = 8
count = 2715
_index = nil
_newindex = nil
tonumber = (function: builtin#17)
beyondLen = nil
f = (function: 0x02d32230)
format = (function: builtin#91)
sOutOfBounds = "array index (%s) out of bounds [%s, %s]"
tostring = (function: builtin#18)
tostring2 = (function: 0x0148e398)
-------------------------------------------------------------------------------------------------------------------------
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
...s\m&m\MM_678_eng\Scripts\Global\Quest_EnrothDarkArts.lua:26: array index (2780) out of bounds [1, 2715]
stack traceback:
[C]: in function 'error'
C:\games\m&m\MM_678_eng\Scripts/Core/RSMem.lua:1426: in function '__index'
...s\m&m\MM_678_eng\Scripts\Global\Quest_EnrothDarkArts.lua:26: in main chunk
arguments of '__index':
t = (table: 0x06507660)
a = 2780
v = nil
local variables of '__index':
aorig = 2780
a1 = 2779
n = 2715
upvalues of '__index':
ptr = nil
u4 = (table: 0x014b8520)
GetPtr = (function: 0x01490618)
obj = (table: 0x041dccf8)
o = 61823932
assertnum = (function: 0x0148e330)
error = (function: 0x011b4108)
type = (function: builtin#3)
SetLen = nil
low = 1
GetLen = (function: 0x0148d098)
lenP = nil
lenA = nil
size = 8
count = 2715
_index = nil
_newindex = nil
tonumber = (function: builtin#17)
beyondLen = nil
f = (function: 0x02d32230)
format = (function: builtin#91)
sOutOfBounds = "array index (%s) out of bounds [%s, %s]"
tostring = (function: builtin#18)
tostring2 = (function: 0x0148e398)
-------------------------------------------------------------------------------------------------------------------------
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
...mes\m&m\MM_678_eng\Scripts\Global\StdQuestsFollowers.lua:7: array index (2793) out of bounds [1, 2715]
stack traceback:
[C]: in function 'error'
C:\games\m&m\MM_678_eng\Scripts/Core/RSMem.lua:1426: in function '__index'
...mes\m&m\MM_678_eng\Scripts\Global\StdQuestsFollowers.lua:7: in main chunk
arguments of '__index':
t = (table: 0x06507660)
a = 2793
v = nil
local variables of '__index':
aorig = 2793
a1 = 2792
n = 2715
upvalues of '__index':
ptr = nil
u4 = (table: 0x014b8520)
GetPtr = (function: 0x01490618)
obj = (table: 0x041dccf8)
o = 61823932
assertnum = (function: 0x0148e330)
error = (function: 0x011b4108)
type = (function: builtin#3)
SetLen = nil
low = 1
GetLen = (function: 0x0148d098)
lenP = nil
lenA = nil
size = 8
count = 2715
_index = nil
_newindex = nil
tonumber = (function: builtin#17)
beyondLen = nil
f = (function: 0x02d32230)
format = (function: builtin#91)
sOutOfBounds = "array index (%s) out of bounds [%s, %s]"
tostring = (function: builtin#18)
tostring2 = (function: 0x0148e398)
-------------------------------------------------------------------------------------------------------------------------
>
I found the reason for the errors. I needed to replace some CR/LF with LF (for example with Notepad++) in the added lines in npctext.txt and npcgreet.txt