						// NAPOLEONIC WARS MOD 1.0 2006 //
							//1812-1815 ADDON PACK//

							   // BY PROFT //



//////////////////////////////////////////////////////////////////////////////////////////////////////

SCRIPTS :

- line3.sqs :

What does it do : a defence script, where units are in a zigzag line formation, kneeling after shooting, and
staying in line. 
How to launch it : [group this] exec "line3.sqs" (in the init line of group's leader).
How to stop it : wait for the group to flee, or "_x domove getpos _x" foreach thislist (in a trigger).

- line4.sqs :

What does it do : make units walk in line with weapon on shoulder.
How to launch it : [group this] exec "line4.sqs" (in the init line of group's leader).
Other script needed : "line6.sqs"
How to stop it : automatic, when the group is fired at.

- line41.sqs and line42.sqs :

What does it do : make units walk in line with weapon on shoulder, then stay in line all the time. A leading group
is followed by other groups, groups staying together as a company could do.
How to launch it : [group this] exec "line41.sqs" (in the init line of leading group's leader)
		[group this,name_of_leading_group] exec "line42.sqs" (in the init line of following groups' leaders)
Other script needed : "line61.sqs" and "line62.sqs"
How to stop it : for leading group : it never stops. For following groups, it stops when the group is fleeing.

- medicshout.sqs :

What does it do : make severely wounded units swing then fall down, then scream every 90 seconds.
How to launch it : "_x addeventhandler [{dammaged},{_this exec {medicshout.sqs}}]" foreach thislist 
(in a trigger, activated by anybody, once, covering all units).
How to stop it : when unit is dead, or using medicjoin.sqs

- medicjoin.sqs :

What does it do : make nearest immobilized unit (by "medicsout.sqs") join player's group.
How to launch it : [] exec "medicjoin.sqs", (through radio command for example).
Other script needed : "ammo1777.sqs" (to "rearm" unit).
How to stop it : automatic, after a wounded unit is found.

- board.sqs :

What does it do : make a group board a ship. Units are "stopped" to avoid falling out of the ship. It won't
work if the ship is moving.
How to launch it : [name_of_group,name_of_ship] exec "board.sqs", (through radio command for example).
How to stop it : automatic, after boarding.

- click on the map scripts :
General Barron's scripts : init.sqs (must be launched at the beginning), mapclick.sqf, mapclick_addcode.sqf
and mapclick_removecodecode.sqs (nothing special to do).
My way to make them work : use a radio command to select a squad AND enable the mapclik command. After clicking
on the map, the squad is ordered to move towards the click point. This point is materialized by a marker.
How to launch it : [{[_pos,name_of_group,"name_of_marker"] exec "move.sqs"}, 0, 1 ] call GENB_mapclick_add
Other script needed : "move.sqs" (to give moving order and move marker).

//////////////////////////////////////////////////////////////////////////////////////////////////////

LAG IN MISSION ISSUE :

- Napoleonic units are quite lag free : low polycount by unit and 5 lods with decreasing texture sizes.

- One Cavalry unit is as laggy as a whole squad of infantrymen : why ? Because : it's a vehicle (and pathfinding
of vehicles are not well handled by OFP), and it does have a "loocking for a target" script.

- What does create lag ? : the number of MOVING UNITS or the number of FIGHTING UNITS. You can put a lot's
of non moving and non fighting units on a map. To create big battles, you must find a way to avoid having more
than 150 units moving or fighting at the same time, with "reinforcements" triggers for example. The "GREEN" combat mode
(hold fire, defend only) is a way to avoid all units on the battle field to engage fighting before having been fired at.
The "dostop" command used in my scripts is a way to avoid pathfinding lag : my walking scripts make the units advance
thanks to a "play a walking move to advance" command. So AI doesn't have to ask itself "How can i go there ?". My walking
scripts create lag when to many units are playing the same move at the same time. Nothing is perfect...
















