• 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!
Battle Foregrounds

Resource Battle Foregrounds N/A

TechSkylander1518 submitted a new resource:

Battle Foregrounds - Add a graphic layer above Pokemon in battle!

View attachment 3466View attachment 3467
To see this script in action, check out Pokémon Champions!
This script creates a "battle foreground"- an image that with a priority above the battlers, but still below the UI!


Code

Paste in a new section above main!
Ruby:
class PokeBattle_Battle
  attr_accessor :foreground # Filename fragment used...

Read more about this resource...
 
TechSkylander1518 updated Battle Foregrounds with a new update entry:

v19 Update

This script is technically already perfectly compatible with v19, it's just the way that I made it plug-and-play isn't compatible with v19. So I've changed it to be step-by-step instructions for how to put it in rather than a plug-and-play script, because:
  • It feels cleaner to me to just put in a few lines rather than re-define several large sections for a minor change
  • Since the steps are the same, I only need one section for v18 and v19 (plus it'll make it easier to test...

Read the rest of this update entry...
 
TechSkylander1518 updated Battle Foregrounds with a new update entry:

v20 Update

Quick update to the instructions to explain how to add this in v20. Like the v19 update, nothing about the code has changed, just where you're putting it. Because of this, I've just written the instructions for v20 and noted where things are different for prior versions, but if it's too jumbled up with all the "for x version do y", I might begin splitting it up.

Read the rest of this update entry...
 

pokepoke1

Novice
Member
Joined
Nov 11, 2022
Posts
34
The pokemon's name its looking bad at my game x.x. Why?
 

Attachments

  • Screenshot_4.png
    Screenshot_4.png
    122 KB · Views: 98
The pokemon's name its looking bad at my game x.x. Why?
This doesn’t seem to have anything to do with this script? Your screenshot doesn’t even have a foreground.

If your names were fine before adding this script, please let me know what other plugins you have so I can check for any incompatibilities. But this looks to me like you’re missing a step to adding the dark battle UI, and that’s not what this thread is about.
 

pokepoke1

Novice
Member
Joined
Nov 11, 2022
Posts
34
This doesn’t seem to have anything to do with this script? Your screenshot doesn’t even have a foreground.

If your names were fine before adding this script, please let me know what other plugins you have so I can check for any incompatibilities. But this looks to me like you’re missing a step to adding the dark battle UI, and that’s not what this thread is about.
The foreground is working fine!, i just was triying things when i did the screenshot and about the names its allright now, i just changed :
NAME_BASE_COLOR to white, and it's fine :D
 

overlordnigel

Novice
Member
Joined
Jul 19, 2017
Posts
16
I put the code in the places it was to on the page and double checked then before the battel with the camper from the base essentials I added the script setBattleRule("foreground","spotlight") (spotlight is the name of the file it was sent with) and I get this message:

[Pokémon Essentials version 20.1]

[v20.1 Hotfixes 1.0.7]

Script error in event 7 (coords 13,19), map 2 (Lappet Town)

Exception: SyntaxError

Message: (eval):2: syntax error, unexpected ',', expecting ')'

("foreground","spotlight")

^

***Line '("foreground","spotlight")' shouldn't begin with '('. Try putting the '('

at the end of the previous line instead, or using 'extendtext.exe'.

***Full script:

setBattleRule

("foreground","spotlight")

sady that doesn’t mean much to me.
 

overlordnigel

Novice
Member
Joined
Jul 19, 2017
Posts
16
i have tryed that and i got this message

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

Script error in event 7 (coords 13,19), map 2 (Lappet Town)
Exception: SyntaxError
Message: (eval):4: syntax error, unexpected local variable or method, expecting ')'
“foreground","spotlight")
^~~~~~~~~
(eval):4: unterminated string meets end of file
“foreground","spotlight")
^


***Full script:
pbTrainerIntro(:CAMPER)
pbNoticePlayer(get_self)
setBattleRule(
“foreground","spotlight")

It tells you what to do right here- put the ( at the end of the previous line, like this-
Ruby:
setBattleRule(
“foreground","spotlight")

or use extendtext.exe to make the box bigger so you can fit it all on one line.
 
Back
Top