查看: 5688|回复: 14

[有事请教] 请教关于角色的属性扩展类插件的设置

[复制链接]
梦石
0
星屑
216
在线时间
31 小时
注册时间
2019-3-16
回帖
16
发表于 2019-4-19 23:45:01 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
是这样的,目前常见的这类插件,包括yep大佬的还有futokoro都能做到,但是他们扩展的数值参数,都不是自变量,而是一个和基础param关联的函数,如果我把这个参数做成自变量,怎么利用script来改变这个参数的数值?还有就是在script当中,主角队伍成员的名称是啥actor这种不起作用。新手很菜,求教育。
想做个era那样的rpg啊
梦石
0
星屑
216
在线时间
31 小时
注册时间
2019-3-16
回帖
16
 楼主| 发表于 2019-4-21 19:25:23 | 显示全部楼层
tseyik 发表于 2019-4-21 16:44
你可參孝別人怎麼做
http://tm.lucky-duet.com/viewtopic.php?f=5&t=3265

谢了,这个做的人和我想的是类似的。
可是我太菜了,这么好的资源一直没找到233
想做个era那样的rpg啊
回复

使用道具 举报

梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2019-4-21 16:44:04 | 显示全部楼层
本帖最后由 tseyik 于 2019-4-21 20:16 编辑

你可參考別人怎麼做
http://tm.lucky-duet.com/viewtopic.php?f=5&t=3265

満腹、水分、睡眠ゲージを追加
回复

使用道具 举报

梦石
0
星屑
216
在线时间
31 小时
注册时间
2019-3-16
回帖
16
 楼主| 发表于 2019-4-21 13:04:23 | 显示全部楼层
526396987 发表于 2019-4-20 14:15
不知道可不可以,如果不可以你试试$gameActor.actor(id).xparam[1]

两种
一种改变只靠开关和事件,不受状态装备啥的影响
一种只受状态影响……从下面这个动手?
Object.defineProperties(Game_BattlerBase.prototype, {
    // Hit Points
    hp: { get: function() { return this._hp; }, configurable: true },
    // Magic Points
    mp: { get: function() { return this._mp; }, configurable: true },
    // Tactical Points
    tp: { get: function() { return this._tp; }, configurable: true },
    // Maximum Hit Points
    mhp: { get: function() { return this.param(0); }, configurable: true },
    // Maximum Magic Points
    mmp: { get: function() { return this.param(1); }, configurable: true },
    // ATtacK power
    atk: { get: function() { return this.param(2); }, configurable: true },
    // DEFense power
    def: { get: function() { return this.param(3); }, configurable: true },
    // Magic ATtack power
    mat: { get: function() { return this.param(4); }, configurable: true },
    // Magic DeFense power
    mdf: { get: function() { return this.param(5); }, configurable: true },
    // AGIlity
    agi: { get: function() { return this.param(6); }, configurable: true },
    // LUcK
    luk: { get: function() { return this.param(7); }, configurable: true },
    // HIT rate
    hit: { get: function() { return this.xparam(0); }, configurable: true },
    // EVAsion rate
    eva: { get: function() { return this.xparam(1); }, configurable: true },
    // CRItical rate
    cri: { get: function() { return this.xparam(2); }, configurable: true },
    // Critical EVasion rate
    cev: { get: function() { return this.xparam(3); }, configurable: true },
    // Magic EVasion rate
    mev: { get: function() { return this.xparam(4); }, configurable: true },
    // Magic ReFlection rate
    mrf: { get: function() { return this.xparam(5); }, configurable: true },
    // CouNTer attack rate
    cnt: { get: function() { return this.xparam(6); }, configurable: true },
    // Hp ReGeneration rate
    hrg: { get: function() { return this.xparam(7); }, configurable: true },
    // Mp ReGeneration rate
    mrg: { get: function() { return this.xparam(8); }, configurable: true },
    // Tp ReGeneration rate
    trg: { get: function() { return this.xparam(9); }, configurable: true },
    // TarGet Rate
    tgr: { get: function() { return this.sparam(0); }, configurable: true },
    // GuaRD effect rate
    grd: { get: function() { return this.sparam(1); }, configurable: true },
    // RECovery effect rate
    rec: { get: function() { return this.sparam(2); }, configurable: true },
    // PHArmacology
    pha: { get: function() { return this.sparam(3); }, configurable: true },
    // Mp Cost Rate
    mcr: { get: function() { return this.sparam(4); }, configurable: true },
    // Tp Charge Rate
    tcr: { get: function() { return this.sparam(5); }, configurable: true },
    // Physical Damage Rate
    pdr: { get: function() { return this.sparam(6); }, configurable: true },
    // Magical Damage Rate
    mdr: { get: function() { return this.sparam(7); }, configurable: true },
    // Floor Damage Rate
    fdr: { get: function() { return this.sparam(8); }, configurable: true },
    // EXperience Rate
    exr: { get: function() { return this.sparam(9); }, configurable: true }
});
想做个era那样的rpg啊
回复

使用道具 举报

梦石
0
星屑
216
在线时间
31 小时
注册时间
2019-3-16
回帖
16
 楼主| 发表于 2019-4-21 01:44:57 | 显示全部楼层
526396987 发表于 2019-4-20 14:15
不知道可不可以,如果不可以你试试$gameActor.actor(id).xparam[1]

唔,基本成了,但是插件用起来还是挺僵硬的。
用alert查看了一下,可以$gameActors.actor(id)._name调出来名字
断头鬼好恶心啊。如果,我想额外添加一个角色关联的自变量,是不是最好直接在Game_Actor的函数上直接动手?
现在用的插件是FTKR_CustomSimpleActorStatus.js 状态界面好处理一点,但是还是有种种微妙的地方……

点评

你改变量是要在什么情况下变化?添加状态发生变化?还是装备武器防具发生变化?然后角色关联的自变量得看你要关联什么了  发表于 2019-4-21 01:54
想做个era那样的rpg啊
回复

使用道具 举报

梦石
0
星屑
216
在线时间
31 小时
注册时间
2019-3-16
回帖
16
 楼主| 发表于 2019-4-21 00:09:41 | 显示全部楼层
526396987 发表于 2019-4-20 14:15
不知道可不可以,如果不可以你试试$gameActor.actor(id).xparam[1]

$gameActor is not defined
我僵住了

点评

... $gameActors.actor(id)  发表于 2019-4-21 00:35
想做个era那样的rpg啊
回复

使用道具 举报

梦石
0
星屑
6334
在线时间
287 小时
注册时间
2018-1-22
回帖
207
发表于 2019-4-20 14:15:30 | 显示全部楼层
剑啸琴吟 发表于 2019-4-20 13:55
谢谢大佬
那对应的属性
$gameActor.actor(id).hit?

不知道可不可以,如果不可以你试试$gameActor.actor(id).xparam[1]
自分自身の神様になること
回复

使用道具 举报

梦石
0
星屑
216
在线时间
31 小时
注册时间
2019-3-16
回帖
16
 楼主| 发表于 2019-4-20 13:55:51 | 显示全部楼层
526396987 发表于 2019-4-20 13:34
不知道能不能直接拿过来用,先调用吧
this._actor = actor;
然后再获取ID

谢谢大佬
那对应的属性
$gameActor.actor(id).hit?
想做个era那样的rpg啊
回复

使用道具 举报

梦石
0
星屑
6334
在线时间
287 小时
注册时间
2018-1-22
回帖
207
发表于 2019-4-20 13:34:07 | 显示全部楼层
剑啸琴吟 发表于 2019-4-20 12:54
那格式是什么样的?actor1/actor(1)/actor 1?

不知道能不能直接拿过来用,先调用吧
this._actor = actor;
然后再获取ID
this._actor._actorId()
或者直接 $gameActor.actor(id)
自分自身の神様になること
回复

使用道具 举报

梦石
0
星屑
216
在线时间
31 小时
注册时间
2019-3-16
回帖
16
 楼主| 发表于 2019-4-20 12:54:22 | 显示全部楼层
526396987 发表于 2019-4-20 12:44
感觉你列举的这些更像是用于系统的参数

不同的actor,获取他们的id,用id作为对象,这个已经在rpg_objec ...

那格式是什么样的?actor1/actor(1)/actor 1?
想做个era那样的rpg啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部