Jump to content
  • 0

New ragexe clients not saving OptionInfo correctly?


Question

Posted (edited)

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.

16 answers to this question

Recommended Posts

Posted

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?

Posted

Have you another optioninfo.lua anywhere ?*

 

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

Posted

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)

Posted

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?

Posted

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

Posted

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.
Posted

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...

Posted

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")"

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...