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

    2. News

    1. Red Dead Redemption 2

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

      1. Gameplay
    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

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

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. 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. Forum Support

    2. Site Suggestions

Sign in to follow this  
Jeansowaty

Making gangs hate each other?

Recommended Posts

Jeansowaty

I tried adding certain gangs into one area. As I knew, to make them start shooting I would need to fire a gun by myself. So did I, but instead most gangsters ran away. Now my question is, how can I make the gangs hate each other and attack themselves on sight? Other optional questions, how can I make them more aggresive, and how can I change their weapons?


(talking about GTA4)

Edited by Jeansowaty

Share this post


Link to post
Share on other sites
byteMe420

if their relationship group is one of the gangs then you can set relationship to hate them... shdn has methods for it or in c++ you have to call the correct natives but the ped needs to be one of the gang rel groups and you set reltionship with other gangs as hate

 

c# using shdn...

ped.RelationshipGroup = RelationshipGroup.Gang_XXXXX;//this is not necessary if you are spawning a gangster ped as their relationshipgroup is set by defaultped.ChangeRealtionship(RelationshipGroup.Gang_YYYYY, Relationship.Hate);

gangsters will attack each other on sight with above code... this works if you are spawning a gang ped type already.... not sure if this works with regualr peds.

Edited by byteMe420

Share this post


Link to post
Share on other sites
Jeansowaty

Thanks, however, I'm looking for normal gangsters to war with each other, not spawned ones. Thanks for the help however.

Share this post


Link to post
Share on other sites
Mordecki
NATIVE_SET_RELATIONSHIPSetRelationship(1, 17, 3);
0 PLAYER1 CIVMALE2 CIVFEMALE3 COP4 GANG_ALBANIAN5 GANG_BIKER_16 GANG_BIKER_27 GANG_ITALIAN8 GANG_RUSSIAN9 GANG_RUSSIAN_210 GANG_IRISH11 GANG_JAMAICAN12 GANG_AFRICAN_AMERICAN13 GANG_KOREAN14 GANG_CHINESE_JAPANESE15 GANG_PUERTO_RICAN16 DEALER17 MEDIC18 FIREMAN19 CRIMINAL20 BUM21 PROSTITUTE22 SPECIAL23-30 MISSION(1-8)31-62 NETWORK_PLAYER_(1-32)62-69 NETWORK_TEAM_(1-8)

Should set relationships between ped groups.

But like byteMe420 said, they need to be in the relation ship group.

 

You can check out parameters of this native here:

http://www.gtamodding.com/wiki/SET_RELATIONSHIP

Edited by MOrdecki

Share this post


Link to post
Share on other sites
Jeansowaty

Thanks for the help, I think it will help. One question (I'm a noob at IV scripting, plz no teasing): as far as I know, writing up that script in Notepad, and saving it as a .cs will do the job, yes?

Edited by Jeansowaty

Share this post


Link to post
Share on other sites
Mordecki

Thanks for the help, I think it will help. One question (I'm a noob at IV scripting, plz no teasing): as far as I know, writing up that script in Notepad, and saving it as a .cs will do the job, yes?

 

Well, hell no.

You need at least Visual Studio or other C++ editor to make an .ASI mod with Scripthook.

I'm not sure if you can do that in Alice, then you could perform this with notepad but i have never payed attention how Alice scripting looks like so i can't help you with that case.

Edited by MOrdecki

Share this post


Link to post
Share on other sites
InfamousSabre

Thanks for the help, I think it will help. One question (I'm a noob at IV scripting, plz no teasing): as far as I know, writing up that script in Notepad, and saving it as a .cs will do the job, yes?

Yes, you can write a .cs (C#) script in notepad. As long as it is properly written it will work fine, but trust me, you're way better off with an IDE like VisualStudio or SharpDevelop

Edited by InfamousSabre

Share this post


Link to post
Share on other sites
Jeansowaty

Thanks for all the help. Now I need an example script which would make two gangs hate each other, it doesn't matter which ones... :sly:

Share this post


Link to post
Share on other sites
Mordecki

 

Thanks for the help, I think it will help. One question (I'm a noob at IV scripting, plz no teasing): as far as I know, writing up that script in Notepad, and saving it as a .cs will do the job, yes?

Yes, you can write a .cs (C#) script in notepad. As long as it is properly written it will work fine, but trust me, you're way better off with an IDE like VisualStudio or SharpDevelop

 

 

So he doesn't need to compile those script ?

Or is .cs actually Alice script ?

Share this post


Link to post
Share on other sites
InfamousSabre

 

Yes, you can write a .cs (C#) script in notepad. As long as it is properly written it will work fine, but trust me, you're way better off with an IDE like VisualStudio or SharpDevelop

 

 

So he doesn't need to compile those script ?

Or is .cs actually Alice script ?

 

Nope.

Thanks for all the help. Now I need an example script which would make two gangs hate each other, it doesn't matter which ones... :sly:

Take a look at the shdn documentation while you're at it.

Grand Theft Auto IV\scripts\for Developers\TestScriptCS\GTA IV ScriptHook.Net Documentation.chm

Edited by InfamousSabre

Share this post


Link to post
Share on other sites
byteMe420

Thanks, however, I'm looking for normal gangsters to war with each other, not spawned ones. Thanks for the help however.

not sure what you mean... all peds are spawned by the game or yourself... the whole point is to make them hate other gangs

Share this post


Link to post
Share on other sites
Jeansowaty

What I mean is, I want to make it like in the 3D Universe GTA Games. In IV, gang peds that appear close to each other just walk by and do nothing, while in, for example GTA San Andreas, they would walk up to each other and start fist-fighting or gun-battling.

Share this post


Link to post
Share on other sites
NTAuthority

What I mean is, I want to make it like in the 3D Universe GTA Games. In IV, gang peds that appear close to each other just walk by and do nothing, while in, for example GTA San Andreas, they would walk up to each other and start fist-fighting or gun-battling.

gangs already hate each other by default, you'll have to edit the decision maker files they get assigned. these are mostly undocumented, however event IDs are the same as in SA, just task IDs are different...

Edited by NTAuthority

Share this post


Link to post
Share on other sites
InfamousSabre

Though, it seems GTA IV has more events than SA. Quite a few task IDs are shared also, but again it seems there are many in IV that are not in SA. Decision makers are awesome but there is a limit to the number of them that can exist at once, so they need to be disposed of when you're done with them.

Share this post


Link to post
Share on other sites
NTAuthority

Though, it seems GTA IV has more events than SA.

Correct, which is especially annoying when one'd want to customize combat event responses in combat decision makers for one. :)

 

 

Quite a few task IDs are shared also, but again it seems there are many in IV that are not in SA.

Hm, didn't notice that yet - it might be I was thinking of script command IDs for GET_SCRIPT_TASK_STATUS.

 

 

Decision makers are awesome but there is a limit to the number of them that can exist at once, so they need to be disposed of when you're done with them.

In this case I'd assume the easiest way is to simply replace the GangMbr.ped decision maker preset in the game files, mainly as it wouldn't require any direct scripting. In addition, this one seems inaccessible from regular script, as script can only use m_*.ped as preset. Edited by NTAuthority

Share this post


Link to post
Share on other sites
byteMe420

 

What I mean is, I want to make it like in the 3D Universe GTA Games. In IV, gang peds that appear close to each other just walk by and do nothing, while in, for example GTA San Andreas, they would walk up to each other and start fist-fighting or gun-battling.

gangs already hate each other by default, you'll have to edit the decision maker files they get assigned. these are mostly undocumented, however event IDs are the same as in SA, just task IDs are different...

 

 

no i dont think so or some enums are named differently in the scripthookdotnet because unless you do... ped.ChangeRel;ationship(thegang, Relationship.Hate) they wont do anything. Hazardx may have made up his own names but if he is using scripthookdotnet then calling that will trigger a fight when the gang sees another gang. Ive written scripts to do this so i know from experience.

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.