仙境传说RO:npc汉化方法

仙境传说RO:npc汉化方法

大家好我是艾西,在我们说了那么多期的教程中大家应该有发现游戏内很多都还是英文的,如果对于国内的玩家开展这个游戏可能有些不熟悉的小伙伴玩起来会有点难受,今天艾西跟大家分享下怎么汉化NPC等。

我们的仙境传说RO是基于Pandas编译出来的,而Pandas的前身是rAthenaCH,之前rAthenaCH的作者有维护过游戏内的汉化工作,但因为游戏整体的汉化量太大了就放弃了。但还是汉化不少内容等,目前pandas是全英文的,如果先要汉化那就把rAthenaCH已经汉化好的NPC脚本直接翻译丢进去。大家可以在GIthub去找一下资源包小编在这里就不太方便放入因PING台限制。

资源包下载好后,会有zh-CH和zh-TW 意思是一个是简体汉化包一个是繁体的,将文件包丢进Pandas服务端目录中既可,旧的npc文件包记得备份一下或是直接改文件名后缀用于区分即可。文件丢进去后启动服务器,在游戏中输入:@reloadsoript 加载一下脚本即可

因翻译量的问题,还是会有部分不是中文大家可以自己尝试查看一下

逻辑工程代码:

import os

import sys

import codecs

from zhconv import convert

# args 0 is inputDir

# args 1 is outputDir

#递归遍历inputDir, 对每个文件执行func

def walkDir(inputDir, func):

for root, dirs, files in os.walk(inputDir):

for file in files:

#如果是目录,递归遍历

if os.path. isdir(os.path.join( root, file)):

wa1kDir(os . path . join(root, file), func)

#如果是文件,执行func

else :

func (os.path . join(root, file))

#把inputUri指向的文件转为繁体中文,输出到outputUri

def zhcn2zhtw( inputUri, outputUri):

print( ”converting“+ inputUri +‘to ' + outputUri)

inputFile = codecs.open( inputUri, 'r', 'utf-8')

outputFile = codecs .open( outputUri, 'w', ' utf-8' )

for line in inputFile :

outputFile. write(convert(line, ' zh-tw' ))

inputFile . close( )

outputFile . close()

def walkFunc (inputUri):

# inputUri = zh- CN\npc \re \mobs \fields \prontera. txt

# outputDir = zh-TW

# inputDir = zh-CN

# outputUri = zh- TW\npc \re \mobs \fields \prontera . txt

outputUri = outputDir + inputUri[1en(inputDir):]

如果是自己想去汉化游戏可以在Pandas>zh-CN > npc > custom > etc >autopot.txt文档里找到我们需要翻译的英文代码例如:直接选中你想翻译的代码利用CHatGPT去翻译

disable_ items ;

mes” [Perchik]";

mes "I can ^0055FFsign your name^000000 on almost any rare item you hold.";

next ;

if(select("Tel1 me more...:Sign my items, please!") == 1) {

mes”[Perchik]";

mes" I can put your name on any slotless equipment or weapon." ;

emotion ET _AHA;

next;

mes”[Perchik]" ;

if (getarraysize( .@Item) | getarraysize( .@Cost)) {

mes "For my work I accept:" ;

if (getarraysize( .@Item)) for(set .@i,0; . @i < getarraysize( . @Item); set .@i, .@i+2)

mes“~ "+.@Item[ .@i+1]+"x "+ getitemname( . @Item[ .@i]);

if (. @Cost[0]) mes”~ "+callfunc("F_ InsertComma" ,. @Cost[0])+" Zeny";

if ( . @Cost[1]) mes”~ "+callfunc("F_ InsertComma", . @Cost[1])+" Zeny per refine";

}

else mes "I work for free, but...";

next;

emotion e_ cry;

mes” [Perchik]";

mes "Alas, I have 12 hungry children";

mes 'and a very angry wife." ;

next;

mes”[Perchik]";

mes "Or it was 12 angry children";

mes "and a very hungry wife..."

emotion ET_ SCRATCH;

close;

先下达一个指令:请帮我把下面这段代码里的字符串翻译成中文,中括号括起来的部分是人名,其余部分每行的字符串都是相连的,请把它们连接起来后再翻译,并且翻译后的中文字符串按每行最多14个汉字拆分成新的代码,然后将我们复制下来的代码粘贴进去形成新的代码,将新的代码直接粘贴进我们刚刚说复制的代码替换掉即可

mes"[派尔奇克]";

mes"我可以在你手上的任何稀有物品上^0055FF签上你的名字000000。";

next;

If(select("告诉我....请为我的物品签名! ") == 1){

mes"[派尔奇克]";

mes“我可以在任何无槽装备或武器上签上你的名字。";

emotion ET _AHA;

next;

mes"[派尔奇克]";

if (getarraysize(.@ltem) II getarraysize(.@Cost) {

mes“我接受以下支付方式:";

if (getarraysize(.@ltem)) {

for(set .@i,0; .@i<getarraysize(.@ltem); set @i.@i+2) {

mes。~ + .@ltem[.@i+ 1]+“个+getitemname(.@ltem[.@i);

}

}

if (.@Cost[0]) {

mes“~" + calfunc("F InsertComma".@Costl0)+" Zeny";

if (.@Cost[1]) {

mes " ~ "+callfunc("F InsertComma' ..@Cost[1])+" Zeny每次强化";

}

}

else{

mes“我是免费的,但是......“;

}

next; (此代码仅为示例并没有全部填写全大家参考下即可)

那么今天的分享教程就到这里啦我们下期再见! 我是驰网艾西

拥有一台服务器可以做很多有趣的事情!

猜你喜欢

转载自blog.csdn.net/V13807970340/article/details/131143650