wind_waker4631 Posted March 9, 2019 Posted March 9, 2019 Hello there! I have a problem with PKHeX in regards to trying and run a batch editor for several files so I can figure out how to handle heights and weights for Pokemon within several boxes. I would rather not have to go in and edit each Pokemon's Height and Weight individually, so my initial assumption was to run a batch command similar to this: .HeightScalar=$60,195 .WeightScalar=$60,195 Regardless of Pokemon Species, it would generate appropriate scalar values, which they are calculated for the Species of the Pokemon to get the Right Calculated Heights and Weights. What ends up happening is that for some reason even though the scalar values are adjusted, I cannot apply the actual height and weight calculations. They are all marked as illegal, but if I click the Auto box next to the CP input field, it will carry out the calculation and the values will be corrected to make the Pokemon legal again. Does the Batch Editor have a corresponding label for the Auto checkbox that needs to be used in the Batch Editor? Or is there a better way to mass edit and calculate heights/weights for Pokemon in PKHeX?
Kaphotics Posted March 9, 2019 Posted March 9, 2019 private static ModifyResult SetSuggestedPKMProperty(string name, PKMInfo info) { var pk = info.pkm; switch (name) { // pb7 only case nameof(PB7.Stat_CP) when pk is PB7 pb7: pb7.ResetCP(); return ModifyResult.Modified; case nameof(PB7.HeightAbsolute) when pk is PB7 pb7: pb7.HeightAbsolute = pb7.CalcHeightAbsolute; return ModifyResult.Modified; case nameof(PB7.WeightAbsolute) when pk is PB7 pb7: pb7.WeightAbsolute = pb7.CalcWeightAbsolute; return ModifyResult.Modified; Use $suggest for the calculated values.
wind_waker4631 Posted March 9, 2019 Author Posted March 9, 2019 This should be the script set up I believe based on the response from earlier correct? When I tried the $suggest value, it returned an internal error. Is this incorrect?
Kaphotics Posted March 9, 2019 Posted March 9, 2019 Remove the "Calc" from the property name; you're needing to do HeightAbsolute etc
wind_waker4631 Posted March 9, 2019 Author Posted March 9, 2019 Doi! No wonder that didn't work before. That makes much more sense! I think that solved my initial assumptions about the Batch Editor interpretation. Thanks again!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now