- 好友
- 2
- 在线时间
- 27 小时
- 最后登录
- 2024-11-18
见习骑士
- UID
- 3048044
- 第纳尔
- 2061
- 精华
- 0
- 互助
- 18
- 荣誉
- 2
- 贡献
- 20
- 魅力
- 289
- 注册时间
- 2018-12-15
鲜花( 34) 鸡蛋( 0)
|
本帖最后由 黑暗路西法 于 2024-10-2 23:22 编辑
众所周知,骑砍原版的士气系统是很抽象的,而且是抽象到一种境界了,这个设定只在野战被应用
具体多抽象我可以给你们看看原版的算法:(不爱研究的可以跳过这部分直接到下面看代码)
我们先看看战团在mt里的源码
(assign, ":initial_courage_score", 5000),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(store_character_level, ":troop_level", ":troop_id"),
(val_mul, ":troop_level", 35),
(val_add, ":initial_courage_score", ":troop_level"), #average : 20 * 35 = 700
(store_random_in_range, ":randomized_addition_courage", 0, 3000), #average : 1500
(val_add, ":initial_courage_score", ":randomized_addition_courage"),
(agent_get_party_id, ":agent_party", ":agent_no"),
(ge,":agent_party",0),
(party_get_morale, ":cur_morale", ":agent_party"),
(store_sub, ":morale_effect_on_courage", ":cur_morale", 70),
(val_mul, ":morale_effect_on_courage", 30), #this can effect morale with -2100..900
(val_add, ":initial_courage_score", ":morale_effect_on_courage"),
#average = 5000 + 700 + 1500 = 7200; min : 5700, max : 8700
#morale effect = min : -2100(party morale is 0), average : 0(party morale is 70), max : 900(party morale is 100)
#min starting : 3600, max starting : 9600, average starting : 7200
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":initial_courage_score"),
换句话说,我们假设是28级的斯骑,而且玩家士气正常的状态下,这个斯骑自身导致的全家桶在里面都不超过1200,也就是说实际上不管是玩家士气还是兵种属性都不重要,不如我们电脑的大手一挥随机0到3000的系数重要,更不如一人一个5000基准值重要
综上所述其实原版的士气额外的算法就是个笑话,因为士兵就算拉满到62级他也就2100多的士气,而这个数连人手一个5000的一半都不到,不如搞个提成给那个0到3000的随机数改大点。
然后我们看看死亡导致的aoe扣士气部分(节选算法部分)
(le, ":dist", 1300), # to count number of allies within 13 meters to dead agent.
(try_begin),
(eq, ":is_dead_agent_ally", ":is_agent_ally"),
(val_add, ":number_of_near_allies_to_dead_agent", 1), # (number_of_near_allies_to_dead_agent) is counted because if there are #孩子们,这部分算队友的士气甚至没去重,也就是说死人也能给人一种安心感,泪目了
(try_end), # many allies of dead agent around him, negative courage effect become less.
(try_begin), # each agent is effected by a killed agent positively if he is rival or negatively if he is ally.
(neq, ":is_dead_agent_ally", ":is_agent_ally"),
(assign, ":agent_delta_courage_score", 10), # if killed agent is agent of rival side, add points to fear score
(else_try),
(assign, ":agent_delta_courage_score", -15), # if killed agent is agent of our side, decrease points from fear score
(val_add, ":agent_delta_courage_score", ":number_of_near_allies_to_dead_agent"), # ":number_of_near_allies_to_dead_agent" is added because if there are many
(try_begin), # allies of dead agent around him, negative courage effect become less.
(gt, ":agent_delta_courage_score", -5),
(assign, ":agent_delta_courage_score", -5),
(try_end),
(agent_get_slot, ":dead_agent_was_running_away_or_not", ":dead_agent_no", slot_agent_is_running_away), #look dead agent was running away or not.
(try_begin),
(eq, ":dead_agent_was_running_away_or_not", 1),
(val_div, ":agent_delta_courage_score", 3), # if killed agent was running away his negative effect on ally courage scores become very less. This added because
(try_end), # running away agents are easily killed and courage scores become very in a running away group after a time, and
(try_end), # they do not stop running away althought they pass near a new powerfull ally party.
(agent_get_position, pos1, ":agent_no"),
(get_distance_between_positions, ":dist", pos0, pos1),
###又到了大伙最爱的穷举环节
(try_begin),
(lt, ":dist", 100), #0-1 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 150),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 200), #2 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 120),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 300), #3 meter
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 100),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 400), #4 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 90),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 600), #5-6 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 80),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 800), #7-8 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 70),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 1000), #9-10 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 60),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 1500), #11-15 meter
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 50),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 2500), #16-25 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 40),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 4000), #26-40 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 30),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 6500), #41-65 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 20),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(else_try),
(lt, ":dist", 10000), #61-100 meters
(agent_get_slot, ":agent_courage_score", ":agent_no", slot_agent_courage_score),
(val_mul, ":agent_delta_courage_score", 10),
(val_add, ":agent_courage_score", ":agent_delta_courage_score"),
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":agent_courage_score"),
(try_end),
接下来我们看另一部分
(store_agent_hit_points, ":agent_hit_points", ":cur_agent"),
(val_mul, ":agent_hit_points", 5),
(try_begin),
(agent_is_ally, ":cur_agent"),
(val_sub, ":agent_hit_points", 100), #ally agents will be more tend to run away, to make game more funnier/harder
(try_end),
(val_mul, ":agent_hit_points", 10),
(store_sub, ":start_running_away_courage_score_limit", 5000, ":agent_hit_points"),
(lt, ":agent_courage_score", ":start_running_away_courage_score_limit"), #if (courage score < 3500 - (agent hit points * 40)) and (agent is not running away) then start running away, average hit points : 50, average running away limit = 1500
我们粗略的算一下,按照他这个牛大了的算法,把战团的28级斯瓦迪亚骑士全家桶随机数取平均值应该是5000+1200+1500=7700,也就是说理论上你需要在他3米内零散的情况下,他有四个队友,三米半径砍死4个人能扣掉他5000士气,最后再给他一个大的他才有可能逃跑
看起来骑士士气高昂很合理是不是,那如果我们换算一下发现4级老农的平均值是5000+1200+140=6340,和骑士只相差一个半死人,是不是变味了
这个士气算法就导致除非远程压制和单刷否则不太可能看到兵种溃逃,导致某种意义上来说阵亡杀伤士气设定最大的用处是吃算力,不如隔段时间根据兵种等级去循一下兵种血量百分比来的实在
然后逃兵计算部分阿凉大大也批判过了,具体看这里,突出一个意义不明
|
然后我为了解决这个士气算法既吃算力又不能让兵种真跑的问题,嗯造了一套基于兵种血量差异的、能让兵种根据战场局势跑路的士气设定
所有的设定大概就是这些,总之可能会有遗漏的部分或者我mod的独立设定在这里面唐突出现,而且不出意外会有优化空间,不过我是不会为此道歉的
2024-10-2-23:不出意外的出错了,store skill level的参数填错了,不过我是不会为此道歉的
|
评分
-
查看全部评分
鲜花鸡蛋huagao 在2024-10-2 21:49 送朵鲜花 并说:隐藏内容是吧 大红怪物KANE 在2024-10-2 21:43 送朵鲜花 并说:我非常同意你的观点,送朵鲜花鼓励一下
|