维多利亚2吧 关注:76,809贴子:1,938,280
  • 29回复贴,共1

【求小白鼠】一键合并南北汉人

只看楼主收藏回复

编程水平太低,花了不知道多少天,终于用python写出了个exe文件,感谢 @shengwu_1994 最后帮我找到了说明完成了最后一步的打包
操作方法是把 民族合并.exe 放在游戏根目录下,就是跟victoria2.exe同一个文件夹里
运行就可以了,mod按理来说也可以,只要在之前的基础上,再放在mod的根目录下运行一下
原理:把history\pops里所有的culture = nanfaren和culture = beifaren换成了culture = hanren
把events和decisions里的所有nanfaren,beifaren换成了hanren
在localisation里增加一个文件以把hanren汉化为汉人
最后在common\cultures.txt加入了hanren
欢迎小白鼠们前来测试,不过使用前一定要备份啊!!!


IP属地:上海1楼2014-07-30 23:51回复
    网盘地址
    http://pan.baidu.com/s/1bny9YQb
    第一次上传分享不知道能不能成功呢


    IP属地:上海2楼2014-07-30 23:54
    回复
      2025-08-25 01:05:44
      广告
      不感兴趣
      开通SVIP免广告
      有必要吗,你干脆把天朝境内的所有民族都合并为中华民族比较好


      IP属地:广西来自Android客户端3楼2014-07-31 00:34
      回复
        不客气。支持一个。


        5楼2014-07-31 01:39
        回复
          技术帝,赞一个


          IP属地:北京来自Android客户端6楼2014-07-31 07:46
          收起回复
            其实……用一个批处理软件把这些文件全部替换一次,也是一键了事的东西。。。


            IP属地:日本7楼2014-07-31 10:00
            收起回复
              怎么没效果啊楼主


              IP属地:四川8楼2014-08-22 20:34
              收起回复
                history里国家的初始可接受民族改了吗?


                IP属地:上海来自手机贴吧9楼2014-08-22 23:19
                收起回复
                  2025-08-25 00:59:44
                  广告
                  不感兴趣
                  开通SVIP免广告
                  # -*- coding: utf-8 -*-
                  import os
                  S = os.getcwd()
                  ####history\pops####
                  s0=os.path.join(S,"history\pops")
                  s1=os.path.join(s0,"1836.1.1")
                  s2=os.path.join(s0,"1861.4.14")
                  for s in s1,s2:
                  for a,b,c in os.walk(s): #c est une liste des noms de dossiers
                  for nom in c:
                  guojia=os.path.join(a,nom)
                  File=open(guojia)
                  Liste=File.readlines()
                  for i in range(len(Liste)):
                  Liste[i]=Liste[i].replace("culture = nanfaren","culture = hanren")
                  Liste[i]=Liste[i].replace("culture = beifaren","culture = hanren")
                  f=open(guojia,*w+*)
                  f.writelines(Liste)
                  f.close()
                  ####history\countries####
                  ####events####
                  ####decisions####
                  s3=os.path.join(S,"history\countries")
                  s4=os.path.join(S,"events")
                  s5=os.path.join(S,"decisions")
                  for s in s3,s4,s5:
                  for a,b,c in os.walk(s):
                  for nom in c:
                  guojia=os.path.join(a,nom)
                  File=open(guojia)
                  Liste=File.readlines()
                  for i in range(len(Liste)):
                  Liste[i]=Liste[i].replace("nanfaren","hanren")
                  Liste[i]=Liste[i].replace("beifaren","hanren")
                  f=open(guojia,*w+*)
                  f.writelines(Liste)
                  f.close()
                  ####chinois####
                  ####\localisation####
                  s6=os.path.join(S,"localisation\hanhua.csv")
                  hanren=open(s6,*w*)
                  hanren.write(*hanren;汉人;;;;;;;;;;X*)
                  hanren.close()
                  ####common####
                  ####文化####
                  s7=os.path.join(S,"common\cultures.txt")
                  nouvelle=open(s7)
                  Liste=nouvelle.readlines()
                  for i in range(len(Liste)-1):
                  Liste[i]=Liste[i].replace("beifaren","hanren")
                  nouvelle=open(s7,*w+*)
                  nouvelle.writelines(Liste)
                  nouvelle.close()
                  以上是源代码


                  IP属地:上海11楼2014-08-23 00:26
                  回复
                    我不喜欢合并民族毕竟南北差异是有的


                    IP属地:广东来自Android客户端12楼2014-08-23 01:17
                    回复
                      法语中文混合 LZ高级啊
                      开始还没看懂


                      IP属地:美国来自iPhone客户端13楼2014-08-23 01:38
                      收起回复
                        Traceback (most recent call last):
                        File "<string>", line 21, in <module>
                        File "D:\python\module\PyInstaller-2.1\PyInstaller\loader\pyi_importers.py", l
                        ine 507, in install
                        File "D:\python\module\PyInstaller-2.1\PyInstaller\loader\pyi_importers.py", l
                        ine 156, in __init__
                        ImportError: Can't load frozen modules.


                        IP属地:广东14楼2020-01-06 21:07
                        回复