Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

engineLicensing



This library handles generation of engines up for purchase, as well as selling player-made engines.

Methods

Variables

BASE_COST ({5000, 10000})

min/max range of the base engine licensing cost.

COST_PER_FEATURE_COUNT_ATTRACTIVENESS_DELTA (1000)

when calculating the cost, each attractiveness - feature count point is multiplied by this and is added to the cost.

COST_PER_STAT_ATTRACTIVENESS (200)

per each point in attractiveness from stats, this much cost is added to the engine.

BASE_STAT_ATTRACTIVENESS_VALUE (15)

the attractiveness of the engine's stats must exceed this before they will add to the cost.

COST_DELTA_MULTIPLIER ({0.9, 1.3})

min/max multiplier range for COST_PER_FEATURE_COUNT_ATTRACTIVENESS_DELTA.

COST_SEGMENT_ROUNDING (100)

final cost is rounded in segments of this size.

HIGH_COST_EXCEPTION_CHANCE (20)

chance that a paid engine will be much cheaper.

HIGH_COST_EXCEPTION_RANGE ({0.2, 0.3})

minmax range for a multiplier of the final cost in case the high cost is an exception for this engine.

NEW_ENGINE_CHANCE (20)

chance for a new engine each passing month.

TIME_ON_MARKET_UNTIL_SEQUEL (120)

amount of time an engine has to be on-market before a sequel for it is made.

SEQUEL_CHANCE (20)

the chance that this time the new engine will be a "sequel" (large update) to an already existing engine.

SEQUEL_FREE_CHANCE (10)

the chance that the sequel will be free from now on.

STAT_PERFORMANCE_RANGE ({50, 85})

the performance stat range for generated engines.

STAT_INTEGRITY_RANGE ({30, 90})

the integrity stat range for generated engines.

STAT_EASE_OF_USE ({40, 90})

the ease of use stat range for generated engines.

GOOD_STATS_CHANCE (35)

the chance that an engine will have higher stats than usual.

FREE_ENGINE_GOOD_STATS_CHANCE (15)

chance that a free engine will have good stats.

FREE_ENGINE_STATS_MULTIPLIER ({1.0, 1.4})

the multiplier range for engine stats on a free engine.

FREE_CHANCE (15)

chance an engine will be free.

FREE_ENGINE_REGULAR_FEATURE_COUNT_CHANCE (50)

chance that if an engine is free will have a regular feature count.

FREE_ENGINE_FEATURE_AMOUNT_MULTIPLIER (0.5)

the multiplier for amount of features in an engine in case it is free.

MAX_LICENSEABLE_ENGINES (10)

how many engines there can be at one time that are available for licensing.

LEAST_ATTRACTIVE_ENGINE_MARKET_ELIMINATION_TIME (60)

it takes this much time for the least attractive engine to be removed from the market in case it's the least attractive.

TIME_DELTA_FOR_LOWER_CHANCE (60)

amount of days after release of a feature within which the chance for the feature to be implemented into an engine is lowered.

LOWERED_CHANCE (30)

the lowered chance for the feature.

CHANCE_INCREASE_MULTIPLIER (1)

when the amount of time between newest and second newest feature is higher than TIME_DELTA_FOR_LOWER_CHANCE, the chance added to the base chance is multiplied by this value.

MANY_FEATURES_CHANCE (15)

chance that the engine will have a lot of features.

MONTLY_ENGINE_CHANCE (10)

chance a new engine will be created every month.

NOTABLE_FEATURE_TIME_PERIOD (60)

when an engine is released with a feature that was released less than this many days ago, we will create a popup stating that it has a new feature.

MIN_ENGINE_SELL_AMOUNT (1)

the minimum amount of times a player-made engine can sell a month.

MAX_ENGINE_SELL_AMOUNT (4)

the max. amount of times a player-made engine can sell amonth.

ENGINE_SELL_AMOUNT_DECREASE_PER_PRICE (0.2)

for every this much % of the maximum price above our ideal price, our max sale amount will drop by 1.

PRICE_OFFSET_MAX (10000)

the maximum price offset of an engine price we can set before we start losing sales/sell chance.

MIN_IDEAL_PRICE (1000)

the lowest the price of an engine can go down to.

MIN_ENGINE_SELL_CHANCE (5)

the lowest chance that our engine will sell.

MAX_ENGINE_SELL_CHANCE (60)

the highest chance that our engine will sell.

SELL_CHANCE_PENALTY_PRICE (2000)

if our engine price is greater than the ideal price by this much, then we will begin losing the sell chance.

SELL_CHANCE_DROP (15)

per every SELL_CHANCE_PENALTY_PRICE, we lose this much % to sell the engine every month.

MIN_ATTRACTIVENESS_OFFSET (0.33)

thisValue * bestEngineAttractiveness = minimum MIN_ENGINE_SELL_CHANCE when the attractiveness is <= this value.

ENGINE_LICENSING_TAX (0.25)

gainedSaleMoney * (1 - this value).

ALL_ENGINES_FREE_IDEAL_PRICE_MULTIPLIER (0.5)

when all engines are free, we will find the best free engine, and multiply its calculated cost by this value as the "ideal" price.

Events

ENGINE_SELECTED

fired when selecting an engine in UI.