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. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

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

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    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 IV 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 SA Mods
    10. GTA Vice City

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

      1. Guides & Strategies
      2. Help & Support
      3. GTA III 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

Brandeeno

A script disabling "Peds Ragdoll on pain".

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

Share this post


Link to post
Share on other sites
Hover_Mode

why would you wanna do such a thing?

 

You could try editing weapon velocity values

Share this post


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.

Share this post


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.

Share this post


Link to post
Share on other sites
Cadde

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

Share this post


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>

Share this post


Link to post
Share on other sites
Drkz

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

Share this post


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

Share this post


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?

Share this post


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

Share this post


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?

Share this post


Link to post
Share on other sites
alvarotf

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

Share this post


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;"?

Share this post


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

Share this post


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

Share this post


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)

Share this post


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

Share this post


Link to post
Share on other sites
Drkz

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.

Share this post


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.

Share this post


Link to post
Share on other sites
Drkz

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.

Share this post


Link to post
Share on other sites
alvarotf

Uploaded! File pending admin approval.

  • Like 1

Share this post


Link to post
Share on other sites
dramamia

The download for this mod is broken now

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.