View previous topic :: View next topic |
Author |
Message |
Mr Robville
Mafiascene Veteran Modder


Joined: 11 Sep 2006 Posts: 605 Location: Dutchland 255968 Bank Notes
Items
|
|
I know this subject had been started a few times in the past, though I can't find any of it back, perhaps it was on the old MS.
I'm curious to know if it would be possible by a press of a button to switch from 3rd person to first person while on foot? I know Mafia supports some sort of first person view when the player enters a tram or metro, or when standing with their back against a wall causing the camera to move in.
Since people have managed to integrate a whole multiplayer in the game, I was wondering if it is possible to program a feature like that?
The reason I'm asking is because of the Titanic mod, in which there are a lot of cramped up and tiny areas in which 3rd person can be pretty disorientating. It would be great to allow the player to switch to first person whenever they want to. _________________
www.robville.net |
|
Back to top |
|
 |
Johncena1
Member


Joined: 03 Mar 2013 Posts: 189 Location: England, UK 169 Bank Notes
Items
|
|
I remember trying first person out, I still had the crosshair and I don't even think I could see the weapon Tommy was holding, I can't remember how I did it, or if I just tried someone else's mod but I found this page:
http://mafiascene.com/forum/viewtopic.php?p=124601
Hope this helps somewhat  _________________
 |
|
Back to top |
|
 |
RubyDragon949
Mafiascene Veteran Modder


Joined: 24 Feb 2013 Posts: 106 Location: Norfolk, England. 752 Bank Notes
Items
|
|
Funnily enough, I am going to be starting a new project soon that I wish to incorporate first person into.
I'll give a go and let you know how I get on, if I can get it to work well, I will show you how
Regards
*Ruby* _________________
The Commission Mod
The Robbery Mod
The Gangster Life Mod
Regards
*Ruby* |
|
Back to top |
|
 |
Cukier
Mafiascene Veteran Modder


Joined: 14 Jan 2014 Posts: 63 Location: Poland 17037 Bank Notes
Items
|
|
Well FPS mode can be obtained in 3 ways.
1. Make a script to stick camera to Tommy.neck frame and move it little bit up. Optional scale Tommy.neck to 0 (to remove head)
2. Using program called Cheat Engine. Add pointer byte 63788C + 24 + 5C (Mafia 1.2) then try to increase value for different cameras (there is few FPS cameras)
3. Another way is adding address float 6BDB10 then set value to 0.25 and freeze it. This way forcing camera to be like "close to wall". It move inside tommys head and make whole model invisible. |
|
Back to top |
|
 |
huckleberrypie
Member


Joined: 08 Aug 2014 Posts: 213
444 Bank Notes
Items
|
|
And with that it could be integrated to an .ASI module where it can be made to detect for any keypresses, say V or C for camera, then run the above mentioned memory hacking routine.
Unfortunately, my C++/ASM skills aren't that up to snuff, but since .ASIs do allow for a modular way to alter gameplay without modifying the EXE I think that would work best for your needs. |
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 335
693 Bank Notes
Items
|
|
huckleberrypie wrote: |
And with that it could be integrated to an .ASI module where it can be made to detect for any keypresses, say V or C for camera, then run the above mentioned memory hacking routine.
|
Actually I could also add a command for that to MSE I guess. This way the camera type could be controlled from MafiaScript. |
|
Back to top |
|
 |
huckleberrypie
Member


Joined: 08 Aug 2014 Posts: 213
444 Bank Notes
Items
|
|
ASM. wrote: | huckleberrypie wrote: |
And with that it could be integrated to an .ASI module where it can be made to detect for any keypresses, say V or C for camera, then run the above mentioned memory hacking routine.
|
Actually I could also add a command for that to MSE I guess. This way the camera type could be controlled from MafiaScript. |
Problem is you have to account for every single mission/level if done through MafiaScript. |
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 335
693 Bank Notes
Items
|
|
huckleberrypie wrote: |
Problem is you have to account for every single mission/level if done through MafiaScript.
|
Yeah, but it would allow to change the camera type programmatically so you could automatically switch to first-person view for narrow areas for example.  |
|
Back to top |
|
 |
ASM.
Mafiascene Veteran Modder


Joined: 10 Jan 2014 Posts: 335
693 Bank Notes
Items
|
|
A quick update:
I've added a command (namely mse_setcameratype) to MSE which allows to set the camera type (using Cukier's 2nd technique; thanks Cukier ). Here's a small example script showing the command in action. The script allows to switch between the first-person camera and the regular camera via the primary and secondary speedlimiter keys.
Code: |
dim_act 1
dim_flt 1
dim_frm 1
mse_debug_text "camera.sc started."
getactiveplayer 0
getactorframe 0, 0
label check_key
commandblock 1
ctrl_read 0, SPEEDLIMIT1
if flt[0] = 1, set_fps_camera, -1
ctrl_read 0, SPEEDLIMIT
if flt[0] = 1, set_nrm_camera, -1
commandblock 0
goto check_key
label set_fps_camera
commandblock 0
mse_setcameratype 3
frm_seton 0, 0
goto check_key
label set_nrm_camera
commandblock 0
mse_setcameratype 1
frm_seton 0, 1
goto check_key
|
|
|
Back to top |
|
 |
|
|