PDA

View Full Version : How to make the Bullet Time slower?


Joonas
01-18-2003, 04:03 AM
Ok. Now I am getting this modding-thing. images/icons/grin.gif
But. As I increased the speed of bullets, now they are too fast to be dodged with the Buller Time... So how to make the Bullet Time slower. I mean the time. Not the lenght of it.
Thank you. images/icons/tongue.gif

Maddieman
01-18-2003, 05:52 AM
From the /skins/max_payne.txt:

</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> [Animation] Index = CHARANIM_SHOOTDODGEFORWARD; Filename = anim\shootdodgeforward.kf2;
[Properties]
{
[Movement] EndPosition = ( 0, 0, 5.25 ); Rotation = ( 0, 0, 0 ); MiddlePosition1 = ( 0, 0, 2.30 ); MiddlePosition2 = ( 0, 0, 4.30 );
[Message] Frame = 0; String = &quot;this->C_Reload();&quot;;
[Message] Frame = 0; String = &quot;this->a_play3dsound ( weapons, reload_mp5, pelvis );&quot;;
[Message] Frame = 1; String = &quot;maxpayne_gamemode->A_PlaySound ( characters, shootdodge );&quot;;
[Message] Frame = 3; String = &quot;this->A_Play3DSound ( characters, jump_medium, pelvis );&quot;;
[Message] Frame = 30; String = &quot;this->A_Play3DSound ( characters, dodge_medium, pelvis );&quot;;
[Message] Frame = 17; String = &quot;this->C_Jump( &quot; PLAYER_SHOOTDODGEJUMP &quot; );&quot;;
[Message] Frame = 34; String = &quot;this->P_CreateprojectileToBone( dummy_character_roll, 1, torso );&quot;;
[Message] Frame = 40; String = &quot;this->P_CreateprojectileToBone( dummy_character_roll, 1, torso );&quot;;
[Message] Frame = 55; String = &quot;this->P_CreateprojectileToBone( dummy_character_roll, 1, torso );&quot;;

[Message] Frame = 12; String = &quot;maxpayne_gamemode->gm_enablebullettime( false );&quot;;
[Message] Frame = 12; String = &quot;maxpayne_gamemode->gm_enablebullettimeBlock( true );&quot;;

//TIME CONTROLS
[Message] Frame = 10; String = &quot;maxpayne_gamemode->gm_changegamespeed( 0.2, 0.3 );&quot;;
[Message] Frame = 30; String = &quot;maxpayne_gamemode->gm_changegamespeed( 1.0, 0.5 );&quot;;
//END TIME CONTROLS







[Message] Frame = 1; String = &quot;this->C_SetDodgeImmortal( true );&quot;;
[Message] Frame = 49; String = &quot;this->C_SetDodgeImmortal( false );&quot;;
}
[/code]</blockquote><font size="2" face="Verdana, Arial">maxpayne_gamemode->gm_changegamespeed( x, y );

x is a real number, representing the speed of time - it can be anything from 0 (stopped), to 1(normal speed). You can also use vaules above 1 to speed up time.

The default bullet-time speed is 0.2, but I'd try vaules of 0.08, 0.05, and 0.01. You can also use values like 0.001 to slow even the fastest bullets (the player wont be able to move though).

y is how long it takes to slow down time to the speed of x.

You can also change the other bullet-time mode in the global configs.txt - search for the block 'slow motion'.

Joonas
01-18-2003, 09:57 AM
Thanks, Maddie! It WORKED! Could you please tell me how to make the actual Bullet Time slower...? images/icons/grin.gif

Maddieman
01-18-2003, 10:53 AM
Maybe you'd like me to hold your hand while crossing streets too. images/icons/tongue.gif

You can also change the other bullet-time mode in the global configs.txt - search for the block 'slow motion'.
<font size="2" face="Verdana, Arial">So, after searching for slow motion in the global configs.txt you come across this:

</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> [slowmotion]
{
[general]
SlowMotionTime = 15.0; // length of full slowmotion session
RegenerationTime = 10; // takes this many seconds to recharge from 0 to 1 (extremely slow)
Threshold = 0.1%; // must be exceeded to start slowmotion (should never regen to this)
TurnOffPenalty = 0%; // amount of slowmotion that gets deducted when you turn it off
ShootDodgePenalty = 10%; // amount of slowmotion that gets deducted when shootdodging
ShootDodgeThreshold = 1%; // minimum of slowmotion needed to allow shootdodging

MusicVolume = 1.0; // music volume when in slowmotion from 0 to 1
MusicVolumeFadeTime = 0.5; // how many seconds the fade from/to music volume should take
// sound message to send every &quot;HeartbeatSoundInterval&quot; seconds - the sound should NOT be looping!
HeartbeatSoundMessage = &quot;maxpayne_gamemode->A_PlaySound( menu, slomo_heartbeat );&quot;;
HeartbeatSoundInterval = 1.25; // interval of sending &quot;HeartbeatSoundMessage&quot; in slowmotion

[StartMessages]
{
[Message] String = &quot;maxpayne_gamemode->gm_changecontrolledgamespeed( 0.2, 0.3 );&quot;; <- JOONAS, HERE!!!!!!!!!!!!!!!
[Message] String = &quot;maxpayne_gamemode->A_PlaySound ( characters, slow_motion );&quot;;
[Message] String = &quot;maxpayne_hudmode->mphm_flashtocolor( 0x000000a0, 0.01, 0.03, 0.1 );&quot;;

}

[EndMessages]
{
[Message] String = &quot;maxpayne_gamemode->gm_changecontrolledgamespeed( 1.0, 0.5 );&quot;;
[Message] String = &quot;maxpayne_gamemode->A_PlaySound ( characters, slow_motion_end );&quot;;

}

[CantSwitchOnMessages]
{
// [Message] String = &quot;maxpayne_gamemode->A_PlaySound ( weapons, Shoot_NoBulletsLeft );&quot;;
}
}
[/code]</blockquote><font size="2" face="Verdana, Arial">Does this line look familiar?

[Message] String = "maxpayne_gamemode->gm_changecontrolledgamespeed( 0.2, 0.3 );";

That's all there is to it. images/icons/wink.gif

Joonas
01-18-2003, 11:01 AM
OF COURSE!!!!!!!!!!!!

I've done MANY changes to that globalconfig.txt including the slow-motion, but......
THE CODE-LINE!!!!!!!!!!!!

Thanks. images/icons/frown.gif images/icons/frown.gif

images/icons/grin.gif images/icons/grin.gif

Joonas
01-18-2003, 11:18 AM
And what is the value for making the grenade explosing larger, bigger?

Somewhere in the projectiles/grenade.txt
</font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">[Animation]
Index = PROJECTILEANIM_EXPLODE; Filename = ..\..\weapons\grenade\grenade_Explode.kf2;
[Properties]
{
[Message] Frame = 0; String = &quot;this->P_AlertEnemies( 15.0 );&quot;;
[Message] Frame = 0; String = &quot;this->CAM_AnimateInPlace( explosion );&quot;;
[Message] Frame = 0; String =&quot;this->PS_StartEffect ( explosion_grenade, \&quot;\&quot; );&quot;;
[Message] Frame = 0; String =&quot;this->A_PlayFloating3DSound( projectiles, bullethit_40mm, \&quot;\&quot;);&quot;;
[Message] Frame = 0; String = &quot;this->D_CreateDecal( grenade );&quot;;
[Message] Frame = 0; String = &quot;this->P_Explosion( 2.0, 5.0, 50, 10, FALSE, TRUE, FALSE, FALSE );&quot;;
[Message] Frame = 1; String = &quot;this->P_Explosion( 2.0, 10.0, 20, 5, FALSE, TRUE, FALSE, FALSE );&quot;;
} [/code]</blockquote><font size="2" face="Verdana, Arial">

Maddieman
01-18-2003, 11:27 AM
Well, you can change the radius of the explosion with this:

[Message] Frame = 0; String = "this->P_Explosion( 2.0, 5.0, 50, 10, FALSE, TRUE, FALSE, FALSE );";

2.0 is the hotspot radius (in metres) - where the most damage occurs (parameter 3 - 50)

5.0 is the falloff radius - where less damage is inflicted (parameter 4 - 10)

But I don't know if that changes the graphic though.

The booleans determine whether the explosion causes the grenade death, the burning death, whether the shooter is affected by the damage, and whether or not an explosion animation is played. I can't remember the order though - you'll have to look it up.

By the way, have you read the max-fx tools help? There's some really useful information in there - especially the receivers/messages documentation. I recommend checking it out if you're serious about getting into coding. It should have been installed with the rest of the max-fx tools.

[ 01-18-2003, 11:32 AM: Message edited by: Maddieman ]

Joonas
01-19-2003, 12:14 AM
Thank you. Now I can finally make my Realism-modification...

... I just need to get the weapons's real names and such...