In depth Guide for Slavers Of Skyrim

Chapter:	Slave pricing system
Modul: SLOSCore
-------------------------------------------
Written for: Stage 2
in the year of: 2025
Month: 1
Day: 6
-------------------------------------------

This system built inside the SLOS Core Script.
Script found in SLOSCoreQST

Revelant variables can be found if you search for this line:
;	Variables - Slave cost and cost calulation, Slave Expire

To udnerstand how the pricing system works first need understand the slave life cycle system.
Evry save has a life time as slave, then considered expired and removed from the system by killing it.
This required to keep the system functional as the slaves usualy victims that will re spawn ower time. plus the slavers non stop capture victims ower time the system gett full
unable to store more slaves...

The expire rule not apply special slaves: liek player and player follower.

More information on cycle system can be found:
000-SLOSCore-Cyclesystem

More information on slave life cycle can be found:
001-CaptureModule-SlaveLifeCycle

Slave pricing works as fallows:
After the slave captured normaly end up a slave camp.
the slave camp sell the slave to a slave trader, for slave camp sell price
then the trader sell the slave to a slave market, for slave market buy price.
From here slave market sell the slave the slave owener, a player or shady figure.
Shady figure add own bonus price the slave and sell to player from here. This is the longest possible rute a slave can take.

The pricing system use this sell price based on location where the slave sold.
But not this alone determinate the cost of a slave!

if male or female effect the slave cost to.
most important factor the slave age! Age this case means how many cycle passed sience the slave captured. older the slave worth less as shorter the remaining life time, where the slave can exploited.

slave can be trained, this case worth lot more.. this signaled the slave trained faction

Here is all of the variables used by the system! 
all of this variables can be changed in SLOSCoreScript.

Faction Property SLOSSlaveTrainedFaction Auto
{signals this slave trained}

int Property SlaveLifeTime = 4 Auto
{Number of weeks before slave expire, maximum 120 accepted!}

int Property SlavePriceCostOfAge = 100 Auto
{as slave life time goes away this value going to reduced}

int Property SlavePriceMale = 0 Auto
{bonus cost for males }

int Property SlavePriceFemale = 30 Auto
{ female slaves more costly }

int Property SlaveCostTrainingBonus = 200 Auto
{ trained slaves are very good }

int Property SlavePriceFollower = 1000 Auto
{slave price bonus if slave is follower }

int Property SlavePricePlayer = 3000 Auto
{slave price bonus if slave is the player }

;location buy/sell prices

int Property SlavePriceSlaveCampSell = 20 Auto
{ slave cost when slave camp sell it }

int Property SlavePriceSlaveMarketplaceBuy = 100 Auto
{ Slave cost when market place buy bonused }

int Property SlavePriceSlaveMarketplaceSell = 50 Auto
{ Slave cost when market place sell }

int Property SlavePriceShadyFigureSell = 200 Auto
{shady figure sell price}

Int Property SlaveProductionValue = 300 Auto
{evry weak the slave produce this ammount of gold as bonus }
;the slave production need to added slave price cost of age + sex bonus!

the system uses the fallowing functions:
int Function CallGetBaseProduction( int slavecount ) --returns the production value of a slaver base slaves
int Function GetBaseSlaveCost( Actor akSlave ) -- return the base cost of the slave, not the actual selling cost!

here is the function that calulates the exact sell cost of a slave based on location:
int Function CallGetSlaveSellPrice( Actor AkSlave, int akDealType )
;/	calculate the sell/buy price of the slave, based on deal type:
	1 - slave camp sell
	2 - slave market buy
	3 - slave market sell
	4 - shady fgiure sell

Return values:
	-1 - invalid deal type
	-2 - slave we recived is none!
	> 0 - the price of slave at designated deal
/;

Abut slave base cost calulation:

		int SlaveAge = akSlave.GetFactionRank( SLOSSlaveLifeTimeFaction ) --- this keep track how old the slave
		SlaveCost = ( SlaveLifeTime - SlaveAge) * SlavePriceCostOfAge 

as you can see if default slave life time value is 4 and our slave is age 3... means the slave very close to end of life time. 
this leads slave cost = 1 * SlavePriceCostOfAge (( 100 gold default ))
so this slave base cost is 100 gold with 1 cylcle left of its life.
same time one slave produce 300 gold/cycle so still worth buy it if one can make it work...

okay its not fully true. problem is the slave price not 100 gold, based on where its shold maybe lot more... in slave market the cost is going to:

BaseCost + SlavePriceSlaveCampSell + SlavePriceSlaveMarketplaceBuy + SlavePriceSlaveMarketplaceSell = Slave sell price on market
base cost this case 100 gold, the camp sell 30, market buy 100, and sell agin for 50 this means: 100 + 30 + 100 + 50 = 280 gold so this poor slave only going to produce 20 gold value.

this calculation only hold true for avarage slaves of corse special cases like player totaly different...
if the slave belong to: 
SLOSTagCapturedSpecialActorFaction 
then the GetBaseSlaveCost script checks its a player or player follower.
based on this data, the revelant special slave base cost used instead the normal aging calulation...