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

don_pedro

liberty city gangs hostility,weapons etc.

Recommended Posts

don_pedro

hey guys I know there were simillar topics before but reading them did not give me any clues. It`s not normal that that the gangs in gta 4 aren`t hostile to eachother and towards the player - for example the russians (both russian gangs from pedgrp.dat) don`t attack Niko after the last mission for Dimitri and it`s obvious they should. In TLAD the Lost and their arch enemy AoD are neutral towards each other and that sucks. Now I know tinkering with ped.dat and relationships.dat doesn`t change anything (eventhough all gangs are set to hate each other by default, unfortunatelly gang turfs are alos controlled by a .dat file so no gang wars San Andreas-style). It`s a simmilar case to GTA SA where the real relationship between different ped groups were set in the main.scm or in a custom cleo script.

(0746: set_acquaintance 4 of_actors_pedtype 7 to_actors_pedtype 0; see ped.dat which means the ballas will shoot the player when they see him)

A good example is the mission "Drive-by" after which the ballas change their behaviour and instead confronting the player or GSF members and eventually attacking them they shoot on sight. I was wondering if something simmilar is possible to achieve in GTA 4. I found somethin but of course it does not work (or maybe I`m not able to make it work)

 

void RusHate_Tick(object sender, EventArgs e)
{
Cleanup();

foreach (Ped ped in World.GetAllPeds())
{
if (Game.Exists(ped) && ped.isAliveAndWell && ped.PedType == PedType.Gang_Russian1)
{
if (ped.Weapons.AssaultRifle_AK47.Ammo == 0 && ped.Weapons.AssaultRifle_M4.Ammo == 0)
{
ped.ChangeRelationship(RelationshipGroup.Player, Relationship.Hate);

ped.Weapons.RemoveAll();
if (ped.Model == swatPedModel) { ped.Weapons.AssaultRifle_M4.Ammo = 500; } else { ped.Weapons.AssaultRifle_AK47.Ammo = 500; }
}

if (ped.isIdle && !ped.isInCombat && !ped.isShooting)
{
ped.Task.FightAgainstHatedTargets(20f);
}
}
}
}
}

 

 

This code is actually borrowed from some of the older posts and it`s supposed to make the russians have ak`s and m4s and shoot the player on sight.

 

This mod http://gtaforums.com/topic/526901-drugwars-beta/

was in some way what I`m looking for but it focused only on 2 gangs, however it did catch randomly spawned enemy gang members and made them hostile (for example joining the spanish lords and going to schottler, beachwood city or willis made randomly spawned jamaicans pursuit and attack the player).

I thought about opeing this mod and finding the right code but this is a file with .NET extension, I tried to open it in Visual Studio 2013 but to no avail.

Now i`m wring this post hoping someone can give me at least a hint on how to control ped groups relationships.

Such a mod would be a great addition for people like me looking for more realism and challenge in the game, plus it would be more lore friendly.

Share this post


Link to post
Share on other sites
Jitnaught

To see the source code of the .NET file (in this case), open it with ILSpy.

Share this post


Link to post
Share on other sites
don_pedro

To see the source code of the .NET file (in this case), open it with ILSpy.

I installed it but it seems it does not work with Visual Studio 2013. Anyway thanks for help

Share this post


Link to post
Share on other sites
Jitnaught

ILSpy has nothing to do with Visual Studio. You said you wanted to see the source code of that mod. ILSpy is a program that decompiles .NET programs. So, what you'd want to do is open the ILSpy program, then drag the script into the list box, and then double click it (the name of the mod in the list box) to see what's inside.

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
don_pedro

yup you`re right, I managed to open the file with ILSpy and even found some lines which may be the ones I`m looking for however this sh*t looks sooo complex ;( Guess I`ll have to spend some time trying to figure this out

Share this post


Link to post
Share on other sites
byteMe420

i wrote that mod... that sh*t is so old and f*cked up (i wrote it when i had no idea how gta worked)... i actually have updated a lot of the code in a personal mod of mine which i can look to make a version for release if I have time...

 

Here it is... now it is all gangs not just jamaicans and puerto ricans

 

http://www.youtube.com/watch?v=A96UoQ9BE8Y


yup you`re right, I managed to open the file with ILSpy and even found some lines which may be the ones I`m looking for however this sh*t looks sooo complex ;( Guess I`ll have to spend some time trying to figure this out

sorry it is so complex... it is because i was a noob and had no idea how to code when i wrote... i was literally googling "How to xxx in c#" every 5 minutes when writing that xD (was only coding for 3 months when i began writing so it is so f*cked up, i had to rewrite a lot of the stuff i liked... video above)

 

the drugwars script actually does work but it will bug out your game because i am doing so much sh*t in it that conflicts with the game... it works but eventually your game will get buggy

Edited by byteMe420

Share this post


Link to post
Share on other sites
Jitnaught

^ Nice

Edited by LetsPlayOrDy

Share this post


Link to post
Share on other sites
byteMe420

thx

Edited by byteMe420

Share this post


Link to post
Share on other sites
don_pedro

i wrote that mod... that sh*t is so old and f*cked up (i wrote it when i had no idea how gta worked)... i actually have updated a lot of the code in a personal mod of mine which i can look to make a version for release if I have time...

 

Here it is... now it is all gangs not just jamaicans and puerto ricans

 

http://www.youtube.com/watch?v=A96UoQ9BE8Y

yup you`re right, I managed to open the file with ILSpy and even found some lines which may be the ones I`m looking for however this sh*t looks sooo complex ;( Guess I`ll have to spend some time trying to figure this out

sorry it is so complex... it is because i was a noob and had no idea how to code when i wrote... i was literally googling "How to xxx in c#" every 5 minutes when writing that xD (was only coding for 3 months when i began writing so it is so f*cked up, i had to rewrite a lot of the stuff i liked... video above)

 

the drugwars script actually does work but it will bug out your game because i am doing so much sh*t in it that conflicts with the game... it works but eventually your game will get buggy

man you are too modest :D Yes the old version is buggy (I have a few other scripts so they may conflict) however I still think it`s an awsome mod giving this game a new life. And when I wrote "complex" I meant it was very advanced and for a noob like me who has almost 0 knowledge about coding understanding it would take months maybe years :D

I see the new version is working ith EFLC! Can`t get better than this :D I don`t know how to convince you to release the current ver so I`ll just keep on praying that you will do it soon:D By the way - AWSOME WORK!

Share this post


Link to post
Share on other sites
byteMe420

thanks man, i dont release stuff anymore because I don't like doing technical support for people that insult you if it doesn't work... (which is why i get banned form places like gta4-mods, i cant ignore it so i usually end up getting banned for talking crap back) but the features in this mod i really like and it makes the game a lot more fun so I think I will release it. Glad you like it, I do this stuff for fun and it makes it worthwhile if other people can enjoy not just yourself. Give me some time to make it nice and clean it up and I will try to soon. ;)

Edited by byteMe420

Share this post


Link to post
Share on other sites
don_pedro

thanks man, i dont release stuff anymore because I don't like doing technical support for people that insult you if it doesn't work... (which is why i get banned form places like gta4-mods, i cant ignore it so i usually end up getting banned for talking crap back) but the features in this mod i really like and it makes the game a lot more fun so I think I will release it. Glad you like it, I do this stuff for fun and it makes it worthwhile if other people can enjoy not just yourself. Give me some time to make it nice and clean it up and I will try to soon. ;)

Yeah I`ve seen the history and the conversations which went along with your mod and I understand you, people just don`t get it that those who make the mods have also other sh*t to do in their lifetime :D can`t be no robot working 24/7 just to change something in the mod because someone wishes so. I appreciate the work you and other modders put in so I`m keeping my fingers crossed and looking forward to lay my dirty hands on this mod soon :D Does the new version bring back the drug dealing feature? I loved it in the earlier version but I had some permanent bug which made the dealer tell me to pick up Mallorie but there was no blip and nobody was waiting at the airport (I`m not sure if I didn`t messed up somethin in the .ini file)

Share this post


Link to post
Share on other sites
byteMe420

haha ok well just know I said a lot of stuff to people on there make myself seem insane (I probably am though :p)... i suppose im not very good at trolling... i usually take it too far... lol

 

Anyways the mission to pickup Mallorie I beleieve triggers from a dealer menu option... so no blip ever appears? This would mean spawning failed. Problem is I think I am flagging lots of peds as mission characters and this interferes with the normal spawning of the game (GTA IV is a bad console port and doesnt allow you to use more resources) and I think causes spawning in the script itself to fail. Just a bug because I didn't understand what the game was doing and how spawning worked.

 

The current version actually is only the combat stuff right now and group related options. The drug dealing I havent added. DrugWars was meant to be like it's own expansion where the current version is more of a gang wars "trainer" where you can turn stuff like behavior on and off... if that makes sense ;)

 

DrugWars code is so ugly tha rewriting the entire thing could take some time. I did enjoy the drugdealing though so ill look for a way to incorporate it.

Edited by byteMe420

Share this post


Link to post
Share on other sites
Jitnaught

I don't like doing technical support for people that insult you if it doesn't work...

Make don_pedro the moderator of the script ;)

Share this post


Link to post
Share on other sites
don_pedro

at first it worked, but the more I played the more bugs I had but I have a lot of other scripts (some of them use the same keys a drug wars) so I was aware sh*t like that can happen, Any way it doesn`t matter now when the new version is on the horizon (and me pissing my pants out of happiness :D) just hope simillar feature will be available cause it merged perfectly with the ability to buy better weapons for the gang. If only gaining/losing territory was possible like in SA...fcuk it I will be editing popcycle.dat like crazy hahaha :D

Share this post


Link to post
Share on other sites
byteMe420

lol oh yeah i completely forgot about buying your gangs weapons, i need to add that too! Yeah the only thing that sucks about territories is that interfering with the game and spawning is tricky since the system is not perfect for PC (this game was designed for console, not PC) I fell like you would have to turn spawning off and manually write your own spawning system O_O not sure i would go that far lol

Edited by byteMe420

Share this post


Link to post
Share on other sites
Ricebox

i wrote that mod... that sh*t is so old and f*cked up (i wrote it when i had no idea how gta worked)... i actually have updated a lot of the code in a personal mod of mine which i can look to make a version for release if I have time...

 

Here it is... now it is all gangs not just jamaicans and puerto ricans

 

http://www.youtube.com/watch?v=A96UoQ9BE8Y

This is off-topic but that video made me sh*t my pants. Holy f*ck that looks fun.

Share this post


Link to post
Share on other sites
byteMe420

 

i wrote that mod... that sh*t is so old and f*cked up (i wrote it when i had no idea how gta worked)... i actually have updated a lot of the code in a personal mod of mine which i can look to make a version for release if I have time...

 

Here it is... now it is all gangs not just jamaicans and puerto ricans

 

 

This is off-topic but that video made me sh*t my pants. Holy f*ck that looks fun.

 

yeah, too bad gta iv didn't have the feature from SA... updated the mod a little.

 

http://youtu.be/uyb5s3V2W0M

Share this post


Link to post
Share on other sites
Rugz007

Can you give the links of the mod.... Would like to play with that :D

Share this post


Link to post
Share on other sites
byteMe420

i haven't released the script, i only started writing it. You shouldnt quit modding... if u want to do this then write a script that does this...

 

1. Spawn Peds in 2 groups... 1 group 1 gang, the other group another gang

 

2. Give them Weapons

 

3. Make them hate each other's gang

 

4. Then once they see each other they will fight

 

You can add one of the gangs to the player group and they will follow you into vehicles.

 

You shouldn't quit modding, if you want to do what is in the video then write it and have the patience to learn. I wont be releasing this mod anytime soon.

Share this post


Link to post
Share on other sites
don_pedro

https://www.youtube.com/watch?v=GZ3XZ5ME-YY

 

still working on this, here is a recent vid

this looks better and better! is the a possibilty you will make the ability to turn off/on blips of enemies?

Share this post


Link to post
Share on other sites
byteMe420

the blips do turn on and off, pause the video and u can see options in the menu for blipping your gang and enemy gangs

Share this post


Link to post
Share on other sites
don_pedro

the blips do turn on and off, pause the video and u can see options in the menu for blipping your gang and enemy gangs

nice! I`ve noticed you have uploaded videos showing a ped relationship editor. Are you planning to release a standalone version? Or is it only a feature of your gang war mod? A standalone version would hit the spot and close this topic

Share this post


Link to post
Share on other sites
maro_hannover

I really just want to know how to make a menu

@Topic Starter

when posting a code first click that button < >

Share this post


Link to post
Share on other sites
byteMe420

 

the blips do turn on and off, pause the video and u can see options in the menu for blipping your gang and enemy gangs

nice! I`ve noticed you have uploaded videos showing a ped relationship editor. Are you planning to release a standalone version? Or is it only a feature of your gang war mod? A standalone version would hit the spot and close this topic

 

no i dont have plans to release that, it is part of a trainer i made. I dont release mods anymore, not really a nice community for doing that. People downloading scripts seem to be mostly a bunch of 12 year olds that have a list of requests to make your mod "better". Would rather just do my own thing. Btw doesnt SNT have a relationship editor?

Edited by byteMe420

Share this post


Link to post
Share on other sites
maro_hannover

How he made that red menu with functions and Attach Weapon Objects(Maybe Real Weapons) to his back?

 

-------

Weapon Objects

-------

CJ_PROP_EAGLECJ_PROP_GLOCKCJ_PROP_GRENADECJ_PROP_KNIFECJ_PROP_M4CJ_PROP_MolotovCJ_PROP_MP5CJ_PROP_PSG1CJ_PROP_pumpshotCJ_PROP_RIFLECJ_PROP_RPGCJ_PROP_ShotgunCJ_PROP_UZI

Share this post


Link to post
Share on other sites
byteMe420

i used per frame draw for the menu and ... magic!!

 

 

...and yes i spawn a weapon object and attach to player ;)

Share this post


Link to post
Share on other sites
maro_hannover

Can i see your source code. i don't want to steal. i just want to learn

Share this post


Link to post
Share on other sites
byteMe420

i will help u learn but my source code is too complicated to learn from... lot's of stuff going on so it won't make a good example to learn from.

 

Use perframe draw to draw a rectangle and after the rectangle draw text. You need to know where on screen you want and set the x, y and the size. You can look at Game.Resolution for numbers to help calculate.

 

What don't you understand?

Edited by byteMe420

Share this post


Link to post
Share on other sites
maro_hannover

The 2D X,Y Is what i want to see.

i just want to find any Table showing 2D X,Y Positions.

I bought a c# book but no GTA LOL!

Can you show me a code of a menu with 1 option that if i choose it the player dies. Please.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

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