Skip to content

Commit

Permalink
temporarily add christmas objects to the game (FAForever#2338)
Browse files Browse the repository at this point in the history
* temporarily add christmas objects to the game

includes:
props being replaced by gifts
Santa hat on GC
GC rename

* bump version

* add santa mod to blacklist

* fix typo

* add snowman

* add normals for correct shadows

* fix paths

* increase size of snowman

* change size of snowman

* add more presents

* add more santa mods to blacklist (temporarily)

* add better snowman and christmas tree

* add more versions to the blacklist

* add santa hat to acus
  • Loading branch information
CookieNoob authored and aeoncleanse committed Dec 25, 2017
1 parent 6d8ba34 commit f33e958
Show file tree
Hide file tree
Showing 93 changed files with 982 additions and 13 deletions.
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Patch 3694 (21st December 2017)
============================
### Game
- Add Christmas theme to the game

### Contributors
- CookieNoob
- Ozonex
- Black_Death

Patch 3693 (3rd December, 2017)
============================
### Lobby
Expand Down
10 changes: 10 additions & 0 deletions etc/faf/blacklist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,15 @@ Blacklist = {
['HUSSAR-PL-a1e2-c4t4-scfa-ssbmod-v1200'] = UPGRADE,
['HUSSAR-PL-a1e2-c4t4-scfa-ssbmod-v1230'] = UPGRADE,
['HUSSAR-PL-a1e2-c4t4-scfa-ssbmod-v1300'] = UPGRADE,

-- Santa is coming mod (temporarily)
['Santa-is-comi-ng03-90f1-0264a2479872'] = INTEGRATED,
['Santa-is-comi-ng04-90f1-0264a2479872'] = INTEGRATED,
['Santa-is-comi-ng05-90f1-0264a2479872'] = INTEGRATED,
['Santa-is-comi-ng06-90f1-0264a2479872'] = INTEGRATED,
['Santa-is-comi-ng07-90f1-0264a2479872'] = INTEGRATED,
['Santa-is-comi-ng08-90f1-0264a2479872'] = INTEGRATED,
['Santa-is-comi-ng09-90f1-0264a2479872'] = INTEGRATED,
['Santa-is-comi-ng10-90f1-0264a2479872'] = INTEGRATED,

}
4 changes: 2 additions & 2 deletions loc/DE/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6644,8 +6644,8 @@ ual0307_help="Mobiler Schildgenerator"
ual0307_name="Asylum"
ual0309_desc="Techniker"
ual0309_help="Techniker"
ual0401_desc="Experimenteller Angriffsbot"
ual0401_help="Experimenteller Angriffsbot"
ual0401_desc="Experimenteller Weihnachtsbot"
ual0401_help="Experimenteller Weihnachtsbot"
ual0401_name="Galaktischer Koloss"
ual5103_desc="Quantum-Gate-Signal"
ual5103_help="Quantum-Gate-Knoten"
Expand Down
4 changes: 2 additions & 2 deletions loc/FR/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2423,8 +2423,8 @@ ual0307_help="Générateur de bouclier mobile"
ual0307_name="Havre"
ual0309_desc="Ingénieur"
ual0309_help="Ingénieur"
ual0401_desc="Robot d'assaut expérimental"
ual0401_help="Robot d'assaut expérimental"
ual0401_desc="Robot expérimental de Noël"
ual0401_help="Robot expérimental de Noël"
ual0401_name="Colosse galactique"
uas0102_desc="Navire d'attaque"
uas0102_help="Navire d'attaque"
Expand Down
4 changes: 2 additions & 2 deletions loc/IT/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2423,8 +2423,8 @@ ual0307_help="Generatore di scudo mobile"
ual0307_name="Asylum"
ual0309_desc="Ingegnere"
ual0309_help="Ingegnere"
ual0401_desc="Robot d'assalto sperimentale"
ual0401_help="Robot d'assalto sperimentale"
ual0401_desc="Robot natalizio sperimentale"
ual0401_help="Robot natalizio sperimentale"
ual0401_name="Colosso galattico"
uas0102_desc="Nave d'attacco"
uas0102_help="Nave d'attacco"
Expand Down
4 changes: 2 additions & 2 deletions loc/RU/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6366,8 +6366,8 @@ ual0307_help="Мобильный генератор силового поля"
ual0307_name="\"Пристанище\""
ual0309_desc="Инженер"
ual0309_help="Инженер"
ual0401_desc="Эксперим. тяж. штурм. бот"
ual0401_help="Эксперим. тяж. штурм. бот"
ual0401_desc="Экспериментальный Рождественский Бот"
ual0401_help="Экспериментальный Рождественский Бот"
ual0401_name="Галактический Колосс"
ual5103_desc="Маяк квантовых врат"
ual5103_help="Узел квантовых врат"
Expand Down
4 changes: 2 additions & 2 deletions loc/US/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5667,8 +5667,8 @@ ual0307_help="Mobile Shield Generator"
ual0307_name="Asylum"
ual0309_desc="Engineer"
ual0309_help="Engineer"
ual0401_desc="Experimental Assault Bot"
ual0401_help="Experimental Assault Bot"
ual0401_desc="Experimental Christmas Bot"
ual0401_help="Experimental Christmas Bot"
ual0401_name="Galactic Colossus"
uas0102_desc="Attack Boat"
uas0102_help="Attack Boat"
Expand Down
99 changes: 99 additions & 0 deletions lua/ChristmasScript.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
local ScenarioUtils = import('/lua/sim/ScenarioUtilities.lua')
local ScenarioFramework = import('/lua/ScenarioFramework.lua')


function Init()
ForkThread(Create_Christmas_Presents)
end


function Create_Christmas_Presents()
math.randomseed(1)

local ListOfProps = {}
local posx, posy = GetMapSize()
local Map_Area = {
["x0"] = 0,
["y0"] = 0,
["x1"] = posx,
["y1"] = posy
}

local i = 1
local allprops = GetReclaimablesInRect(Map_Area)
local StoneName = {'rock', 'boulder', 'fieldstone', 'iceberg'}
local number_of_props = table.getn(allprops)

for _, r in allprops or {} do
local replaceit = 0
local propbp = r:GetBlueprint()
if propbp.ScriptClass == 'Tree' then
replaceit = 0.035
elseif string.find(propbp.Interface.HelpText, 'Rock') then
replaceit = 0.09
end
if number_of_props > 0 then
replaceit = replaceit * 10000/number_of_props
end
if (replaceit > 0) then
if(math.random(100) < 100 * replaceit) then
local prop = r
ListOfProps[i] = prop
r:Destroy()
i = i + 1
end
end
end

local color_gifts = {'blue', 'green', 'green2', 'pink', 'red', 'yellow','snowflake', 'owl', 'star'}
local new_props = {}
new_props[table.getn(new_props)+ 1] = '/props/snowman/snowman_prop.bp'
for _, color in color_gifts do
new_props[table.getn(new_props)+1] = '/props/gift_' .. color .. '/gift_' .. color .. '_prop.bp'
end
for k = 1, 3 do
new_props[table.getn(new_props)+ 1] = '/props/cookie/cookie_prop.bp'
end

for _, present in ListOfProps or {} do
local proptype = math.ceil(math.random(table.getn(new_props)))
local NewGift = CreateProp( VECTOR3(present:GetPosition()['x'],
present:GetPosition()['y'],
present:GetPosition()['z'] ),
new_props[proptype])

-- set the reclaim values to match the removed prop
NewGift:SetMaxReclaimValues( 5, present:GetBlueprint().Economy.ReclaimMassMax, present:GetBlueprint().Economy.ReclaimEnergyMax)
-- determine the new size of the prop
local new_size = ( (present:GetBlueprint().Economy.ReclaimMassMax + present:GetBlueprint().Economy.ReclaimEnergyMax/10 + math.random(25)) ) -- +
-- map the size of the prop into the allowed range
new_size = 0.02 + 0.064*(new_size-3)/135
if(new_size < 0.02) then
new_size = 0.02
elseif (new_size > 0.084) then
new_size = 0.084
end
if proptype == 1 then
new_size = 100 * new_size
end
NewGift:SetScale(new_size*0.7)

local orient = math.random(628)/100-3.14
local vec = VECTOR3(math.cos(orient),0,math.sin(orient))
NewGift:SetOrientation(OrientFromDir( vec ), true)
end

-- create christmas tree
if GetSurfaceHeight(posx/2,posy/2) == GetTerrainHeight(posx/2,posy/2) then
local christmasTree = CreateProp( VECTOR3(posx/2,
GetTerrainHeight(posx/2,posy/2),
posy/2 ),
'/props/christmastree/christmastree_prop.bp')
christmasTree:SetMaxReclaimValues( 10, 1, 1)
christmasTree:SetScale(0.24)

local orient = math.random(628)/100-3.14
local vec = VECTOR3(math.cos(orient),0,math.sin(orient))
christmasTree:SetOrientation(OrientFromDir( vec ), true)
end
end
2 changes: 2 additions & 0 deletions lua/simInit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ function BeginSession()
if syncStartPositions then
Sync.StartPositions = syncStartPositions
end

import('/lua/ChristmasScript.lua').Init()
end

function GameTimeLogger()
Expand Down
15 changes: 14 additions & 1 deletion lua/ui/lobby/changelog.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
last_version = 3693
last_version = 3694
changelog = {
{
version = 3,
Expand Down Expand Up @@ -1392,4 +1392,17 @@ changelog = {
'- IceDreamer',
},
},
{
version = 3694,
name = 'Game Version 3694',
description = {
'** Game**',
'- Add Christmas theme to the game',
'',
'**Contributors**',
'- CookieNoob',
'- Ozonex',
'- Black_Death',
},
},
}
2 changes: 1 addition & 1 deletion lua/version.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local Version = '3693'
local Version = '3694'
function GetVersion()
LOG('Supreme Commander: Forged Alliance version ' .. Version)
return Version
Expand Down
2 changes: 1 addition & 1 deletion mod_info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-- Documentation for the extended FAF mod_info.lua format can be found here:
-- https://github.com/FAForever/fa/wiki/mod_info.lua-documentation
name = "Forged Alliance Forever"
version = 3693
version = 3694
_faf_modname='faf'
copyright = "Forged Alliance Forever Community"
description = "Forged Alliance Forever extends Forged Alliance, bringing new patches, game modes, units, ladder, and much more!"
Expand Down
Binary file added props/christmastree/christmastree_NormalsTS.dds
Binary file not shown.
Binary file added props/christmastree/christmastree_albedo.dds
Binary file not shown.
Binary file added props/christmastree/christmastree_lod0.scm
Binary file not shown.
39 changes: 39 additions & 0 deletions props/christmastree/christmastree_prop.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
PropBlueprint {
Categories = {
'RECLAIMABLE',
},
Defense = {
Health = 50,
MaxHealth = 50,
},
Display = {
Mesh = {
IconFadeInZoom = 4,
LODs = {
{
AlbedoName = [[/props/christmastree/christmastree_albedo.dds]],
LODCutoff = 500,
ShaderName = 'VertexNormal',
},
},
},
UniformScale = 0.051,
},
Economy = {
ReclaimEnergyMax = 0,
ReclaimMassMax = 0,
ReclaimTime = 5,
},
Footprint = {
OccupancyCaps = 3,
},
Interface = {
HelpText = 'Large Rock',
},
Physics = {
BlockPath = false,
},
SizeX = 2,
SizeY = 1,
SizeZ = 5,
}
Binary file added props/cookie/cookie_NormalsTS.dds
Binary file not shown.
Binary file added props/cookie/cookie_albedo.dds
Binary file not shown.
Binary file added props/cookie/cookie_lod0.scm
Binary file not shown.
39 changes: 39 additions & 0 deletions props/cookie/cookie_prop.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
PropBlueprint {
Categories = {
'RECLAIMABLE',
},
Defense = {
Health = 50,
MaxHealth = 50,
},
Display = {
Mesh = {
IconFadeInZoom = 4,
LODs = {
{
AlbedoName = [[/props/cookie/cookie_albedo.dds]],
LODCutoff = 500,
ShaderName = 'NormalMappedTerrain',
},
},
},
UniformScale = 0.051,
},
Economy = {
ReclaimEnergyMax = 0,
ReclaimMassMax = 0,
ReclaimTime = 5,
},
Footprint = {
OccupancyCaps = 3,
},
Interface = {
HelpText = 'Large Rock',
},
Physics = {
BlockPath = false,
},
SizeX = 2,
SizeY = 1,
SizeZ = 5,
}
Binary file added props/gift_blue/gift_blue_NormalsTS.dds
Binary file not shown.
Binary file added props/gift_blue/gift_blue_albedo.dds
Binary file not shown.
Binary file added props/gift_blue/gift_blue_lod0.scm
Binary file not shown.
39 changes: 39 additions & 0 deletions props/gift_blue/gift_blue_prop.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
PropBlueprint {
Categories = {
'RECLAIMABLE',
},
Defense = {
Health = 50,
MaxHealth = 50,
},
Display = {
Mesh = {
IconFadeInZoom = 4,
LODs = {
{
AlbedoName = [[/props/gift_blue/gift_blue_albedo.dds]],
LODCutoff = 500,
ShaderName = 'NormalMappedTerrain',
},
},
},
UniformScale = 0.051,
},
Economy = {
ReclaimEnergyMax = 0,
ReclaimMassMax = 0,
ReclaimTime = 5,
},
Footprint = {
OccupancyCaps = 3,
},
Interface = {
HelpText = 'Large Rock',
},
Physics = {
BlockPath = false,
},
SizeX = 2,
SizeY = 1,
SizeZ = 5,
}
Binary file added props/gift_green/gift_green.dds
Binary file not shown.
Binary file added props/gift_green/gift_green_NormalsTS.dds
Binary file not shown.
Binary file added props/gift_green/gift_green_lod0.scm
Binary file not shown.
39 changes: 39 additions & 0 deletions props/gift_green/gift_green_prop.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
PropBlueprint {
Categories = {
'RECLAIMABLE',
},
Defense = {
Health = 50,
MaxHealth = 50,
},
Display = {
Mesh = {
IconFadeInZoom = 4,
LODs = {
{
AlbedoName = [[/props/gift_green/gift_green.dds]],
LODCutoff = 500,
ShaderName = 'NormalMappedTerrain',
},
},
},
UniformScale = 0.051,
},
Economy = {
ReclaimEnergyMax = 0,
ReclaimMassMax = 0,
ReclaimTime = 5,
},
Footprint = {
OccupancyCaps = 3,
},
Interface = {
HelpText = 'Large Rock',
},
Physics = {
BlockPath = false,
},
SizeX = 3,
SizeY = 3,
SizeZ = 3,
}
Binary file added props/gift_green2/gift_green2.dds
Binary file not shown.
Binary file added props/gift_green2/gift_green2_NormalsTS.dds
Binary file not shown.
Binary file added props/gift_green2/gift_green2_lod0.scm
Binary file not shown.
Loading

0 comments on commit f33e958

Please sign in to comment.