Author Topic: (RGPXP) Default Weapon / Animation  (Read 1707 times)

Offline MeVII

  • Awakened Visionist
  • **
  • Posts: 54
  • LV: 16
    • View Profile
(RGPXP) Default Weapon / Animation
« on: February 14, 2010, 01:35:41 AM »
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

« Last Edit: February 15, 2010, 01:13:41 AM by MeVII »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: (RGPXP) Default Weapon / Animation
« Reply #1 on: February 14, 2010, 01:04:03 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline MeVII

  • Awakened Visionist
  • **
  • Posts: 54
  • LV: 16
    • View Profile
Re: (RGPXP) Default Weapon / Animation
« Reply #2 on: February 14, 2010, 07:52:33 PM »
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
« Last Edit: February 14, 2010, 08:08:34 PM by MeVII »

Offline lilbrudder917

  • SDK's fault, I swear.
  • Awakened Visionist
  • **
  • Posts: 77
  • LV: 21
  • Gender: Male
  • It's a shroom.
    • View Profile
Re: (RGPXP) Default Weapon / Animation
« Reply #3 on: February 14, 2010, 08:10:38 PM »
Lines 327 to 330 in Game_Actor:
Code: [Select]
  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.

Offline MeVII

  • Awakened Visionist
  • **
  • Posts: 54
  • LV: 16
    • View Profile
Re: (RGPXP) Default Weapon / Animation
« Reply #4 on: February 15, 2010, 12:50:32 AM »
Hey thanks alot for the bit o info on default animation LilB!

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.

Code: [Select]
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

Offline Alton Wyte

  • Awakened Visionist
  • **
  • Posts: 66
  • LV: 0
  • Gender: Female
    • View Profile
Re: (RGPXP) Default Weapon / Animation
« Reply #5 on: March 13, 2010, 10:53:58 PM »
This should work too. Find
Code: [Select]
  def base_atk
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.atk : 0
  end
and replace the zero with the unarmed ATK value.

Offline MeVII

  • Awakened Visionist
  • **
  • Posts: 54
  • LV: 16
    • View Profile
Re: (RGPXP) Default Weapon / Animation
« Reply #6 on: March 13, 2010, 11:28:40 PM »
This should work too. Find
Code: [Select]
  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