Tuesday, February 18, 2014

[TUT] Finding native functions usage and parameters - GTA IV

Let's say that you found a native method on the GTA IV native functions list but don't know how to use it, what you can do is download and extract this file and use windows search to search inside the file contents for the native method, this way you will see how R* used the method in GTA IV/EFLC.

The big problem is understand the parameters because great part of them are variables with numbers that don't make much sense hehe, so, you can try finding the param elsewhere in the code to have an idea of what it can be.

In any case, this decompiled SCO files are the best way to see how some things are made in GTA IV or EFLC :)

Let me demonstrate how to find and understand for example the call of DRAW_CHECKPOINT.

First i find the method on site but it don't have a definition, so, i open the SCO files folder and use windows search to find that word:



If the result show some files i open them and search for the method inside it:



Now that i have the method call i try to find from where the parameters came or what are their type:


The param "uVar12" is previously used as reference (ref) in a method that will result in coordinates, so, i assume that the first three uses of this param is the coordinate of the checkpoint, Now we need to find out what are the other parameters: 12, 230, 110, 0

A good way to understand what they are is try in a code and see the result, in this case for example if you call the DRAW_CHECKPOINT and pass player position as the position and let the other params as they are in the SCO you will find out that the other params are the diameter (12) and color in RGB format, red (230), green (110) and blue (0). But, in this specific case the param diameter need to be used as float (12.0) or the command will fail, this is the result:


Saturday, February 15, 2014

Tank V Style - GTA IV

Tank mod inspired by GTA V's Tank, model made by SkyLineGTRFreak and edited by me to fit the script needs (tower and cannon).


This mod is a old project that me and SkyLineGTRFreak started months before GTA V release but we never finished, now that i know how to create simple object mods for IV i was able to edit the tower and cannon to fit the script behavior and finally finish the mod but making it behave similar to the tank from GTA V.

You can edit how much tanks will come after you and how much stars are needed to send tanks.

The camera number 4 was "edited" to behave as an fixed camera attached to the tank tower, it's good to use when controlling with XBox 360 control.

The mod will replace ripley by default but you can edit the .ini file and set other vehicle, look inside the .oiv file with winzip to see the handling line. The tank should spawn at airport.

You can use the scripthook command "enemytank 1" to create enemy tanks to hunt you, "1" is how much enemy tanks to create, more than 10 is dangerous for performance and script behavior.

See the develop history/stages: http://www.facebook.com/hashtag/tankvstyle

Download

Download Leopard 2A7 tank model by SkylineGTRFreak here (optional)

Taxi bug: Case you experience the taxi bug (lot of taxi on streets) when driving the tank, you can use this script to help reduce this bug, extract it to your gta Scripts folder.


Features

Heavy weight + script makes you smash and, sometimes, explode cars
Shoot tank cannon projectile
Moving parts: Tower and cannon
Enemy tanks: Cops will use tanks at certain wanted level or when player has tank and is messing around
Tank hideout points: Make you able to save the stolen tank
Tank auto spawn at airport
Swat guys can have RPG to shoot against you
Tank damage controlled by script, so, it's needed some 4 or 6 close explosions to destroy a tank, damage in player's tank is lower

***
if you want share or make videos of this mod, please use the following link as reference in description:
http://gtaxscripting.blogspot.com/2014/02/tank-v-style-gta-iv.html
http://www.youtube.com/user/SkylineGTRR34Freak

Thanks
***

See more about the mod here:


Installation: This mod uses OpenIV Package Installer, see how to install here


Hotkeys

Shoot cannon: Left mouse button

XBox 360 Control:

Shoot cannon: Left shoulder

Both keys can be edited in the self generated .ini file


Credits

Model by SkyLineGTRFreak
Script and edited models by JulioNIB


Screens


 *image from develop stage






Sunday, February 2, 2014

GTA V Fighter Jet P-996 Lazer script mod

This mod is inspired by GTA V's Fighter Jet features and uses a jet model made by SkyLineGTRFreak before GTA V release, so, the jet model is not exact the same from V and don't have all moving parts.

Features:

Shoot with minigun
Lock on targets and launch missiles on them
Crosshair and Jet model inspired by GTA V
Simulated jet physics
Improved engine and air flow sounds


Download

Important: Air Combat IV users must check the jet config files and see if none of them is using same model choosen to be the jet of this script :)

Case your jet model setup fails you can edit the handling.dat and vehicles.ide manually using this instructions

***
if you want share or make videos of this mod, please use the following link as reference in description:
http://gtaxscripting.blogspot.com/2014/02/gta-v-fighter-jet-p-996-lazer-script-mod.html
https://www.youtube.com/user/SkylineGTRR34Freak

Thanks
***

Installation: This mod uses OpenIV Package Installer, see how to install here


Tips

The jet is located in the airport, watch the video to see where exactly.

If you plan to use XBox 360 controller is interesting use the fixed camera (Last camera mode) or use the "inside" view camera

When the target indicator is green you can launch the rocket, you don't need to wait until becomes red, just like in V.

The script works based on the model name specified on .ini file (Scripts folder), so, if you want use other model you need to edit the .ini file and set the same name there.

The mod will try to clean any unwanted ped with the jet model on streets, to disable this method just set cleanStreetsTime to 0 on self-generated .ini file.

Depending on modded graphics your engine effect may look bad, you can edit the corona colors used in the .ini file.

In case you need to install the jet model manually you can download it here and see the handling/vehicles.ide lines on the readme.


Hotkeys

Q - Switch gun mode
Hold F (enter car key) - Eject (when jet speed > 3)
Space - Shoot actual gun
W (move forward) - Accelerate
S (move backward) - Decelerate
Numpad 5 - Pitch up
Numpad 8 - Pitch down
Numpad 4 - Roll left (also performed by A)
Numpad 6 - Roll right (also performed by D)
Numpad 7 - Turn left
Numpad 9 - Turn Right
G - Toggle gears In/Out

XBox 360 control support:

X - Switch gun mode
Hold Y (enter car button) - Eject (when jet speed > 3)
A - Shoot
Right trigger - Accelerate
Left trigger - Decelerate
Left thumb stick "up" (move forward)  - Pitch up
Left thumb stick "down" (move backward) - Pitch down
Left thumb stick "left"  - Roll left
Left thumb stick "right"  - Roll right
Left bumper - Turn left
Right bumper - Turn Right
Left Thumb Stick - Toggle gears In/Out

You can edit the .ini and customize keyboard hotkeys.
Press change camera button until pass last camera and you will activate fixed camera


Credits

Script and extra models by JulioNIB
Jet model by SkyLineGTRFreak


W.I.P. video

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


Screens



















//propaganda YT float style='display:none;'