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

    1. GTANet.com

    1. GTA Online

      1. The Cayo Perico Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA VI

      1. St. Andrews Cathedral
    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    7. GTA III

      1. Guides & Strategies
      2. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    1. Announcements

    2. Support

    3. Suggestions

A script disabling "Peds Ragdoll on pain".


Brandeeno

Recommended Posts

Brandeeno

I know This should be in the "Request section" but rarely anyone goes in that topic to see what they should make. so I tried for several hours on how to make the script from scratch, but I can't do it. I have a fairly good understanding of scripts, I can edit already made scripts, I can also change them to a certain degree. but when it comes to making my own script from scratch, I have no idea how. I think the problem is, I started with editing scripts rather than figuring out how to even make them. I have spent several days asking for help from different places, checking different peoples scripts, searching if someone already made it.

 

to my point.

 

This is the last thing I would want to do, and I hate asking this question because it's so needy, (although this is the first time I have come to this point to have to ask this question)

 

Would someone be willing to create a LUA script for me (obviously for GTA V) that disables ragdoll on all npc's when I shoot them, so it would be like shooting any other player (they don't ragdoll when shot, only from an explosion or getting hit by a car). If someone were to do this for me, I wouldn't just throw the script in and jump in the game, I would examine the script and learn from it. I also wouldn't post it anywhere, it would be for personal use (unless of course you upload it yourself)

  • Like 1
Link to post
Share on other sites
Hover_Mode

why would you wanna do such a thing?

 

You could try editing weapon velocity values

Link to post
Share on other sites
Brandeeno

why would you wanna do such a thing?

 

You could try editing weapon velocity values

I tried editing the weapons file, and I changed all the force to 0, and on peds, on the head, neck, thigh, and calves. nope, they still drop like flies.

 

the reason why I would like to have this kind of script, is because I have a mod called riot mode. I'm sure you've heard of it, I like running around downtown los santos and having an open world, free for all, battle ground type of thing. but I found it way too easy, as soon as you shoot them with any gun, they ragdoll. no matter what, and It bugs me, it's so boring killing multiple people like nothing. I would like the npc's to be on-par with me. that's why if I disable ragdoll on pain for npcs, it will be a lot more engaging. it's boring when I always have the advantage.

Link to post
Share on other sites
Hover_Mode

 

why would you wanna do such a thing?

 

You could try editing weapon velocity values

I tried editing the weapons file, and I changed all the force to 0, and on peds, on the head, neck, thigh, and calves. nope, they still drop like flies.

 

the reason why I would like to have this kind of script, is because I have a mod called riot mode. I'm sure you've heard of it, I like running around downtown los santos and having an open world, free for all, battle ground type of thing. but I found it way too easy, as soon as you shoot them with any gun, they ragdoll. no matter what, and It bugs me, it's so boring killing multiple people like nothing. I would like the npc's to be on-par with me. that's why if I disable ragdoll on pain for npcs, it will be a lot more engaging. it's boring when I always have the advantage.

 

 

Oh I see and agreed, I hate how the peds just drop too. I would suggest changing the Player instead of the AI though.

Through Ragdoll by Pain(for Player) and lower health(equal to a ped's health). Thats my favorite way to play btw.

 

but regaurding peds dropping, look into the naturalmotion/behaviours.xml file

it has items pertaining to how peds react to gun shots.

Link to post
Share on other sites

hover_mode, isn't those behaviours about how peds react to gunfire (seen or heard) and not about getting hit though?

Link to post
Share on other sites
Hover_Mode

hover_mode, isn't those behaviours about how peds react to gunfire (seen or heard) and not about getting hit though?

No, it has settings for the Rage engine. I'm just now really looking into this and its pretty interesting the number of settings there are.

here are some random bits from the file

 

here

 

<description>configureShotInjuredArm: This single message allows you to configure the injured arm reaction during shot</description>

<params>

 

 

<Item type="rage__NMParam">

<name>shockSpinScaleByLeverArm</name>

<type>bool</type>

<init>true</init>

<description>shock spin scales by lever arm of bullet i.e. bullet impact point to centre line</description>

 

<Item type="rage__NMParam">

<name>ftkFallBelowStab</name>

<type>float</type>

<init>0.50</init>

<min value="0.00"/>

<max value="15.00"/>

<description>Balancer instability below which the character starts to bend legs even if it isn't going to fall on to it's knees (i.e. if going backwards). 0.3 almost ensures a fall to knees but means the character will keep stepping backward until it slows down enough.</description>

Link to post
Share on other sites

Just FYI, i tried to modify this file for days (naturalmotion/behaviours.xml) yet nothing is applied ingame.

 

Don't waste your time.

Edited by Drkz
Link to post
Share on other sites
Brandeeno

Just FYI, i tried to modify this file for days (naturalmotion/behaviours.xml) yet nothing is applied ingame.

 

 

 

I noticed that too, I edit some files, rebuild it and nothing is different. why does this happen? does anyone know?

Edited by Brandeeno
Link to post
Share on other sites
Brandeeno

 

hover_mode, isn't those behaviours about how peds react to gunfire (seen or heard) and not about getting hit though?

No, it has settings for the Rage engine. I'm just now really looking into this and its pretty interesting the number of settings there are.

here are some random bits from the file

 

here

<description>configureShotInjuredArm: This single message allows you to configure the injured arm reaction during shot</description>

<params>

 

<Item type="rage__NMParam">

<name>shockSpinScaleByLeverArm</name>

<type>bool</type>

<init>true</init>

<description>shock spin scales by lever arm of bullet i.e. bullet impact point to centre line</description>

<Item type="rage__NMParam">

<name>ftkFallBelowStab</name>

<type>float</type>

<init>0.50</init>

<min value="0.00"/>

<max value="15.00"/>

<description>Balancer instability below which the character starts to bend legs even if it isn't going to fall on to it's knees (i.e. if going backwards). 0.3 almost ensures a fall to knees but means the character will keep stepping backward until it slows down enough.</description>

 

Bump, I edited all the lines related to what you said, saved it, rebuilt it, and went in-game and the peds still ragdoll. Is there a lua script I could use that disables ragdoll?

Link to post
Share on other sites
alvarotf

Hi, i ve just found that with ScriptHookV Dot Net you can simply do this:

ped.CanRagdoll = false;

And that ped won't ragdoll anymore. Hope this helps

Link to post
Share on other sites
Brandeeno

Hi, i ve just found that with ScriptHookV Dot Net you can simply do this:

ped.CanRagdoll = false;

And that ped won't ragdoll anymore. Hope this helps

Is that in a lua script, cs script or asi script?

Link to post
Share on other sites
Brandeeno

Cs, you cant make asi with script hook v .net version I think

I don't know cs very well, how would I make a script with just "ped.CanRagdoll = false;"?

Link to post
Share on other sites
Hover_Mode

 

 

hover_mode, isn't those behaviours about how peds react to gunfire (seen or heard) and not about getting hit though?

 

here

<description>configureShotInjuredArm: This single message allows you to configure the injured arm reaction during shot</description>

<params>

 

<Item type="rage__NMParam">

<name>shockSpinScaleByLeverArm</name>

<type>bool</type>

<init>true</init>

<description>shock spin scales by lever arm of bullet i.e. bullet impact point to centre line</description>

<Item type="rage__NMParam">

<name>ftkFallBelowStab</name>

<type>float</type>

<init>0.50</init>

<min value="0.00"/>

<max value="15.00"/>

<description>Balancer instability below which the character starts to bend legs even if it isn't going to fall on to it's knees (i.e. if going backwards). 0.3 almost ensures a fall to knees but means the character will keep stepping backward until it slows down enough.</description>

 

Bump, I edited all the lines related to what you said, saved it, rebuilt it, and went in-game and the peds still ragdoll. Is there a lua script I could use that disables ragdoll?

 

 

I wasnt saying change those exact items, I was just showing you that they related to gun shot reactions.

 

What happens if you delete some items?

 

Hi, i ve just found that with ScriptHookV Dot Net you can simply do this:

ped.CanRagdoll = false;
And that ped won't ragdoll anymore. Hope this helps

 

can this be used for the player for a ragdoll by pain mod?

Edited by Hover_Mode
Link to post
Share on other sites
alvarotf

 

Cs, you cant make asi with script hook v .net version I think

I don't know cs very well, how would I make a script with just "ped.CanRagdoll = false;"?

 

 

 

Ok, I ve made a script for you.

 

Here is the code:

using System;using System.Collections.Generic;using System.Windows.Forms;using System.Drawing;using GTA;using GTA.Native;public class GTAScript : Script{    float MAXDIST = 60.0f; //Max distance to process    Keys AKEY = Keys.NumPad0; //Activation key Can change it to Keys.F7 for example        Ped player;    Boolean on = false;    Ped[] nearPeds;       public GTAScript()    {        Tick += OnTick;        KeyDown += OnKeyDown;        KeyUp += OnKeyUp;        Interval = 100;            }    private void OnTick(object sender, EventArgs e)    {        player = Game.Player.Character;        //Peds that are near player. I use player.ForwardVector as a length unit.        nearPeds = World.GetNearbyPeds(player, player.ForwardVector.Length() * MAXDIST);        if (on)        {            foreach (Ped p in nearPeds)            {                p.CanRagdoll = false;            }        }        else        {            foreach (Ped p in nearPeds)            {                p.CanRagdoll = true;            }        }    }    private void OnKeyDown(object sender, KeyEventArgs e)    {    }    private void OnKeyUp(object sender, KeyEventArgs e)    {        if (e.KeyCode == AKEY)        {                             if (!on)          {                            player = Game.Player.Character;              on = true;              UI.ShowSubtitle("No Ragdoll: ON");          }          else          {              on = false;              UI.ShowSubtitle("No Ragdoll: OFF");          }        }            }    }

Put this in a cs file or download it here:

https://drive.google.com/file/d/0B9PGSulWVUEDVjRlanY4S2k0SUk/view?usp=sharing

Put this file in scripts folder inside GTA folder. When in game press Numpad 0 to activate it.

 

You will need ScriptHookV .Net. (Follow the instructions in this post to install it).

If you want to learn how to make your own scripts I recommend you to watch this

.

It's all. Hope you enjoy it.


 

 

 

hover_mode, isn't those behaviours about how peds react to gunfire (seen or heard) and not about getting hit though?



here

<description>configureShotInjuredArm: This single message allows you to configure the injured arm reaction during shot</description>
<params>



<Item type="rage__NMParam">
<name>shockSpinScaleByLeverArm</name>
<type>bool</type>
<init>true</init>
<description>shock spin scales by lever arm of bullet i.e. bullet impact point to centre line</description>


<Item type="rage__NMParam">
<name>ftkFallBelowStab</name>
<type>float</type>
<init>0.50</init>
<min value="0.00"/>
<max value="15.00"/>
<description>Balancer instability below which the character starts to bend legs even if it isn't going to fall on to it's knees (i.e. if going backwards). 0.3 almost ensures a fall to knees but means the character will keep stepping backward until it slows down enough.</description>

 

Bump, I edited all the lines related to what you said, saved it, rebuilt it, and went in-game and the peds still ragdoll. Is there a lua script I could use that disables ragdoll?

 



I wasnt saying change those exact items, I was just showing you that they related to gun shot reactions.

What happens if you delete some items?

Hi, i ve just found that with ScriptHookV Dot Net you can simply do this:

ped.CanRagdoll = false;
And that ped won't ragdoll anymore. Hope this helps

 


can this be used for the player for a ragdoll by pain mod?

 

 

I dont think so. But It exist already a mod that can do it: https://www.gta5-mods.com/scripts/ragdoll-by-pain

Edited by alvarotf
  • Like 1
Link to post
Share on other sites
Brandeeno

 

 

Cs, you cant make asi with script hook v .net version I think

I don't know cs very well, how would I make a script with just "ped.CanRagdoll = false;"?

 

 

 

Ok, I ve made a script for you.

 

Here is the code:

using System;using System.Collections.Generic;using System.Windows.Forms;using System.Drawing;using GTA;using GTA.Native;public class GTAScript : Script{    float MAXDIST = 60.0f; //Max distance to process    Keys AKEY = Keys.NumPad0; //Activation key Can change it to Keys.F7 for example        Ped player;    Boolean on = false;    Ped[] nearPeds;       public GTAScript()    {        Tick += OnTick;        KeyDown += OnKeyDown;        KeyUp += OnKeyUp;        Interval = 100;            }    private void OnTick(object sender, EventArgs e)    {        player = Game.Player.Character;        //Peds that are near player. I use player.ForwardVector as a length unit.        nearPeds = World.GetNearbyPeds(player, player.ForwardVector.Length() * MAXDIST);        if (on)        {            foreach (Ped p in nearPeds)            {                p.CanRagdoll = false;            }        }        else        {            foreach (Ped p in nearPeds)            {                p.CanRagdoll = true;            }        }    }    private void OnKeyDown(object sender, KeyEventArgs e)    {    }    private void OnKeyUp(object sender, KeyEventArgs e)    {        if (e.KeyCode == AKEY)        {                             if (!on)          {                            player = Game.Player.Character;              on = true;              UI.ShowSubtitle("No Ragdoll: ON");          }          else          {              on = false;              UI.ShowSubtitle("No Ragdoll: OFF");          }        }            }    }

Put this in a cs file or download it here:

https://drive.google.com/file/d/0B9PGSulWVUEDVjRlanY4S2k0SUk/view?usp=sharing

Put this file in scripts folder inside GTA folder. When in game press Numpad 0 to activate it.

 

You will need ScriptHookV .Net. (Follow the instructions in this post to install it).

If you want to learn how to make your own scripts I recommend you to watch this

.

It's all. Hope you enjoy it.

 

Thank you very much, I very much appreciate the script you made! This will give me an idea of what I could've done, and it will make a great addition to my mod collection. Again, Thank you! (Don't worry, I won't post it anywhere)

Link to post
Share on other sites
alvarotf

No problem! Feel free to post it if you want!

If we all share our knowlegde modding community will be way better

  • Like 1
Link to post
Share on other sites

I would be interested to know the results of your experiments, so don't forget to tell us what happened once you ran the script.

Link to post
Share on other sites
alvarotf

I ve already tested the script. When it is activated peds don't fall to ground when you shoot them. They only fall when are killed but not when they receive a shoot that keeps them alive.

Link to post
Share on other sites

I ve already tested the script. When it is activated peds don't fall to ground when you shoot them. They only fall when are killed but not when they receive a shoot that keeps them alive.

 

Amazing. You should compile it and release it properly on GTA5-MODS, i'm sure a lot of people would appreciate your work.

Link to post
Share on other sites
  • 4 years later...

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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