I really wanted to get by without help but.... oh well...

Started by Satoh, October 24, 2008, 06:14:50 pm

Previous topic - Next topic

Satoh

Level-up/ EXP gain notifier for BlizzABS

#=============================================================================
# * EXP Notifier for BlizzABS
#=============================================================================
# ** Display EXP
#-----------------------------------------------------------------------------
class Game_System
  def b_abs_exp_display #this script should use damage_pop to display gained EXP
    BlizzABS.player.actors.each {|actor|
      if @level != actor.final_level
        actor.battler.damage = exp_result(enemy).to_i #unless actor.cant_get_exp?
        # display text
        actor.battler.damage_pop = true #unless actor.cant_get_exp?
      end}
  end

#-----------------------------------------------------------------------------
# ** Removal of enemy call addition
#-----------------------------------------------------------------------------
  alias satoh_remove_enemy_mod remove_enemy
  def remove_enemy(enemy)
    satoh_remove_enemy_mod(enemy)
    b_abs_exp_display
  end
end


It screams random errors at me as soon as I kill and enemy...

Things I have been told are not defined:

actor
enemy
cant_get_exp?
implicitly convert nil to integer
final_level
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Shadonking

October 24, 2008, 06:23:12 pm #1 Last Edit: October 24, 2008, 06:33:04 pm by Shadonking
ok i'll just test what youve given me, then i'll get back to you

EDIT

this may take some time.





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Satoh

Thanks, I put it under the custom EXP and BlizzABS in my .hack game demo.... (which is hosted and posted now)
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Shadonking

ok for those that may also want to help this is the error i keep getting, is it the same as you Satoh.



it cant seem to find what the final level it for the actor. help :plz:





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Satoh

yep... gotten that more than a few times.... eventually I commented actor.final_level out and wrote 99 in front of it... that only served to give me a different error though....
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

ozoke

Edit. nvm just read the script my suggestion wouldnt work

Blizzard

You need 2 more conditions. Replace the condition in b_abs_exp_display with this one:

actor.battler != nil && !actor.battler.dead? && actor.battler.level < actor.battler.final_level


The array BlizzABS.player.actors does not contain the party members but the characters on the map. I would, in fact, suggest that you change the whole part since you don't need to access the characters on the map but the actors.

    $game_party.actors.each {|actor|
      if actor.level != actor.final_level && !actor.cant_get_exp?
        actor.damage = exp_result(enemy).to_i
        # display text
        actor.damage_pop = true
      end}
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Shadonking

i still cant get it to work, it might be the way im putting in the changes. could you place the changes in the script and post it for us. thanks





Creator Of Music And Games
Spoiler: ShowHide
]

keywords: ShowHide
rmxp rmvx blizz-abs rpg maker xp vx abs cbs cms script tons of addons charsets autotiles HUD


come here if you have a ps3
http://forum.chaos-project.com/index.php?topic=1952.0

Blizzard

LOL! I found another problem, Satoh forgot to carry over the enemy parameter into the b_abs_exp_display method. xD Try this here:

#=============================================================================
# * EXP Notifier for BlizzABS
#=============================================================================
# ** Display EXP
#-----------------------------------------------------------------------------
class Game_System
  def b_abs_exp_display(enemy) #this script should use damage_pop to display gained EXP
    $game_party.actors.each {|actor|
      if actor.level != actor.final_level && !actor.cant_get_exp?
        actor.damage = exp_result(enemy).to_i
        # display text
        actor.damage_pop = true
      end}
  end

#-----------------------------------------------------------------------------
# ** Removal of enemy call addition
#-----------------------------------------------------------------------------
  alias satoh_remove_enemy_mod remove_enemy
  def remove_enemy(enemy)
    satoh_remove_enemy_mod(enemy)
    b_abs_exp_display(enemy)
  end
end
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Satoh

Haha... forgive me I'm still a noob....

I'll try it out now, sorry to keep relying on you all... but then I suppose it gets you all extra credit, ne?


Script 'EXP_Notifier_ABS' line 9: NoMethodError occurred.

undefined method `final_level' for #<Game_Actor:0x3878158>


You were using it with blizzABS right?

This is annoying me now...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Blizzard

Right, Game_Actor doesn't have final_level defined. Instead of using "actor.final_level" use "$data_actors[actor.id].final_level". ^_^

Don't worry about it, we all live to learn. You can see me making mistakes all the time, don't you? ;)
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Satoh

Ok, something is going wrong here....

the script DOES show the correct EXP upon enemy death.... however, for some reason the script quadruples the amount of exp added to each player... I'm still testing scenerios, it may be that its adding exp for each party member to every party member...

IE: 4 possible party members x 5 exp = 20 exp for all party members...

OR

it could just be multiplying it by four for some unknown reason...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Blizzard

October 25, 2008, 05:44:27 pm #12 Last Edit: October 25, 2008, 05:45:31 pm by Blizzard
Didn't your original script do that when changing exp_result? I think the problem is there. exp_result gets called too often. Try this:

  def b_abs_exp_display(enemy) #this script should use damage_pop to display gained EXP
    exp = exp_result(enemy).to_i
    $game_party.actors.each {|actor|
      if actor.level != actor.final_level && !actor.cant_get_exp?
        actor.damage = exp
        # display text
        actor.damage_pop = true
      end}
  end


You should maybe edit your original script not to use exp_result to add EXP but only to calculate it. Then again, I might be remembering it wrong.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Satoh

well, now it gives out 2x EXP while still displaying.

However... I was looking at the level-up script in BlizzABS and I think I should do something similar to that instead...

For the moment I'm gonna formulate several plans and run around in lazy circles ranting about pancakes...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources