How it's possible to lower shooting accuracy of AI in Vietnam mode? Right now it seems they are too accurate and precise... Is it doable by some script or by changing weap.txt?
OK, I can locate vcbasic.inc in SDK and can change D3_SHOOT_PREC macro. Now what are the next steps to actually make it change behavior of all AI in single player and multiplayer? In other words where I need to put this file in the .cbf directory structure so the game engine will pick it up and use it instead of the default?
This file should be compiled and added to map in editor. If you want to create new map with modified parameters, it is not problem. If you want to modify existing map or single player campaign, don't do it. For single player - choose another difficulty, for multiplayer - map will be modified and you will not be able to play with others (or you will be kicked by server).
For right now I'm mostly concerned with single player. So there is no way to alter AI accuracy on the global level for single player while still using "vietnam" mode?
If vietnam mode is too hard for you, just try something easier ;-) medium dificulty
If you want to change behavior/accuracy for singleplayer, you have to change it in all VC scripts (hundreds of them) and then compile them again. Problem is that you have only compiled versions in CBF files, not sourcecodes. So - it is not possible easily. You can debug it and try to modify scr filed in hexa editor but I think only Brchi can do that. And from my POV - it is wasting of time when you can chose lower difficulty.
It's not that it's too hard, it's just that in my opinion AI accuracy in Vietnam mode is completely unrealistic. They act more like sniper cyborgs than historical NVA/Vietcong.
My question is what other things besides number of allowed saves and AI accuracy, difficulty level changes? Does it also alter the number of opponents in single player campaign? Does it also alter other behavior of AI, e.g. are they more aggresive in Vietnam mode than Normal mode?
Thats for the multiplayer. But i guess there are some changes when it comes to the campaign mode.....imo more changes were made.
Look at the structure of the AI properties which can be found in the sc_global.h (SDK)
You can also use the properties in MP-Maps to create even smarter enemies ;)
Code
typedef struct{
float max_vis_distance; // how far can see
float watchfulness_zerodist; // how he can recognize enemies at near distance
float watchfulness_maxdistance; // how he can recognize enemies at maximum distance
float boldness; // odvaha - 0.5- very low, 1 - low, 2-medium, 4-high,10-suicide - ma vliv na vykukovani z krytu kdyz okolo litaj kulky
float coveramount; // normal 0.2 - jak daleko se maximalne bezi schovat vuci vzdalenost nejblizsiho EN
float shoot_imprecision; // 0 - absolutely exact aim, 1 - very bad aiming, default is 0.2
BOOL extend_searchway; // FALSE - do not use (recommended for enemies)
// TRUE - use extended searchway (recommended for player's group)
float shortdistance_fight; // 0 - do not use
// 1 - use as much as possible
// - computing very expensive, use 0.2 (in average) for enemies, 1 for player's group
float view_angle; // 2.5f is default, for allies is recommended 4.7 (1.5*PI)
float view_angle_near; // 3.5f is default, for allies is recommended 6 (nearly 2*PI)
float grenade_min_distance; // minimal distance to throw grenade at (default: 10.0f)
float grenade_timing_imprecision; // random max + in sec (default: 0.5f)
float grenade_throw_imprecision; // 0 - totally exact, 1 - normal (default: 1.0f)
float grenade_sure_time; // how long player makes sure about valid situation to throw grenade (default: 5.0f sec)
float forget_enemy_mult; // how fast ai forgots enemies , 1.0f default, 2.0f - 2times faster, 0.5f - 2times slower
float shoot_damage_mult; // multiple of the damage player causes
BOOL disable_peace_crouch; // when TRUE, player never crouches in peace mode (except crouching bellow obstacles when moving)
float shoot_while_hidding; // 0-1 (0-never, 1-ever), default is 0.3f
float reaction_time; // used when spotting first enemy, default is 0.0f for side 0, and 1.0f for the rest
float scout; // if AI going to check spotted first enemies (0-never, 1 - ever), default is 0.0f
float berserk; // if AI is in Attack mode - if attack withouot hidding himself (0-never, 1- ever), default is 0.0f
float aimtime_max; // maximalni cas pro zamireni, default 0.7f
float aimtime_canshoot; // hodnota 'casu', pod kterou jiz muze strilet, default 0.1f
float aimtime_rotmult; // nasobitel otoceni, default 0.5f
float wounded_start_perc; // hodnota hp/max_hp pri ktere se zacina uplatnovat zhorsovani mireni
float wounded_aimtime_mult_max; // hodnota nasobku zamirovaciho casu pri hp==0
float wounded_shoot_imprec_plus; // hodnota zvetseni shoot_imprecision pri hp==0
Silent Bob, what then would be the easiest way to incorporate global script with s_SC_P_AI_props structure to change behavior of AI across all single player campaign?
I guess the easiest way would be to include it in some header file, but it seems I still would have to compile all the scripts, right?
Is there any simpler way to do this?
And if I would like to compile all the scripts again where I can find the source files for them?
PS> Little explanation of my motivation. In my spare time I'm working on the new military simulation mod for Vietcong that is basically aiming for VBS type realism. One of the main reasons I'm interested in Vietcong is that it has one of the best (if not the best) implementation of military AI ever created in the computing industry. It's really fun to play with bots in this game. Even VBS AI is much much worse.