• 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.
Resource icon

Resource Essentials Deluxe [v20.1] [DEPRECATED] v1.2.8

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222

llk

Novice
Member
Joined
Oct 4, 2022
Posts
14
What exactly are you trying to display? What "information" doesn't display anymore?
Form information ,gender information and shiny information,
It should show two lines of text, but now it shows only one
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
Form information ,gender information and shiny information,
It should show two lines of text, but now it shows only one
Ok, show me how you had it set up before that allowed it to work.
 

llk

Novice
Member
Joined
Oct 4, 2022
Posts
14
Ok, show me how you had it set up before that allowed it to work.
SHOW_MEGA_ANIM = true
SHOW_PRIMAL_ANIM = true
SHORTEN_MOVES = true
POKEDEX_SHINY_FORMS = true
POKEDEX_SHADOW_FORMS = true
NO_Z_MOVE = 35
NO_ULTRA_BURST = 36
NO_DYNAMAX = 37
NO_STYLE_MOVES = 38
NO_TERASTALLIZE = 39
NO_ZODIAC_POWER = 40
NO_FOCUS_MECHANIC = 41
DYNAMAX_ANY_MAP = 42
CAN_DYNAMAX_WILD = 43
Other than that, I just changed the text language in the INTL function
 

llk

Novice
Member
Joined
Oct 4, 2022
Posts
14
When I deleted PluginScripts.rxdata and ran it again, the text was displayed
SHOW_MEGA_ANIM = true
SHOW_PRIMAL_ANIM = true
SHORTEN_MOVES = true
POKEDEX_SHINY_FORMS = true
POKEDEX_SHADOW_FORMS = true
NO_Z_MOVE = 35
NO_ULTRA_BURST = 36
NO_DYNAMAX = 37
NO_STYLE_MOVES = 38
NO_TERASTALLIZE = 39
NO_ZODIAC_POWER = 40
NO_FOCUS_MECHANIC = 41
DYNAMAX_ANY_MAP = 42
CAN_DYNAMAX_WILD = 43
Other than that, I just changed the text language in the INTL function
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
When I deleted PluginScripts.rxdata and ran it again, the text was displayed
Alright then. Still not really sure exactly what it is that you were having issues with, but if it works, it works.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
Lucidious89 updated Essentials Deluxe [v20.1] with a new update entry:

v1.2.4 Update

  • Fixed some speech in DEMO_VS_SADA_PHASE_1 from displaying the wrong speaker.
  • Fixed how the :ignore midbattle key works so that it no longer repeats infinitely until the conditions for the ignore are met. The trigger now only occurs once (unless set to repeat), regardless if the trigger was ignored or not.
  • The :useitem midbattle key can now be triggered by wild Pokemon, allowing them to use items on themselves in battle, as if they...

Read the rest of this update entry...
 

MaouAlter

Novice
Member
Joined
Aug 8, 2022
Posts
15
How can I set team effects on the opponent's side?
I wanted to apply both Mist and Safeguard to the opponent's team, but it applies them to the player's team instead.
Here's what I did:
Ruby:
Expand Collapse Copy
{ # Midbattle
  "turnCommand" => { # Triggers during the Command Phase of turn 0.
    :team => [
   [PBEffects::Mist, 99,],
   [PBEffects::Safeguard, 99]
]
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
How can I set team effects on the opponent's side?
I wanted to apply both Mist and Safeguard to the opponent's team, but it applies them to the player's team instead.
Here's what I did:
Ruby:
Expand Collapse Copy
{ # Midbattle
  "turnCommand" => { # Triggers during the Command Phase of turn 0.
    :team => [
   [PBEffects::Mist, 99,],
   [PBEffects::Safeguard, 99]
]
All of the "turn" triggers defaults to the player since no particular trainer triggers these. For cases like these, you set the :battler key to the battler/side index you want to apply things to.
 

Motothu

Novice
Member
Joined
Apr 17, 2017
Posts
15
Hey @Lucidious89,
really love your plugin so far!
I got a question regarding your outliner script.
Because of how my Pokédex looks, I want to outline the sprites with white, but I can't quite make it work.

The script I mean is the following:

Ruby:
Expand Collapse Copy
class PokemonPokedex_Scene
  def setIconBitmap(species)
    gender, form, shiny, gmax, shadow = $player.pokedex.last_form_seen(species)
    shiny = false if !Settings::POKEDEX_SHINY_FORMS
    shadow = false if !Settings::POKEDEX_SHADOW_FORMS
    @sprites["icon"].setSpeciesBitmap(species, gender, form, shiny, shadow, false, false, false, gmax)
    if !$player.seen?(@sprites["pokedex"].species)
      @sprites["icon"].tone = Tone.new(-255,-255,-255,255)
    else
      @sprites["icon"].tone = Tone.new(0,0,0,0)
    end
    if PluginManager.installed?("Generation 8 Pack Scripts")
      @sprites["icon"].constrict([224, 216]) if !defined?(EliteBattle)
    end
  end
end

The sprite to be outlined is @sprites["icons"].
I already took a look at your other script sections, but I don't quite get the hang of the object-parameter your pbAddSpriteOutline demands.

I already tried variations of this, but had no success:
Ruby:
Expand Collapse Copy
        pbAddSpriteOutline(["icon", @viewport, species, PictureOrigin::CENTER])

Is there anything I am missing?
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
Hey @Lucidious89,
really love your plugin so far!
I got a question regarding your outliner script.
Because of how my Pokédex looks, I want to outline the sprites with white, but I can't quite make it work.

The script I mean is the following:

Ruby:
Expand Collapse Copy
class PokemonPokedex_Scene
  def setIconBitmap(species)
    gender, form, shiny, gmax, shadow = $player.pokedex.last_form_seen(species)
    shiny = false if !Settings::POKEDEX_SHINY_FORMS
    shadow = false if !Settings::POKEDEX_SHADOW_FORMS
    @sprites["icon"].setSpeciesBitmap(species, gender, form, shiny, shadow, false, false, false, gmax)
    if !$player.seen?(@sprites["pokedex"].species)
      @sprites["icon"].tone = Tone.new(-255,-255,-255,255)
    else
      @sprites["icon"].tone = Tone.new(0,0,0,0)
    end
    if PluginManager.installed?("Generation 8 Pack Scripts")
      @sprites["icon"].constrict([224, 216]) if !defined?(EliteBattle)
    end
  end
end

The sprite to be outlined is @sprites["icons"].
I already took a look at your other script sections, but I don't quite get the hang of the object-parameter your pbAddSpriteOutline demands.

I already tried variations of this, but had no success:
Ruby:
Expand Collapse Copy
        pbAddSpriteOutline(["icon", @viewport, species, PictureOrigin::CENTER])

Is there anything I am missing?
This is interesting. I never really expected anyone to bother utilizing this feature of Essentials Deluxe, so it's only really designed to work for my narrow uses. Mainly, I needed this to be used for sprites used by specific Pokemon objects (such as in the Summary, or in battle), but it isn't built to support species sprites that aren't linked to actual Pokemon (like in the Pokedex).

However, with some minor edits, it can be reworked to allow for this.
In the plugin, replace def pbAddSpriteOutline with this updated method:
Code:
Expand Collapse Copy
def pbAddSpriteOutline(param = [], color = Color.white, border = 2, opacity = 255)
  key, viewport, object, offset = param[0], param[1], param[2], param[3]
  return if !@sprites || !@sprites.has_key?(key) || param.empty?
  for i in 0..7
    outline = key + "_outline#{i}"
    case @sprites[key]
    when PokemonSprite
      @sprites[outline] = PokemonSprite.new(viewport)
      @sprites[outline].setOffset(offset)
      case object
      when Pokemon
        @sprites[outline].setPokemonBitmap(object)
        object.species_data.apply_metrics_to_sprite(@sprites[outline], 1, nil, object.gmax_factor? ? 2 : 1)
      when Symbol
        @sprites[outline].setSpeciesBitmap(*object)
      end
    when PokemonIconSprite
      @sprites[outline] = PokemonIconSprite.new(object, viewport)
      @sprites[outline].setOffset(offset)
    when PokemonSpeciesIconSprite
      @sprites[outline] = PokemonSpeciesIconSprite.new(object, viewport)
    when ItemIconSprite
      @sprites[outline] = ItemIconSprite.new(0, 0, object, viewport)
    when HeldItemIconSprite
      @sprites[outline] = HeldItemIconSprite.new(0, 0, object, viewport)
    else
      @sprites[outline] = IconSprite.new(0, 0, viewport)
      @sprites[outline].bitmap = @sprites[key].bitmap
    end
    @sprites[outline].visible = @sprites[key].visible
    @sprites[outline].mirror = @sprites[key].mirror
    @sprites[outline].color = color
    @sprites[outline].opacity = opacity
    @sprites[outline].x = @sprites[key].x
    @sprites[outline].y = @sprites[key].y
    @sprites[outline].z = @sprites[key].z
    case i
    when 0; @sprites[outline].x += border
    when 1; @sprites[outline].x -= border
    when 2; @sprites[outline].y += border
    when 3; @sprites[outline].y -= border
    when 4
      @sprites[outline].x -= border
      @sprites[outline].y -= border
    when 5
      @sprites[outline].x += border
      @sprites[outline].y -= border
    when 6
      @sprites[outline].x -= border
      @sprites[outline].y += border
    when 7
      @sprites[outline].x += border
      @sprites[outline].y += border
    end
  end
  @sprites[key].z = @sprites[key + "_outline7"].z + 1
end

Similarly, replace def pbUpdateOutline with this:
Code:
Expand Collapse Copy
def pbUpdateOutline(sprite, pokemon)
  return if !@sprites || !@sprites.has_key?(sprite)
  for i in 0..7
    key = sprite + "_outline#{i}"
    next if !@sprites[key]
    next if !(@sprites[key].is_a?(PokemonSprite) || @sprites[key].is_a?(PokemonIconSprite))
    if pokemon.is_a?(Pokemon)
      case @sprites[key]
      when PokemonSprite
        @sprites[key].setPokemonBitmap(pokemon)
        pokemon.species_data.apply_metrics_to_sprite(@sprites[key], 1, nil, pokemon.gmax_factor? ? 2 : 1)
        @sprites[key].applyEffects(pokemon)
      when PokemonIconSprite
        @sprites[key].pokemon = pokemon
        @sprites[key].applyIconEffects
      end
    else
      @sprites[key].setSpeciesBitmap(*pokemon)
    end
  end
end

Now these methods will support species sprites. To utilize them in the Pokedex, first find def pbStartScene located in the UI_Pokedex_Main section of the Essentials script. Underneath the lines where @sprites["icon"] is set, add this line:
Code:
Expand Collapse Copy
pbAddSpriteOutline(["icon", @viewport, nil, PictureOrigin::CENTER])
This will initialize the outline sprites.

Then, update your setIconBitmap method to look like this:
Code:
Expand Collapse Copy
class PokemonPokedex_Scene
  def setIconBitmap(species)
    gender, form, shiny, gmax, shadow = $player.pokedex.last_form_seen(species)
    shiny = false if !Settings::POKEDEX_SHINY_FORMS
    shadow = false if !Settings::POKEDEX_SHADOW_FORMS
    poke_data = [species, gender, form, shiny, shadow, false, false, false, gmax]
    @sprites["icon"].setSpeciesBitmap(*poke_data)
    if !$player.seen?(@sprites["pokedex"].species)
      @sprites["icon"].tone = Tone.new(-255,-255,-255,255)
    else
      @sprites["icon"].tone = Tone.new(0,0,0,0)
    end
    pbUpdateOutline("icon", poke_data)
    if PluginManager.installed?("Generation 8 Pack Scripts")
      @sprites["icon"].constrict([224, 216]) if !defined?(EliteBattle)
    end
  end
end
This will update the outline sprites of the species whenever the Pokedex is updated to display a new species.
 

Motothu

Novice
Member
Joined
Apr 17, 2017
Posts
15
Thank you so much!
That worked like a charm!

I actually just stumbled upon that script after installing your plugin - I have been looking for something like this for quite some time!
You might wanna add it to your tutorials, as it can be used in many more helpful ways. :)
 

RegalSword

Pokemon Itinerant Developer
Member
Joined
Feb 13, 2021
Posts
522
Hello! In version 1.2.4 of Essentials Deluxe, the script section [000] Essentials Patches Battle.rb causes an issue where in a double battle, the partner is stated to have sent out the player's Pokemon and vice versa.
Correct (Battle.rb removed):
[2023-03-24] 01_23_02.254.png

Incorrect (with Battle.rb):
[2023-03-24] 01_26_42.336.png
16832
 

Attachments

  • [2023-03-24] 01_26_43.316.png
    [2023-03-24] 01_26_43.316.png
    22.9 KB · Views: 385

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
Hello! In version 1.2.4 of Essentials Deluxe, the script section [000] Essentials Patches Battle.rb causes an issue where in a double battle, the partner is stated to have sent out the player's Pokemon and vice versa.
Correct (Battle.rb removed):
View attachment 16830
Incorrect (with Battle.rb):
View attachment 16831
16832
I see, I'll fix this eventually.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
Two questions:
1. In a triple battle, how do I choose which opponent gets the mid-battle dialogue?
2. Would it be possible to add a flag that forces a Pokemon to always be sent out last?
1) When you set speech as an array, you can set the index of the desired speaker prior to the speech that you want them to say. This is covered in the tutorial.

2) by default, Essentials already makes it so the last Pokemon in a trainer's lineup will always be sent out last. No flag is necessary.
 

Neeka

Cooltrainer
Member
Joined
Aug 7, 2021
Posts
116
This is probably an ultra-stupid question, but when you say to extract it to the "root" essentials file, where do I find the root?
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,222
Yeah the whole point is that you wanna drag and drop so that all the folders included in the plugin just merge with the existing project folders. So Audio merges with Audio, Graphics with Graphics, etc, etc.
 
Back
Top