I am making a mod which adds a big beer in project zomboid. I am currently using the Red Wine mesh with a new custom texture.
Please see the following code:
Model file:
module Base
{
model NewBeer_Ground
{
mesh = WorldItems/Wine,
texture = WorldItems/NewBeer_ground,
scale = 0.4,
}
model NewBeerEmpty_Ground
{
mesh = WorldItems/Wine,
texture = WorldItems/NewBeer_ground,
scale = 0.4,
}
}
Item file:
module Base
{
item NewBeer
{
DisplayName = New Beer Test,
DisplayCategory = Food,
Type = Food,
Weight = 1.0,
Icon = NewBeerIcon,
FoodType = Beer,
Alcoholic = TRUE,
CantBeFrozen = TRUE,
EatType = Bourbon,
Packaged = TRUE,
ReplaceOnUse = NewBeerEmpty,
HungerChange = -30,
ThirstChange = -60,
UnhappyChange = -35,
Calories = 500,
Carbohydrates = 120,
Lipids = 0,
Proteins = 0,
CustomContextMenu = Drink,
CustomEatSound = DrinkingFromBottleGlass,
StaticModel = NewBeer_Ground,
WorldStaticModel = NewBeer_Ground,
}
item NewBeerWaterFull
{
DisplayName = New Beer with Water,
DisplayCategory = Water,
Type = Drainable,
Weight = 0.9,
Icon = NewBeerIcon,
CanStoreWater = TRUE,
EatType = Bourbon,
FillFromDispenserSound = GetWaterFromDispenserGlass,
FillFromTapSound = GetWaterFromTapGlass,
IsCookable = TRUE,
IsWaterSource = TRUE,
ReplaceOnDeplete = NewBeerEmpty,
ReplaceOnUseOn = WaterSource-NewBeerWaterFull,
UseDelta = 0.08,
UseWhileEquipped = FALSE,
CustomEatSound = DrinkingFromBottleGlass,
StaticModel = NewBeer_Ground,
WorldStaticModel = NewBeer_Ground,
}
item NewBeerEmpty
{
DisplayCategory = WaterContainer,
Weight = 0.35,
CanStoreWater = TRUE,
Type = Normal,
DisplayName = New Beer Empty Bottle,
ReplaceOnUseOn = WaterSource-NewBeerWaterFull,
Icon = NewBeerEmptyIcon,
StaticModel = NewBeerEmpty_Ground,
WorldStaticModel = NewBeerEmpty_Ground,
}
}
I tested this code and it works fine. I can see the new textures when the beer is on the floor and the icons are showed correctly in the inventory menu. HOWEVER, when the character is drinking from the bottle or refilling the bottle with water, the bottle is upside down (please see the attached image). Any ideas of why does this happens and how to resolve it?
Thanks in advance!