- 7
- Posts
- 7
- Years
- Seen Apr 3, 2021
Hello,
I want to take into account the metrics to position sprites in battle according to their forms. I have seen in the forums a workaround redefining the way forms are created in MultipleForms. I have already changed adjustBattleSpriteY to get the pokemon not the species and all its appearances but I cannot find a solution to access forms' metrics in getBattleSpriteMetricOffset.
I have seen that in the development of v18 it is a bug fixed but I'd like to have it before.
I have checked in the compiler but it is not clear to me how to access the metrics for a form:
Can anyone help me solve this?
Thank you
I want to take into account the metrics to position sprites in battle according to their forms. I have seen in the forums a workaround redefining the way forms are created in MultipleForms. I have already changed adjustBattleSpriteY to get the pokemon not the species and all its appearances but I cannot find a solution to access forms' metrics in getBattleSpriteMetricOffset.
I have seen that in the development of v18 it is a bug fixed but I'd like to have it before.
I have checked in the compiler but it is not clear to me how to access the metrics for a form:
Code:
metrics[0].fillNils(dexdatas.length,999) # player Y
metrics[1].fillNils(dexdatas.length,999) # enemy Y
metrics[2].fillNils(dexdatas.length,999) # altitude
newmetrics = load_data("Data/metrics.dat")
mx = [maxValue,metrics[0].length-1,metrics[1].length-1,metrics[2].length-1].max
for sp in 1..mx
nsp = pbGetSpeciesFromFSpecies(sp)[0]
for i in 0..2
newmetrics[i][sp] = (metrics[i][sp]!=999) ? metrics[i][sp] : newmetrics[i][nsp]
end
end
save_data(newmetrics,"Data/metrics.dat")
Can anyone help me solve this?
Thank you