骑马与砍杀中文站论坛

 找回密码
 注册(Register!)

QQ登录

只需一步,快速开始

搜索
购买霸主CDKEY 购买战帆CDKEY
查看: 3187|回复: 13

[求助] 新手想学习做MOD几个基础问题,请教

[复制链接]

56

主题

210

回帖

90

积分

扈从

Rank: 2Rank: 2

UID
1651004
第纳尔
979
精华
0
互助
0
荣誉
1
贡献
0
魅力
0
注册时间
2013-11-5

战团正版勋章拿破仑正版勋章霸主正版勋章元老骑士勋章战帆正版勋章

鲜花(4) 鸡蛋(0)
发表于 2025-10-31 23:07:24 | 显示全部楼层 |阅读模式
本帖最后由 牛肉火锅 于 2025-10-31 23:11 编辑

1:比较好上手的是不是已经发布源代码的那个,比如我想做潘德子MOD的子MOD,没有源代码,能做些什么呢?我主要是想先调调技能效果什么的就行。魔球没法调试脚本吧,只能设置装备兵种一类的。没源代码的话,反编译的不一定对是么

2:PYTHON还是必须要用2.6吗,然后战团源代码是最新只有1.171么。我系统是WIN11
3:有靠谱的反编译工具吗。他们大佬做的都是用战团发布的源代码,然后自己去写需要的源代码来实现自己想要的功能的是吗。正常情况写,如果没有作者自己开源,是没有办法靠反编译去做局部修改的吧?我说的不是数值上的,是功能上的
4:如果只能自己写代码,哪里有骑砍的指令库可以查吗,还是说没有这一说。。
问题都很小白,大家请见谅。。希望大佬们不吝赐教,谢谢

16

主题

131

回帖

204

积分

见习骑士

Rank: 3

UID
3304622
第纳尔
690
精华
0
互助
26
荣誉
3
贡献
0
魅力
158
注册时间
2021-12-28
鲜花(31) 鸡蛋(0)
发表于 2025-10-31 23:24:20 | 显示全部楼层
老老实实先从战团代码看看起吧,B站有三啸(朱红之恋)很基础的手把手教学视频

56

主题

210

回帖

90

积分

扈从

Rank: 2Rank: 2

UID
1651004
第纳尔
979
精华
0
互助
0
荣誉
1
贡献
0
魅力
0
注册时间
2013-11-5

战团正版勋章拿破仑正版勋章霸主正版勋章元老骑士勋章战帆正版勋章

鲜花(4) 鸡蛋(0)
 楼主| 发表于 2025-10-31 23:34:27 | 显示全部楼层
杰喵喵 发表于 2025-10-31 23:24
老老实实先从战团代码看看起吧,B站有三啸(朱红之恋)很基础的手把手教学视频 ...

谢谢大佬回复,我看了置顶那个视频了。第二节视频没了。必须看B站上的是么,我去看看,就是这个源代码门槛卡的死死的感觉

21

主题

722

回帖

388

积分

见习骑士

Rank: 3

UID
3102512
第纳尔
2460
精华
0
互助
33
荣誉
0
贡献
0
魅力
85
注册时间
2019-9-6

骑砍中文站APP会员勋章战团正版勋章霸主正版勋章

鲜花(68) 鸡蛋(0)
发表于 2025-11-1 09:10:17 来自手机 | 显示全部楼层
看到潘就不想回答了。。
反编译就可以做所有ms能做到的修改,实际上读TXT不是不行,主要是机器码的可读性和复用性很差。另外不要迷信反编译,半吊子东西越用越没出息。
裸装MS是不能用Python3的,之前有人发过修正版的,得你自己找
指令库。。你想问的是API手册吧。。。operation和common基本都在这两里面了,前者是能用的函数,后者里面有关于编译的基础原理。来自: Android客户端

56

主题

210

回帖

90

积分

扈从

Rank: 2Rank: 2

UID
1651004
第纳尔
979
精华
0
互助
0
荣誉
1
贡献
0
魅力
0
注册时间
2013-11-5

战团正版勋章拿破仑正版勋章霸主正版勋章元老骑士勋章战帆正版勋章

鲜花(4) 鸡蛋(0)
 楼主| 发表于 2025-11-1 10:19:46 | 显示全部楼层
huagao 发表于 2025-11-1 09:10
看到潘就不想回答了。。
反编译就可以做所有ms能做到的修改,实际上读TXT不是不行,主要是机器码的可读性和 ...

好的,谢谢大佬解惑。。。主要是潘德现在玩的比较多,所以想修改下自己想要的玩下,她城他们那个源代码是找作者要的吗,还是潘德开源了呢。。
总之谢谢大佬,没源码还是不去费劲了,钻研下R大的领军者吧

21

主题

722

回帖

388

积分

见习骑士

Rank: 3

UID
3102512
第纳尔
2460
精华
0
互助
33
荣誉
0
贡献
0
魅力
85
注册时间
2019-9-6

骑砍中文站APP会员勋章战团正版勋章霸主正版勋章

鲜花(68) 鸡蛋(0)
发表于 2025-11-1 10:34:43 | 显示全部楼层
牛肉火锅 发表于 2025-11-1 10:19
好的,谢谢大佬解惑。。。主要是潘德现在玩的比较多,所以想修改下自己想要的玩下,她城他们那个源代码是 ...

潘德是没有源码的,只能自己琢磨txt。领军者这块确实是美食榜第一,多看有好处
解解解解解解解解解解解解解解解解解解

45

主题

758

回帖

246

积分

见习骑士

Rank: 3

UID
1717081
第纳尔
4154
精华
0
互助
1
荣誉
0
贡献
0
魅力
0
注册时间
2013-12-13
鲜花(32) 鸡蛋(0)
发表于 2025-11-1 10:58:44 | 显示全部楼层
本帖最后由 zrcs 于 2025-11-1 11:00 编辑

对我们这些玩儿家来说改MOD好过完全做MOD,做MOD很多方面不擅长,我只擅长搬运模型改数据,就是一些基础功都难以搞定,比战后自动收俘虏,战场小地图等等。一些MOD本身功能齐全,比如领军者,三国魂等等用来改改,简单高效模型数据飞起,关键这些MOD完全体验过,没有什么影响游戏玩儿下去闪退的严重BUG,其他MOD可能就没有这么好命,就是感觉改MOD已经很累了,我真的佩服那些做MOD的高人,就是毅力就比不了。

56

主题

210

回帖

90

积分

扈从

Rank: 2Rank: 2

UID
1651004
第纳尔
979
精华
0
互助
0
荣誉
1
贡献
0
魅力
0
注册时间
2013-11-5

战团正版勋章拿破仑正版勋章霸主正版勋章元老骑士勋章战帆正版勋章

鲜花(4) 鸡蛋(0)
 楼主| 发表于 2025-11-1 11:46:02 | 显示全部楼层
zrcs 发表于 2025-11-1 10:58
对我们这些玩儿家来说改MOD好过完全做MOD,做MOD很多方面不擅长,我只擅长搬运模型改数据,就是一些基础功都 ...

是的哈,现在没那么多时间了。如果再回到刚毕业那会或者大学时代,就接触玩骑砍了,我估计我都能抽空去好好自学编程了,现在只能靠着简单的一些修改游戏经验去改改MOD玩。兴趣确实是学习最好的动力

29

主题

817

回帖

594

积分

骑士

Rank: 4Rank: 4

UID
3322408
第纳尔
1773
精华
0
互助
68
荣誉
0
贡献
0
魅力
16
注册时间
2022-2-3
鲜花(60) 鸡蛋(0)
发表于 2025-11-1 13:41:42 来自手机 | 显示全部楼层
她城他们拿txt硬改的,硬改的结果就是,做同样的东西要比别人花几倍的精力,还会因为难以排查的问题报错。哪怕是潘改中最顶部的那批,绝大部分顶天了也就到处扒功能,没什么功能上的创新。
硬要搞的话,这几天有两个逼正在测试特殊办法整出来的潘得源代码,可以蹲一下。不过就算是完美反编译的,注释、common和局部变量命名都没了,可读性极差。来自: Android客户端

49

主题

115

回帖

229

积分

见习骑士

Rank: 3

UID
3199602
第纳尔
1152
精华
0
互助
36
荣誉
0
贡献
1
魅力
227
注册时间
2020-9-4
鲜花(64) 鸡蛋(0)
发表于 2025-11-1 19:39:13 | 显示全部楼层
本帖最后由 奥杜因阿卡托什 于 2025-11-1 19:45 编辑


1.做潘德很有钱途,但是没什么前途。等你技术强到能在潘德上加功能时,你会发现熟悉它的txt的时间,足够你给它的功能、任务、系统全部在战团上复现一遍了。
2.我用的2.7;对。
3.一般用codeeditor,不过这个格式比较老,不能直接用。而且就像上面一条说的那样,反编译的东西比真正的源代码缺少了很多很多信息。
4.指令库的话下个ms,里面的header_operation就是所有操作符。然后script是允许你自己写的封装好的脚本,某种意义上也相当于操作符。

鲜花鸡蛋

牛肉火锅  在2025-11-2 22:06  送朵鲜花  并说:我非常同意你的观点,送朵鲜花鼓励一下

35

主题

1022

回帖

2562

积分

子爵[版主]

Rank: 7Rank: 7Rank: 7

UID
2755938
第纳尔
6228
精华
12
互助
13
荣誉
98
贡献
85
魅力
265
注册时间
2016-7-5

骑砍中文站APP会员勋章骑士美德之忠诚勋章[杰出会员精华勋章]骑士美德之英勇勋章[杰出会员活跃勋章]骑士美德之正义勋章[杰出会员荣誉勋章]元老骑士勋章

鲜花(254) 鸡蛋(0)
发表于 2025-11-2 10:33:04 来自手机 | 显示全部楼层
刚开始学不用考虑反编译,可读性太差。建议学习native和领军者。这俩的源码都是不错的学习资源。还能对比两者的代码和功能,对比对学习帮助也比较大。

鲜花鸡蛋

牛肉火锅  在2025-11-2 22:07  送朵鲜花  并说:谢谢哥的解惑~

56

主题

210

回帖

90

积分

扈从

Rank: 2Rank: 2

UID
1651004
第纳尔
979
精华
0
互助
0
荣誉
1
贡献
0
魅力
0
注册时间
2013-11-5

战团正版勋章拿破仑正版勋章霸主正版勋章元老骑士勋章战帆正版勋章

鲜花(4) 鸡蛋(0)
 楼主| 发表于 2025-11-2 22:06:30 | 显示全部楼层
112233lyh 发表于 2025-11-1 13:41
她城他们拿txt硬改的,硬改的结果就是,做同样的东西要比别人花几倍的精力,还会因为难以排查的问题报错。 ...

好的,明白了,也解惑了。就不死磕了,学习R大的领军者中

29

主题

817

回帖

594

积分

骑士

Rank: 4Rank: 4

UID
3322408
第纳尔
1773
精华
0
互助
68
荣誉
0
贡献
0
魅力
16
注册时间
2022-2-3
鲜花(60) 鸡蛋(0)
发表于 2025-11-3 11:34:39 来自手机 | 显示全部楼层
牛肉火锅 发表于 2025-11-2 22:06
好的,明白了,也解惑了。就不死磕了,学习R大的领军者中

学习代码可以来68181940这个群,大部分在世作者都在里面。来自: Android客户端

鲜花鸡蛋

牛肉火锅  在2025-11-3 20:53  送朵鲜花  并说:好的,谢谢兄弟分享

1

主题

31

回帖

10

积分

随仆

Rank: 1

UID
3840361
第纳尔
0
精华
0
互助
0
荣誉
0
贡献
0
魅力
0
注册时间
2026-1-13
鲜花(0) 鸡蛋(0)
发表于 5 天前 | 显示全部楼层
偃靖 发表于 2025-11-2 04:33
刚开始学不用考虑反编译,可读性太差。建议学习native和领军者。这俩的源码都是不错的学习资源。还能对比两 ...

  I agree with this post.

  For me, I started with wanting to add a feature (Wife as a companion) to a mod I was playing at that time (summer 2014) "Brytenwalda", which had source code.  I just wanted to add that ONE feature, so I left the rest of the code as it was.

   I later tried the same thing for Gekokujo, since that ALSO had source code.
   I noticed not that many mods had source code, besides Native.  Modders loved their secrets!

   Sometime later I noticed Perisno had an issue with dialogs -- all the races except humans responded as if female gender.  The point was at each mod I focused on changing ONE thing only, and then tested that working, and changed one more thing ... and a few thousand repeats later became a "modder".  I never, ever, went from a blank screen to a finished mod, it was always a slow evolution of something that worked into something that (sort-of) worked much later but with a few hundred changes along the way.

   Something that would have saved a lot of time at the beginning was when I noticed I did not have to "guess" what each line did, but "edit" header_operations.py  to see the exact syntax of each line.  
Of course that file is in English, so if you have trouble reading my replies you have two barriers, not one, keeping you from modding.

  There are some excellent walkthroughs on modding Warband at Taleworlds forum.

  From there, I would say many of the older mods source used syntax specific to earlier Warband versions, and sometimes the source makes assumptions about the run time environment that changed over time.
I specifically see that with anything using Modmerger, where the old modmerger kits assume specific code to search for in the module system to use as a roadmap of where exactly to insert some new code and those lines are changed or gone in a later native version.

   95% of mods kept the native code someplace, and added small extensions or dropped in OSP kits for some function that seemed cool at the time but with very little re-thinking happening.  This tends to produce frankenstein mods that have a checklist of "must have" features but are glitchy because the add-in code OSP kits each assume they are the ONLY non-native code and tend to re-define the same slots for data storage in game for their own special purposes.

  I ended making an excel file to keep my slots assignments without re-use of the same "unused" slots so I could juggle all the add-ins against a master list of "used" and "unused" locations.  This came from something I saw at Silverstag and I am grateful for it, as mods that did not do this had a fair number of glitches that could have been prevented by a few days review.  For example, in Paradigm Worlds the author had a large number of add-in functions, with around 30 preventable glitches that I found in a 2 day review of the code before remaking it as "Paradigm Chronomancer".  Of course, I did not just cut and paste his old code when remaking a mod - I went through nearly every single line and remade them, which took most of a year instead of two months slash and burn as I first planned.  

   You can spend a great deal of time working on a mod and if you only want to add some cute graphics or something new then you can still burn a great deal of time trying to understand what the original code thought it was doing.

   I strongly do NOT recommend trying to disassemble or direct edit text files to guess what they do.  
There are too many places where something you want is spread across several places in the code and you would have a much easier time finding all of those places if you have the original source code.  This just means you limit your remakes to mods with source included.

   I included all my source at Phantasy Calradia 2024 version and Paradigm Chronomancer, before that I kept the source closed like everyone else, in part to protect other people's assets (such as Perisno or Warsword Conquest).  Also I specialized in coding deep mechanics and not eye catching graphics, so mostly I used other peoples art at existing, dead or dying mods and remade the code internals.  This is why I have a long resume of mods I made "layers" of but few mods I made start to finish alone.  The list is fairly large though.

  My advice anyway.


  
您需要登录后才可以回帖 登录 | 注册(Register!)

本版积分规则

Archiver|手机版|小黑屋|骑马与砍杀中文站

GMT+8, 2026-2-1 22:47 , Processed in 0.074527 second(s), 32 queries , Gzip On, MemCached On.

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表