WOW thank you this is incredibly helpful.
Is it possible to reload the replaced textures without restarting the game?
WOW thank you this is incredibly helpful.
Is it possible to reload the replaced textures without restarting the game?
I've done it successfully, but I want a better way to locate the billboards. As of now I have to guess and brute force check a bunch of files in OpenIV. I would love a tool that allowed me to see the name of the texture in-game. I found something called Map Info Tool that is meant to do this, but it does not work (likely too old).
https://www.gta5-mods.com/scripts/map-info-tool
Any ideas? Is there a C# function I can call that will return the texture as a string in-game? Something like this? Or a better way to find the textures than a fair amount of guess work?
I have a simple loop that spawns many peds and then tasks them to fight the player. Problem is, a few of them do at first but then virtually none of the peds I spawn when I keep hitting the key will attack the player.
Any ideas?
for (int i = 0; i < 5; i++)
{
Vector3 spawn_location = player.Position + player.ForwardVector * -5f;
Ped ped = GTA.World.CreatePed(PedHash.Business01AMY, spawn_location);
ped.Weapons.Give(WeaponHash.Bat, 999, true, true);
ped.Task.ClearAllImmediately();
GTA.Native.Function.Call(GTA.Native.Hash.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS, ped, 1);
GTA.Native.Function.Call(GTA.Native.Hash.SET_PED_FLEE_ATTRIBUTES, ped, 0, 0);
GTA.Native.Function.Call(GTA.Native.Hash.SET_PED_COMBAT_ATTRIBUTES, ped, 46, 1);
// make them fight
ped.Task.AimAt(player, 1);
ped.Task.FightAgainst(player);
}
@Aurora11 This is what I suspected. It is interesting that the police in GTA have a hard coded, immutable relationship. This seems to be similar to the way police are in the real world. Even if one of them does something wrong, the others will not fight him.
So you mean to say that I will have to create a new model for a police officer, and then use something like AddonPeds to load it into the game, yes?
Thank you for your help
Right now I am using SHVDN. I typically use the CreatePed method and specify a model string like ""a_m_y_business_02"" but is there a way to say something like... PedModelHash.BusinessMan or something along those lines?
@Aurora11 thank you for responding. I did think of that, and tried creating new Relationship Groups for the two spawned peds, but it doesn't seem to work when applied to police officers. It's as if their Relationship Groups cannot be modified.
// experiment 3
GTA.UI.Screen.ShowSubtitle("creating two cops to fight each other, using relationship groups");
Ped player = Game.Player.Character;
string model_name = "s_m_y_cop_01";
Ped cop1 = GTA.World.CreatePed(model_name, player.Position + (player.ForwardVector * 5f));
cop1.Weapons.Give(WeaponHash.Bat, 999, true, true);
model_name = "s_m_y_cop_01";
Ped cop2 = GTA.World.CreatePed(model_name, player.Position + (player.ForwardVector * 6f));
// create a new relationship group
RelationshipGroup newGroup1 = World.AddRelationshipGroup("newgroup1");
cop1.RelationshipGroup = newGroup1;
RelationshipGroup newGroup2 = World.AddRelationshipGroup("newgroup2");
cop1.RelationshipGroup = newGroup2;
newGroup1.SetRelationshipBetweenGroups(newGroup2, Relationship.Hate);
newGroup2.SetRelationshipBetweenGroups(newGroup1, Relationship.Hate);
cop1.Task.FightAgainst(cop2);
cop1.AlwaysKeepTask = true;
// 46 is the "fight to the death" attribute
Function.Call(Hash.SET_PED_COMBAT_ATTRIBUTES, cop1, 46, true);
Function.Call(Hash.SET_PED_FLEE_ATTRIBUTES, cop1, 0, 0);
I've been programming the police in GTA and came across this behavior recently. It seems that no matter what I do, the cops will not fight each other.
I'm giving them the same instructions as other characters, who fight without issue. A police officer will attack a civilian without issue, but when I use the same code for two police officers, they run away from each other instead of fighting.
What could cause this behavior? Does anyone have any ideas on how to fix it?
the cop has no problems attacking a regular pedestrian
the cops will not fight each other
I'm an artist and researcher and have been trying to wrap my head around the entire modding process for GTA5 over the last year or so. I've made strides but I don't have the time to figure out every aspect of the process and I find myself wanting some very simple things done that would otherwise take me days.
For example: I want to create a part of the map that is simply a white cube, in which the player and other peds can walk around. No textures, just a white cube of an arbitrary size (let's say something like 10 meters cubed).
I'm happy to pay someone to do this, with the assumption that it will take someone familiar with this process about 2 hours.
DM or reply and we can start an email thread.
I've followed a few tutorials and saved the ymap and manifest files in my mods/~ folder in OpenIV, but nothing shows up in game. Is it only for FIVEM? If not, what additional steps do I need to see the new map in single player? Is my only option the mod-based mad editor rather than CodeWalker?