04-22-2014, 12:42 AM
Actually you CAN change the energy from script, but the ATB system overwrites the value at battle start anyways. Let's fix that.
Find:
replace with
then find:
replace with:
Now, from a "Script..." Event, do:
I tested it and it works for me, so let me know if you have any problems.
Find:
Code:
#----------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‚̉Šú‰»
#----------------------------------------------------------------------------
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# ”z—ñ @count_battlers ‚ð‰Šú‰»
@count_battlers = []
# ƒGƒlƒ~[‚ð”z—ñ @count_battlers ‚ɒljÁ
for enemy in $game_troop.enemies
@count_battlers.push(enemy)
end
# ƒAƒNƒ^[‚ð”z—ñ @count_battlers ‚ɒljÁ
for actor in $game_party.actors
@count_battlers.push(actor)
end
for battler in @count_battlers
@agi_total += battler.agi
end
for battler in @count_battlers
battler.cp = [[65535 * (rand(15) + 85) / 100 * battler.agi / @agi_total * 4, 0].max, 65535].min
end
end
replace with
Code:
#----------------------------------------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‚̉Šú‰»
#----------------------------------------------------------------------------
def initialize
@battlers = []
@cancel = false
@agi_total = 0
# ”z—ñ @count_battlers ‚ð‰Šú‰»
@count_battlers = []
# ƒGƒlƒ~[‚ð”z—ñ @count_battlers ‚ɒljÁ
for enemy in $game_troop.enemies
@count_battlers.push(enemy)
end
# ƒAƒNƒ^[‚ð”z—ñ @count_battlers ‚ɒljÁ
for actor in $game_party.actors
@count_battlers.push(actor)
end
for battler in @count_battlers
@agi_total += battler.agi
end
for battler in @count_battlers
if (battler.cp == 0)
battler.cp = [[65535 * (rand(15) + 85) / 100 * battler.agi / @agi_total * 4, 0].max, 65535].min
end
end
end
then find:
Code:
#--------------------------------------------------------------------------
# œ ƒoƒgƒ‹I—¹
# result : Œ‹‰ (0:Ÿ—˜ 1:”s–k 2:“¦‘–)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
# CPƒJƒEƒ“ƒg’âŽ~
@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#-------
replace with:
Code:
#--------------------------------------------------------------------------
# œ ƒoƒgƒ‹I—¹
# result : Œ‹‰ (0:Ÿ—˜ 1:”s–k 2:“¦‘–)
#--------------------------------------------------------------------------
alias xrxs_bp1_battle_end battle_end
def battle_end(result)
#return actor CP to inital value
for actor in $game_party.actors
actor.cp = 0
end
# CPƒJƒEƒ“ƒg’âŽ~
@cp_thread.stop
xrxs_bp1_battle_end(result)
end
#------
Now, from a "Script..." Event, do:
Code:
#Player Advantage!
for actor in $game_party.actors
actor.cp = 65534
end
Code:
#Enemy Advantage!
for actor in $game_party.actors
actor.cp = 1
end
I tested it and it works for me, so let me know if you have any problems.