Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

4 Pages V  « < 2 3 4  
Reply to this topicStart new topic
> The Script Builders' Help Topic, Get General Script Support Here.
Ed_Ross_Dont_Car...
post Jan 19 2011, 03:09 PM
Post #61


Level 1
Group Icon

Group: Member
Posts: 6
Type: Developer
RM Skill: Skilled




@54tan: If you want a really quick and dirty way of doing this, just open up the script page titled Game_Character_1. On line 18:
change attr_reader :character_name to attr_accessor :character_name

Then just use this script to change a graphic:

a=1#number of event you wanna change
b="001-Fighter01"#filename of new pic
$game_map.events[a].character_name=b


@Everyone else. Now I have a question of my own. Does anyone know how to access the character_sprite priority information on the map? I know that you can access the priority information for a given tile by going to $scene.spriteset.tilemap.priorities(provided that you open up a few attr_accessors to get there). And I know that the general rules for character sprite priority are as follows: of two characters with overlapping sprites the one with the highest y value (on the map) has the higher priority. If they have equal y values, then the last one to be created or move has priority. What I want to know is if there is anywhere in the script I can go to reference this dynamically. If not, does anyone know how I can do a check to see which of two overlapping events was the last to move or be drawn?
Go to the top of the page
 
+Quote Post
   
Ruuku
post May 25 2012, 08:38 AM
Post #62


Level 1
Group Icon

Group: Member
Posts: 8
Type: Writer
RM Skill: Intermediate




The original post
I don't feel like this is a big enough problem to have its own thread here, so here goes:

Does anyone know why this is making skills disregard the user's attack power? It's a custom skill formula I'd like to use in Game_Battler. It should double the base damage of a skill for an attack power of 100, but it's currently doing damage equal to the base damage.

Custom Damage
CODE
  def make_obj_damage_value(user, obj)
    damage = obj.base_damage                        # get base damage
    if damage > 0                                   # a positive number?
      damage = (damage * (1 + 1/100 * ( user.atk * obj.atk_f / 100 + user.spi * obj.spi_f / 100 - self.def * obj.atk_f / 100 - self.spi * obj.spi_f / 100))).to_i
      damage = 0 if damage < 0                      # If negative, make 0
    elsif damage < 0                                # a negative number?
      damage -= user.atk * 4 * obj.atk_f / 100      # Attack F of the user
      damage -= user.spi * 2 * obj.spi_f / 100      # Spirit F of the user
    end
    damage *= elements_max_rate(obj.element_set)    # elemental adjustment
    damage /= 100
    damage = apply_variance(damage, obj.variance)   # variance
    damage = apply_guard(damage)                    # guard adjustment
    if obj.damage_to_mp  
      @mp_damage = damage                           # damage MP
    else
      @hp_damage = damage                           # damage HP
    end
  end


And a quick demo for it:
https://www.dropbox.com/s/7yt0nk8r1z1zivc/C...om%20Damage.exe

To see what I mean, use skills on the bat. I'm not worried about normal attacks, just skills. The ignore-damage and healing bits I should be able to figure out once the problem's fixed.

Thanks for the help!
Edit: Solved one problem to find another. Hopefully this one's due to me being dumb as well.


I finally figured it out, so no worries biggrin.gif It was just a bunch of stupid errors. Here's the complete damage formula if anyone wants it:

Ruuku's Tiny Damage Formula for use with double-digit power and power_F
CODE
  def make_obj_damage_value(user, obj)
    damage = obj.base_damage                        # get base damage
    if damage > 0                                   # a positive number?
      damage  = user.atk * obj.atk_f / 100.0      # Attack F of the user
      damage += user.spi * obj.spi_f / 100.0      # Spirit F of the user
      unless obj.ignore_defense                     # Except for ignore defense
        damage -= self.def * obj.atk_f / 100.0    # Attack F of the target
        damage -= self.spi * obj.spi_f / 100.0    # Spirit F of the target
      end
      damage = 1.0 + 1.0 / 100.0 * damage
      damage *= obj.base_damage
      damage = damage.to_i
      damage = 0 if damage < 0                      # If negative, make 0
    elsif damage < 0                                # a negative number?
      damage = user.atk * obj.atk_f / 100.0      # Attack F of the user
      damage += user.spi * obj.spi_f / 100.0      # Spirit F of the user
      damage = 1.0 + 1.0 / 100.0 * damage
      damage *= obj.base_damage
      damage = damage.to_i
    end
    damage *= elements_max_rate(obj.element_set)    # elemental adjustment
    damage /= 100
    damage = apply_variance(damage, obj.variance)   # variance
    damage = apply_guard(damage)                    # guard adjustment
    if obj.damage_to_mp  
      @mp_damage = damage                           # damage MP
    else
      @hp_damage = damage                           # damage HP
    end
  end


This post has been edited by Ruuku: May 25 2012, 11:38 AM
Go to the top of the page
 
+Quote Post
   
djskagnetti
post May 29 2012, 04:30 PM
Post #63


Level 1
Group Icon

Group: Member
Posts: 5
Type: Artist
RM Skill: Intermediate




Having trouble with Charlie Fleed's Equipment Upgrade System by Charlie Fleed, Version 1.1 located here: http://save-point.org/thread-2299.html

Ok, let's say I have 2 Bronze armors, and 1 Poison DEF enhancement (protects against poisons). I call the script, put the Poison DEF enhancement in 1 of the armors, and then leave the Enhancing screen. Then I equip both of the armors on 2 different characters and go fight a giant nasty venom-spitting snake monster. Both of the armors all of a sudden protect against poison.

While using Stormtronics CMS I noticed that when I had two Bronze Armors and 1 had the Poison DEF crystal in it, both of the armors had a poison state defense icon. Not good. When I took out the Poison DEF crystal, I went to the equip screen and both armors still had the poison state defense icon, and neither had the crystal 'installed.' So I copied the game over and deleted all scripts except Fleed's. Blargh, there's that ugly equip screen, but it now shows how many slots the armor/weapon has in the description (doesn't do that in Stormtronics, but I can live without), and, after placing the Poison DEF crystal in one of the armors, the armor with the crystal showed the crystal in the slot, the other did not. Awesome! So I equipped both armors on 2 different characters and went off to fight that snake monster again. Both were still protected against poison. I went like 40 rounds against the snake monster, each round it spat poison, each round the poison only affected the 2 characters not wearing the Bronze Armor.

It seems it is not creating a new version of the Bronze armor with the Poison DEF like it's supposed to, and figures both armors have the new state defense. In fact, if I had 30 Bronze Armors and put 1 Poison DEF crystal in just one of them, all of them become protected against poison.
Go to the top of the page
 
+Quote Post
   

4 Pages V  « < 2 3 4
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 03:42 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker