• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Caruban's Dynamic Darkness

Resource Caruban's Dynamic Darkness 1.2.1

Sorry, I'm unable to replicate this error. However, it may be caused by line 385.
Changing the line from (cx - cradius..cx + cradius).each do |j| to ((cx - cradius).to_i..(cx + cradius).to_i).each do |j| might resolve the issue.
It seems to work now, thanks a lot :D
I will test around some more to see if it crashes under other circumstances.

On a different note, do you know if it Is possible to make certain pokemon in caves glow like your "glowalways" events? Im using "Visible Overworld Wild Encounters" Plugin.
But I guess giving certain Pokemon the "glowalways" tag is more a general Essentials thing, right?
 
It seems to work now, thanks a lot :D
I will test around some more to see if it crashes under other circumstances.

On a different note, do you know if it Is possible to make certain pokemon in caves glow like your "glowalways" events? Im using "Visible Overworld Wild Encounters" Plugin.
But I guess giving certain Pokemon the "glowalways" tag is more a general Essentials thing, right?
If you can customize the event name, then it is possible.
 
Ruby:
Expand Collapse Copy
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: SystemStackError
Message: stack level too deep

Backtrace:
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:491:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
I've picked up this error randomly, seems to happen when you soft reset on a dark map.
 
Ruby:
Expand Collapse Copy
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: SystemStackError
Message: stack level too deep

Backtrace:
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:491:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
[Caruban's Dynamic Darkness] Dynamic Darkness.rb:495:in `update'
I've picked up this error randomly, seems to happen when you soft reset on a dark map.
Oops, I messed up the update method definition. It's not supposed to be an alias, and I should be using super to call the Sprite's update.

Ruby:
Expand Collapse Copy
# alias caruban_update update <- Remove this line
def update
    duration = 2  # Seconds
    size = 6      # Max light modifier in pixel
    @light_starttime = System.uptime if System.uptime - @light_starttime > duration
    if System.uptime - @light_starttime < duration / 2
      @light_modifier = lerp(0, -size, duration / 2, @light_starttime, System.uptime).to_i
    else
      @light_modifier = lerp(-size, 0, duration / 2, @light_starttime + duration / 2, System.uptime).to_i
    end
    # caruban_update <- Remove this line
    super                   #<- Add this line
    refresh
end
 
Oops, I messed up the update method definition. It's not supposed to be an alias, and I should be using super to call the Sprite's update.

Ruby:
Expand Collapse Copy
# alias caruban_update update <- Remove this line
def update
    duration = 2  # Seconds
    size = 6      # Max light modifier in pixel
    @light_starttime = System.uptime if System.uptime - @light_starttime > duration
    if System.uptime - @light_starttime < duration / 2
      @light_modifier = lerp(0, -size, duration / 2, @light_starttime, System.uptime).to_i
    else
      @light_modifier = lerp(-size, 0, duration / 2, @light_starttime + duration / 2, System.uptime).to_i
    end
    # caruban_update <- Remove this line
    super                   #<- Add this line
    refresh
end
That's fixed it, thanks!
 
Back
Top