Jump to content

Relationship Groups


FtDLulz

Recommended Posts

I've been working on and off on a callout plugin, and I've been stuck on relationship groups. How would you go about making a new relationship group and setting them to hate/like other groups? Also, is there a list of groups already in the game anywhere?

A relationship is automatically created when you add a ped in it, eg. 

angryDriver.RelationshipGroup = "ANGRYDRIVERS";
Game.SetRelationshipBetweenRelationshipGroups("ANGRYDRIVERS", "COP", Relationship.Hate);

This will create the RelationshipGroup "ANGRYDRIVERS", add the angryDriver ped in it, and set the group to hate "COP", that already exists in game, so the angryDriver will attack any nearby cop. You can check the other types of relationships here : http://docs.ragepluginhook.net/html/FBC57062.htm

As to the in-game relationship group, here's a list (found in common.rpf -> data) :

PLAYER
CIVMALE    
CIVFEMALE    
COP 
SECURITY_GUARD
PRIVATE_SECURITY
FIREMAN
GANG_1
GANG_2
GANG_9
GANG_10
AMBIENT_GANG_LOST
AMBIENT_GANG_MEXICAN
AMBIENT_GANG_FAMILY
AMBIENT_GANG_BALLAS
AMBIENT_GANG_MARABUNTE
AMBIENT_GANG_CULT
AMBIENT_GANG_SALVA
AMBIENT_GANG_WEICHENG
AMBIENT_GANG_HILLBILLY
DEALER
HATES_PLAYER
HEN
WILD_ANIMAL
SHARK
COUGAR
NO_RELATIONSHIP
SPECIAL
MISSION2
MISSION3
MISSION4
MISSION5
MISSION6
MISSION7
MISSION8
ARMY
GUARD_DOG
AGGRESSIVE_INVESTIGATE
MEDIC
CAT

Edited by DemNinjas
Link to comment
Share on other sites

  • 2 weeks later...

does anyone know what the difference between SECURITY_GUARD and PRIVATE_SECURITY is?

SECURITY_GUARD is self-explanatory (the guards you see around special places), PRIVATE_SECURITY is most likely Merryweather.

Edited by FtDLulz
Link to comment
Share on other sites

I'm getting some weird results when playing around with RelationshipGroups. I've noticed the following things:

  • RPH will give an empty string for custom RelationshipGroups when getting RelationshipGroup.Name on Ped.RelationshipGroup (it returns the correct value for premade relationship groups)
  • Contrary to what DemNinjas said, in my experience LSPDFR is not putting the player in the cop RelationshipGroup (bug with new game update?)[1]
  • Preexisting RelationshipGroup's relations cannot be modified

In my armored car robbery callout I tried switching my guards over to the SECURITY_GUARD relationship group and they will now start engaging the player. If I switch it back there are no problems. Tried doing some debugging and found the above results. Here's what I logged:
 

[10/1/2015 6:37:50 PM.070] LSPD First Response: SECURITY_GUARD
[10/1/2015 6:37:50 PM.096] LSPD First Response: g1|Rage.RelationshipGroup|SECURITY_GUARD
[10/1/2015 6:37:50 PM.096] LSPD First Response: g2|Rage.RelationshipGroup|SECURITY_GUARD
[10/1/2015 6:37:50 PM.096] LSPD First Response: p0|Rage.RelationshipGroup|PLAYER

and then with a custom RelationshipGroup:

[10/1/2015 6:35:05 PM.331] LSPD First Response: SECURITY
[10/1/2015 6:35:05 PM.340] LSPD First Response: g1|Rage.RelationshipGroup|
[10/1/2015 6:35:05 PM.340] LSPD First Response: g2|Rage.RelationshipGroup|
[10/1/2015 6:35:05 PM.341] LSPD First Response: p0|Rage.RelationshipGroup|PLAYER

 

I've tried two methods for giving the peds relationship groups:

RelationshipGroup g = new RelationshipGroup("SECURITY");
guard1.RelationshipGroup = "SECURITY";
guard2.RelationshipGroup = g;

Just leaving this here in case I am running into a unique bug that no one else is having or someone else ends up having a similar issue.

 

[1] I did some testing and it seems that it might be one way. When I just put "COP" in instead of the local player's relationship group, the player could not target/shoot the guards but they could shoot the player. This is similar to how when LSPDFR crashes/gets manually reloaded you cannot shoot the LSPD but they can shoot you. Not really sure how/why that is.

Link to comment
Share on other sites

I'm assuming you set the relationships between SECURITY and PLAYER (and COP)  to like? (it has to be done in both directions...i.e. SECURITY likes PLAYER, and PLAYER likes SECURITY) 

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
Share on other sites

I'm assuming you set the relationships between SECURITY and PLAYER (and COP)  to like? (it has to be done in both directions...i.e. SECURITY likes PLAYER, and PLAYER likes SECURITY) 

Yes, I set the relationship from security to player to companion and player -> security to like. CanAttackFriendlies (or whatever the property name is) is set to false. The only thing I change is SECURITY to SECURITY_GUARD and they become hostile.

Edited by goigle
Link to comment
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.



×
×
  • Create New...