PDA

View Full Version : I have successfully decompiled the code... I think



v2k4
05-28-2008, 05:46 AM
hey there all,

interesting stuff and not sure if anyone has done this before me, but i have successfully decompiled R6Game.u into its seperate .u files.

not sure i am allowed to share these files, but just wanted to say it is possible.

Heres a snippet of R6AITEMPLATE.uc perhaps someone with more programming knowledge than me can put some of these values into the .ini's we have to change the AI?

R6AITEMPLATE.uc snippet

defaultproperties
{
m_fLockFOV=25.000000
m_fTakeCoverPeekFOV=90.000000
m_rAimRotationRate=(Pitch=16384,Yaw=16384)
m_rAimRotationRateSlow=(Pitch=6000,Yaw=6000)
m_rAimRotationRateModerate=(Pitch=10000,Yaw=10000)
m_iAimRotationRateSlowLimit=5421
m_iAimRotationRateModerateLimit=16384
m_fDirectRotationDistance=500.000000
m_fLockTime=1.000000
m_fLockTimeMultiplierForMovingTarget=1.500000
m_fCirclingTime=3.000000
m_fCirclingJerkFactor=2.500000
m_fCirclingMagnetFactor=2.000000
m_fSprayingFOV=35.000000
m_fSprayingJerkFactor=1.000000
m_fSprayingMagnetFactor=0.500000
m_fShortBurstPreference=0.200000
m_fMediumBurstPreference=0.600000
m_fLongBurstPreference=0.200000
m_fDeadShootTime=0.700000
m_fMaxFiringTime=3.000000
m_fStopBurstProbability=0.333000
m_fIntuitionTime=3.000000
m_fLostTimeMinGuard=40.000000
m_fLostTimeMaxGuard=55.000000
m_fLostTimeMinPatroller=20.000000
m_fLostTimeMaxPatroller=30.000000
m_fSustainedVisionTime=0.500000
m_fCoverThreatTime=5.000000
m_fDistanceToConsiderSafeForGrenade=800.000000
m_fDistanceToMoveWhenChoked=900.000000
m_fDistanceToSeeNearbyGrenade=200.000000
m_fMinimumBrightnessFactor=0.200000
m_fDistanceToCoordinate=1500.000000
m_iAwareFocusVisionAngleHorizontal=10920
m_iAwareFocusVisionAngleVertical=9100
m_fAwareFocusVisionMaximumDistance=10000.000000
m_iUnAwareFocusVisionAngleHorizontal=10920
m_iUnAwareFocusVisionAngleVertical=9100
m_fUnAwareFocusVisionMaximumDistance=10000.000000
m_fPeripheralVisionBlendDistance=1000.000000
m_iAwarePeripheralVisionAngleHorizontal=15474
m_iAwarePeripheralVisionAngleVertical=10920
m_fAwarePeripheralVisionMaximumDistance=5000.00000 0
m_iUnAwarePeripheralVisionAngleHorizontal=15474
m_iUnAwarePeripheralVisionAngleVertical=10920
m_fUnAwarePeripheralVisionMaximumDistance=5000.000 000
m_fNoiseEvent_GrenadeBounceRadius=1500.000000
m_fNoiseEvent_BulletRicochetRadius=200.000000
m_fNoiseEvent_BulletPassNearbyRadius=500.000000
m_fNoiseEvent_DoorMoveRadius=1200.000000
m_fNoiseEvent_WindowMoveRadius=500.000000
m_fNoiseEvent_WindowBreakRadius=2000.000000
m_fNoiseEvent_HeavyFootstepRadius=800.000000
m_fNoiseEvent_LightFootstepRadius=400.000000
m_fNoiseEvent_PawnRadioRadius=2000.000000
m_fNoiseEvent_PawnTalkRadius=1000.000000
m_fNoiseEvent_PawnShoutRadius=6000.000000
m_fNoiseEvent_PawnScreamRadius=2000.000000
m_fCombatFeeling_FirstTimeAwareAndSeenByHuman=4.00 0000
m_fCombatFeeling_BulletPassNearby=1.000000
m_fCombatFeeling_BulletRicochet=0.500000
m_fCombatFeeling_BulletPassByBlindFire=0.500000
m_fCombatFeeling_SeeGrenadeLandNear=5.000000
m_fCombatFeeling_ReactToBeingDamaged=10.000000
m_fCombatFeeling_ReactToBeingGassed=15.000000
m_fCombatFeeling_ReactToBeingFlashed=10.000000
m_fCombatFeeling_ReactToBeingStunned=15.000000
m_fCombatFeeling_ReactToExplosion=5.000000
m_fCombatFeeling_ReactToFriendDying=3.000000
m_fCombatFeeling_ReactToLeaderDying=3.000000
m_fCombatFeeling_ReactToEnemyFlashed=10.000000
m_fCombatFeeling_MaxOffense=-5.000000
m_fCombatFeeling_MaxDefense=15.000000
m_fBulletMediumReactionMin=0.700000
m_fBulletMediumReactionMax=0.700000
m_fBulletFastReactionMin=0.500000
m_fBulletFastReactionMax=1.200000
m_fDistanceFromStartToWalk=100.000000
m_fDistanceFromStartToFastWalk=250.000000
m_fDistanceFromDestinationToFastWalk=250.000000
m_fDistanceFromDestinationToWalk=100.000000
m_fDMaxDistanceBackward=300.000000
m_fFOVToAcquirePOIWhenMoving=80.000000
m_fFOVToDiscardPOIWhenMoving=130.000000
m_fIdealPOIDistance=1000.000000
m_fTolerablePOIDistanceRatio=2.500000
m_fMaxDistancePenalty=0.400000
m_fBaseEnemyThreatValue=1.000000
m_fBaseObjectThreatValue=0.600000
m_fBaseCornerThreatValue=0.300000
m_fEntryObjectThreatDiscount=0.300000
m_fTimeToFocusOnDangerBeforeLookAtPOI=4.000000
m_fMinTimeToFocusOnDanger=2.000000
m_fAngleToDropDanger=110.000000
m_fMinTimeToFocusOnAPOI=0.800000
m_fMaxTimeToFocusOnAPOI=1.500000
m_fHighThreatLimit=0.400000
m_fAngleToGroupPOI=15.000000
m_fBodyFOV=85.000000
m_fPropensityToLookAtTeammate=0.500000
m_fVerticalAngleLimit=30.000000
m_fMaxAdvanceStepDistance=1000.000000
m_fMinAdvanceStepDistance=350.000000
m_fMaxAdvanceCoverDistance=300.000000
m_fEarlyRegroupDistance=150.000000
m_fMinDistanceForAdvanceTactic=400.000000
m_bSlicingThePie_AllowedToUse=True
m_fSlicingThePie_StartRadiusRatio=3.000000
m_fSlicingThePie_MaxRadius=60.000000
m_fSlicingThePie_MinRadius=30.000000
m_fSlicingThePie_SpeedRatio=0.800000
m_fGroupDistance=1000.000000
m_fThreatLevel=1.000000
m_fMinTimeToStayInCover=2.500000
m_fMinTimeToPeekFromCover=1.200000
m_fMaxTimeToPeekFromCover=2.000000
m_fConsecutivePeekTime=6.000000
m_fMaxTimeToAimShoot=5.000000
m_fMaxPreCombatMoveDistance=1000.000000
m_fCloseQuarterShootoutDistance=400.000000
m_fMaxSafetyDistance=2000.000000
m_fZeroSafetyDistance=400.000000
m_iZeroSafetyHAngle=8192
m_iZeroSafetyVAngle=4096
m_fMaximumThrowDistance=3000.000000
m_fMaximumUsefulSmokeDistance=1000.000000
m_fMaximumDistanceToMoveToThrow=500.000000
m_fSafeDistanceFactor=1.200000
m_fConsecutiveGrenadeTime=8.000000
m_fLeaderEffect_DefensiveInputPercentReduction=0.7 50000
m_fLeaderEffect_HealthValuePercentIncrease=0.50000 0
m_fLeaderEffect_LockTimePercentReduction=0.250000
m_fLeaderEffect_LeaderOrderOffensiveBoost=2.000000
m_fLeaderEffect_LeaderDeathDefensiveBoost=5.000000
m_fLeaderEffect_PercentChanceToRetreat=0.250000
m_fLeaderEffect_PercentChanceToAdvance=0.500000
m_fLeaderEffect_WaitTimeBetweenLeaderTactic=5.0000 00
m_fMaxRunToCoverDist=500.000000
m_fMaxStayInCoverDist=1000.000000
m_fFormationIdleTime=5.000000
m_fMaxXYDistFromDestForTakeCover=200.000000
m_fMaxZDistFromDestForTakeCover=200.000000
m_aeThreatEvent(0)=AI_SEE_ENEMY_ALERT
m_aeThreatEvent(1)=AI_SEE_CORPSE
m_aeThreatEvent(2)=AI_HEAR_GUNFIRE
m_aeThreatEvent(3)=AI_HEAR_RICOCHET
m_aeThreatEvent(4)=AI_SHOT_JUST_MISSED
m_aeThreatEvent(5)=AI_HEAR_GRENADE_BOUNCE
m_aeThreatEvent(6)=AI_HEAR_EXPLOSION_FRAG
m_aeThreatEvent(7)=AI_HEAR_EXPLOSION_MOLOTOV
m_aeThreatEvent(8)=AI_HEAR_EXPLOSION_DETERRENT
m_aeThreatEvent(9)=AI_HEAR_EXPLOSION_INCENDIARY
m_aeThreatEvent(10)=AI_HEAR_EXPLOSION_BREACHING_CH ARGE
m_aeThreatEvent(11)=AI_HEAR_EXPLOSION_CLAYMORE
m_aeThreatEvent(12)=AI_HEAR_EXPLOSION_C4
m_aeThreatEvent(13)=AI_HEAR_EXPLOSION_TRIP_WIRE
m_aeThreatEvent(14)=AI_SEE_GRENADE
m_aeThreatEvent(15)=AI_HEAR_SCREAM

v2k4
05-28-2008, 05:46 AM
hey there all,

interesting stuff and not sure if anyone has done this before me, but i have successfully decompiled R6Game.u into its seperate .u files.

not sure i am allowed to share these files, but just wanted to say it is possible.

Heres a snippet of R6AITEMPLATE.uc perhaps someone with more programming knowledge than me can put some of these values into the .ini's we have to change the AI?

R6AITEMPLATE.uc snippet

defaultproperties
{
m_fLockFOV=25.000000
m_fTakeCoverPeekFOV=90.000000
m_rAimRotationRate=(Pitch=16384,Yaw=16384)
m_rAimRotationRateSlow=(Pitch=6000,Yaw=6000)
m_rAimRotationRateModerate=(Pitch=10000,Yaw=10000)
m_iAimRotationRateSlowLimit=5421
m_iAimRotationRateModerateLimit=16384
m_fDirectRotationDistance=500.000000
m_fLockTime=1.000000
m_fLockTimeMultiplierForMovingTarget=1.500000
m_fCirclingTime=3.000000
m_fCirclingJerkFactor=2.500000
m_fCirclingMagnetFactor=2.000000
m_fSprayingFOV=35.000000
m_fSprayingJerkFactor=1.000000
m_fSprayingMagnetFactor=0.500000
m_fShortBurstPreference=0.200000
m_fMediumBurstPreference=0.600000
m_fLongBurstPreference=0.200000
m_fDeadShootTime=0.700000
m_fMaxFiringTime=3.000000
m_fStopBurstProbability=0.333000
m_fIntuitionTime=3.000000
m_fLostTimeMinGuard=40.000000
m_fLostTimeMaxGuard=55.000000
m_fLostTimeMinPatroller=20.000000
m_fLostTimeMaxPatroller=30.000000
m_fSustainedVisionTime=0.500000
m_fCoverThreatTime=5.000000
m_fDistanceToConsiderSafeForGrenade=800.000000
m_fDistanceToMoveWhenChoked=900.000000
m_fDistanceToSeeNearbyGrenade=200.000000
m_fMinimumBrightnessFactor=0.200000
m_fDistanceToCoordinate=1500.000000
m_iAwareFocusVisionAngleHorizontal=10920
m_iAwareFocusVisionAngleVertical=9100
m_fAwareFocusVisionMaximumDistance=10000.000000
m_iUnAwareFocusVisionAngleHorizontal=10920
m_iUnAwareFocusVisionAngleVertical=9100
m_fUnAwareFocusVisionMaximumDistance=10000.000000
m_fPeripheralVisionBlendDistance=1000.000000
m_iAwarePeripheralVisionAngleHorizontal=15474
m_iAwarePeripheralVisionAngleVertical=10920
m_fAwarePeripheralVisionMaximumDistance=5000.00000 0
m_iUnAwarePeripheralVisionAngleHorizontal=15474
m_iUnAwarePeripheralVisionAngleVertical=10920
m_fUnAwarePeripheralVisionMaximumDistance=5000.000 000
m_fNoiseEvent_GrenadeBounceRadius=1500.000000
m_fNoiseEvent_BulletRicochetRadius=200.000000
m_fNoiseEvent_BulletPassNearbyRadius=500.000000
m_fNoiseEvent_DoorMoveRadius=1200.000000
m_fNoiseEvent_WindowMoveRadius=500.000000
m_fNoiseEvent_WindowBreakRadius=2000.000000
m_fNoiseEvent_HeavyFootstepRadius=800.000000
m_fNoiseEvent_LightFootstepRadius=400.000000
m_fNoiseEvent_PawnRadioRadius=2000.000000
m_fNoiseEvent_PawnTalkRadius=1000.000000
m_fNoiseEvent_PawnShoutRadius=6000.000000
m_fNoiseEvent_PawnScreamRadius=2000.000000
m_fCombatFeeling_FirstTimeAwareAndSeenByHuman=4.00 0000
m_fCombatFeeling_BulletPassNearby=1.000000
m_fCombatFeeling_BulletRicochet=0.500000
m_fCombatFeeling_BulletPassByBlindFire=0.500000
m_fCombatFeeling_SeeGrenadeLandNear=5.000000
m_fCombatFeeling_ReactToBeingDamaged=10.000000
m_fCombatFeeling_ReactToBeingGassed=15.000000
m_fCombatFeeling_ReactToBeingFlashed=10.000000
m_fCombatFeeling_ReactToBeingStunned=15.000000
m_fCombatFeeling_ReactToExplosion=5.000000
m_fCombatFeeling_ReactToFriendDying=3.000000
m_fCombatFeeling_ReactToLeaderDying=3.000000
m_fCombatFeeling_ReactToEnemyFlashed=10.000000
m_fCombatFeeling_MaxOffense=-5.000000
m_fCombatFeeling_MaxDefense=15.000000
m_fBulletMediumReactionMin=0.700000
m_fBulletMediumReactionMax=0.700000
m_fBulletFastReactionMin=0.500000
m_fBulletFastReactionMax=1.200000
m_fDistanceFromStartToWalk=100.000000
m_fDistanceFromStartToFastWalk=250.000000
m_fDistanceFromDestinationToFastWalk=250.000000
m_fDistanceFromDestinationToWalk=100.000000
m_fDMaxDistanceBackward=300.000000
m_fFOVToAcquirePOIWhenMoving=80.000000
m_fFOVToDiscardPOIWhenMoving=130.000000
m_fIdealPOIDistance=1000.000000
m_fTolerablePOIDistanceRatio=2.500000
m_fMaxDistancePenalty=0.400000
m_fBaseEnemyThreatValue=1.000000
m_fBaseObjectThreatValue=0.600000
m_fBaseCornerThreatValue=0.300000
m_fEntryObjectThreatDiscount=0.300000
m_fTimeToFocusOnDangerBeforeLookAtPOI=4.000000
m_fMinTimeToFocusOnDanger=2.000000
m_fAngleToDropDanger=110.000000
m_fMinTimeToFocusOnAPOI=0.800000
m_fMaxTimeToFocusOnAPOI=1.500000
m_fHighThreatLimit=0.400000
m_fAngleToGroupPOI=15.000000
m_fBodyFOV=85.000000
m_fPropensityToLookAtTeammate=0.500000
m_fVerticalAngleLimit=30.000000
m_fMaxAdvanceStepDistance=1000.000000
m_fMinAdvanceStepDistance=350.000000
m_fMaxAdvanceCoverDistance=300.000000
m_fEarlyRegroupDistance=150.000000
m_fMinDistanceForAdvanceTactic=400.000000
m_bSlicingThePie_AllowedToUse=True
m_fSlicingThePie_StartRadiusRatio=3.000000
m_fSlicingThePie_MaxRadius=60.000000
m_fSlicingThePie_MinRadius=30.000000
m_fSlicingThePie_SpeedRatio=0.800000
m_fGroupDistance=1000.000000
m_fThreatLevel=1.000000
m_fMinTimeToStayInCover=2.500000
m_fMinTimeToPeekFromCover=1.200000
m_fMaxTimeToPeekFromCover=2.000000
m_fConsecutivePeekTime=6.000000
m_fMaxTimeToAimShoot=5.000000
m_fMaxPreCombatMoveDistance=1000.000000
m_fCloseQuarterShootoutDistance=400.000000
m_fMaxSafetyDistance=2000.000000
m_fZeroSafetyDistance=400.000000
m_iZeroSafetyHAngle=8192
m_iZeroSafetyVAngle=4096
m_fMaximumThrowDistance=3000.000000
m_fMaximumUsefulSmokeDistance=1000.000000
m_fMaximumDistanceToMoveToThrow=500.000000
m_fSafeDistanceFactor=1.200000
m_fConsecutiveGrenadeTime=8.000000
m_fLeaderEffect_DefensiveInputPercentReduction=0.7 50000
m_fLeaderEffect_HealthValuePercentIncrease=0.50000 0
m_fLeaderEffect_LockTimePercentReduction=0.250000
m_fLeaderEffect_LeaderOrderOffensiveBoost=2.000000
m_fLeaderEffect_LeaderDeathDefensiveBoost=5.000000
m_fLeaderEffect_PercentChanceToRetreat=0.250000
m_fLeaderEffect_PercentChanceToAdvance=0.500000
m_fLeaderEffect_WaitTimeBetweenLeaderTactic=5.0000 00
m_fMaxRunToCoverDist=500.000000
m_fMaxStayInCoverDist=1000.000000
m_fFormationIdleTime=5.000000
m_fMaxXYDistFromDestForTakeCover=200.000000
m_fMaxZDistFromDestForTakeCover=200.000000
m_aeThreatEvent(0)=AI_SEE_ENEMY_ALERT
m_aeThreatEvent(1)=AI_SEE_CORPSE
m_aeThreatEvent(2)=AI_HEAR_GUNFIRE
m_aeThreatEvent(3)=AI_HEAR_RICOCHET
m_aeThreatEvent(4)=AI_SHOT_JUST_MISSED
m_aeThreatEvent(5)=AI_HEAR_GRENADE_BOUNCE
m_aeThreatEvent(6)=AI_HEAR_EXPLOSION_FRAG
m_aeThreatEvent(7)=AI_HEAR_EXPLOSION_MOLOTOV
m_aeThreatEvent(8)=AI_HEAR_EXPLOSION_DETERRENT
m_aeThreatEvent(9)=AI_HEAR_EXPLOSION_INCENDIARY
m_aeThreatEvent(10)=AI_HEAR_EXPLOSION_BREACHING_CH ARGE
m_aeThreatEvent(11)=AI_HEAR_EXPLOSION_CLAYMORE
m_aeThreatEvent(12)=AI_HEAR_EXPLOSION_C4
m_aeThreatEvent(13)=AI_HEAR_EXPLOSION_TRIP_WIRE
m_aeThreatEvent(14)=AI_SEE_GRENADE
m_aeThreatEvent(15)=AI_HEAR_SCREAM

EddieDeath
05-28-2008, 11:10 AM
How?

It looks like the macro like values at the end ( in CAPS ) are probably defined in the ai ini file.

There is probably a similar set of properties for enemy leaders which would contain weightings for retreating / advancing etc. Tweaking that might be a huge improvement combined with the spawn at start.

v2k4
05-28-2008, 10:58 PM
i tried throwing these values into the AI.ini (too early in the morning to think of the full name), using [R6Game.R6AITemplate] and then pasting below, yet the game crashes, so guessing the best option is a recompiling.

A little wierd thing though i renamed it to R6Game.R6AITemplate2 ... and it seems to make a slight difference :| of what changes you can make in here anyways

Since nobody has yelled at us here, ill explain how i did it, perhaps other people with more experience with Unreal and programming can sort this out, please give credit for my workout though, since people normally snatch and claim they are the first!

anyways
1)Create a new batch file in %Game Root%\KellerGame\Script and name it decompiler.bat [dont matter what you call it]
2)Edit the newly created batch file and write
"%GAMEROOT%\Binaries\R6Vegas2_Game.exe" batchexport %1 class .uc "%GAMEROOT%\ExportedScripts\" [change game root with where your Vegas root folder is e.g. J:\Vegas 2 on mine] and Save.
3) Drag R6Game.u onto decompiler.bat it pulls up 2 boxes... itll be there for a few seconds then show a General Protection Fault[no worries though!]
4) Go to your Exported Scripts folder... and there you go theres your .uc files! [EVEN THE CAMERA ONES, I WANT TO FIGURE OUT HOW TO CHANGE IT!]

Have fun.

GSG_9_Rage
05-29-2008, 10:31 AM
Beware of PunkBuster. If you mess with .u files, punkbuster will ban kick and ban you from servers.

GhostDance.2000
05-29-2008, 10:45 AM
Then how do you recompile it?

v2k4
05-29-2008, 02:10 PM
<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by GSG_9_Rage:
Beware of PunkBuster. If you mess with .u files, punkbuster will ban kick and ban you from servers. </div></BLOCKQUOTE>

I dont care personally about Punkbuster, because I dont play on the internet. =]

But thanks for mentioning it because i forget hehe

<BLOCKQUOTE class="ip-ubbcode-quote"><div class="ip-ubbcode-quote-title">quote:</div><div class="ip-ubbcode-quote-content">Originally posted by GhostDance.2000:
Then how do you recompile it?
</div></BLOCKQUOTE>

and thats where i am stuck my good man, thats why i need help from people who know how to do this kind of thing, you have to compile using a make command i think, but thats only what ive been reading