(RGPXP) Default Weapon / Animation

Started by MeVII, February 13, 2010, 06:35:41 pm

Previous topic - Next topic

MeVII

February 13, 2010, 06:35:41 pm Last Edit: February 14, 2010, 06:13:41 pm by MeVII
Hello All:

      I'm just wondering if I'm missing something obvious.

      Is there an auto default for when a player is unarmed?

      So, basically, any unarmed player uses the "fist" weapon, with the "punch" animation.

      Otherwise my unarmed characters deal no damage, and have no animations.

      Thanks for the heads up!

                                                                                                        MeVII


Blizzard

Nope. The animation ID of unarmed is 0 which means no animation. That can be changed with a very simple script, though. Also, an unarmed attack defaults in no damage. But there's a script for that as well.
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.

MeVII

February 14, 2010, 12:52:33 pm #2 Last Edit: February 14, 2010, 01:08:34 pm by MeVII
I didnt find those scripts here in the CP Script Database. Are those as of yet unmade scripts, or are they hiding out in a thread somewhere Im overlooking?

Finding a needle in a haystack may be hard, but I seem to be really good at always picking the needle thats in a haystack. :^_^':
(I always seem to be looking for something that's not common place.)

This (13th post) is all I could find on the net. Looks to fix the zero damage, but not the lack of animation?

                                                                                                     MeVII

lilbrudder917

Lines 327 to 330 in Game_Actor:
  def animation2_id
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.animation2_id : 0
  end


Change "weapon.animation2_id : 0" to "weapon.animation2_id : x", x being the animation number for the actor not wielding anything.

As for not dealing 0, I don't really remember where/what the line was, but I remember reading a solution on this forum.

MeVII

Hey thanks alot for the bit o info on default animation LilB!

Quote from: lilbrudder917 on February 14, 2010, 01:10:38 pm
As for not dealing 0, I don't really remember where/what the line was, but I remember reading a solution on this forum.


Added to that, I tested the below script changes, and it does change the default zero damage for unarmed attacks.

First press shift + ctrl + F and search for
self.damage = atk * (20 + attacker.str) / 20
once found all you have to do is change the atk to (atk + 1) so it looks like this
self.damage = (atk + 1) * (20 + attacker.str) / 20


That solution listed was found in the other forum, linked in my post above.

                                                                                                   MeVII

Alton Wyte

This should work too. Find

  def base_atk
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.atk : 0
  end

and replace the zero with the unarmed ATK value.

MeVII

Quote from: Alton Wyte on March 13, 2010, 03:53:58 pm
This should work too. Find

  def base_atk
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.atk : 0
  end

and replace the zero with the unarmed ATK value.


Hey!

Thanks for the additional information, :) Ill tinker around with doing just one or the other, and see the results of stacking both.

Ill eventually get around to posting some stats and etc on my observations.

                                                                                                  MeVII