• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
[v13+] Single Screen Day-Care Checker Item

Resource [v13+] Single Screen Day-Care Checker Item 1.2.1

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
276
-FL- submitted a new resource:

Single Screen Day-Care Checker Item - A single screen Day-Care Checker (like in DPP Pokétch) activated by item.

gif.gif
screen.png

A single screen Day-Care Checker (like in DPP Pokétch) activated by item. This displays the pokémon sprites, names, levels, genders and if they generated an egg.

Tested on Essentials v13, v19.1 and v20.1. If this script isn't working on latest Essentials version, please inform on...

Read more about this resource...
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
Added! I didn't make this feature working in v19.1 and earlier since defining the egg species and graphic in these versions isn't secluded enough.

But this way it works with Egg Sprite per Group.
That's great. I couldn't get it figure out and it's a pain having custom eggs for every poke and not being able to show them off. Excellent work.
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
Def going to review this. You've done excellent work. I love the whole Daycare aspect of every game and I'm trying to make it a highlight in mine. This has helped tremendously. I think I'm finally at my finished product: (Well I guess I could bring the text down a bit...)
Final.png
 

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
276
That's great. I couldn't get it figure out and it's a pain having custom eggs for every poke and not being able to show them off. Excellent work.
Just these two below lines return the egg sprite (a dummy egg is generated in the process):

Ruby:
  egg = $PokemonGlobal.day_care.generate_egg
  return GameData::Species.egg_sprite_filename(egg.species, egg.form)

Def going to review this. You've done excellent work. I love the whole Daycare aspect of every game and I'm trying to make it a highlight in mine. This has helped tremendously. I think I'm finally at my finished product: (Well I guess I could bring the text down a bit...)
This looks a lot better than my UI! Good job! I just fix the grass pixel size and maybe put boxes for the texts.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
For those who are adding those two lines so the eggs have a different sprite depending on the species: pokemon that can have more than one offspring (illumise and volbeat or the nidoran, for example) will have the sprite change between both options every time you enter that screen. To solve that, you can make the game create the egg as soon as this plugin makes it appear on the screen.

This would go in this plugin:
Ruby:
  def pbCreateEgg
    $PokemonGlobal.day_care_egg = $PokemonGlobal.day_care.generate_egg
  end
You have to create the variable so give it any name you want.

Then you have to change the part of the code that looks for the egg path for this (again, in this plugin):
Ruby:
    def egg_path
       return "Graphics/Battlers/egg" if MAJOR_VERSION < 19
       return "Graphics/Pokemon/Eggs/000" if MAJOR_VERSION == 19
       pbCreateEgg if !$PokemonGlobal.day_care_egg
       egg = $PokemonGlobal.day_care_egg
       return GameData::Species.egg_sprite_filename(egg.species, egg.form)
    end

In Overworld_DayCare search for def self.collect_egg and change it for this:
Ruby:
  def self.collect_egg
    day_care = $PokemonGlobal.day_care
    egg = $PokemonGlobal.day_care_egg
    raise _INTL("Couldn't generate the egg.") if egg.nil?
    raise _INTL("No room in party for egg.") if $player.party_full?
    $player.party.push(egg)
    $PokemonGlobal.day_care_egg = nil
    day_care.reset_egg_counters
  end

And done! Now the egg should not change its sprite every time you enter the daycare checker. It also means that the egg you see in the daycare checker is the egg you receive. If you don't change the last code, there's a 50% chance that you receive an illumise or a female nidoran from the daycare when the checker shows a volbeat or male nidoran eggs.

Note: made this little explanation because it was asked somewhere else.
 

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
276
For those who are adding those two lines so the eggs have a different sprite depending on the species: pokemon that can have more than one offspring (illumise and volbeat or the nidoran, for example) will have the sprite change between both options every time you enter that screen. To solve that, you can make the game create the egg as soon as this plugin makes it appear on the screen.

This would go in this plugin:
Ruby:
  def pbCreateEgg
    $PokemonGlobal.day_care_egg = $PokemonGlobal.day_care.generate_egg
  end
You have to create the variable so give it any name you want.

Then you have to change the part of the code that looks for the egg path for this (again, in this plugin):
Ruby:
    def egg_path
       return "Graphics/Battlers/egg" if MAJOR_VERSION < 19
       return "Graphics/Pokemon/Eggs/000" if MAJOR_VERSION == 19
       pbCreateEgg if !$PokemonGlobal.day_care_egg
       egg = $PokemonGlobal.day_care_egg
       return GameData::Species.egg_sprite_filename(egg.species, egg.form)
    end

In Overworld_DayCare search for def self.collect_egg and change it for this:
Ruby:
  def self.collect_egg
    day_care = $PokemonGlobal.day_care
    egg = $PokemonGlobal.day_care_egg
    raise _INTL("Couldn't generate the egg.") if egg.nil?
    raise _INTL("No room in party for egg.") if $player.party_full?
    $player.party.push(egg)
    $PokemonGlobal.day_care_egg = nil
    day_care.reset_egg_counters
  end

And done! Now the egg should not change its sprite every time you enter the daycare checker. It also means that the egg you see in the daycare checker is the egg you receive. If you don't change the last code, there's a 50% chance that you receive an illumise or a female nidoran from the daycare when the checker shows a volbeat or male nidoran eggs.

Note: made this little explanation because it was asked somewhere else.
I completly forgot about Nidoran/Volbeat/Illumise case. Thanks! I maybe gonna add into the main script (not so sure about creating a save variable just for when dev use different egg graphics between the Nidoran and Illumise/Volbeat).

I haven't tested but your fix looks like will crash if player collect egg without looking at checker.
Code:
$PokemonGlobal.day_care_egg ||= $PokemonGlobal.day_care.generate_egg
after
Code:
def self.collect_egg
should fix this.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
Oh, right, didn't think of that possibility!

I think the line pbCreateEgg if !$PokemonGlobal.day_care_egg would also work in the code to receive the egg, but not sure since I haven't checked it.
 

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
Well, I didn't mention where to create it.

As for the problem with the variable, you could maybe simply add those instructions in the overview of the plugin. If anyone wants to use custom sprites for the eggs and have the egg sprite stay consistent, they can follow the instructions.
 

drdoom76

Cooltrainer
Member
Joined
Aug 1, 2023
Posts
212
I actually had this exact same problem when trying to randomly make a Mimiyku from pikachu.. Thought it was me, never thought about this script. 🤣
 

TaxFraug

Novice
Member
Joined
Jan 3, 2024
Posts
12
I love this feature a lot, but is there a way to make this a Pokegear app? I've tried adding it myself but I'm not sure what scene or screen needs to be called in UI_Pokegear. (I'm on V20.1 btw)
 

TaxFraug

Novice
Member
Joined
Jan 3, 2024
Posts
12
View attachment 26345
You can ignore the condition if you want it always in the pokegear.
Hmm, it keeps giving me a name error.

[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NameError
Message: uninitialized constant DayCareChecker

Backtrace:
286:UI_Pokegear:250:in `block (2 levels) in <main>'
082:MessageConfig:570:in `pbFadeOutIn'
286:UI_Pokegear:249:in `block in <main>'
286:UI_Pokegear:191:in `block in pbStartScreen'
286:UI_Pokegear:185:in `loop'
286:UI_Pokegear:185:in `pbStartScreen'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:96:in `block in selected'
082:MessageConfig:570:in `pbFadeOutIn'
[Voltseon's Pause Menu] 005_VoltseonMenu_Entries.rb:93:in `selected'
[Voltseon's Pause Menu] 003_VoltseonMenu_Menu.rb:58:in `update'

Here's also what the entry looks like on the scripts page
 

Attachments

  • Capture.PNG
    Capture.PNG
    7.8 KB · Views: 14

LinKazamine

Champion
Member
Joined
May 24, 2023
Posts
614
Well, considering I have opened the plugin from the pokegear without trouble, I would say that the problem may be that your game hasn't loaded this plugin. It should appear in the list of plugins in the console when playtesting. If it isn't there, make sure to recompile.
 

TaxFraug

Novice
Member
Joined
Jan 3, 2024
Posts
12
Well, considering I have opened the plugin from the pokegear without trouble, I would say that the problem may be that your game hasn't loaded this plugin. It should appear in the list of plugins in the console when playtesting. If it isn't there, make sure to recompile.
So I did a full compile again and I did not see the name of the plugin in the console at all. Turns out I was missing the meta.txt file in the folder and now it seems to work just fine.

Thanks!
 
Back
Top