[CSM] Raised Fist v0.6 Full + 0.61 Patches

Full Game Conversions and Custom maps

Re: Raised Fist v0.6 Full + 0.61 Patches

Postby Apache Thunder » Mon Jan 21, 2019 2:00 am

How does the third person view thing work? Are the bullets still shooting from the soldier or do they originate from the new camera position? If it's usable enough I may add it to my BFH'42 mod at some point. :D
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1195
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: Raised Fist v0.6 Full + 0.61 Patches

Postby Classical Modder » Mon Jan 21, 2019 2:21 pm

Hi Apache!

To answer your question the bullets originate from the soldier, it’s just the position of the soldier relative to the center of your screen (the crosshair) that changes in third person view.

The third-person view is pretty cool to use, however it requires a script with constant user input to work, because the third-person view always gets reset to the default value (0) after the player dies.

The command of interest to activate the third-person crosshair is:

game.debugShowFullSoldier 1

This will give you a very basic third person crosshair that is so close to the soldiers helmet that you basically cannot see in front of you while using the view. To reposition the third person camera, you must activate the soldier you want the camera for and use these commands:

ObjectTemplate.SetPoseCameraPos c_BfSoldierStanding 0/0.65/0
ObjectTemplate.SetPoseCameraPos c_BfSoldierCrouching 0/0.12/0
ObjectTemplate.SetPoseCameraPos c_BfSoldierLying 0/-0.7/0

These commands set the camera position in third person depending on the pose of the soldier (standing, crouching or lying). Since my mod doesn’t use prone only the first two lines are used. This is where you really have to play around with the values to get the exact camera position you want; personally I prefer a view that shows the full body of the soldier.

So basically, if you put all this code in a CON or TXT file, you would have:


ObjectTemplate.Active USSoldier
game.debugShowFullSoldier 1

ObjectTemplate.SetPoseCameraPos c_BfSoldierStanding 0/0.65/0
ObjectTemplate.SetPoseCameraPos c_BfSoldierCrouching 0/0.12/0
ObjectTemplate.SetPoseCameraPos c_BfSoldierLying 0/-0.7/0

This only enables the third person camera view, but remember that it is removed once the player dies. To counter that problem I have made a client script that is tied to a key that the player can press at will to switch from first to third person.

The only drawback is that if a player wants to play in third person during the whole match they would have to constantly press the third person key to activate it. If this can be circumvented and the view always enabled, that would be great.

I’ll post the rest of the code later today.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 450
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: Raised Fist v0.6 Full + 0.61 Patches

Postby Apache Thunder » Fri Feb 08, 2019 6:51 pm

Hmm interesting. have you tried applying the third person code directly to the soldier objects instead of using active command? Active command is typically used for server side mods and stuff and that's probably why it's resetting everytime a player dies.

Unless those Camera Pose commands impact first person view so that would be the reason you have to use active command? Well in my case that wouldn't be a problem with my BFH'42 mod. I could just make Third Person view the only available camera view for soldiers in that case....
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1195
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: Raised Fist v0.6 Full + 0.61 Patches

Postby Apache Thunder » Fri Feb 08, 2019 7:19 pm

Ok got around to testing it myself. It seems it's not the active command that's the real issue here. It's the debug command you found. That's the one that doesn't stick. The pose positions do stick even with active command and even after soldier dies and respawns. But the game command seems to be the one that's temperary. What you could do is tie the script to the camera change key? That would be stop gab measure to use. Someone could try patching the EXE to always default with that command set to true instead of false for each new soldier spawn.

Oh also the projectiles do appear to originate from camera crosshair and not soldier. I noticed this when firing large projectiles like RPG and the Keg in my BFH'42 mod. ;)

Oh and for the C key binding to work you'd probably have to disable all camera switch modes for the soldier camera object. The command doesn't work if you used it while already in a third person view or one of the other views. Seems to be specific to first person view.
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1195
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: Raised Fist v0.6 Full + 0.61 Patches

Postby Classical Modder » Sat Feb 09, 2019 6:35 pm

I like your idea about soldier camera views. One could add the code for the third person camera view the game uses for soldiers (Chase camera), but there would still be the problem of the disappearing crosshair at spawn. That is why I designed a client side script that allows the player to reactivate the third person crosshair with the push of a button.

EXE hack seems interesting, not sure how to go about it though.

About the projectile thing, are you sure? Because the soldier will point his gun towards the center of his screen when firing in third person from my point of view. Will have to test with the Bazooka.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 450
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Re: Raised Fist v0.6 Full + 0.61 Patches

Postby Classical Modder » Fri Mar 01, 2019 7:14 pm

And please guys if anyone wants to use this 3rd person soldier camera view in their mods, please ask me first. Even though the code wasn’t invented by me obviously (it’s DICE’s) it would be nice if this view could stay unique to my mod. The exception goes to anyone that has helped me in my mod projects or anyone I :? have collaborated with to make mods or maps (reegad, Apache, takiwa). Thanks.
{SoH} Clan Leader // http://sohclan.forumotion.com/
See my Strasbourg map project here.
GSC: diamondback67
Steam: diamondback67
Classical Modder
 
Posts: 450
Joined: Mon Oct 01, 2012 3:13 pm
Location: Canada

Previous

Return to Mod Downloads

Who is online

Users browsing this forum: No registered users and 7 guests