In depth Guide for Slavers Of Skyrim

Chapter:	Slaver Guild - Strike
Modul: Event Modul
-------------------------------------------
Written for: Stage 2 version
in the year of: 2025
Month: 1
Day: 7
-------------------------------------------

When slaver guild entity decide strike a slaver base this module kick in.

Slaver guild goal here to capture back own slaver guild base.
The player goal:
-kill or capture all attackers
-avoid being captured by slavers
-after entering the location dont leave until all attackers kiled or captured

Quest that controling the strike event called:
SLOSSlaverGuildStrikeBase[ number ]

Where is [ number ] is the quest number.
The system can chose a pool of strike quest each has minior variation to its strike force compozition and size.
So player never can sure what going to face.

Slaver guild strikes relay on existing in game manpower. The strike force members exist in game slaver guild hidden bases. this bases house significant combat power that can be deployed varius combat tasks.
Thier main porpuse to defend slaver guild intrest and particapte raids.

When a Strike quest starts the quest select the required number of attackers from this pool. After all fighter chosen the system move all the strike team member a chosen hidden base rally point.
From here the strike team move the target location.

If any member of strike team reach the target location a timer start.
The time before slaver guild capture the base defined by:

CoreCode.SlaverGuildStrikeBaseWaitTime

the timer value incrased by the player mercanarys found on the base time of arrival. Evry mercanary add +1 hour defense time aginst the attacking forces, giving more time to player to reach the base and defend it...

this timer aborted in case player enters the slaver base that under attack.
this locks the player in place as if player for any reason leave the slaver base location before the strike is ower the base considered lost to slaver guild.

Strike team fails if all of its member get captured or killed. this case quest stops run.
same happen if for any reason the strike team wins.
this case the strike team members walk back own hidden slaver base( as the quest not force them to fallow the quest packages ).

in case the slaver guild strike team win the quest make call for:
CoreCode.SLOSPlayerClaimHandlerQST 

to the local script:
SLOSLibaryPlayerClaimLocationScript 

the call contain this informations:
ForcePlayerLoseLocation( akPlace = TargetLoc, iReasonToLose = 3 )

this tell the player claim handler quest what location player lost and why.
Based on this data the system remove player control for this location, all slaves stored inside the base now belong to slaver guild and all surving player mercanary ensalved.

===========================
Slaver Guild Raid system:
===========================

Slaver guild raids are happen randomly.
Evry time cycle end event reported to the slaver guild entity:

SLOSSlaverGuildEntity ( Quest )

local script is:
SLOSLibarySlaverGuildScript 

So the end cycle script check the fallowings:
1 - no active raid ordered ( SLOSDataSlaverGuildEntityScript.RaidTownQuest property contain a quest or not, if yes means the raid town ordered! )
2 - player has not 0 trust with the guild. if player +1 or -1 or larger trust with guild we have a chance...
3 - Corecode.SlaverGuildRaidTownChance define a chance ( default 2 ) if the random number generator roll this or lover raid function activated

if all check passed the Slaver guild start prepare for a raid. This controlled by :

Bool Function RaidTown()

this one return true if raid quest activated and loaded to the slaver guild entitiy data.
if fail to load any raid quest reports failure.
this case next cycle end the system attemt setup raid agin.

Setting up raid require sizeble manpower avible in hidden slaver bases. if not enught free combat force avible the quest not start.

Possible town raid quest stored on this formlist:
SLOSGuildRaidQuestList

this is all possible raid town list.
but not this list used to select one raid quest to settup...

this list contain the avible raid quests:
SLOSGuildRaidUseItQuestList

the system check this raid use it list, if not empty randomly pick one quest using the built in random generator.
if the list empty got refilled from the SLOSGuildRaidQuestList formlist. this way repatation of same quest maybe minimalized.

After the quest started, the quest allocate the required combat force and wait stend ready to player wisit one of the towns, or any location that prepared to play out the event.

tha fallowing trigger need placed in game world to make a raid:
SLOSSlaverGuildRaidTrigger

this object scripted the way if loaded with a cell. aka player get near to it, runs a checks if the slaver guild entity has a loded raid quest in the ready. 
in case yes, activates the raid. this spawn large number of victims and after sort delay teleports the raiding slavers to pre designated positions.

The script using XMakerHeading object to place the actors.
This heading object reference linked to the SLOSSlaverGuildRaidTrigger object by the fallowing way:
The raid trigger object links the first marker that usualy used as victim spawn point, marked as: 
SLOSSlaverGuildRaidSpawnCenter Reference type

From here other maximum 4 other xmarker heading linked.
Fallowing reference types used:
SLOSSlaverGuildRaidSpawnNorth
SLOSSlaverGuildRaidSpawnWest
SLOSSlaverGuildRaidSpawnEast
SLOSSlaverGuildRaidSpawnShout

if all present the system allocate attackers each designeted position.
requred only one that case all attacker placed to that one point

From now on the Raid quest takes control:
if all victim killed or captured then slavers win
if all slaver killed or captured then slavers lose
if the player leave the loaded cell and its detected by 
SLOSSlaverGuildRaidTrigger
object, then... the quest stops and slavers lose

if the quest stop for any reason all non captured living victim removed from game world... basicly deleted.
all living non captured slaver guild member moved back to its original place.

if player slaver guild member of corse can join the raid, if player aginst slaver guild can chose to fight aginst them... or simpli run away...