Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
512 stars 130 forks source link

Script ' code converter not found (UTF-8 to SHIFT_JIS) #192

Closed StrongholdVerx closed 6 years ago

StrongholdVerx commented 6 years ago

2 games that I've tried so far has given me this error. I found the problem script but not sure how I could change it. My operating system is Arch Linux. Here's the script (think that's the source): http://cacaosoft.webcrow.jp/script/rgss3/ini.html Can anyone help with this?

Ancurio commented 6 years ago

I don't know which line caused the error, but this script isn't going to work either way:

class IniFile
  # INI ファイルの内容を数値で取得
  GetPrivateProfileInt = 
    Win32API.new('kernel32','GetPrivateProfileIntA','ppip','i')
  # INI ファイルの内容を文字列で取得
  GetPrivateProfileString = 
    Win32API.new('kernel32','GetPrivateProfileStringA','pppplp','l')
  # セクション内のキーと値を取得
  GetPrivateProfileSection = 
    Win32API.new('kernel32','GetPrivateProfileSectionA','pplp','l')
  # 全セクション名の取得
  GetPrivateProfileSectionNames =
    Win32API.new('kernel32','GetPrivateProfileSectionNamesA','plp','l')

I don't know what the game is doing with the script; if it's simple parsing and manipulation of Game.ini, you might be able to rewrite that to use a Marshal-based config system; I've thought about exposing ini-parsing via Boost.PropertyTree since a substantial amount of games (at least commercial ones) seem to be using it, but have no concrete plans atm.; I wouldn't be opposed to a solid proposal though.