The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.


Advertise here

Reply
 
Thread Tools
  #1    
Old September 23rd, 2012, 06:18 AM
thedudemister's Avatar
thedudemister
Pokemon: New Order
 
Join Date: Nov 2008

Advertise here
There are three things I would like to do but don't know where to make edits.

Where do I make it so that the HP bar subtracts all the damage done at once when damage is done?

Where can I make the Exp increase faster?

Is it possible to show on the Pokemon in battle the amount of damage that was done?

Thank you,
Reply With Quote
  #2    
Old September 23rd, 2012, 09:32 AM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
1,2-In PokeBattle_ActualScene change
Code:
    if @animatingHP
      if @currenthp<@endhp
        @currenthp+=1
      elsif @currenthp>@endhp
        @currenthp-=1
      end
      refresh
      @animatingHP=false if @currenthp==@endhp
    end
    if @animatingEXP
      if !@showexp
        @currentexp=@endexp
      elsif @currentexp<@endexp
        @currentexp+=1
      elsif @currentexp>@endexp
        @currentexp-=1
      end
      refresh
      if @currentexp==@endexp
        if @currentexp==PokeBattle_Scene::EXPGAUGESIZE
to
Code:
  hpspeed=4 # hp speed here, put 1000 for instantaneous
  if @animatingHP
   if @currenthp<@endhp
    if(@endhp-@currenthp<hpspeed)
     @currenthp=@endhp
    else
     @currenthp+=hpspeed
    end
   elsif @currenthp>@endhp
    if(@currenthp-@endhp<hpspeed)
     @currenthp=@endhp
    else
     @currenthp-=hpspeed
    end
   end
   refresh
   @animatingHP=false if @currenthp==@endhp
  end
  if @animatingEXP
   expspeed # exp speed here
   if !@showexp
    @currentexp=@endexp
   elsif @currentexp<@endexp
    @currentexp+=expspeed
   elsif @currentexp>@endexp
    @currentexp-=expspeed
   end
   refresh
   if @currentexp>=@endexp
    if @currentexp>=PokeBattle_Scene::EXPGAUGESIZE
3-Yes, use @currenthp minus @endhp.
__________________
Reply With Quote
  #3    
Old September 23rd, 2012, 01:41 PM
thedudemister's Avatar
thedudemister
Pokemon: New Order
 
Join Date: Nov 2008
Thank you very much. I got the code to work and hp bar subtracts instantly and the exp bar is nice and fast. I am just having trouble with the last one, where do I put "@currenthp minus @endhp"?

Thank you,
Reply With Quote
  #4    
Old September 24th, 2012, 02:14 AM
TACHAN
 
Join Date: Jan 2010
Gender: Female
I have tested it.
After defeating a wild Pokemon this message appears:

---------------------------
TEST GAME
---------------------------
Exception: NameError
Message: undefined local variable or method `expspeed' for #<PokemonDataBox:0x4da7ad8>
PokeBattle_ActualScene:790:in `update'
SpriteWindow:1375:in `pbUpdateSpriteHash'
SpriteWindow:1371:in `each'
SpriteWindow:1371:in `pbUpdateSpriteHash'
SpriteWindow:1600:in `pbFadeOutAndHide'
SpriteWindow:1598:in `each'
SpriteWindow:1598:in `pbFadeOutAndHide'
SpriteWindow:1597:in `pbDeactivateWindows'
SpriteWindow:1524:in `pbActivateWindow'
SpriteWindow:1524:in `pbDeactivateWindows'

Thanks FL. Also me this script will be useful.

Last edited by TACHAN; September 24th, 2012 at 02:21 AM.
Reply With Quote
  #5    
Old September 24th, 2012, 04:20 AM
thedudemister's Avatar
thedudemister
Pokemon: New Order
 
Join Date: Nov 2008
Quote:
Originally Posted by TACHAN View Post
I have tested it.
After defeating a wild Pokemon this message appears:

---------------------------
TEST GAME
---------------------------
Exception: NameError
Message: undefined local variable or method `expspeed' for #<PokemonDataBox:0x4da7ad8>
PokeBattle_ActualScene:790:in `update'
SpriteWindow:1375:in `pbUpdateSpriteHash'
SpriteWindow:1371:in `each'
SpriteWindow:1371:in `pbUpdateSpriteHash'
SpriteWindow:1600:in `pbFadeOutAndHide'
SpriteWindow:1598:in `each'
SpriteWindow:1598:in `pbFadeOutAndHide'
SpriteWindow:1597:in `pbDeactivateWindows'
SpriteWindow:1524:in `pbActivateWindow'
SpriteWindow:1524:in `pbDeactivateWindows'

Thanks FL. Also me this script will be useful.
I got that too at first, you need to put a value here
"expspeed # exp speed here"

like this

expspeed=10 #exp speed here.

It should work now.

I am still unable to figure out where to put this @currenthp minus @endhp?
Reply With Quote
  #6    
Old September 26th, 2012, 04:31 AM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Quote:
Originally Posted by thedudemister View Post
I got that too at first, you need to put a value here
"expspeed # exp speed here"

like this

expspeed=10 #exp speed here.

It should work now.

I am still unable to figure out where to put this @currenthp minus @endhp?
I can't believe that I forget the number in expspeed XD! I recommend to use 4.

I found a easier way to display the damage, in PokeBattle_Move, after line 'def pbEffectMessages(opponent)' add:
Code:
    if(opponent.damagestate.calcdamage>0) #test
      @battle.pbDisplayBrief(_INTL("{1} damage!",opponent.damagestate.calcdamage))
    end
__________________
Reply With Quote
  #7    
Old September 26th, 2012, 06:17 AM
thedudemister's Avatar
thedudemister
Pokemon: New Order
 
Join Date: Nov 2008
Quote:
I found a easier way to display the damage, in PokeBattle_Move, after line 'def pbEffectMessages(opponent)' add:
Code:
    if(opponent.damagestate.calcdamage>0) #test
      @battle.pbDisplayBrief(_INTL("{1} damage!",opponent.damagestate.calcdamage))
    end
Thank you. It is working but is there a way to move the damage amount to show on top of the Pokemon's sprite instead of in the message section?

Thanks,
Reply With Quote
  #8    
Old September 30th, 2012, 11:25 AM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Quote:
Originally Posted by thedudemister View Post
Thank you. It is working but is there a way to move the damage amount to show on top of the Pokemon's sprite instead of in the message section?

Thanks,
Make the damage pop up from pokémon sprite in parallel that battle run? You need to edit several parts to do this right and start the animation and stop it in right time.
__________________
Reply With Quote
  #9    
Old September 30th, 2012, 03:00 PM
thedudemister's Avatar
thedudemister
Pokemon: New Order
 
Join Date: Nov 2008
Quote:
Originally Posted by FL . View Post
Make the damage pop up from pokémon sprite in parallel that battle run? You need to edit several parts to do this right and start the animation and stop it in right time.
Yes. So I guess its a lot of work then, could you maybe direct me to some kind of tutorial where I may be able to figure out how to do it? I tried searching for a tutorial on how to write scripts but have had no luck so far. I am looking for something like the websites that show you had to do CSS or html. All I have been able to figure out so far is basic editing like moving things and changing some text.

Thanks,
Reply With Quote
  #10    
Old September 30th, 2012, 06:53 PM
IceGod64's Avatar
IceGod64
My imagination.
 
Join Date: Oct 2008
Location: Castelia City
Age: 26
Gender: Male
Nature: Naive
Quote:
Originally Posted by FL . View Post
1,2-In PokeBattle_ActualScene change
Code:
    if @animatingHP
      if @currenthp<@endhp
        @currenthp+=1
      elsif @currenthp>@endhp
        @currenthp-=1
      end
      refresh
      @animatingHP=false if @currenthp==@endhp
    end
    if @animatingEXP
      if !@showexp
        @currentexp=@endexp
      elsif @currentexp<@endexp
        @currentexp+=1
      elsif @currentexp>@endexp
        @currentexp-=1
      end
      refresh
      if @currentexp==@endexp
        if @currentexp==PokeBattle_Scene::EXPGAUGESIZE
to
Code:
  hpspeed=4 # hp speed here, put 1000 for instantaneous
  if @animatingHP
   if @currenthp<@endhp
    if(@endhp-@currenthp<hpspeed)
     @currenthp=@endhp
    else
     @currenthp+=hpspeed
    end
   elsif @currenthp>@endhp
    if(@currenthp-@endhp<hpspeed)
     @currenthp=@endhp
    else
     @currenthp-=hpspeed
    end
   end
   refresh
   @animatingHP=false if @currenthp==@endhp
  end
  if @animatingEXP
   expspeed # exp speed here
   if !@showexp
    @currentexp=@endexp
   elsif @currentexp<@endexp
    @currentexp+=expspeed
   elsif @currentexp>@endexp
    @currentexp-=expspeed
   end
   refresh
   if @currentexp>=@endexp
    if @currentexp>=PokeBattle_Scene::EXPGAUGESIZE
3-Yes, use @currenthp minus @endhp.
Um.... What?

Would'nt it be more efficient to just change
Code:
if @animatingHP
      if @currenthp<@endhp
        @currenthp+=1
      elsif @currenthp>@endhp
        @currenthp-=1
      end
      refresh
      @animatingHP=false if @currenthp==@endhp
    end
to

Code:
if @animatingHP
      @currenthp = @endhp
      @animatingHP=false
    end
__________________

Reply With Quote
  #11    
Old October 3rd, 2012, 05:34 AM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Quote:
Originally Posted by thedudemister View Post
Yes. So I guess its a lot of work then, could you maybe direct me to some kind of tutorial where I may be able to figure out how to do it? I tried searching for a tutorial on how to write scripts but have had no luck so far. I am looking for something like the websites that show you had to do CSS or html. All I have been able to figure out so far is basic editing like moving things and changing some text.

Thanks,
You probably need to create a variable to put the damage number and put a update method in 'def pbGraphicsUpdate', something like:
Code:
if @damagenumber!=0
  do animation
  @damagenumber=0 if animation ended
end
I made a guide that show how simple scenes works in essentials http://www.pokecommunity.com/showthread.php?t=286554. I can't link here to others forums, so I can't post links to RGSS tutorials. Try to find on google. Note that to you make this damage pop up effect you needs a certain experience with programming.

Quote:
Originally Posted by IceGod64 View Post
Um.... What?

Would'nt it be more efficient to just change
Code:
if @animatingHP
      if @currenthp<@endhp
        @currenthp+=1
      elsif @currenthp>@endhp
        @currenthp-=1
      end
      refresh
      @animatingHP=false if @currenthp==@endhp
    end
to

Code:
if @animatingHP
      @currenthp = @endhp
      @animatingHP=false
    end
For question 1: Yes! I only pasted a code that I made to my game a long time ago to HP bar speeds up.
__________________
Reply With Quote
  #12    
Old October 3rd, 2012, 12:06 PM
thedudemister's Avatar
thedudemister
Pokemon: New Order
 
Join Date: Nov 2008
Quote:
Originally Posted by FL . View Post
You probably need to create a variable to put the damage number and put a update method in 'def pbGraphicsUpdate', something like:
Code:
if @damagenumber!=0
  do animation
  @damagenumber=0 if animation ended
end
I made a guide that show how simple scenes works in essentials http://www.pokecommunity.com/showthread.php?t=286554. I can't link here to others forums, so I can't post links to RGSS tutorials. Try to find on google. Note that to you make this damage pop up effect you needs a certain experience with programming.

For question 1: Yes! I only pasted a code that I made to my game a long time ago to HP bar speeds up.
Well maybe in the future I will do it. As of now I have no idea where I would start or what to do. I did a Google search for the tutorial found some right away. I wasn't sure what the coding was called so that why I could not find any before.

I am curious would it be more simple to have the damage show on the HP bar? For example: The bar would shake and show the damage that was done.

Thanks,
__________________
My deviantART: http://dasdoodmeister.deviantart.com/
Pokemon New Order: http://www.pokecommunity.com/showthread.php?t=289465
Web Store: http://www.schobookcollectibles.com/
Ebay Store: http://stores.ebay.com/Schobook-Collectibles
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 07:13 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.