(10-20-2019, 03:26 AM)DerVVulfman Wrote: Wow, Moggy didn't account for 0 (Zero) SP? Well, that sucks. But, I have a fix (or fixes) if you don't mind some edits:
On line 214 in the create_sp_meter method, replace
withCode:@sp_width = @sp_range * @actor.sp / @actor.maxsp
Code:if @actor.maxsp == 0
@sp_width = 0
else
@sp_width = @sp_range * @actor.sp / @actor.maxsp
end
On line 545 in the sp_flow_update method, you also replace
withCode:@sp_width = @sp_range * @actor.sp / @actor.maxsp
Code:if @actor.maxsp == 0
@sp_width = 0
else
@sp_width = @sp_range * @actor.sp / @actor.maxsp
end
And finally, on line 526 in the sp_number_refresh method, replace
withCode:@s = @actor.sp * 100 / @actor.maxsp
Code:if @actor.maxsp == 0
@s = 0
else
@s = @actor.sp * 100 / @actor.maxsp
end
Of course, the line numbers will change once you make your edits. But this makes it so Zero SP is tolerated.
Oh neat! Thanks. I'll get the script back inserted and make these edits. Thanks.