Alcohol Effects
Configuration
Everything is in shared/config.lua.
Items & props
shared/config.lua
Config = {
Locale = 'en', -- 'en' | 'fr'
AlcoholItems = {
'beer', 'vodka', 'whiskey', 'wine',
'djs_raspberry_martini', 'djs_strawberry_margarita',
-- every drinkable item name
},
BottleModels = {
['beer'] = 'prop_beer_bottle',
['vodka'] = 'prop_vodka_bottle',
['default'] = 'prop_beer_bottle', -- used for anything not listed
},
BottlePosition = { pos = vec3(0.02, 0.00, -0.01), rot = vec3(0.0, 0.0, 0.0) },
SipsPerBottle = 5,
ThirstPerSip = 50000,
}
Intoxication levels
Each level kicks in at a number of bottles and sets your walk style. The last one can knock you out.
shared/config.lua
Effects = {
levels = {
{ bottle = 2, label = "effects.level1", walk = nil },
{ bottle = 4, label = "effects.level2", walk = "move_m@drunk@slightlydrunk" },
{ bottle = 8, label = "effects.level4", walk = "move_m@drunk@moderatedrunk" },
{ bottle = 14, label = "effects.level7", walk = "move_m@drunk@verydrunk" },
{ bottle = 20, label = "effects.level10", walk = "move_m@drunk@verydrunk",
knockout = { chance = 0.5, duration = 30000 } },
},
screenEffect = { minBottles = 8, name = "DrugsMichaelAliensFight" },
reduction = { rate = 0.1, time = 120000 }, -- -0.1 every 2 minutes
Hangover = {
walk = "move_m@drunk@verydrunk",
stumbleChance = 0.8,
stumbleInterval = 15000,
duration = 60000,
vehicleProtection = true, -- no stumbling while driving
},
},
Drunk driving
shared/config.lua
DrunkDriving = {
enabled = true,
minBottles = 1,
controls = {
accelerate = 32, -- Z (QWERTY: 20)
brake = 33, -- S (QWERTY: 21)
handbrake = 73, -- SPACE
left = 34, -- Q (QWERTY: 44)
right = 35, -- D (QWERTY: 45)
},
effects = {
[1] = { steeringBias = 0.7, speedVariation = 0.2, brakeChance = 0.05, blurEffect = false, randomHonking = false },
[2] = { steeringBias = 1.5, speedVariation = 0.4, brakeChance = 0.10, blurEffect = true, randomHonking = true },
[3] = { steeringBias = 2.5, speedVariation = 0.6, brakeChance = 0.15, blurEffect = true, randomHonking = true },
},
},
Text for every level and command is in locales/en.json and locales/fr.json.