Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. 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. News

    2. Forum Support

    3. Site Suggestions

Wheatley

[Q] [WIP] GTA IV Character Switcher

Recommended Posts

Wheatley

Hey there!

 

After seeing someone recreate the GTA V weapon HUD for GTA IV I thought I might take a gander at making the "Character Switch" mechanic for GTA IV since someones done it in San Andreas.

 

I haven't coded in a while so my C skills are not top-notch but I decided to do the "planning" in 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

 

The way this works is that when players play as say Niko and push the Character Switch button, it will temporarily remove the player and save the location of where it is and move/teleport to a random spot, spawn Luis or Johnny and continue playing. When players switch back to Niko then it will remove the current model, move the camera upwards and along to the the saved location where Niko previously was.

 

I also want to see how if it's possible to make when you switch to characters they might teleport to Burger Shot and buy a burger or hailing a cab etc but if it's too hard then I might leave it.

 

Right now I'm taking a look at how the Simple Native Trainer works in switching models, teleporting and camera control. Should I pursue this and actually code this script? What do you think?

 

 

 

 

Share this post


Link to post
Share on other sites
cp1dell

I don't know much about the San Andreas version, but it doesn't make much sense. IV seems much more suitable for this considering it actually has three protagonists, albeit spread across three games. It's a very good idea. I'm not much of a coder, but I'm sure there has to be a way to load mission information - that way when switching characters their respectable missions will be available - or locked depending on what missions for other characters have been completed. But that's much more complicated, best to focus on the switching for now.

 

One thing I'm not sure about is how agility and handling is going to work. Handling for vehicles differs between IV and EFLC since the characters have different backgrounds. There is also the agility between them. For example, Niko runs much faster than Luis and Johnny. Johnny runs slow due to the bike accident he was in before the events of TLAD.

 

The different feel between the three protagonists is very big, and that's definitely something that should be achieved if you're going to be switching between them. I'm not 100% sure, but the agility might even be up to the engine, and how fast the running, climbing etc. animations are and Euphoria handles that. Regardless, they still need to feel different like they do between the three games. If not, it will just seem like this is some fancy script that teleports you and changes your skin. And you won't feel like you are actually switching[i/] to another protagonist.

Share this post


Link to post
Share on other sites
Wheatley
I don't know much about the San Andreas version, but it doesn't make much sense. IV seems much more suitable for this considering it actually has three protagonists, albeit spread across three games. It's a very good idea. I'm not much of a coder, but I'm sure there has to be a way to load mission information - that way when switching characters their respectable missions will be available - or locked depending on what missions for other characters have been completed. But that's much more complicated, best to focus on the switching for now.

 

One thing I'm not sure about is how agility and handling is going to work. Handling for vehicles differs between IV and EFLC since the characters have different backgrounds. There is also the agility between them. For example, Niko runs much faster than Luis and Johnny. Johnny runs slow due to the bike accident he was in before the events of TLAD.

 

The different feel between the three protagonists is very big, and that's definitely something that should be achieved if you're going to be switching between them. I'm not 100% sure, but the agility might even be up to the engine, and how fast the running, climbing etc. animations are and Euphoria handles that. Regardless, they still need to feel different like they do between the three games. If not, it will just seem like this is some fancy script that teleports you and changes your skin. And you won't feel like you are actually switching[i/] to another protagonist.

I want to walk before I run so that means it will probably start out as a skin switcher at first but evolve to what you have said where animations would change, handling and voices too. That would take a long time and bug fixing due to how advance that would be, multiple things are being changed at once. This is also a major problem: optimization.

 

 

 

 

 

Share this post


Link to post
Share on other sites
nixolas1

nice idea! and who has made that weapon hud thing? where is it?

 

heres how i would do the char switch:

 

when keycombo is pressed, switch to custom cam which smoothly pans up in the air, in a wide bow down to the location the other player should be, while rotating the cam downward while flying up, and rotating it to the game cam pos again when going down.

maybe add some cool effect to the switch cam, like black&white etc, and some DoScreenFadeIn(50);

the location of the other player should be pretty random the first time you switch. but the script should remember the position of the player you switched from, and depending on how much time has passed, set the location at a logical random distance from where it was when the switch happened.

the simplest way to do the model thing, is just teleporting , disabling player control, using SetCharModel, then maybe some setcharstyle or something like that.

 

when all that is done, it can always be expanded with saving the specific weapons the players have, the health, money, wanted, etc.

 

looking forwards to more V features in IV!

Share this post


Link to post
Share on other sites
Th3MaN1

Sorry for the off-topic, but I just wanna ask, who makes a SA version of the character switch? A link would be much appreciated in a PM, thanks smile.gif.

 

Also, I dunno how this will work out, but if it's possible, then good luck with it!

Share this post


Link to post
Share on other sites
Wheatley
Sorry for the off-topic, but I just wanna ask, who makes a SA version of the character switch? A link would be much appreciated in a PM, thanks smile.gif.

 

Also, I dunno how this will work out, but if it's possible, then good luck with it!

Here it is:

 

 

 

 

It works just like the V version.

 

 

Share this post


Link to post
Share on other sites
cp1dell
I don't know much about the San Andreas version, but it doesn't make much sense. IV seems much more suitable for this considering it actually has three protagonists, albeit spread across three games. It's a very good idea. I'm not much of a coder, but I'm sure there has to be a way to load mission information - that way when switching characters their respectable missions will be available - or locked depending on what missions for other characters have been completed. But that's much more complicated, best to focus on the switching for now.

 

One thing I'm not sure about is how agility and handling is going to work. Handling for vehicles differs between IV and EFLC since the characters have different backgrounds. There is also the agility between them. For example, Niko runs much faster than Luis and Johnny. Johnny runs slow due to the bike accident he was in before the events of TLAD.

 

The different feel between the three protagonists is very big, and that's definitely something that should be achieved if you're going to be switching between them. I'm not 100% sure, but the agility might even be up to the engine, and how fast the running, climbing etc. animations are and Euphoria handles that. Regardless, they still need to feel different like they do between the three games. If not, it will just seem like this is some fancy script that teleports you and changes your skin. And you won't feel like you are actually switching[i/] to another protagonist.

I want to walk before I run so that means it will probably start out as a skin switcher at first but evolve to what you have said where animations would change, handling and voices too. That would take a long time and bug fixing due to how advance that would be, multiple things are being changed at once. This is also a major problem: optimization.

Well from what I've seen, changing the voice isn't that difficult. It's just a simple call of a native function. Though I've had issues with getting the pain voice working.

 

So is this going to be for the standalone version of EFLC? In my opinion it would be much better that way, since EFLC contains Niko's resources such as animations, voice, textures etc. That way for IV you don't have to package huge voice, animimation, texture, and model files for Johnny and Luis. With this being just for EFLC, it can just be a script.

Share this post


Link to post
Share on other sites
Wheatley
I don't know much about the San Andreas version, but it doesn't make much sense. IV seems much more suitable for this considering it actually has three protagonists, albeit spread across three games. It's a very good idea. I'm not much of a coder, but I'm sure there has to be a way to load mission information - that way when switching characters their respectable missions will be available - or locked depending on what missions for other characters have been completed. But that's much more complicated, best to focus on the switching for now.

 

One thing I'm not sure about is how agility and handling is going to work. Handling for vehicles differs between IV and EFLC since the characters have different backgrounds. There is also the agility between them. For example, Niko runs much faster than Luis and Johnny. Johnny runs slow due to the bike accident he was in before the events of TLAD.

 

The different feel between the three protagonists is very big, and that's definitely something that should be achieved if you're going to be switching between them. I'm not 100% sure, but the agility might even be up to the engine, and how fast the running, climbing etc. animations are and Euphoria handles that. Regardless, they still need to feel different like they do between the three games. If not, it will just seem like this is some fancy script that teleports you and changes your skin. And you won't feel like you are actually switching[i/] to another protagonist.

I want to walk before I run so that means it will probably start out as a skin switcher at first but evolve to what you have said where animations would change, handling and voices too. That would take a long time and bug fixing due to how advance that would be, multiple things are being changed at once. This is also a major problem: optimization.

Well from what I've seen, changing the voice isn't that difficult. It's just a simple call of a native function. Though I've had issues with getting the pain voice working.

 

So is this going to be for the standalone version of EFLC? In my opinion it would be much better that way, since EFLC contains Niko's resources such as animations, voice, textures etc. That way for IV you don't have to package huge voice, animimation, texture, and model files for Johnny and Luis. With this being just for EFLC, it can just be a script.

The problem is that I don't own EFLC, only Grand Theft Auto IV. If I start making a simple skin switcher that moves the camera to a designated spot then that will allow others to step in and make it work for EFLC fully.

 

 

Share this post


Link to post
Share on other sites
cp1dell
The problem is that I don't own EFLC, only Grand Theft Auto IV. If I start making a simple skin switcher that moves the camera to a designated spot then that will allow others to step in and make it work for EFLC fully.

Ah alright.

Share this post


Link to post
Share on other sites
DRUZZRIN12296

I fortunately own all three sp I could be that guy smile.gif

Share this post


Link to post
Share on other sites
AgentWD40

 

nice idea! and who has made that weapon hud thing? where is it?

 

heres how i would do the char switch:

 

when keycombo is pressed, switch to custom cam which smoothly pans up in the air, in a wide bow down to the location the other player should be, while rotating the cam downward while flying up, and rotating it to the game cam pos again when going down.

maybe add some cool effect to the switch cam, like black&white etc, and some DoScreenFadeIn(50);

the location of the other player should be pretty random the first time you switch. but the script should remember the position of the player you switched from, and depending on how much time has passed, set the location at a logical random distance from where it was when the switch happened.

the simplest way to do the model thing, is just teleporting , disabling player control, using SetCharModel, then maybe some setcharstyle or something like that.

 

when all that is done, it can always be expanded with saving the specific weapons the players have, the health, money, wanted, etc.

 

looking forwards to more V features in IV!

the weapon hud script - http://www.gta4-mods.com/script/gta-5-weap...a-4-0905-f22972

 

I found a video demo of character switching in gtaiv that looks really impressive

 

GTA V character switch system in GTA IV singleplayer, even shows a free mode version

 

 

GTA V systems:character switch in free mode

 

 

and if you want to set screen effect :

"SET_TIMECYCLE_MODIFIER"

 

to clear effect :

"CLEAR_TIMECYCLE_MODIFIER"

 

 

Edited by hardsty1e

Share this post


Link to post
Share on other sites
Michael Wojtanis

Lol i know how to do it ,really it is not hard.

I can effect, i can make animation for camera, load physics and object in that area.

This is not problem.

Problem is my time... I spend many hours to testing and make GTA 5 HUD wheel better.

Mayby that - i will make a script and You will test it. Hour per hour, thing behind thing...

What do You people think about it? smile.gif

 

Someone want to see my point of view? How to do that in "behind scene"?

 

Share this post


Link to post
Share on other sites
pedro2555
Lol i know how to do it ,really it is not hard.

I can effect, i can make animation for camera, load physics and object in that area.

This is not problem.

Problem is my time... I spend many hours to testing and make GTA 5 HUD wheel better.

Mayby that - i will make a script and You will test it. Hour per hour, thing behind thing...

What do You people think about it? smile.gif

 

Someone want to see my point of view? How to do that in "behind scene"?

Are ok with upload your project to google code (or any other SVN repository), anyone can work on it and share with you. I would definitly, you just need the method for that.

Share this post


Link to post
Share on other sites
Wheatley

 

Lol i know how to do it ,really it is not hard.

I can effect, i can make animation for camera, load physics and object in that area.

This is not problem.

Problem is my time... I spend many hours to testing and make GTA 5 HUD wheel better.

Mayby that - i will make a script and You will test it. Hour per hour, thing behind thing...

What do You people think about it? smile.gif

 

Someone want to see my point of view? How to do that in "behind scene"?

Are ok with upload your project to google code (or any other SVN repository), anyone can work on it and share with you. I would definitly, you just need the method for that.

I think once the main code is done for GTA IV, it'll be published on here so others can step in and move it to EFLC for full functionality.

 

Someone has seemed to already accomplished the moving camera and teleporting aspect but what needs to be accomplished is the model switcher. Native Trainer already as the ability to switch models but doesn't change the voices (which I've been told is not that hard to accomplish) so that's a great start.

 

Check it: http://www.gtaforums.com/index.php?showtopic=568325

 

 

Edited by Wheatley

Share this post


Link to post
Share on other sites
nixolas1

I will try to clean up my code a bit, then maybe more people can contribute to the coding part. One problem might be that I'm doing C++, while many are doing .NET, so if everyone wants to contribute and work together, we would have to make two mods, with different features, one made in c++ and one in .net

 

I'll post my code tomorrow!

 

One difficult part is the square radar. I don't know of any way of displaying a partial sprite/texture natively in GTA (to cut off the part of the map thats not inside the square), and if we want to make it 3D, like in V, we WILL have to use some external stuff, like directx. The newest OpenIV has a 3D map thing, which probably could be ported to IV.

 

And can someone post/make the textures for char switch? like the little wheel thing.

 

Cheers!

Share this post


Link to post
Share on other sites
Michael Wojtanis

Someone need me?

smile.gif Can i help?

Share this post


Link to post
Share on other sites
Michael Wojtanis

How You import C++ into game?

I thought only C# or VB can be used in ScriptHookDotNet.

Share this post


Link to post
Share on other sites
nixolas1

I use the normal ScriptHook by Arun ;P It was the one that was made first.

Share this post


Link to post
Share on other sites
Michael Wojtanis

Uh, and there You can use only C++?

Share this post


Link to post
Share on other sites
nixolas1

Yup...

Share this post


Link to post
Share on other sites
Wheatley

Looks like someone already beat us to the punch, folks.

 

 

 

 

Damn. It appears that all the major gaming news sites are reporting about this guys mod. D:

Edited by Wheatley

Share this post


Link to post
Share on other sites
nixolas1

Well, dosnt matter too much, thats JulioNIB. May the best mod win tounge.gif I think my cam effects look nicer, but he has made the char model switch, and 3 different buttons.

today ive made different things happen when you change, like theres a chance you'll be in a heli when you switch, or driving a car, while being wanted by the police.

the worst thing that can happen is that we take longer because we're working on the same stuff, but im working on a lot of stuff, so dosnt matter.

Share this post


Link to post
Share on other sites
julionib

turn.gif

im sorry if i caused some inconvenience to you guys, i just dont want to loose my job that i started some days after GTA V first gameplay trailer, i saw that a GTA V Hud was a success so i decided to finish this mod, but i dont will release it officially, so, when you release your version there will not be a competition, will be only yours

Share this post


Link to post
Share on other sites
pedro2555
Well, dosnt matter too much, thats JulioNIB. May the best mod win tounge.gif I think my cam effects look nicer, but he has made the char model switch, and 3 different buttons.

today ive made different things happen when you change, like theres a chance you'll be in a heli when you switch, or driving a car, while being wanted by the police.

the worst thing that can happen is that we take longer because we're working on the same stuff, but im working on a lot of stuff, so dosnt matter.

 

turn.gif

im sorry if i caused some inconvenience to you guys, i just dont want to loose my job that i started some days after GTA V first gameplay trailer, i saw that a GTA V Hud was a success so i decided to finish this mod, but i dont will release it officially, so, when you release your version there will not be a competition, will be only yours

Why aren't you guys working together, until then it's a fight nevertheless.

 

Great work from both anyway.

Share this post


Link to post
Share on other sites
nixolas1

I've invited anyone to work with me, but since I do my coding in C++, the .NET guys can't collaborate with me directly, though they can work on other stuff on the list in the GTA IV:V post.

 

One question JulioNIB, have you managed to spawn Niko in tbogt? if so, can you tell me how, and give me the model hash?

 

I've been working on my mod:

Ammo display added

When you switch you can be in a car or heli or bike or on foot, and have wanted. all random.

Better camera stuff.

 

 

One big issue is still the square minimap. Not sure how to solve that one.

Share this post


Link to post
Share on other sites
julionib

we have an model called ig_niko in EFLC, im using this one

 

we need to export this model and replace or add as ped in gta iv to have a normal looking niko after switch to luis or johnny

Share this post


Link to post
Share on other sites
pedro2555
I've invited anyone to work with me, but since I do my coding in C++, the .NET guys can't collaborate with me directly, though they can work on other stuff on the list in the GTA IV:V post.

 

One question JulioNIB, have you managed to spawn Niko in tbogt? if so, can you tell me how, and give me the model hash?

 

I've been working on my mod:

Ammo display added

When you switch you can be in a car or heli or bike or on foot, and have wanted. all random.

Better camera stuff.

 

 

One big issue is still the square minimap. Not sure how to solve that one.

Just one thing about GTA V trailer, I don't think characters will have random wanted levels and such.

 

At least when looking on the original IV missions, they ma have random situations you can found them in, but that is almost sure to be only during storyline gameplay. But I'm not sure about this, just thought it was worth sharing.

 

About the square radar, what is really the issue with it ? The blips ?

 

I can only help with .NET too..

 

 

Share this post


Link to post
Share on other sites
SomeLegitPlayer

Well, if someone need some help on coding, etc i'm here, but be aware im only good at C++ not at .net ^^

Share this post


Link to post
Share on other sites
EdyTheViper

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.