Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
MrKlorox

[Q]Stun Punch re-enable?

Recommended Posts

MrKlorox

In Vlad's mission "Clean Getaway" where you have to steal then wash the Blista, you're taught how to stun punch (aka sucker punch) the owner of the car. You're supposed to approach an unsuspecting person then target them; doing so is supposed to change the white reticule into a red dot, enabling you to knock the person out cold with your next punch. Trying to do this anywhere else in the game doesn't seem to work (however you can occasionally luck into a face-shot that ends up doing the trick), and the reticule doesn't change, no matter how unsuspecting your victim is.

 

I'm wanting to restore the functionality of this move for the entire game, exactly as it was in the mission. The tutorial text makes it seem like it is a move that would be available for the rest of the game.

 

 

This video shows the punch very well, but doesn't show the target reticule change, nor does it show the tutorial text in the corner. But it should be enough to present what I mean.

Edited by MrKlorox

Share this post


Link to post
Share on other sites
jjcoolj91

probably thats becuase it was recorded with IV's ingame replay feature and not Fraps, I suggest you either try to look for a vid of the mission recorded in FRAPS or to play the mission again

Share this post


Link to post
Share on other sites
MrKlorox

You seem to have completely missed the point.

 

I don't care what the video looks like. I chose this one because most on youtube completely bypass the punch or provide a horrible view.

Share this post


Link to post
Share on other sites
Leopard_

Interesting. Might be able to do, if i look into the mission code.

Share this post


Link to post
Share on other sites
Symbiote

I was looking through the game's natives when I saw these:

 

SET_CHAR_READY_TO_BE_EXECUTED

SET_CHAR_READY_TO_BE_STUNNED

 

They seem to let you perform those special execution/stun moves where the reticule changes. I don't know what to do with them, but maybe someone can look into them.

Share this post


Link to post
Share on other sites
mirmihir

ya that wud be cool!

pls make a mod

Share this post


Link to post
Share on other sites
spaceeinstein

The instruction was

 

You can surprise some enemies with a stun punch. This will knock them to the floor instantly. Stun punches can not be performed while in combat.

 

To perform a stun punch lock onto an enemy and approach them unarmed. When close enough the target reticule will change then press (MELEE HIT) to perform the move.

So it really does seem to be mission specific. There doesn't seem to be much missions with that native.

Edited by spaceeinstein

Share this post


Link to post
Share on other sites
MrKlorox

But the exact wording makes it seem like it would be available universally throughout the game. Using "an enemy" instead of specifically denoting the one singular dude and clarifying that it cannot work when engaged in combat is just counter-intuitive. It might've been taken out of the general sandbox play because it caused issues with other mission perhaps?

 

In vlad3.sco of scripts.img there is this:

 

 

function sub_272a(var0){  auto var3, var4;  var3 = 0;  if (!IS_CHAR_INJURED(*(var0)))  {      if (GET_CHAR_READY_TO_BE_STUNNED(*(var0)))      {          if (HAVE_ANIMS_LOADED("melee_unarmed_base"))          {              if (IS_PED_IN_COMBAT(*(var0)) && (!IS_CHAR_PLAYING_ANIM(sub_fc9(), "melee_unarmed_base", "stun_punch")))              {                  var3 = 1;              }              if (IS_CHAR_IN_MELEE_COMBAT(*(var0)) && (!IS_CHAR_PLAYING_ANIM(sub_fc9(), "melee_unarmed_base", "stun_punch")))              {                  var3 = 1;              }          }          if (IS_PLAYER_TARGETTING_CHAR(sub_126f(), *(var0)) && IS_CHAR_ARMED(*(var0), 4))          {              var3 = 1;          }          if (IS_PLAYER_FREE_AIMING_AT_CHAR(sub_126f(), *(var0)) && IS_CHAR_ARMED(*(var0), 4))          {              var3 = 1;          }          if (HAS_CHAR_BEEN_DAMAGED_BY_CHAR(*(var0), sub_fc9(), 0))          {              var3 = 1;          }      }  }  if (var3)  {      if (!IS_CHAR_INJURED(*(var0)))      {          SET_CHAR_READY_TO_BE_STUNNED(*(var0), 0);          return 1;      }  }  return 0;}

 

 

Perhaps somebody who knows what they're doing can figure something out.

 

Is it possible to set a variation of this to run every time Niko targets a pedestrian?

Edited by MrKlorox

Share this post


Link to post
Share on other sites
Leopard_

Hmm, looks like i've made it. But the guy doens't die directly, gotta fix that.

 

Leopard

Share this post


Link to post
Share on other sites
MrKlorox

Excellent! Well there is this right before the previous code I posted located in vlad3.sco

 

 

void sub_2506(var0){  auto var3, var4, var5;  if ((!IS_CHAR_INJURED(*(var0))) && (!IS_CHAR_INJURED(sub_fc9())))  {      if (GET_CHAR_MELEE_ACTION_FLAG1(*(var0)))      {          SET_CHAR_MELEE_ACTION_FLAG1(*(var0), 0);          SET_CHAR_READY_TO_BE_STUNNED(*(var0), 0);          var3 = 0;          while (var3 <= 1)          {              if (L[489][var3] == null)              {                  L[489][var3] = *(var0);              }              var3 = var3 + 1;          }          SETTIMERA(0);      }      var3 = 0;      while (var3 <= 1)      {          if (!(L[489][var3] == null))          {              if (!IS_CHAR_INJURED(L[489][var3]))              {                  if (TIMERA() > 200)                  {                      TRIGGER_PTFX_ON_PED_BONE("blood_stun_punch", L[489][var3], 0.0f, 0.13f, 0.0f, 0.0f, 0.0f, 0.0f, 1205, (float)1);                      SET_CHAR_HEALTH(L[489][var3], 99);                      L[489][var3] = null;                  }                  if (IS_CHAR_PLAYING_ANIM(L[489][var3], "MELEE_UNARMED_BASE", "Hit_Jab"))                  {                      GET_CHAR_ANIM_CURRENT_TIME(L[489][var3], "MELEE_UNARMED_BASE", "Hit_Jab", &var4);                      if (var4 > 0.1f)                      {                          TRIGGER_PTFX_ON_PED_BONE("blood_stun_punch", L[489][var3], 0.0f, 0.13f, 0.0f, 0.0f, 0.0f, 0.0f, 1205, (float)1);                          SET_CHAR_HEALTH(L[489][var3], 99);                          L[489][var3] = null;                      }                  }              }              else              {                  L[489][var3] = null;              }          }          var3 = var3 + 1;      }  }  sub_272a(var0);}

 

 

 

The SET_CHAR_HEALTH part looks promising.

Share this post


Link to post
Share on other sites
Leopard_

That looks totally awesum. I'll try doing that tomorrow.

 

Leopard

Share this post


Link to post
Share on other sites
MrKlorox

So Leopard, did you get it working? I'm sure there are quite a few curious people.

Share this post


Link to post
Share on other sites
Leopard_

It's going good. I enabled stun punch, now you can do stun punch with all the closest people. But i can't lower the health of the stun punched player. Will get an workaround.

 

I'll be posting this tonight.

 

EDIT: Ok, i've made it. Just go onto a pedestrian that is walking, standing (not fighting). When you see the red symbol, press fire key. You will then do a stun punch and hopefully make the pedestrian faint.

 

http://gta4pc.co.uk/forum/index.php?topic=15.0

 

Please download there as i want to track the downloads tounge.gif

 

Leopard

Edited by Leopard_

Share this post


Link to post
Share on other sites
a-k-t-w

ARGH! The link is broken! user posted image

Share this post


Link to post
Share on other sites
Leopard_

 

ARGH! The link is broken! user posted image

Yeah sorry. For the sake of you and all others, i'll just upload on my dad's company website.

 

StunPunch.asi

 

Website gonna be restored tomorrow.

 

Leopard

Share this post


Link to post
Share on other sites
MrKlorox

Can't seem to get it to work. It acts like there's no script installed. No red dot, just the regular targeting reticule. The log file says this:

 

 

Log start: Fri Mar 06 04:10:25 2009-----------------------------------------------[iNFO] GTA IV Script Hook 0.2.3 - © 2009, Aru - Initialized[iNFO] Process base address: 0x3c0000[iNFO] Auto detecting game version[iNFO] Using game version 1.0.2[iNFO] ScriptHookController - Host[iNFO] [scriptHookWatchThread] Thread started[iNFO] [scriptHookWatchThread] Thread reset[iNFO] [CustomThread] Thread started[iNFO] [CustomThread] Thread reset[iNFO] MELLE_UNARMED_BASE Loaded.[iNFO] !IsCharInjured<repeated 200 times> [iNFO] !IsCharInjured[iNFO] [scriptHookWatchThread] Thread killed[iNFO] [CustomThread] Thread killed[iNFO] Script Hook - Shutdown

 

 

Upon opening the asi file in notepad, and searching for the word "stun" I find the path and file "e:\Program Files\Rockstar Games\Grand Theft Auto IV\StunPunch.pdb" listed. My GTA4 isn't installed here, nor do I have this file. Could this be my problem?

Edited by MrKlorox

Share this post


Link to post
Share on other sites
Leopard_

Hmm, it should work alright. Try redownload the new version.

 

Leopard

Share this post


Link to post
Share on other sites
MrKlorox

Okay. Last time I downloaded from the alternate direct link. This time I signed up for your forum and downloaded it. This mod is very close to completion with just a few issues.

 

Now if I target an unsuspecting victim, a red dot will appear when in range. If I attack, the correct animation plays and the target's physics react but no health is taken away. Then once they're back on their feet ready to react, they die and fly at a higher velocity than my punch provided directly north, regardless of what angle I punched them from.

 

Also I'm not seeing the blood_stun_punch blood effect.

Share this post


Link to post
Share on other sites
Nikkola bellic,Belgrade,Serbia
Okay. Last time I downloaded from the alternate direct link. This time I signed up for your forum and downloaded it. This mod is very close to completion with just a few issues.

 

Now if I target an unsuspecting victim, a red dot will appear when in range. If I attack, the correct animation plays and the target's physics react but no health is taken away. Then once they're back on their feet ready to react, they die and fly at a higher velocity than my punch provided directly north, regardless of what angle I punched them from.

 

Also I'm not seeing the blood_stun_punch blood effect.

Cool i tried to do it after that Vlad mission and was WTF I cant

Share this post


Link to post
Share on other sites
buzbegone

Started working but after my first punch which went unsuccessful, it ceased altogether

Share this post


Link to post
Share on other sites
MrKlorox
Started working but after my first punch which went unsuccessful, it ceased altogether

You have to try it on peds that haven't seen you act crazy or hit people, or are otherwise _COMPLETELY_ unsuspecting.

Share this post


Link to post
Share on other sites
buzbegone
You have to try it on peds that haven't seen you act crazy or hit people, or are otherwise _COMPLETELY_ unsuspecting.

Yeah, I know but still to no avail

Share this post


Link to post
Share on other sites
frost156

i have the same problem too -_-

 

i can execute a stun attack sometimes on peds but they don't go limp or lose any health. they just go about their own business afterwards.

 

actually, i found out what the problem was.

 

this mod conflicts with the violent city mod (the one which uses the peds.ide and pedpersonality.xml file to alter the peds so they shoot back at you) in the sense that if you pull off a stun punch, the peds won't collapse.

 

unfortunately, even if you take out the mod, the punch works less than 50% of the time.

Edited by frost156

Share this post


Link to post
Share on other sites
buzbegone

But still, a work in progress

Share this post


Link to post
Share on other sites
FatAssCartman

100% working stun_punch mod

 

 

Set nikos MeleeMartialLevelPercent to 100 in pedpersonality.dat

 

Open action_table.xls in excel

 

Tab On Foot Results

line 20 stun_punch_A_Res

 

OnHitDamage

20 (20 isn’t always killing Ai)

 

 

Tab On Foot Actions

line 12 stun_punch_A_Act

 

RequireTarget

None

 

RequireLockOn (not necessary but will replace “jab” and will not require the red dot and is lame)

None

 

 

SpecialTest

None

 

 

DistanceRange

0.0 : 5.0 (not necessary but makes it easier to make a stun_punch while running)

 

 

 

Export to csv (action_table.csv)

 

 

a , is not allowed as a decimal separator and must be replaced in the entire document

 

 

Ai don't need to be unsuspecting

Do not require StunPunch.asi or any other modification.

This will only work while nikos arms are down (not in fighting position)

 

To fix this duplicate the line stun_punch_A_Act in tab On Foot Actions

 

Type

Melee

 

AIPlayerfilter

All (not necessary but will allow the AI to make a stun_punch. but it requires MeleeMartialLevelPercent is set to 100 for Ai)

 

 

 

 

 

 

ObjectDamageMult is the amount of damage on objects and vehicles

In taskParams.txt it is possible to make ai fly when hit by meele or bullet

Edited by FatAssCartman

Share this post


Link to post
Share on other sites
MrKlorox

Thanks, but that's not really what I had in mind. We seem to be on the right track already with just a little tweaking to go.

 

I don't want to change any data files, plus it needs to act like in the mission where they aren't expecting to be hit. That's what a sucker-punch actually is after all.

 

An asi file or .net script you can just drop in to enable is the best option.

Share this post


Link to post
Share on other sites
Leopard_

Good news, i finally fixed it - the person will faint when you hit him/her. Going to release with an execution mod too.

 

EDIT: Preview video:

 

Leopard

Edited by Leopard_

Share this post


Link to post
Share on other sites
MrKlorox

The video looks pretty great! However your forum (where the only download resides) seems to be down. Could we get a public link?

Share this post


Link to post
Share on other sites
Leopard_
The video looks pretty great! However your forum (where the only download resides) seems to be down. Could we get a public link?

I ain't updated, but i'll upload on my dad's company webhost tomorrow or so. And it isn't finished.

 

Leopard

Share this post


Link to post
Share on other sites
Leopard_

Sorry for doubleposting, but i've updated it.

 

http://viking-pizzeria.se/IV/StunExecution.asi

 

Put in GTA IV's root folder. Press Y ingame to enable stun punch on nearest ped, press U for an execution (it might not work).

 

Leopard

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • 1 User Currently Viewing
    0 Members, 0 Anonymous, 1 Guest

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.