Classes

Concepts

Libraries

advertisement »

ambientSounds »

bitser »

contentPoints »

eventBoxText »

factValidity »

frameBuffer »

officeBuildingInserter »

priorityRenderer »

randomEvents »

scaling »

spritesheetParser »

statusIcons »

test3 »

util »

Objects

activities



This library handles various things related to employee activities.

Methods

Example

-- taken from game/activities/basic_activities.lua

activities:registerNew({
	id = "medieval_fighting",
	icon = "activity_medieval_fight",
	display = _T("ACTIVITY_MEDIEVAL_FIGHTING", "Medieval fighting"),
	displayPopup = _T("ACTIVITY_MEDIEVAL_FIGHTING_POPUP_TITLE", "Participating in a medieval fight with coworkers"),
	activityDisplay = _T("ACTIVITY_MEDIEVAL_FIGHTING_ACTION", "play out a medieval fight"),
	autoOrganizedAction = _T("ACTIVITY_MEDIEVAL_FIGHTING_AUTO_ORGANIZED", "play out a medieval fight"),
	mentionHint = _T("ACTIVITY_MEDIEVAL_FIGHTING_MENTION", "Do you take interest in the medieval fights? Donning chainmail armor, grabbing a sword and engaging in a make-believe medieval fight would be fun, I'm sure. I know NAME is interested in medieval times and participates in events like this, so he would definitely enjoy it."),
	description = {
		{text = _T("ACTIVITY_MEDIEVAL_FIGHTING_DESCRIPTION", "Put on some heavy plate or brigandine armor, get yourself a sword and step into the fray as a footman of the medieval times."), font = "pix18"}},
		
	notOnTheHouseEnjoymentScale = 0.8, -- multiply enjoyment by this much if the session is not on the house
	costPerEmployee = 35,
	reducedEnjoymentTime = 14, -- in days
	baseEnjoymentRating = 40, -- the base enjoyment rating
	randomEnjoymentOffset = {0.7, 1.5}, -- additional random multiplier for base enjoyment, does not depend on anything
	maxReducedEnjoyment = 0.5, -- maximum reduction in enjoyment in case not enough time has passed
	minimumPeopleAmount = 4, -- how many people we need to have to not suffer a decrease in enjoyment
	notEnoughPeopleEnjoymentReduction = 0.05, -- per each not-enough person, we lose this much enjoyment (in multiplier form)
	skillToProgress = "teamwork",
	enjoymentToTeamworkExperience = 20, -- convert enjoyment to teamwork experience, exp gained = enjoyment * enjoymentToTeamworkExperience
	
	contributingInterests = {
		lifting = 1.5, -- multiplier
		martialarts = 1.5,
		medieval_fighting = 2,
		parkour = 1.25,
		pacifism = 0.2
	},
	
	knowledgeIncrease = {id = "medieval_fighting", min = 5, max = 7},
	
	chanceToTurnDown = {
		lifting = {mul = 0.5},
		martialarts = {mul = 0.5},
		medieval_fighting = {mul = 0.25},
		parkour = {mul = 0.6},
		pacifism = {add = 80}
	},
	
	postActivityVisit = function(self, employee, enjoymentRating)
		skills:progressSkill(employee, self.skillToProgress, self.enjoymentToTeamworkExperience * enjoymentRating)
	end
})

Variables

ENJOYMENT_TO_DRIVE (10)

divide the enjoyment value by this value to get the amount of drive employees get from an activity.

HIGHEST_ENJOYMENT

the highest enjoyment value from all the registered activities.

AUTO_ORGANIZE_COOLDOWN (120)

amount of days before auto-organizing an activity in general.

AUTO_ORGANIZE_COOLDOWN_NEW_GAME (60)

we will apply a cooldown of auto-organizing of this much at the beginning of a new game.

AUTO_ORGANIZE_TIME_PERIOD (160)

how much time in days before auto-organizing the same activity again.

AUTO_ORGANIZE_MINIMUM_PEOPLE (2)

a minimum of this many people need to be in office to auto-organize something.

AUTO_ORGANIZE_CHANCE (66)

the chance that something will be auto-organized.


Notice: Undefined offset: 1 in /var/www/vhosts/gamedevstudiogame.com/httpdocs/templates/subgroup_view.phtml on line 21