///////////////////////////////////////////////////////////////////////////////
//
// RTS_CFG.h
//
// Runtime configuration file for real-time topdown strategy elements added
// to the engine.
//
// By the Mad Dr. I.  4/98.
//
///////////////////////////////////////////////////////////////////////////////

//
// Include the ART only parameters
//
#include "ART_CFG.h"

// include the parameters for the Admiral's Log
#include "ADLOG_CFG.h"

// include the network configuration
//#include "Network_CFG.h"
 
///////////////////////////////////////////////////////////////////////////////
// Interface Settings
///////////////////////////////////////////////////////////////////////////////

// INTRO MOVIE
#define cfgINTRO_MOVIE_NAME "Intro.bik"

// CAMERA CONTROL

// Where do we start the cinematic zoom?
float cfg_DEFAULT_TACTICAL_ZOOM = 4.0;//DAS 4.0

float OVERVIEW_PARABOLA_FOCUS = 200.0;
float OVERVIEW_MAX_HEIGHT  = 2200.0;
float OVERVIEW_INIT_HEIGHT = 600.0;
float OVERVIEW_MIN_HEIGHT  =  10.0;
float OVERVIEW_INIT_ROTATION = 0.0;
int SCROLL_BORDER_WIDTH = 20;
float SCROLL_COEFFICIENT = 90000.0;
float FASTSCROLL_COEFFICIENT = 0.005;
float ZOOM_SCROLL_COEFFICIENT = 0.01;
float ROTATION_SCROLL_COEFFICIENT = 0.01;
float CINEMATIC_ROTATION_COEFFECIENT = 0.035;

float SCROLL_ACCELERATION = 10;				// Multiplier for each "step"
float SCROLL_FRICTION = .90;
float MAX_SCROLL_SPEED = 900.0;				// The max speed we want to scroll
float INITIAL_SCROLL_SPEED = 0.0;			    // Initial speed
float MAX_ROTATE_SPEED = 5.0;
float ROTATE_ACCELERATION = 4.0;
float ROTATE_FRICTION = .95;
float ZOOM_ACCELERATION = 1.8;
float ZOOM_FRICTION = .95;

// how far from the screen center the craft can move without moving camera. 0.4 is edge of screen,
// 0.0 is center.
float cfgSCREENS_FROM_CENTER_FOR_MAX_TETHER = 0.0;

// how much realtime to interpolate from the current camera to focus totally on a moving
// ship after it's tether maxes out
float cfgREALTIME_TO_REEL_IN_MAXED_TETHER = 5.0;

// the tether will be allowed to go back to max length when the focused craft speed goes under this
// and after he has been reeled in.
float cfgRESET_TETHER_WHEN_CRAFT_UNDER_SPEED = 30.0;


// SHIP SELECTION
int SELECTION_RECTANGLE_COMMIT_AREA = 100;	// Define the area of the rectangle we need to form for the selection
											// rectangle to become the current action.

float cfgPATH_POINT_SELECTION_DISTANCE=15;	// How far from a path point we
int cfg_DEFAULT_TERRAIN_VALUE = 10;
											// can click and select it

int SNAP_TO_DISTANCE = 20;					// Distance where the panels snap to another panel or the edge.
int UNHIDE_DISTANCE = 30;					// Distance at which the interface auto-hide pops up.


// DEBUG DISPLAY
int SHOW_QUADTREE = 0;						// Should we show the quadtree decompsition?
int SHOW_FOOTPRINTS_IN_EDIT_MODE = 0;		// Should we show footprints in edit mode?
int DEBUG_VECTORS_3D = 0;
int DEBUG_SHOW_AI_PATHS = 0;
int DEBUG_SHOW_AI_PATHS_RUNNING = 0;
int DEBUG_SHOW_CURVES = 1;
int DEBUG_SHOW_OBJ_POSTS = 1;
int DEBUG_SHOW_LOCAL_BOUNDING_BOX = 0;
int DEBUG_SHOW_OBJECT_BOUNDING_BOX = 0;
int DEBUG_SHOW_OBJECT_BOUNDING_SPHERE = 0;
int DEBUG_SHOW_OBJECT_BOUNDING_ELLIPSOID = 0;
int DEBUG_SHOW_BOUNDING_SQUARE = 0;
// DEBUG_DRAW can  be 0 - 3
//	0 means draw nothing,
//	1 means draw just coords
//	2 means draw everything but AI,
//	3 means AI state only
int DEBUG_DRAW = 0;

///////////////////////////////////////////////////////////////////////////////
// Other...
///////////////////////////////////////////////////////////////////////////////

//
// DEFAULT MISSION START STARDATE (if not specified in the mission itself)
//

float cfgINITIAL_STARDATE = 56123.1;	// stardate at mission start if not specified
float cfgSTARDATE_PER_SECOND =0.01389;		// for every "game second (more or less real time second), this many stardate intervals pass

//
// PARAMETERS FOR MULTIPLAYER MISSION TYPES
//

float cfgDEFEND_TIME = 60.0 * 60.0;		// how long does a defender need to hold out (if unspecified) in seconds
float cfgPLANETCONQUER_TIMELIMIT = 60.0 * 15.0;
float cfgLATINUM_COLLECT = 15000.0;		// how much latinum to collect to win a latinum collection game

//
// DIFFICULTY SETTINGS
//

// Damage coefficients for incoming damage for user in single player
float EASY_DAMAGE = 0.5;
float HARD_DAMAGE = 2.0;

// Mining rate cooefficients for user in single player
float EASY_MINING_MODIFIER = 2.0;
float HARD_MINING_MODIFIER = 0.5;

// AI special weapon fire rate
float EASY_SPECIAL_WEAPON_FIRE_MODIFIER = 20.0;
float DEFAULT_SPECIAL_WEAPON_FIRE_MODIFIER = 4.0;
float HARD_SPECIAL_WEAPON_FIRE_MODIFIER = 0.05;

// Build cost multiplier handicap for hard AI
float HARD_AI_COST_HANDICAP = 0.6;
float HARD_AI_SPEED_HANDICAP = 0.7;

float MEDIUM_AI_COST_HANDICAP = 0.85;
float MEDIUM_AI_SPEED_HANDICAP = 1.0;

float EASY_AI_COST_HANDICAP = 1.2;
float EASY_AI_SPEED_HANDICAP = 1.1;

// Percent chance that AI fleets will cloak for long moves in Instant Action
// and Multiplayer AI (provided they can!)
float HARD_AI_CLOAK_PERCENT = 75;
float MEDIUM_AI_CLOAK_PERCENT = 50;
float EASY_AI_CLOAK_PERCENT = 25;

// how far away must latinum resource bases be? (to keep them from building
// clusters of mining stations around clusters of nebulas
float cfgRESOURCE_LATINUM_SPACING = 500.0;

// how far should the transmuters park from the resource
float cfg8472_RESOURCE_DISTANCE = 300.0;

// what is too close to the resource?
float cfg8472_RESOURCE_INSIDE_DISTANCE = 200.0;

// how many freighters can we have around each resource?
int cfgFREIGHTERS_PER_MOON = 3;
int cfgFREIGHTERS_PER_NEBULA = 3;
int cfgFREIGHTERS_PER_PLANET = 5;

// Threat multiplier penalty for getting resources
float cfgRESOURCE_THREAT_PENALTY_COEFFICIENT = 1.0;

// if we start a planet base, build this far above the surface
float cfgPLANET_BASE_BUILD_BUFFER = 400.0;

// At what range of a move command will AI cloak in Instant Action and MP?
float cfg_MIN_MOVE_DISTANCE_FOR_CLOAK = 1500.0;

// At what range will the AI try to warp?
float cfg_MIN_MOVE_WARP_DISTANCE = 1100.0;

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// CLEAN TO HERE.
// I've eliminated unused parameters above this spot.
// Please clean more, and move this down as appropriate.
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

//
// DAMAGE MODEL
//

// Are we using the hitpoint system for damage allocation?
int USE_SYSTEM_HITPOINTS = 1;
int SYSTEM_HITPOINTS_BONUS = 0;
float SHIELD_DAMAGE_PROTECTION = 1.0;//DAS 0.8

// The default for pre-loading is off for debug, on for release.
// If you want it different, uncomment these two.

// Should we demand load all ODFs?
int cfgDEMAND_LOAD_ODFS = 1;

// Reload object classes on editor instance creation?
// NOTE: When placing objects with this flag on, ALL OBJECTS of the same type
//		actually end up with different Object Classes, because they ALWAYS get reloaded.
//		Only turn this on if you're actually making changes to the odfs, not when building a mission.
int cfgRELOAD_OBJECT_CLASSES = 0;

// Should we go to windowed mode when we hit an assert?  Very useful for single monitor machines.
int cfgFLIP_TO_WINDOWED_ON_ASSERT = 1;

// What's our default grid rendering state in tactical mode? 0=on shift, 1=always, 2=never
int cfgTACTICAL_GRID_RENDER = 2;

// What's our default grid rendering state in strategic mode? 0=on shift, 1=always, 2=never
int cfgSTRATEGIC_GRID_RENDER = 0;

// New clicking scheme, right means DO, left is select and focus.
int cfgNEW_CLICKS = 1;

// Can we deselect by left clicking in empty space.
int cfgNO_DESELECT = 0;

// Should we show the framerate in the upper left corner?
int  FRAMERATE_DISPLAY = 0;

// At what size should we start scaling objects in strategic view?
float cfgMIN_STRATEGIC_VIEW_OBJECT_RADIUS = 25.0; // 1/4 grid square size

// What's the maximum strategic view scale factor?
float cfgMAX_STRATEGIC_VIEW_OBJECT_SCALE = 1.75;  // Grow by at most 75%

//       A    AAAAA
//      A A     A
//     A   A    A
//     AAAAA    A
//     A   A    A
//     A   A  AAAAA

// STRATEGIC AI

// Show this many goals in the minimap display
int cfg_AI_SHOW_GOALS_COUNT = 12;

// COMBAT

// Instead of standing perfectly still, should we circle in place near our
// weapon range?
int CIRCLE_IN_PLACE_DURING_COMBAT = 0;
float CIRCLE_RADIUS_DIVISOR = 6.0;

// PATHING

// How quickly do we rotate away from collision (1.57 is very quick)
float MAX_PREVENTION_ROTATION = 0.95;//DAS 0.6

// Path Planning
float HIGHEST_OCTTREE_GRID_RESOLUTION = 100.0;

// BUFFER FOR WARP FOOTPRINTS
float cfg_WARP_INHIBITION_BUFFER = 80.0;

// Default value for terrain cost
int cfg_DEFAULT_TERRAIN_VALUE = 100;

// Warp inhibition cost
int cfg_WARP_INHIBITION_COST = DEFAULT_TERRAIN_VALUE * 4;

// Almost, but not quite impassable
int cfg_ALMOST_INTRAVERSIBLE = 300;

// Amount to bias against pathing vertically.  This stretches space
// vertically so that we tend to path horizontally
float cfg_PATHING_VERTICAL_BIAS = 5.0;

// In certain combat modes, we go extra slow
float COMBAT_SLOWDOWN = 1.0;

// The leader of a formation should slow down
float FORMATION_LEADER_SLOWDOWN = 1.0;

// Pathing cost for nebulae
float NEBULAE_PATHING_COST = 300.0;

// Extra distance for pathing around nebulae
float NEBULAE_PATHING_SAFETY_COEFFICIENT = 1.8;

// Pathing cost for asteroid belts
float ASTEROID_BELT_PATHING_COST = 400.0;

// Pathing cost for blackholes
float BLACKHOLE_PATHING_COST = IMPASSABLE_TERRAIN;

// Extra distance for pathing around blackholes
float BLACKHOLE_PATHING_SAFETY_COEFFICIENT = 1.5;

// Do we default to formation move, or non-formation group move
int cfgDEFAULT_TO_FORMATION_MOVE = 1;

// How do we scale the planet radius for the gravity induced dewarping zone.
float cfgPLANET_DEWARP_RADIUS_MULTIPLIER = 5;
// Radius multiplier for black holes, since hey, they got gravity
float cfgBLACKHOLE_DEWARP_RADIUS_MULTIPLIER = 125.0;

// STRATEGIC AI PARAMETERS
float AI_GRID_SIZE = 400.0;
#define EASY_AI "AI_Easy_Script.dsl"
#define MEDIUM_AI "AI_Medium_Script.dsl"
#define HARD_AI "AI_Hard_Script.dsl"

// Ship combat configuration
float SKINNY_SHIP_COMBAT_FLOOR = -600.0;//DAS -400.0
float SKINNY_SHIP_COMBAT_CEILING = 600.0;//DAS 400.0
float SHIP_COMBAT_FLOOR = -3250.0;//DAS -1250.0
float SHIP_COMBAT_CEILING = 3250.0;//DAS 1250.0
float DEEP_SPACE_SHIP_COMBAT_FLOOR = -5000.0;//DAS -3000.0
float DEEP_SPACE_SHIP_COMBAT_CEILING = 5000.0;//DAS 3000.0
float ANCHOR_PURSUIT_POINT_ANGLE = (3.14159/6);
float ANCHOR_RADIUS = 4.0;
float ANCHOR_PURSUIT_FORCE = 10.0;
float CENTER_OF_COMBAT_PERSISTENCE_CUTOFF = 6 * ANCHOR_RADIUS;
float DOGFIGHT_RANGE = 170.0;//DAS 70.0

// multiply times target radius to get radius for circling, cloverleaf
float cfgDOGFIGHT_RADIUS_MODIFIER = 3.0;
float cfgCLOVERLEAF_RADIUS_MODIFIER = 1.2;

// We don't want to go all the way past this guy
float cfgFLYBY_LENGTH_MODIFIER = 1.41;

// If the enemy is this much (coeff) too far from our flyby goal, recalculate a goal
float cfgFLYBY_RECALC_DISTANCE_COEFF = 2.0;


//
// COLLISION AVOIDANCE & PATH FOLLOWING STUFF
//

// How far apart should ships be when moving in formation
float FORMATION_SPACING = 100.0;

/* // These are defunct or in another place now... -MPJ
//	I will remove them when I am sure I got em all.

// How much the last cycle's collision avoidance force should factor into
// this cycle's.  Must be less than 1.0, and should likely not be very close
// to 1.0.
float OLD_AVOIDANCE_FORCE_WEIGHT = 0.7;

//Obstacle avoidance is off by default
int OBSTACLE_AVOIDANCE = 1;//DAS 0

// How far ahead to project a collision
float COLLISION_LOOK_AHEAD_TIME = 600.0;//DAS 1.4

// How much wider than reality to pretend objects are for collision avoidance
float COLLISION_SAFETY_MARGIN = 100.0;//DAS 1.2

// We're adding a special repulsion on the y-axis for collision avoidance.
float Y_REPULSION = 0.5;
*/

// When we're following a scripted 3D path, we know to advance to the next
// point when we're within this radius of the current point
float cfgPATH_POINT_RADIUS = 35.0;
float cfgPATH_POINT_RADIUS_SQUARED = cfgPATH_POINT_RADIUS * cfgPATH_POINT_RADIUS;


// We need an epsilon value for sending units to the right or bottom of the map
// to keep our position strictly LESS than the edge value
float MAP_EDGE_EPSILON = 0.1;

// We actually start keeping ships from the edge this many meters out
float MAP_EDGE_BUFFER = 100.0;

//
//     GAMEPLAY
//

// Transporter parameters.
float TRANSPORTER_RANGE = 1000.0;//DAS 500.0
float TRANSPORTER_DELAY = 1.0;
float TRANSPORTER_ACTION_DELAY = 1.0;
int   TRANSPORTER_MAX = 5;

//fraction of the the build time it takes to decommission
float DECONSTRUCT_PERCENT_TIME = 0.3;

// Weapon parameters.
float BEAM_MISS_LIFETIME = 0.1;

// Use team color for normal weapons?
int NORMAL_WEAPON_TEAM_COLOR = 0;

// UI Limits for each resource
int MAX_DILITHIUM = 999999;
int MAX_CREW =		 99999;
int MAX_LATINUM =	 99999;
int MAX_METAL =		999999;
int MAX_OFFICERS =     999;

int MAX_BIOMATTER = 9999999;

// default resource starting values
// these form the basis for a new bzn file created in edit mode
// they are ignored by multiplayer / instant actions --- see below
// they are ignored by single player - they get loaded from the map iteself
int STARTING_DILITHIUM =	3500;
int STARTING_CREW =			 750;
int STARTING_CREW_CAPACITY = 250;	// this is the number of crew you can accumulate if you have nothing (no starbases, no planets)
int STARTING_LATINUM =		1000;
int STARTING_METAL =	   12500;

// the max value that officer capacity can be in a single player game, and default in multiplayer game.
int SINGLE_PLAYER_OFFICER_LIMIT = 600;

// multiplayer starting resource possibilities
struct MP_Resource_Class
{
	char m_key[80];			// key for multilanguage lookup in the label.map file
//	int m_dilithium;
//	int m_metal;
//	int m_latinum;
//	int m_crew;
};

int MP_RESOURCE_MODES = 3;	// Note -- this cannot be more than 60 (and it may fail if over 8 depending on how win event handles are set up)

// we no longer define the resource amts here
// they're defined on a per race basis in the race odfs
MP_Resource_Class MP_STARTING_RESOURCE[MP_RESOURCE_MODES] =
{
//  Key					Dilith			Metal		Latinum			Crew
	"GUI_MPS_RESOURCE_NORM",//		3500,			2000,		500,			1200,
	"GUI_MPS_RESOURCE_LOTS",	//		30000,			30000,		30000,			30000,
	"GUI_MPS_RESOURCE_UNLIMITED",//		MAX_DILITHIUM,	MAX_CREW,	MAX_LATINUM,	MAX_CREW,
};


// This is for the pull down in the MP Setup screen.
// this sets the maximum officer capacity available to all players in the game.
// this forces a limit to the size of each players armada, so that a reasonable constant speed can be maintained.
struct MP_Officer_Limit_Class
{
	char m_key[80];			// key for multilanguage lookup in the label.map file
	int m_officer_limit;
};
int MP_OFFICER_LIST_SIZE = 4;
MP_Officer_Limit_Class MP_OFFICER_LIMIT[MP_OFFICER_LIST_SIZE] =
{
	"ol_normal",		SINGLE_PLAYER_OFFICER_LIMIT,
	"ol_restricted",	(SINGLE_PLAYER_OFFICER_LIMIT / 2),
	"ol_more",			(SINGLE_PLAYER_OFFICER_LIMIT + 200),
	"ol_max",			MAX_OFFICERS,
};



int DRAW_PIZZA_BOX = 0;

float cfgSCREEN_WIDTH =	1900.0;//DAS 1600
float cfgSCREEN_HEIGHT = 1200.0;

// should the control panel be displayable
int cfgCONTROL_PANEL_SHOW = 0;

// How far away should we look for ships to snap to in Tactical View?
float cfgTACTICAL_SNAP_DISTANCE = 5200.0;//DAS 800.0

// should we fade out craft that get too close to the camera?
int cfgFADE_OUT_ENABLED = 1;//DAS 1
// ratio of radius/distance at which fade out begins
float cfgFADE_OUT_MIN_FOV = 0.26;//DAS 0.5
// ratio of radius/distance at which fade out is maximum
float cfgFADE_OUT_MAX_FOV = 0.28;//DAS 0.8
// maximum degree of fade-out (1.0 = invisible, 0.0 = opaque)
float cfgFADE_OUT_MAX = 0.9;

// How far you have to be from your anchor to try warping at all
float cfgTOO_CLOSE_TO_WARP = 50.0;//DAS 800.0

// Bonus points to be added to winner(s) game score
float cfgWINNERS_BONUS = 5000;

//
// PLANET CONSTANTS
//
int cfgPOP_SPARSE	= 1000;
int cfgPOP_LIGHT	= 2000;
int cfgPOP_MEDIUM	= 3000;
int cfgPOP_HEAVY	= 5000;
float cfgPLANET_CIVILIAN_RATE_MODIFIER = 0.20;

// PLANET CONSTANTS

// How often should we take snapshots of strength for the timeline?
// in seconds
// this is just the initial sample rate, it decreases as the game plays
float cfgTIMELINE_FREQ = 0.5;


// How much time should there be between 2 ferengi traders going to one trading station?
float cfgTSTATION_TIME_BETWEEN_FERENGI = 60;
// extra time added per ferengi trader that a team has killed
float cfgKILL_FERENGI_TIME_ADD = 5;

float cfgBIOMATTER_RECYCLE_FRACTION = 0.5;

// these aren't bad either:  gvomar06.wav,gvomar60.wav,gvomar62.wav
#define cfgSOUND_VOICE_SAMPLE "gvopic50.wav"
#define cfgSOUND_EFFECTS_SAMPLE "phfwea.wav"
#define cfgSOUND_BUTTON_SAMPLE "federation_click.wav"

int cfgRIGHT_CLICK_POPUP = 1;

// Distances that the movement cursor is seen at full size
// and at half size.
float cfgMOVE_CURSOR_NEAR_DIST = 300;
float cfgMOVE_CURSOR_HALF_DIST = 3000;

// the transparency of the 'ghost ship' drawn when holding down shift
// 1.0 == invisible 0.0 = opaque
float cfgGHOST_TRANSPARENCY = 0.75;

// for auto energy triangle
float cfgEnergyTriangleLowShields = .5;

// what is the chance that a planet will rotate backwards?
float cfgPLANET_REVERSE_ROT_CHANCE = 0.5;

// what things do we draw posts for when something is selected?
//	0	kPostDrawingMode_DrawAll,			// draw posts on everthing we can see
//	1	kPostDrawingMode_ShipsOnly,			// on ships only, but ALL ships
//	2	kPostDrawingMode_SelectionOnly		// on selected units only
int cfgGridPostDrawingMode = 2;

///////////////////////////////////////////////////////////////////////////////
// Game Pace settings
///////////////////////////////////////////////////////////////////////////////

// how quickly units move, this is a multiplier on ALL unit speeds
float cfgGAMEPACE_MOVEMENTSPEED = 1.0;//DAS 2.0
