Jump to content


Photo

what i learned in game.dat


  • Please log in to reply
13 replies to this topic

#1 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 14 December 2008 - 07:04 PM

I have been peeking into game.dat in my off time for a while now and I have found a few things of interest.

A lot of Generals stuff was left over and some of it even works in BFME.
I am going to attach my list of BMFE enums I found all these in game.dat it took ages to list them all so I hope they are useful.
Some of them I don't know how they work because I never really played generals so if there are any generals players that can explain some these it will help.


On top of the enum list I have found where the behaviours are listed a lot I didn't know about i'm going to be testing some of these out to see what works,so if you're a coder please try and help me figure these out, and again generals players will be of help here.

EvacuateDamage
SpecialPowerCreate
SupplyWarehouseCreate
SupplyCenterCreate
PreorderCreate
LockWeaponCreate
TemporarilyDefectUpdate
AudioLoopUpgrade
AttributeModifierUpgrade
ModelConditionUpgrade
MaxHealthUpgrade
ExperienceScalarUpgrade
WeaponBonusUpgrade
RadarUpgrade
DelayedUpgrade
LevelUpUpgrade
BaseUpgrade
WanderAIUpdate
TransportAIUpdate
RadarUpdate
BoneFXUpdate
HijackerUpdate
ProneUpdate
SlavedUpdate
OCLUpdate
SpawnPointProductionExitUpdate
WeaponSetSpecialAbilityUpdate
BattlePlanUpdate
ShareExperienceBehavior
CivilianSpawnUpdate
DemoTrapUpdate
LaserUpdate
FloatUpdate
FireSpreadUpdate
DestroyEnvironmentUpdate
RainOfFireUpdate
RadiusDecalUpdate
DynamicShroudClearingRangeUpdate
DeletionUpdate
StealthDetectorUpdate
AutoFindHealingUpdate
AssistedTargetingUpdate
KeepObjectDie
SpecialPowerCompletionDie
UpgradeDie
RefundDie
CreateCrateDie
HeroDie
CrushDie
FXListDie
DestroyDie
SlaveWatcherBehavior
ReplenishUnitsBehavior
SupplyWarehouseCripplingBehavior
PoisonedBehavior
FireWeaponWhenDamagedBehavior
PropagandaTowerBehavior
ContestableContain
HorseHordeContain
HealContain
CritterEmitterUpdate
CaveContain
ClickReactionBehavior
BridgeTowerBehavior
BridgeScaffoldBehavior

Some of these I know,most I don't.
This not the full list but a sampling.

and finally I found some code for the AutoHeal_Module (or whatever it was called) I haven't tested these yet but they maybe of interest

AffectsWholePlayer
HealOnlyOthers

I hope this helps coders I will post more when I find it

Attached Files


Break dancing into the hearts of millions


#2 Sûlherokhh

Sûlherokhh

    Sagacious Engineer

  • Project Team
  • 3,754 posts
  • Location:Central Germany
  • Projects:S.E.E., Sage A.I., Code Advisor
  •  'Axe'er of the Gordic Knot

Posted 14 December 2008 - 07:07 PM

I can send you a somewhat sorted collection of files where i have listed and experimented with a lot of stuff i found in game.dat from BfMe2. There is bound to be some overlap. Let me peek into my archives. :thumbsdownsmiley:

bannerreal01mittelit3.jpg
Axed Head and A.I. Coder for S.E.E. and ... stuff

".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."


#3 Lauri

Lauri

    Let us remember foREVer

  • Hosted
  • 10,419 posts
  • Location:Norway
  • Projects:'The 4th Age' and 'Shadow and Flame'
  •  The very worst T3A Team Chamber Member

Posted 14 December 2008 - 07:11 PM

Here are my stuff from game.dat :thumbsdownsmiley:

Summon List

CREATE_ABOVE_LOCATION ;-- Like the Eagle Allies
CREATE_AT_LOCATION ;-- Standard one.. You pick the targeted place, voila, comes from nothing
CREATE_AT_EDGE_NEAR_TARGET_AND_MOVE_TO_LOCATION ;-- Comes at edge, and should move to target location
CREATE_AT_EDGE_FARTHEST_FROM_TARGET ;-- If you wanna summon something that has to cross the map, this is for you
CREATE_AT_EDGE_NEAR_TARGET ;-- This will just summon them at the nearest edge, not make them move to the target site
CREATE_AT_EDGE_NEAR_SOURCE ;-- At the nearest edge of the unit that summons. No need to target a site
CREATE_CLOSEST_TO_SPAWN_POINT ;-- Dunno
USE_OWNER_OBJECT ;-- No need to target a site, the units spawn around the user (wouldn't use it for Spellbook powers)


LUA List

GetRandomNumber
ObjectHideSubObjectPermanently
ObjectHideSubObject
ObjectSetDelayedDeath
ObjectGrantUpgrade
ObjectCreateAndFireTempWeapon
ObjectDoSpecialPower
ObjectSetEnragedState
ObjectSetFearFactor
ObjectSetChanting
ObjectPlaySound
ObjectEnterRampageState
ObjectEnterAlertState
ObjectEnterUncontrollableCowerState
ObjectEnterCowerState
ObjectEnterRunAwayPanicState
ObjectEnterFearState
ObjectCountNearbyEnemies
ObjectTestCanSufferFear
ObjectTestModelCondition
ObjectTemplateName
ObjectTeamName
ObjectBroadcastEventToUnits
ObjectBroadcastEventToCivilians
ObjectBroadcastEventToAllies
ObjectBroadcastEventToEnemies
ObjectDispatchEvent
ObjectSpy
ObjectDescription
HordeBroadcastEventToMembers
ExecuteAction
EvaluateCondition


Edited by Lauri, 14 December 2008 - 07:12 PM.

Shadow and Flame BETA 0.6 RELEASED - Link


#4 Sûlherokhh

Sûlherokhh

    Sagacious Engineer

  • Project Team
  • 3,754 posts
  • Location:Central Germany
  • Projects:S.E.E., Sage A.I., Code Advisor
  •  'Axe'er of the Gordic Knot

Posted 14 December 2008 - 07:31 PM

My list is too long to post here, so i have appended a txt file. You may find what you are looking for in the second half.
Some of the stuff definitely works in BfMe1, because i got those while checking the ini files of 'GENERALS' for the use of the arguments.

Attached File  MOD_TERMS.ini   79.14KB   196 downloads

Have fun! I certainly did, hehe. :thumbsdownsmiley:

bannerreal01mittelit3.jpg
Axed Head and A.I. Coder for S.E.E. and ... stuff

".. coding is basically boring. What's fun is finding out how things work, take them apart and then put them together in ways that were not intended nor even conceived."


#5 Lurtzy

Lurtzy

    Forerunner

  • Project Team
  • 1,169 posts
  • Location:DeLand, Florida, USA
  • Projects:Returning to modding

Posted 14 December 2008 - 09:46 PM

Wow, very useful information, thanks Sûl!

Trying to hold on...


#6 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 19 December 2008 - 02:48 PM

I was looking through the ini files of generals when I came across the following codes hopefully these should open some doors.
I experimented with the FireWeaponWhenDamagedBehavior.
I found that some strings that worked in generals for this power won't work now.
The same may be true of these code peices.
I'm going to try out as many as I can and let you guys know the results.

Behavior		= PropagandaTowerBehavior ModuleTag_04
	Radius				= 150.0
	DelayBetweenUpdates   = 2000; in milliseconds
	HealPercentEachSecond = 1%  ; get this % of max health every second 
	PulseFX			   = FX_OverlordPropagandaTowerPropagandaPulse;plays as often as DelayBetweenUpdates
	UpgradeRequired	   = Upgrade_ChinaSubliminalMessaging
	UpgradedHealPercentEachSecond = 2%  ; get this % of max health every second 
	UpgradedPulseFX	   = FX_OverlordPropagandaTowerSubliminalPulse;plays as often as DelayBetweenUpdates

  End
  
  
	Behavior = HealContain ModuleTag_06
	ContainMax		  = 10;way bigger than the # of objects we can have  
	TimeForFullHeal	 = 2000  ;(in milliseconds)
	AllowInsideKindOf   = INFANTRY
	AllowAlliesInside   = Yes
	AllowNeutralInside  = No
	AllowEnemiesInside  = No
  End
  
  
	Behavior = PoisonedBehavior ModuleTag_18
	PoisonDamageInterval = 100 ; Every this many msec I will retake the poison damage dealt me...
	PoisonDuration = 3000	  ; ... for this long after last hit by poison damage
  End
  
  
	Behavior = FireWeaponUpdate ModuleTag_02
	Weapon = ParticleUplinkCannonBeamTrailRemnantWeapon
  End
  
  
  Behavior = SpecialPowerCompletionDie ModuleTag_11
	SpecialPowerTemplate = SuperweaponA10ThunderboltMissileStrike
  End

  
  
  Behavior = AutoFindHealingUpdate   ModuleTag_05; This update will have the unit go to a healing station if injured. jba 
	ScanRate = 1000; once a second.
	ScanRange = 300;
	NeverHeal = 0.85;  don't heal if we are > 85% healthy.
	AlwaysHeal = 0.25; if we get below 25%, find healing right away.
  End

  
	Behavior = StealthDetectorUpdate ModuleTag_08
	DetectionRate   = 500  ; how often to rescan for stealthed things in my sight (msec)
   ;DetectionRange = ???;Dustin, enable this for independant balancing!
	CanDetectWhileGarrisoned  = No;Garrisoned means being in a structure that you units can shoot out of.
	CanDetectWhileContained   = No;Contained means being in a transport or tunnel network.
  End
  
	Behavior = StealthUpdate ModuleTag_09
	StealthDelay				= 0		  ; msec
	StealthForbiddenConditions  = MOVING; stays stealthy while attacking
	FriendlyOpacityMin		  = 30.0%
	FriendlyOpacityMax		  = 80.0%
	PulseFrequency			  = 500  ; msec
	MoveThresholdSpeed		  = 3
	InnateStealth			   = Yes
	OrderIdleEnemiesToAttackMeUponReveal  = Yes
  End
 
 
   Behavior = DynamicShroudClearingRangeUpdate ModuleTag_04
	FinalVision = 250.0 
	ChangeInterval = 50
	ShrinkDelay = 2000
	ShrinkTime = 1000
	GrowDelay = 0
	GrowTime = 1000
	GrowInterval = 10; Faster than most

	GridDecalTemplate
	  Texture		   = EXGrid
	  Style			 = SHADOW_ADDITIVE_DECAL
	  OpacityMin		= 50%
	  OpacityMax		= 100%
	  OpacityThrobTime  = 500
	  Color			 = R:32 G:64 B:128 A:0 //dim blue, additive
	End

  End
  
	Behavior = FloatUpdate UpdateTag_01
	Enabled = No; 'no' because we dont want to be lifted by this update, just swayed around like a buoy
  End
  
  
  ClientUpdate = LaserUpdate ModuleTag_02
	MuzzleParticleSystem = PaladinPointDefenseLaserFlare
	ParentFireBoneName   = Laser
	ParentFireBoneOnTurret = Yes
  End

  
	Behavior = SpecialAbility ModuleTag_13
	SpecialPowerTemplate = SpecialAbilityChangeBattlePlans
	UpdateModuleStartsAttack = Yes
  End
  Behavior = BattlePlanUpdate ModuleTag_14
	SpecialPowerTemplate			  = SpecialAbilityChangeBattlePlans

   ;Transition Timings
	BombardmentPlanAnimationTime	  = 7000
	HoldTheLinePlanAnimationTime	  = 7000
	SearchAndDestroyPlanAnimationTime = 7000
	TransitionIdleTime				= 0

   ;Messages
	BombardmentMessageLabel	  = MESSAGE:BattlePlanBombardmentInitiated
	HoldTheLineMessageLabel	  = MESSAGE:BattlePlanHoldTheLineInitiated
	SearchAndDestroyMessageLabel = MESSAGE:BattlePlanSearchAndDestroyInitiated

   ;Audio hooks
	BombardmentPlanUnpackSoundName		= StrategyCenter_BombardmentPlanUnpackSound
	BombardmentPlanPackSoundName		  = StrategyCenter_BombardmentPlanPackSound
	BombardmentAnnouncementName		   = StrategyCenter_BombardmentPlanAnnouncement
	SearchAndDestroyPlanUnpackSoundName   = StrategyCenter_SearchAndDestroyPlanUnpack
	SearchAndDestroyPlanIdleLoopSoundName = StrategyCenter_SearchAndDestroyPlanIdleLoop
	SearchAndDestroyPlanPackSoundName	 = StrategyCenter_SearchAndDestroyPlanPack
	SearchAndDestroyAnnouncementName	  = StrategyCenter_SearchAndDestroyAnnouncement
	HoldTheLinePlanUnpackSoundName		= StrategyCenter_HoldTheLinePlanUnpack
	HoldTheLinePlanPackSoundName		  = StrategyCenter_HoldTheLinePlanPack
	HoldTheLineAnnouncementName		   = StrategyCenter_HoldTheLineAnnouncement

   ;Army bonuses granted by different battle plans
	ValidMemberKindOf				   = INFANTRY CAN_ATTACK VEHICLE;Battle plans affect any kind of these...
; POW Trucks are cut. sorry. (srj)
;   InvalidMemberKindOf				 = DOZER STRUCTURE AIRCRAFT POW_TRUCK DRONE  ;...but make sure they don't have any of these
	InvalidMemberKindOf				 = DOZER STRUCTURE AIRCRAFT DRONE  ;...but make sure they don't have any of these
	BattlePlanChangeParalyzeTime		  = 5000;Subjected to paralyzation whenever a battle plan is changed.
	HoldTheLinePlanArmorDamageScalar	  = 0.9;Armor damage bonus scalar -- LESS is better!
	SearchAndDestroyPlanSightRangeScalar  = 1.2;Sight range bonus -- more is better!
   ;***NOTE*** WEAPON bonuses for army are specified in GameData.ini file!

   ;Building bonuses granted based on battle plan mode.
	StrategyCenterSearchAndDestroySightRangeScalar = 2.0
	StrategyCenterSearchAndDestroyDetectsStealth   = Yes
	StrategyCenterHoldTheLineMaxHealthScalar	   = 2.0
	StrategyCenterHoldTheLineMaxHealthChangeType   = PRESERVE_RATIO

 ;Revealing info
  VisionObjectName = VisionObject

  End

	Behavior = SpawnPointProductionExitUpdate ModuleTag_05
	SpawnPointBoneName = SpawnPoint
  End
  

;  Behavior = ProneUpdate ModuleTag_07
;	DamageToFramesRatio = 5.0; I take 20 damage, I go prone for 100.  For this guy, if any of my buds or my building take damage too (I have SlaveUpdate + ProneUpdate) Prone may get cut by itself though
;  End

  Behavior = HijackerUpdate ModuleTag_04
	ParachuteName = AmericaParachute
  End

  
  Behavior = RadarUpdate ModuleTag_12
	RadarExtendTime   = 4000	;in mSeconds
  End

  
	Behavior = WeaponBonusUpgrade ModuleTag_09
	TriggeredBy = Upgrade_GLAAPBullets
  End
  
	Behavior = ExperienceScalarUpgrade ModuleTag_17
	TriggeredBy = Upgrade_AmericaAdvancedTraining
	AddXPScalar = 1.0;Increases experience gained by an additional 100%
  End
  
  
  Behavior = MaxHealthUpgrade ModuleTag_06
	TriggeredBy   = Upgrade_AmericaDroneArmor
	AddMaxHealth  = 50.0
	ChangeType	= ADD_CURRENT_HEALTH_TOO  ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH
  End

Break dancing into the hearts of millions


#7 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 30 December 2009 - 08:15 AM

Bump and Pin.
May be useful for some.

Break dancing into the hearts of millions


#8 eabykov

eabykov
  • Members
  • 5 posts
  • Location:Russia
  •  #1 BFME Online Fan

Posted 28 September 2013 - 04:37 PM

I have been peeking into game.dat in my off time for a while now and I have found a few things of interest.

A lot of Generals stuff was left over and some of it even works in BFME.
I am going to attach my list of BMFE enums I found all these in game.dat it took ages to list them all so I hope they are useful.
Some of them I don't know how they work because I never really played generals so if there are any generals players that can explain some these it will help.


On top of the enum list I have found where the behaviours are listed a lot I didn't know about i'm going to be testing some of these out to see what works,so if you're a coder please try and help me figure these out, and again generals players will be of help here.
 

EvacuateDamage
SpecialPowerCreate
SupplyWarehouseCreate
SupplyCenterCreate
PreorderCreate
LockWeaponCreate
TemporarilyDefectUpdate
AudioLoopUpgrade
AttributeModifierUpgrade
ModelConditionUpgrade
MaxHealthUpgrade
ExperienceScalarUpgrade
WeaponBonusUpgrade
RadarUpgrade
DelayedUpgrade
LevelUpUpgrade
BaseUpgrade
WanderAIUpdate
TransportAIUpdate
RadarUpdate
BoneFXUpdate
HijackerUpdate
ProneUpdate
SlavedUpdate
OCLUpdate
SpawnPointProductionExitUpdate
WeaponSetSpecialAbilityUpdate
BattlePlanUpdate
ShareExperienceBehavior
CivilianSpawnUpdate
DemoTrapUpdate
LaserUpdate
FloatUpdate
FireSpreadUpdate
DestroyEnvironmentUpdate
RainOfFireUpdate
RadiusDecalUpdate
DynamicShroudClearingRangeUpdate
DeletionUpdate
StealthDetectorUpdate
AutoFindHealingUpdate
AssistedTargetingUpdate
KeepObjectDie
SpecialPowerCompletionDie
UpgradeDie
RefundDie
CreateCrateDie
HeroDie
CrushDie
FXListDie
DestroyDie
SlaveWatcherBehavior
ReplenishUnitsBehavior
SupplyWarehouseCripplingBehavior
PoisonedBehavior
FireWeaponWhenDamagedBehavior
PropagandaTowerBehavior
ContestableContain
HorseHordeContain
HealContain
CritterEmitterUpdate
CaveContain
ClickReactionBehavior
BridgeTowerBehavior
BridgeScaffoldBehavior
Some of these I know,most I don't.
This not the full list but a sampling.

and finally I found some code for the AutoHeal_Module (or whatever it was called) I haven't tested these yet but they maybe of interest

AffectsWholePlayer
HealOnlyOthers
I hope this helps coders I will post more when I find it

 

How I can modify game.dat?

What software edit game.dat?

Please write me to email: eabykov@spaces.ru



#9 Radspakr Wolfbane

Radspakr Wolfbane

    The John Farnham of modding

  • Members
  • 7,722 posts
  • Location:less than 5 meters from my bed
  • Projects:Comeback tour
  •  The Retired Beard

Posted 28 September 2013 - 06:45 PM

game.dat hasn't been reverse engineered so far as I'm aware.

This information was merely gleamed by looking through the file in notepad++.


Break dancing into the hearts of millions


#10 eabykov

eabykov
  • Members
  • 5 posts
  • Location:Russia
  •  #1 BFME Online Fan

Posted 30 September 2013 - 04:43 PM

How I can edit game.dat?

#11 Goldtouch

Goldtouch

    title available

  • Hosted
  • 449 posts

Posted 30 September 2013 - 05:33 PM

How I can edit game.dat?

You can't edit game.dat...



#12 eabykov

eabykov
  • Members
  • 5 posts
  • Location:Russia
  •  #1 BFME Online Fan

Posted 30 September 2013 - 06:09 PM

I must edit game.dat

Because I wand do modding!!!

How you make patch 1.05 and edit game.dat???



#13 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,971 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 30 September 2013 - 06:31 PM

We don't edit game.dat when we mod, we just change everything else.


revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#14 Blade

Blade

    title available

  • Members
  • 503 posts

Posted 07 September 2017 - 11:23 AM

I realise this is a big necro to this thread, but I've currently got a project, Thyme (https://github.com/T...blyArmada/Thyme) on the go attempting to reimplementing the game.dat from Zero Hour by modifying it in memory to run new code and replacing the original function by function until the entire game.dat is reimplemented in C++.

 

Although not of immediate use for BFME and later, if anyone has started poking around in the game.dat files since the last post here and mapping what functions do what, I might be able to help speed that along with what I know of the ZH binary to work out what is where. Also, When Thyme is further along towards no longer needing the original game.dat, well mapped BFME binaries would potentially allow back porting of support for the newer games to Thyme as well. Sister projects to reimplement and inject missing generals functions or entirely new functions into BFME and later might also be possible.


  • NDC likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users