Jump to content
  • 0

New ragexe clients not saving OptionInfo correctly?


rayn

Question


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   55
  • Joined:  11/25/11
  • Last Seen:  

I am testing new clients from March to June 2013.

 

It seems like OpenSetup and the original Setup program does not affect the new clients. Changed made with these setup programs affect older clients.

 

Also, newer clients require OptionInfo to be in this format:


CmdOnOffList = {
  ["/battlemode"] = 0,
  ["/notrade"] = 0,
  ["/noshift"] = 0,
  ["/noctrl"] = 1,
  ["/skillfail"] = 1,
  ["/notalkmsg"] = 0,
  ["/notalkmsg2"] = 0,
  ["/showname"] = 1,
  ["/fog"] = 1,
  ["/aura"] = 1,
  ["/window"] = 0,
  ["/miss"] = 1,
  ["/q1"] = 0,
  ["/q2"] = 0,
  ["/effect"] = 1,
  ["/bgm"] = 1,
  ["/sound"] = 1,
  ["/loginout"] = 1,
  ["/shopping"] = 1,
  ["/stateinfo"] = 1,
  ["/snap"] = 0,
  ["/itemsnap"] = 0,
  ["/skillsnap"] = 1,
  ["/hoai"] = 0,
  ["/merai"] = 0,
  ["/camera"] = 0,
  ["/btg"] = 1,
  ["/lightmap"] = 1
}
OptionInfoList = {
  Window_XPos = -1,
  Window_YPos = -1,
  Trilinear = 0,
  Bgm_Volume = 100,
  Effect_Volume = 100,
  AutoOpen1to1Window = 1,
  AutoOpen1to1Window_Friend = 1,
  PlaySound_Open1to1Window = 1,
  Simplicity_SkillList = 0,
  Show_SkillDescript = 0,
  ChangeChatMode = 1,
  LockMouse = 0,
  ChannelCopID = 0,
  Outdoor_ViewLatitude = -45,
  Outdoor_ViewDistance = 400,
  Indoor_ViewLatitude = -45,
  Indoor_ViewDistance = 300,
  SkinName = "<Basic Skin>",
  MouseExclusive = 1
}

However, the game client saves in the following incorrect format:

CmdOnOffList["/notrade"] = 0
CmdOnOffList["/noshift"] = 0
CmdOnOffList["/noctrl"] = 0
CmdOnOffList["/skillfail"] = 1
CmdOnOffList["/notalkmsg"] = 0
CmdOnOffList["/notalkmsg2"] = 0
CmdOnOffList["/showname"] = 1
CmdOnOffList["/fog"] = 0
CmdOnOffList["/aura"] = 1
CmdOnOffList["/window"] = 0
CmdOnOffList["/miss"] = 1
CmdOnOffList["/q1"] = 0
CmdOnOffList["/q2"] = 0
CmdOnOffList["/effect"] = 1
CmdOnOffList["/bgm"] = 1
CmdOnOffList["/sound"] = 1
CmdOnOffList["/loginout"] = 1
CmdOnOffList["/shopping"] = 0
CmdOnOffList["/stateinfo"] = 1
CmdOnOffList["/snap"] = 0
CmdOnOffList["/itemsnap"] = 0
CmdOnOffList["/skillsnap"] = 1
CmdOnOffList["/hoai"] = 0
CmdOnOffList["/merai"] = 0
CmdOnOffList["/camera"] = 0
CmdOnOffList["/lightmap"] = 1
CmdOnOffList["/monsterhp"] = 1

OptionInfoList["Trilinear"] = 0
OptionInfoList["Bgm_Volume"] = 100
OptionInfoList["Effect_Volume"] = 100
OptionInfoList["AutoOpen1to1Window"] = 1
OptionInfoList["AutoOpen1to1Window_Friend"] = 1
OptionInfoList["PlaySound_Open1to1Window"] = 1
OptionInfoList["Outdoor_ViewLatitude"] = -45.000000
OptionInfoList["Outdoor_ViewDistance"] = 300.000000
OptionInfoList["Indoor_ViewLatitude"] = -45.000000
OptionInfoList["Indoor_ViewDistance"] = 300.000000
OptionInfoList["SkinName"] = "<Basic Skin>"
OptionInfoList["ChannelCopID"] = 0
OptionInfoList["Window_XPos"] = 640
OptionInfoList["Window_YPos"] = 360
OptionInfoList["Simplicity_SkillList"] = 0
OptionInfoList["Show_SkillDescript"] = 0
OptionInfoList["ChangeChatMode"] = 1
OptionInfoList["LockMouse"] = 0
OptionInfoList["ShowBattleFieldIcon"] = 1
OptionInfoList["MouseExclusive"] = 1
OptionInfoList["ISFULLSCREENMODE"] = 0
OptionInfoList["WIDTH"] = 640
OptionInfoList["HEIGHT"] = 480
OptionInfoList["BITPERPIXEL"] = 16
OptionInfoList["DEVICECNT"] = 0
OptionInfoList["MODECNT"] = 0
OptionInfoList["SPRITEMODE"] = 2
OptionInfoList["TEXTUREMODE"] = 2
OptionInfoList["bLockItemDropFromItemWnd"] = 0

 

This leads to the following error on every startup:

SaveDate\OptionInfo - [string "buf"]:1: attempt to index global 'CmdOnOffList' (a nil value)

 

Of course, I can save the correct format as a lub file (and the incorrect settings would be saved as a lua file on client exit), but then no settings would be saved.

 

Any ideas how to fix?

Edited by Emistry
added code bbcode.
Link to comment
Share on other sites

16 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  402
  • Reputation:   89
  • Joined:  02/07/13
  • Last Seen:  

Ok the client read .lua files. 

Maybe your format is wrong.

My OptionInfo.lua : http://pastebin.com/LU5zCz29

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   55
  • Joined:  11/25/11
  • Last Seen:  

Hi Shakto. Thanks for the reply. Even with your OptionInfo.lua, I get

SaveDate\OptionInfo - [string "buf"]:1: attempt to index global 'CmdOnOffList' (a nil value)

 

Seems like the client is expecting arrays this format:

CmdOnOffList = { }

OptionInfoList = { }

 

not enumerations of CmdOnOffList[] and OptionInfoList[] (why does that even matter?)

 

I'm lost. Any other ideas?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  402
  • Reputation:   89
  • Joined:  02/07/13
  • Last Seen:  

Have you another optioninfo.lua anywhere ?*

 

This file must be in SaveData folder not SaveDate. Don't know if you misswrited  :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   55
  • Joined:  11/25/11
  • Last Seen:  

Sorry for the typo. My OptionInfo.lua is in SaveData folder.

 

I do not have another OptionInfo.lua anywhere else, but I do have an OptionInfo.lub in the system folder (which is in the CmdOnOffList = { } OptionInfoList = { } format)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Yep, I'm experiencing this issue too.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  65
  • Reputation:   0
  • Joined:  04/12/12
  • Last Seen:  

make sure not in System , it in savedata

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   55
  • Joined:  11/25/11
  • Last Seen:  

make sure not in System , it in savedata

 

Even when deleting from System folder, error persists.

 

Savedata folder is read last. The problem is the format of the OptionInfo file in SaveData.

Not sure why the client client is writing this file in the wrong format. Could it be a diff option?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  28
  • Reputation:   1
  • Joined:  05/16/12
  • Last Seen:  

This error appears with newer exe files :)

Its simpel... you need the option file 3 times :) try it.

One in savedata/

One in system/luafiles514/

One in data/luafiles (i will check this later if it was not luafiles514)

Also you should dissable "read from data folder first"

But somehow i got it also to work with data folder read.

How i found out? - i opened the client.exe with hex editor and searched for optioninfo. And found thoosei file pathes ;)

Hope it will work!

Kinda regards,

Filgaja

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  417
  • Reputation:   354
  • Joined:  11/11/11
  • Last Seen:  

Hi Shakto. Thanks for the reply. Even with your OptionInfo.lua, I get

SaveDate\OptionInfo - [string "buf"]:1: attempt to index global 'CmdOnOffList' (a nil value)

 

Seems like the client is expecting arrays this format:

CmdOnOffList = { }

OptionInfoList = { }

 

not enumerations of CmdOnOffList[] and OptionInfoList[] (why does that even matter?)

 

I'm lost. Any other ideas?

Both formats do the same, declare and assign Lua tables. Basically:
TableName = { FieldName = 123 }
is the same as:
TableName = {}
TableName["FieldName"] = 123
System folder contains the default files for the settings and also the table declarations. So deleting it makes things only worse.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  332
  • Reputation:   15
  • Joined:  12/11/11
  • Last Seen:  

Any solution to this issue? I am having the same problem.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  209
  • Reputation:   3
  • Joined:  11/28/11
  • Last Seen:  

i got this problem too TT someone please help me

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  104
  • Reputation:   4
  • Joined:  02/06/12
  • Last Seen:  

the new clients are annoying -.-

 

i cant remember that i ever had so much problems then since they implemented this fucking lua system....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  193
  • Reputation:   14
  • Joined:  12/02/11
  • Last Seen:  

uhh is there any solution for this problem? My client can't save the BM keys also after closing the client

 

Settings will saved to [E:\Games\Ragnarok\CleanKRO[04-05-2013]\\SaveData\UserKeys.lub] when
you normally exit.

 

Somehow I don't have UserKeys.lub on my SaveData folder and i don't know if that double backslash is client's fault or it's

just there...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  5
  • Reputation:   0
  • Joined:  10/05/13
  • Last Seen:  

same problem here

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  6
  • Reputation:   0
  • Joined:  03/20/12
  • Last Seen:  

Have people truly not solved this yet? Or I just haven't bumped into the proper thread?
 
In any case, there's a way to solve it by modifying the lua files. In "lua files/optioninfo/optioninfo_f.lub" look for the function "SaveToFileCmdOnOffValueEx(nID)" and just add the proper lines:
 
 

  function SaveToFileCmdOnOffValueEx(nID)
  if nID == 0 then
    saveFile = io.open("SaveData\\OptionInfo.lua", "w")
  else
    saveFile = io.open("data\\OptionInfo.lua", "w")
  end
  if saveFile ~= nil then
    saveFile:write("CmdOnOffList = {}\n")
    saveFile:write("OptionInfoList = {}\n")
    for k, v in pairs(CmdOnOffOderList) do
      local value = c_GetCmdOnOffValue(v)
      if value ~= -1 then
        saveFile:write(string.format("CmdOnOffList[\"%s\"] = %d\n", v, value))
      end
    end
    saveFile:write("\n")
    io.close(saveFile)
  end
end

 
The lines added (if you can't spot them) are "saveFile:write("CmdOnOffList = {}\n")" and "saveFile:write("OptionInfoList = {}\n")"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  80
  • Reputation:   0
  • Joined:  07/03/12
  • Last Seen:  

skotlex, this was an old thread but it helped me! thank you  /kis2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...