#the script mods list gets smaller and smaller every update
Explore tagged Tumblr posts
Text
when i go silent just know my mods aren’t updated LMAO
3 notes
·
View notes
Text
Modding a 10 Year Old Game - Grand Theft Auto IV

(extremely sentimental intro)
My first foray into game development (if you could even call it that) was modding. I’ve always been a sucker for immersion and realism in games, and as a fan of RPG’s, I love the feeling of belonging to a virtual world, and being able to engage in open, dynamic gameplay. This is what mods do best, taking an existing game-world, rules, and limits, and extending them to allow for many more hours of exploration and interactivity.
In Fallout: New Vegas, I loved pretending to be some kind of nomadic gun merchant, roaming the deserts of Nevada and living life rough. In Skyrim, I spent hours as a high society landlord, buying and renting every house in Whiterun, and hiring bodyguards to do my bidding. In both games, I had already played the story missions, and gone through all the available guilds and side-quests. However, I still enjoyed being part of such detailed game environments. Mods allow players like myself to run right past the storyline and do whatever weird, niche activity we want.
modding GTA IV
Another title with a fantastic modding community behind it is Grand Theft Auto IV. A lot of people don’t like this game compared to the brighter, goofier titles in the GTA series, but personally, it’s always been my favorite. Even though the graphics have begun to show their age, GTA IV’s rendition of Liberty City feels so authentic.
I’m still shocked at the amount of detail Rockstar managed to pack inside this game. Cab drivers pour coffee out of their driver’s side windows, pedestrians throw cigarette butts on the sidewalk, people get into arguments and conversations all without any input from the player. The city feels incredibly alive, and carries on regardless. Liberty City is filthy, covered in a layer of grime, garbage and haze. Walking around places like Hove Beach evokes all of my favorite films like Taxi Driver, Donnie Brasco, and Lord of War.

With such an intricate city to roam around in, I always wanted mods to make GTA IV more realistic. Thankfully, there are a lot of mods available aimed at doing this. Unfortunately, as the game and modding community are almost a decade old, many of the forums and sites dedicated to modding GTA IV are no longer available. Thankfully, some sites like GTAinside, and GTAforums are still kicking.
Modding GTA IV requires a couple things. First of all, if you have it on Steam, you’ll want to downgrade the game to Version 1.0.7 or 1.0.4. Next, you’ll need something called a ScriptHook, and an ASI loader. Basically, these make it possible to load custom scripts into the game. A guide on how to install these can be found here. Once installed, you’ll have a scripts folder inside your game directory. Most mods for GTA IV are scripts, but things like effects or textures that have to do with actual game data will have more complex installations. Typically, you’ll have to overwrite files in the common directory, so be sure to make a backup before you do.
Now that you’re ready to add some mods to your game, the only annoying part is making sure they’re all compatible with each other and don’t crash the game. Since I love realism mods, a lot of the ones I found where from this list. I really recommend ones like Arrest Warrant, Bank Account, Interactivity, and Bleed & Heal. I’ve found it makes the game a lot more challenging when you really have to be careful of how you approach combat, and when you also can’t magically carry an entire arsenal of weapons.
my mod for GTA IV
One thing I always wanted in Grand Theft Auto IV was a riot mode. I’m still amazed Rockstar never had a cheat for this in IV or V like it did in San Andreas or Vice City. Looking around online, I found a couple good mods that attempted to implement this, namely Ambient Wars by “IronHide” and Crossfire by user “my ammo crate”.
Ambient Wars is extremely detailed and provides a lot of features, but unfortunately seems to crash quite a bit. It’s also not compatible with version 1.0.7 of the game, which is problematic. That being said, it does a lot of neat things like spawn drive-by crews, gangsters and police all over the city, making it a lot of fun to try and survive amidst the mayhem.
Crossfire is a smaller, less-robust mayhem mod, but does work pretty well. The script basically spawns groups of police and criminals in a radius around the player and makes them fight each other, with the player in the middle. While the script does what it’s supposed to , it has a lot of potential for more features - so I decided to make my mod an updated, better version of Crossfire.
You can find the source code for Crossfire here on my GitHub.
getting started
My script for GTA IV was pretty simple, but it did need a few things to work with the scripthook. First of all, you’ll need an IDE that can spit out a class library, or .DLL file - I use Visual Studio 2017.
You’ll also need to reference two libraries - ScriptHookDotNet.dll. I wrote my mod in C# so I used the .NET Scripthook, which can be found here. You will also need a reference to System.Windows.Forms.dll.
Starting out, you’ll need the following include statements before you start writing your code :
using System; using System.Collections.Generic; using System.Windows.Forms; using GTA; using GTA.Native;
Because we’re referencing the ScriptHook, we have access to the GTA library, which is really neat. Thankfully, RAGE is a great engine, and exposes a lot of handy functions that make modding pretty simple.
If you’re writing in C#, you’ll need to specify a namespace, and declare a class. Make sure your class extends Script. This is part of GTA’s library that allows our script to be run in the game:
namespace Mod { public class MyMod : Script
...
Scripts in GTA IV are run in-game in two ways. Firstly, they can specify a function to be run by a tick, which is specified in the script class’s constructor:
Interval = Settings.GetValueInteger("INTERVAL", "SETTINGS", 1000);
this.Tick += new EventHandler(Event_Tick);
Secondly, they can specify functions to be run on key presses.
BindKey(Settings.GetValueKey("Toggle Script", "SETTINGS", Keys.F10), new KeyPressDelegate(ScriptOn));
As you can see, in the first case, we’re setting our interval to one second (1000 ms). This means that the game will go into our script each second. The game also needs something to run, though. To satisfy this, we add an event handler to our interval tick, which is on the second line. Here, we are passing the function “Event_Tick” as the function the game will call every second.
In the second case, we are binding a key to a function. Using GTA’s BindKey function, we are assigning F10 to the function “ScriptOn”.
At this point, the mod is technically working. If you throw this empty script into the your scripts folder, the game will load it. Just press the ~ key at any time, and you’ll see a message in the console stating it’s been loaded. The console is really handy, as it will spew output if it encountered any errors.

writing the mod itself!
Now that we have the skeleton of the mod up and running, we can actually make it do stuff. For my mod, I wanted the functionality of Crossfire, but with more mayhem. I also noticed that Crossfire had a lot of trouble placing and spawning its NPC’s, which i’d like to fix.
Spawning a pedestrian in GTA IV is easy, and really just needs this function call:
Ped ped = World.CreatePed(Model model, Player.Character.GetOffsetPosition(new Vector3(float x, float y, 0.0f)).ToGround());
Basically, you have to specify what model you want to use for the pedestrian, and where you want it. Pedestrian is the class that GTA IV uses to describe any person in the game. Even the player class contains a Ped object, which has all kinds of handy information, like if the pedestrian is alive, driving a vehicle, speaking, etc.
Choosing a model for your pedestrian is easy - all you need is a string or hash to an existing model in game. Thankfully, there is a list of these online: https://gtamods.com/wiki/List_of_models_hashes. If you want to spawn a pedestrian who’s a fat cop, just put the string “M_M_FATCOP_01″ as your model.
As for the spawn location, you can spawn a pedestrian anywhere, but you’ll probably want them somewhere close to the player. Using the GetOffsetPosition function, you can specify a location relative to the player, and use the ToGround() function to ensure that the pedestrian wont spawn mid-air. This will attempt to place them on a surface nearby. CreatePed can still fail, though. If the game cant place a pedestrian, it will return a null pointer, so be sure to check that the Ped object you get isn’t null.
Another thing! Since this is a game engine, things like garbage collection are very important. RAGE probably uses a lot of smart pointers and weak pointers behind the scenes, so you can’t use the conventional check of == NULL to check if an object is available or not. Pedestrians are often deleted and removed from the memory heap, so if you want to check that a GTA game object still exists, use the .Exists() functions, rather than checking for a null pointer.
Once you have your pedestrian object, you can apply all kinds of things to it. Just be sure to call the function ped.BecomeMissionCharacter(), so the game doesn’t garbage collect your pedestrian. Keep in mind that when you die, all the pedestrians you made will be garbage collected. This is a good thing. If you spawn too many pedestrians, the game will crash, so keep that in mind too.
I’m still learning how the AI works in GTA IV, but you can define a lot of behavior with a few simple calls like this:
ped.RelationshipGroup = RelationshipGroup.Cop; ped.ChangeRelationship(RelationshipGroup.Criminal, Relationship.Hate); ped.ChangeRelationship(RelationshipGroup.Dealer, Relationship.Hate); ped.ChangeRelationship(RelationshipGroup.Player, Relationship.Respect); ped.MaxHealth = 100; ped.Health = 100; ped.Armor = 50;
In this code snippet, i’ve put the pedestrian in the Cop “relationship group”. This is GTA’s way of sorting NPC’s into criminals, civilians, and police. I’ve also told the pedestrian to hate any NPC who is in the Criminal or Dealer group, and to “respect” the player (because they kept shooting at me on sight).
I also gave the pedestrian a health threshold and some armor.
Now to give them more orders:
ped.Task.FightAgainstHatedTargets(200);
ped.Weapons.AssaultRifle_M4.Ammo = 999999;
Here, i’m telling the ped to fight against hated NPCs in a radius of 200 units. I also gave him an assault rifle with a ton of ammo. So there you have it, there’s a cop.

For the criminals, I added a couple other things to make things more interesting:
ped.RelationshipGroup = RelationshipGroup.Criminal; ped.ChangeRelationship(RelationshipGroup.Cop, Relationship.Hate); ped.ChangeRelationship(RelationshipGroup.Civillian_Male, Relationship.Hate); ped.ChangeRelationship(RelationshipGroup.Civillian_Female, Relationship.Hate); ped.ChangeRelationship(RelationshipGroup.Fireman, Relationship.Hate); ped.ChangeRelationship(RelationshipGroup.Bum, Relationship.Hate); ped.ChangeRelationship(RelationshipGroup.Medic, Relationship.Hate); ped.ChangeRelationship(RelationshipGroup.Player, Relationship.Neutral); ped.MaxHealth = 100; ped.Health = 100; ped.Armor = 0; ped.WantedByPolice = true; ped.StartKillingSpree(true); Blip blip = ped.AttachBlip(); blips.Add(ped, blip);
As you can see, i’ve basically told the criminal pedestrian to hate literally everybody. This guy will open fire on anybody he sees. I also made him wanted by police, and to start a killing spree for maximum mayhem.
Now, police automatically have mini-map blips in the game, but criminals don’t. So, I attached a blip for the criminals. I also added the blip to a Dictionary that holds key-pairs of Pedestrians and Blips, so I can turn them off when the pedestrian dies. This way the map wont be flooded with the dots of fallen NPCs.
I also have a PedCollection for my pedestrians. This is a data structure provided by the GTA library meant for holding Pedestrian objects. I want to be able to keep track of every Pedestrian I spawn, and remove their blips when they die, etc.
what does the mod do?
The pedestrian spawning is really the meat and bones of the script. On top of that, I cap the total spawned and alive pedestrians at 64. Every tick, I do a “Cull”, where I go through and remove and dead pedestrians from the list, remove their blips, and allow for more space for new spawns. This way, the game never crashes and there’s always a steady flow of police and criminals running around.
I also implemented a wave system, so that three waves of criminals spawn, and then one wave of police. I did this because the criminals aren’t as well armed or armored, and get killed so quickly, while the police stay alive a lot longer.
One other feature I added is a weapon tier system. Each wave of goons is assigned a weapon tier (Melee, Pistols, Fully Armed). This way, one way has knives and baseball bats, while another has AK-47s, to mix things up.
When you start the mod using K+L, it spawns waves on a timer, and does cleanup in between. When you end the mod with L+K, or die, the script will do another cleanup, killing all spawned NPCs and removing any blips from the map. You can also use the mod without waves, by pressing F9 or F10 to spawn waves dynamically.
So that’s it! My mod used the Crossfire script as a starting point and turned it into more of a wave style format, with more weapon customization and better placement. I added a lot of randomization to the spawning, so that NPC’s aren’t spawning inside of each other, etc. I will be sure to post a video of gameplay soon.

If you want to try out my mod, you can download the script here!
happy modding!
0 notes
Text
Madden NFL Mobile Hack Cash and Coins 2017 (Android/iOS) Madden NFL Mobile Cheat
Free Article Spinner Online - No Sign Up Needed! OurStage As EA updates the season of madden mobile each and every year in august, We too update our online tools to match up the compatibility, Now you can use this online madden mobile 17 hack tool with all new releases along with old versions if you are still playing them. You can appreciate playing Madden NFL with unlimited money for a few days, and then when you get bored you can make a new account and commence once again. You ought to have the ability to simply return and re-do these methods once once more and also produce even more complimentary, unrestricted cash and also coins for your account. Our exclusive software is built based on the vulnerabilities we've found in Madden NFL Mobile and our proprietary exploit technologies. Without any doubt, these changes keep the players updated with the newest transformation in the realm of Madden Mobile Hack and are really exceptional. http://filmaster.tv/ Like Madden NFL Mobile is a never ending globe which keeps on advancing in right way, it seems. Explanations: philosophy is primarily based on the absolute or eternal wo. Will appear to consider, in view could not be all-unworthy madden mobile hack for totally free. There is no other game that will be providing such splendid graphics on mobile gaming. The online strategy of use for all of our Madden Mobile cheats is based mainly on ease of use for anybody that desires to try out our internet site. Madden NFL mobile 17 GOLD pack hack shouldnot be attempting to make use of that acts to probable properly mix 99 x GOLD GROUP and cash, coins. Our Madden Mobile Cheats includes Private Proxy Support and Anti-ban program script. Sharing your scoops to your social media accounts is a must to distribute your curated content. When you determine your madden mobile 16 coins hack team's demands, go to Live Auctions in the Marketplace and browse madden nfl mobile hack cheat offered players. New player sheet that has been updated are going to be emotional to Madden Mobile Player List”. Madden Cellular 17 Game Hack Tricks have now been sooner or later uncovered as a result basically generate all of the amazing chance. This is a fantastic option for beginners and sophisticated players due to the fact we can get much more money, coins and points. The Game is incredible, but most of the social people want to have free Money and Coins From this day, this chance gives our Madden NFL Mobile hack. The 2017 Continuing Training Web site can be programmed to print proof of attendance letters utilizing login info. Just do not go anywhere as we have lastly decided to reveal the most impressive Madden Mobile 17 Game Guidelines and Tricks greatest suited to acquire unstoppable offense and controlled defense. The mentioned Madden Mobile 17 Hack Guide is incredibly beneficial for the newcomers. You can join to league, earning achievements as a group, and taking on other league competition with Madden Mobile cheats. We support each nation inside the world, you are going to be able to access our madden mobile generator and madden mobile cheats on-line from anyplace inside the globe and produce your resources for complimentary. Our talked about Madden Mobile 17 strategies are more than adequate to turn into a much better player in quick time. You need to know that Madden Mobile is quite particularly game in The United States of America. In-Box Messaging - You will effortlessly encounter numerous interesting reside events which genuinely make it tough to concentrate in the proper direction should you follow Madden NFL mobile. We know how much of discomfort it can be to locate and install mods for games like Madden Mobile, so we took a various approach. We will listen — to all of your ideas taking into consideration cheats for Madden NFL Mobile with pleasure. Yet another thrilling function added to the madden mobile cheats update 2017 is a private reminder from the inbox. But never be concerned our hack will give you with limitless amount of free Madden NFL coins in no time. Enter your e-mail or username to connect to your Madden Mobile account and select your platform. Select the amount of free of charge Madden Mobile Coins, Money, Stamina, or XP that you want to add to your account. When you are determined that you want to play the game without any obstacles, you require to get the madden mobile cheats. In case you don't know how to input our cheats, check the hyperlink in red box beneath and you will discover basic tutorial on how to use cheats for MADDEN NFL Mobile. If you wish to beat them at their own game, you would like to use our hack tool. For Madden NFL, that is prepared to unharness August twenty third, Ea Sports identical it really is transferral in a completely new comment team and method. That mentioned, possessing alternated Madden NFL 17 and Madden NFL 17 in the Lapse of a couple of minutes, I understand that the previous game felt accelerated, which I attribute to a smaller sized count of animations. Right here at we have the largest on the web repository of cheats for Madden Mobile 17 on the net. Madden NFL is associate degree American football sports game supported the National league and printed by Ea Sports for the PlayStation four, PlayStation 3, Xbox One and Xbox 360. It permits you to play a lot of events and be the show your pro talents in your mobile. There is no need to have to install any additional software for our cheats that make your program cumbersome. You do not require to waste countless hour of grinding the game just to make a modest amount of coins. We do possess some tips to share which are good sufficient for you your self to dominate on defense and take your madden nfl 17 game encounter to high level. We have top notch assistance and also adding on-line chat to help out all the individuals who are not able to generate the coins instantaneously, If there is some glitch in the program we are on the web to aid you out instantaneously. This can be the tool which supplies you means for generating endless stamina, cash and coins for your loved ones or buddies as well as for the account cellular account. The cheat can be downloaded simply because the cheat guide is a pdf file so it is totally free for download. Typical updates of this on the internet hack tool give an array of advantages to each and every user these days. As you all know in madden mobile 17 you want lots of stamina to play longer games. Mobile games can be really addictive, but they quickly get very boring when you can not simply progress by means of the game. Now you are at the page with madden mobile cheats, enter your user name / ID from the game. First of all, attempt to discover out sources from exactly where you can get the reputable hack tools. Initial, the hack tool is on-line and browser based, and this is a actually a quite uncommon issue to discover with hack tools.
3 notes
·
View notes