Quantcast

Jump to content

» «
Photo

GTA V Minimap to GTA IV

244 replies to this topic
DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#1

Posted 21 July 2013 - 09:36 AM

I'm currently trying to make a GTA V HUD for GTA IV. I have made the border rectangle just like GTA V but now I have no idea how to change the health and armour bars into the linear ones shown in GTA V. I also need the radar map to fit in the rectangle also. Wondering whether I would have to make my own script, or if I can just rewrite what they have in the game. There must be something there to say:
"Hey! The game wants the radar to be round not square. and we want the health and armour to fit around"
but I simpy can not find it. I've looked in almost every nook and cranny. I'd say I've overturned around 80% of the game's files opening .dat's some .sco's... Just can not locate where to find this. My next option was to find out how they made a GTA IV HUD mod for SA and see if I could reverse engineer. The health and armour bars in GTA V are much like previous GTAs so what tells those games to have the health and armour bars linear!! Someone for the love of all that is holy, help me!! I'm going mad, this is pretty much the last thing I need to publish this mod for the public :'(

NOTE: If someone could also tell me why my TBOGT and TLAD crosshairs are huge!!? That'd be great.

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#2

Posted 21 July 2013 - 11:41 AM

Well, nobody know where is the information about radar sphere.
If You want make HUD You should copy of GTA 4 map or load texture and then with player position X,Y make sure to pleace it. Then write about blocking rectangle [borders] and also write the drawing rectangle of Player Health. That is all. I can make the health bar, armor and "special" but... i self do not know exactly how to do minimap. I know how to make map in one direction, but without rotation... sad.gif

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#3

Posted 21 July 2013 - 11:48 AM

Are you interested in helping me get this done? Haha
Ps nice job on The weapon wheel. I don't know much at all about scripting

Alexander made a GTA IV radar mod for San Andreas and I've messaged him about this asking how he did it.

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#4

Posted 21 July 2013 - 12:27 PM

If he answer, please, share with us the solution what he did.

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#5

Posted 21 July 2013 - 12:34 PM

QUOTE (Michael Wojtanis @ Sunday, Jul 21 2013, 12:27)
If he answer, please, share with us the solution what he did.

If he does then I will make sure to tell you smile.gif us Michaels have to stick together hahaha. Now scripting:
Before I go to sleep, 0:30am here, would you be willing to give me some code structure Icould write to get the health and armour bars? Tell me what you would need to be able to help me

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#6

Posted 21 July 2013 - 12:40 PM

You just need to know about DrawingPerFrame, getting from Player.Character.health and Player.Character.Armor and that is all.
Next just do some matematic of screen... To work perfect on wide, on 3:4 etc.

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#7

Posted 21 July 2013 - 12:46 PM

Too bad I don't. Hahaha. Is it like GET_CHAR_HEALTH and GET_CHAR_ARMOUR? How will that all link to health bar and armour bar? :S would you be able to make a basic example and send me it?

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#8

Posted 21 July 2013 - 01:03 PM

int playerHealth = Player.Character.Health;
int playerArmor = Player.Character.Armor;

This is beggining... i write now my script, sorry sad.gif

pedro2555
  • pedro2555

    Open Sourcer

  • Members
  • Joined: 02 Sep 2012
  • Portugal

#9

Posted 21 July 2013 - 03:27 PM

QUOTE (Michael Wojtanis @ Sunday, Jul 21 2013, 11:41)
Well, nobody know where is the information about radar sphere.
If You want make HUD You should copy of GTA 4 map or load texture and then with player position X,Y make sure to pleace it. Then write about blocking rectangle [borders] and also write the drawing rectangle of Player Health. That is all. I can make the health bar, armor and "special" but... i self do not know exactly how to do minimap. I know how to make map in one direction, but without rotation... sad.gif

C'mon man I'm sure you can find out how to rotate the map. BTW excelent work with the V Weapon HUD, funny enought I had the exact same idea when I saw the V preview video.

So give a search on how to rotate that and take hands on job, if I find a way I will post it here. I would love to see that mod from you.

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#10

Posted 21 July 2013 - 03:52 PM

First i must end the weapon hud and switcher players mod. Then i will see what i can do with minimap.

pedro2555
  • pedro2555

    Open Sourcer

  • Members
  • Joined: 02 Sep 2012
  • Portugal

#11

Posted 21 July 2013 - 06:58 PM

QUOTE (Michael Wojtanis @ Sunday, Jul 21 2013, 15:52)
First i must end the weapon hud and switcher players mod. Then i will see what i can do with minimap.

biggrin.gif. Call it 'GTA IV + I' mod pack. Good work mate.

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#12

Posted 21 July 2013 - 09:09 PM

QUOTE (Michael Wojtanis @ Sunday, Jul 21 2013, 13:03)
int playerHealth = Player.Character.Health;
int playerArmor = Player.Character.Armor;

This is beggining... i write now my script, sorry sad.gif

Thanks a lot man. Just got a reply from Alexander. I'm not sure if he knows

QUOTE
Hi , it needs different approach with GTA IV , this isn't typical modding and requires many things to patch in exe .


confused.gif I'll try learn some more about scripting. I am supposed to be writing a seminar this week... Hahaha

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#13

Posted 21 July 2013 - 10:37 PM Edited by DRUZZRIN12296, 23 July 2013 - 04:04 AM.

PROGRESS:
Hazah!

I made a script that loads the border for map and bars
user posted image
user posted image
Now just for the Health bars. And making map rectangle :S
And making the script hide the game radar
I'm thinking that I could get the amount of health the player has and relate it to a percentage of bar?

Wheatley
  • Wheatley

    I'm living in High Pressure Days.

  • Members
  • Joined: 21 Aug 2010

#14

Posted 23 July 2013 - 03:08 PM Edited by Wheatley, 23 July 2013 - 03:22 PM.

QUOTE (DRUZZRIN12296 @ Sunday, Jul 21 2013, 22:37)
PROGRESS:
Hazah!

I made a script that loads the border for map and bars
*SNIP*
*SNIP*
Now just for the Health bars. And making map rectangle :S
And making the script hide the game radar
I'm thinking that I could get the amount of health the player has and relate it to a percentage of bar?

Nice, this will go well with the GTA V Weapon HUD mod that was released recently. I'm actually trying to work out how to do a "Character Switching" Mechanic on GTA IV right now, I should probably start it on it soon before GTA V's release.

I've written my basic idea down into Pseudo code:

1. Start
1.1 Set Player Model to Niko
1.1.1 Save Player Niko Location

1.2 Push Switch Button To Luis
1.2.1 Pull Camera down Y Axis
1.2.2 Move Camera Up X Axis
1.2.3 Move Camera Along Z Axis to Teleport location

1.3 Set Teleport location to random
1.3.1 Set Player Model to Luis

1.4 Save Player Luis Location
1.4.1 Push Button to Johnny
1.4.2 Pull Camera Down Y Axis
1.4.3 Move Camera Up X Axis
1.4.4 Move Camera Along Z Axis to Teleport location
1.5 Set Teleport location to random
1.5.1 Set Player model to Johnny

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#15

Posted 23 July 2013 - 09:59 PM

Yeah man cool, but I think M. Wojtanis is already scripting his, but you should go ahead. It's always good to see a little competition, stops people from getting lazy wink.gif

Once we have a few GTA V themed mods in place we will make a joint pack for them.

Weapon Wheel - M.Wojtanis
Character Switcher - M.Wojtanis
Radar - DRUZZRIN12296
Middle finger mouse cursor - DRUZZRIN12296

Also I have some GTA V police cars and weapons smile.gif

Inbetween my radar mod I am also making a sniper scope, just like the one they use to kill the deer haha.

I am also trying to make a spawn Bugstars Van via telephone haha

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#16

Posted 23 July 2013 - 10:05 PM

I am writing script for this too.

user posted image

And this is the deer one that is almost done:

user posted image

Michael Wojtanis
  • Michael Wojtanis

    Rinepim

  • Members
  • Joined: 17 Jul 2013

#17

Posted 25 July 2013 - 09:04 AM

You make a model of deer?
You should look at "GTA IV" in "other" in modding page. There is instructions to make animation.
Just add new animation with OpenIV, in one file i remeber You can put this name and viola - we have a deer with original animation.


DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#18

Posted 26 July 2013 - 12:07 AM

QUOTE (Michael Wojtanis @ Thursday, Jul 25 2013, 09:04)
You make a model of deer?
You should look at "GTA IV" in "other" in modding page. There is instructions to make animation.
Just add new animation with OpenIV, in one file i remeber You can put this name and viola - we have a deer with original animation.

No... I am making the Crosshair for the sniper hahaha

pedro2555
  • pedro2555

    Open Sourcer

  • Members
  • Joined: 02 Sep 2012
  • Portugal

#19

Posted 26 July 2013 - 01:50 PM

QUOTE (DRUZZRIN12296 @ Sunday, Jul 21 2013, 22:37)
PROGRESS:
Hazah!

I made a script that loads the border for map and bars
user posted image
user posted image
Now just for the Health bars. And making map rectangle :S
And making the script hide the game radar
I'm thinking that I could get the amount of health the player has and relate it to a percentage of bar?

for the bar :

CODE

Rectangle(X, Y, (currentValue * (barWidth)) / maxValue, barHeight)


for health for instance, just change currentValue to Players health, and maxValue to 100.
you may have to tweak some points from the calculation to make sure it fits corectly.

But any way it does what you need. Given a maximum it makes it fit in the available space.

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#20

Posted 26 July 2013 - 11:31 PM

What if I use a sprite instead, would that work?

nixolas1
  • nixolas1

    Creator/Destroyer

  • Members
  • Joined: 23 Dec 2008

#21

Posted 27 July 2013 - 08:58 AM

This is something i made now (C++):

CODE

u32 health;
f32 max=1500.0f; //make bigger if you want a smaller (x-width) health bar.
GetCharHealth(ped, &health);
health-=100; //max=200, dead=100
if(health<=200 && health>=0){}else health=0; //health value is non-existing when player is dead. check for it.
//         x pos,            y pos,  x width,   y width, r,  g,  b,  alpha
DrawRect(0.1f+health/(max*2), 0.96f, health/max, 0.01f, 0, 175, 100, 200);


works for me smile.gif

user posted image

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#22

Posted 27 July 2013 - 10:36 AM

Omg omg omg!!! I need that for C#

nixolas1
  • nixolas1

    Creator/Destroyer

  • Members
  • Joined: 23 Dec 2008

#23

Posted 27 July 2013 - 07:45 PM

ops tounge.gif
http://puu.sh/3Nb9O.png

when i made the made yellow bar i just had to make some special abilities, so the screen is from in-car slow motion ability smile.gif

DRUZZRIN12296
  • DRUZZRIN12296

    Part of the GTA V:IV modding team

  • Members
  • Joined: 04 Aug 2009

#24

Posted 27 July 2013 - 08:35 PM Edited by DRUZZRIN12296, 27 July 2013 - 09:21 PM.

QUOTE (nixolas1 @ Saturday, Jul 27 2013, 19:45)
ops tounge.gif
http://puu.sh/3Nb9O.png

when i made the made yellow bar i just had to make some special abilities, so the screen is from in-car slow motion ability smile.gif

That's not fair you're already ahead of me wink.gif
That's good work. Shame that i don't know how to code really haha. But nice work. Any idea on the map?

_CP_
  • _CP_

    Group: Vice City Stories team

  • Members
  • Joined: 27 Dec 2007
  • Poland

#25

Posted 27 July 2013 - 08:43 PM

Oh, nice progress, keep it up, guys.

paranamo42
  • paranamo42

    Player Hater

  • Members
  • Joined: 08 Aug 2013

#26

Posted 08 August 2013 - 02:29 AM

Looks amazing, When do you think it will be finished? I will be happy to get it first thing biggrin.gif

pedro2555
  • pedro2555

    Open Sourcer

  • Members
  • Joined: 02 Sep 2012
  • Portugal

#27

Posted 08 August 2013 - 08:47 AM

QUOTE (DRUZZRIN12296 @ Friday, Jul 26 2013, 23:31)
What if I use a sprite instead, would that work?

For the map itself ?

Yes it should be the best option, and should not be difficult at all. I will try to post some snippets for that soon.

The blip display, is the real hassle. But still possible.

I wished I had time to work on this stuff, but I'm quite limited at the moment.

Nice progress thought.

nixolas1
  • nixolas1

    Creator/Destroyer

  • Members
  • Joined: 23 Dec 2008

#28

Posted 08 August 2013 - 11:41 AM

QUOTE (pedro2555 @ Thursday, Aug 8 2013, 09:47)
QUOTE (DRUZZRIN12296 @ Friday, Jul 26 2013, 23:31)
What if I use a sprite instead, would that work?

For the map itself ?

Yes it should be the best option, and should not be difficult at all. I will try to post some snippets for that soon.

The blip display, is the real hassle. But still possible.

I wished I had time to work on this stuff, but I'm quite limited at the moment.

Nice progress thought.

how would you draw the sprites so that they dont exceed the radar area? i mean, when you draw the map sprites for the area youre in, the sprites dosnt perfectly match the size of the radar, some of them will be outside the radar area. how would you cut that part out? that is the problem I've been having while trying to make this.
The blips could be done somewhat easily, with some GetAllBlipsOfType and some arrays with blip textures linked to blipsprite number.

Urethra
  • Urethra

    Player Hater

  • Members
  • Joined: 09 Aug 2013

#29

Posted 11 August 2013 - 02:55 AM

I'm not sure if this helps, but the guy in this video has a lot of the HUD set up:

The map isn't very useful though tounge.gif

pedro2555
  • pedro2555

    Open Sourcer

  • Members
  • Joined: 02 Sep 2012
  • Portugal

#30

Posted 11 August 2013 - 09:55 AM Edited by pedro2555, 14 August 2013 - 03:30 PM.

QUOTE (DRUZZRIN12296 @ Friday, Jul 26 2013, 23:31)
What if I use a sprite instead, would that work?

If it is only a solid color, why using a sprite ? It will not work with the exact code I've sent you, but it is possible with a bit more code.

EDIT: Lol, I may have miss read something




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users