How to set the default value in Freelancer?
-
OK, im trying to ask this question simply with my bugest english.
Here is Constants.ini from SDK 1.5b
[Constants]
COLLISION_DAMAGE_FACTOR = 0.500000
MUSIC_CROSS_FADE_DELAY = 10.000000
MUZZLE_CONE_ANGLE = 40
PLAYER_COLLISION_GROUP_HIT_PTS_SCALE = 3
PLAYER_ATTACHED_EQUIP_HIT_PTS_SCALE = 5[EngineEquipConsts]
CRUISE_DISRUPT_TIME = 5
MAX_DELTA_FX_THROTTLE = 0.250000
THROTTLE_STEADY_TIME = 0.500000
THROTTLE_ATTEN_MOD_RANGE = 8.000000
DELTA_THROTTLE_ATTEN_MOD_CHANGING = 8.000000
DELTA_THROTTLE_ATTEN_MOD_STEADY = -1.000000
CRUISE_STEADY_TIME = 2.000000
DELTA_CRUISE_ATTEN_MOD_STEADY = -1.000000
CRUISE_ATTEN_MOD_RANGE = 8.000000[ShieldEquipConsts]
HULL_DAMAGE_FACTOR = 0.500000[PhySysConsts]
MATERIAL_FRICTION = 0.100000
MATERIAL_ELASTICITY = 0.900000
DEFAULT_LINEAR_DAMPING = 0.500000
DEFAULT_ANGULAR_DAMPING = 0.200000, 0.200000, 0.200000[CommConsts]
COMM_PLAYER_FAR_DIST = 6000.000000
COMM_PLAYER_FAR_DIST_ATTEN = 0.000000
CHATTER_MAX_DIST = 3500.000000
CHATTER_MAX_DIST_ATTEN = -16.000000
CHATTER_START_ATTEN = -2.000000
COMM_CONFLICT_PRIORITY_CUTOFF = -3
WALLA_MAX_DIST = 3500.000000
WALLA_MAX_DIST_ATTEN = -24.000000
WALLA_START_ATTEN = -8.000000
WALLA_PRIORITY_CUTOFF = -3[AsteroidConsts]
MAX_ASTEROID_LOOT_DAMAGE = 20000.000000
MAX_LOOT_PER_ASTEROID = 3Do you found something miss? that is
MAX_PLAYER_AMMO in Constants node
and
CRUISING_SPEED in EngineEquipConsts nodeBut when you install the sdk and run Freelancer, the game will runs fine, so i suppose Freelancer Loaded the value from default setting.
And, we have some player cheating by edit MAX_PLAYER_AMMO and CRUISING_SPEED to make him strong and fast. So i have a idea to make that guy stop that if i can change the keyname and default value.
For exp.
I change MAX_PLAYER_AMMO to SOME_THING_ELSE and set the default value to 50, player will not able to get more ammo by edit MAX_PLAYER_AMMO.So, anyone can tell me how to do that? Thanks.
-
-
You can’t change the default variable names. Not without a hell of research into and editing the freelancer.exe file.
-
Your best bet, therefore, is to use some form of anti-cheat for the server or be very vigilant
-
Some variables are missing yes, and the game uses the defaults if none are present, as you suspected
-
Also some variables that are present aren’t actually used by the game, or have no noticeable effect
The ‘hardcore’ guys will be able to fill you in better with any more in-depth info, but I believe that’s the jist of it
-
-
Remember that modifying the default constant would have no effect on what you are describing; the game would still get the overridden values from the INIs without reading the EXE.
Your only luck would be to find the hex address where the game looks for the constant in the INI and remove that, making the INI obsolete. It could be a jump and you might have some luck, but it would still be very difficult to find.
As Fury said, your best bet would be to just get good server-side cheat detection
(FLHook and others detect and disable things like cruise hacks or kick the cheater)
-
And, we have some player cheating by edit MAX_PLAYER_AMMO and CRUISING_SPEED to make him strong and fast. So i have a idea to make that guy stop that if i can change the keyname and default value.
For exp.
I change MAX_PLAYER_AMMO to SOME_THING_ELSE and set the default value to 50, player will not able to get more ammo by edit MAX_PLAYER_AMMO.So, anyone can tell me how to do that? Thanks.
PMed you with the info, as it probably shouldn’t be made public.
-
And, we have some player cheating by edit MAX_PLAYER_AMMO and CRUISING_SPEED to make him strong and fast. So i have a idea to make that guy stop that if i can change the keyname and default value.
For exp.
I change MAX_PLAYER_AMMO to SOME_THING_ELSE and set the default value to 50, player will not able to get more ammo by edit MAX_PLAYER_AMMO.So, anyone can tell me how to do that? Thanks.
PMed you with the info, as it probably shouldn’t be made public.
Got it, Thank you M0tah!!!
-
Lmao the offset hunter strikes again ;D