52bcde9c17
Added: AUR A1 with a guaranteed magazine spawn into Tier 4 Added: AUR AX with a guaranteed magazine spawn into Tier 5 Added: 30rnd AUR magazine into Tier 4 Added: Hunter vest into hunting spawn points Added: cfgweather.xml configuration file (replaces the original init.c weather setup) Added: land_observatory_spawn and land_portalcage_spawn (invisible objects) expanding loot spawn points in Lantia (allowing for bigger items to be spawned in Tier 6) Added: Tire repair kit into hardcore setup Added: Christmas event (disabled for now) Changed: Updated map cluster and map pos files to support latest version of Namalsk Tweaked: re-named effect area json file to all lower-case Fixed: Invalid spawn point at land_hiluxT wreck Fixed: Invalid spawn point on a stove inside village house 1w04 Fixed: Invalid spawn point on a bmp1 wreck Removed: Incorrect secondary spawner settings for StaticMedDrop Removed: Legacy waves parameter from events
126 lines
3.6 KiB
C
126 lines
3.6 KiB
C
void main()
|
|
{
|
|
/*
|
|
[Namalsk] CE init (offline)
|
|
*/
|
|
CreateHive();
|
|
GetHive().InitOffline();
|
|
|
|
/*
|
|
[Namalsk] Mission time init
|
|
after CE init to determine if storage mission type is outside of the required time-frame
|
|
currently recommended time-frame is:
|
|
12/1 -> 12/31
|
|
keep in mind that gameplay features are tied to the mission date (stored in the storage) and that it SHOULD remain this period!
|
|
while using:
|
|
day accelerated 6 times (serverTimeAcceleration=6), resulting in an average 78 min of day-time (RL)
|
|
night accelerated 24 times (serverNightTimeAcceleration=4), resulting in an average of 26 min of night-time (RL)
|
|
*/
|
|
int year, month, day, hour, minute;
|
|
GetGame().GetWorld().GetDate( year, month, day, hour, minute );
|
|
|
|
if ( month < 12 )
|
|
{
|
|
year = 2011;
|
|
month = 12;
|
|
day = 1;
|
|
|
|
GetGame().GetWorld().SetDate( year, month, day, hour, minute );
|
|
}
|
|
};
|
|
|
|
class CustomMission: MissionServer
|
|
{
|
|
override void OnInit()
|
|
{
|
|
super.OnInit();
|
|
|
|
// this piece of code is recommended otherwise event system is switched on automatically and runs from default values
|
|
// comment this whole block if NOT using Namalsk Survival
|
|
if ( m_EventManagerServer )
|
|
{
|
|
// enable/disable event system, min time between events, max time between events, max number of events at the same time
|
|
m_EventManagerServer.OnInitServer( true, 550, 1000, 2 );
|
|
// registering events and their probability
|
|
m_EventManagerServer.RegisterEvent( Aurora, 0.85 );
|
|
m_EventManagerServer.RegisterEvent( Blizzard, 0.4 );
|
|
m_EventManagerServer.RegisterEvent( ExtremeCold, 0.4 );
|
|
m_EventManagerServer.RegisterEvent( Snowfall, 0.6 );
|
|
m_EventManagerServer.RegisterEvent( EVRStorm, 0.35 );
|
|
m_EventManagerServer.RegisterEvent( HeavyFog, 0.3 );
|
|
}
|
|
}
|
|
|
|
void SetRandomHealth(EntityAI itemEnt)
|
|
{
|
|
if (itemEnt)
|
|
{
|
|
float rndHlt = Math.RandomFloat( 0.50, 0.85 );
|
|
itemEnt.SetHealth01( "", "", rndHlt );
|
|
}
|
|
}
|
|
|
|
override void StartingEquipSetup( PlayerBase player, bool clothesChosen )
|
|
{
|
|
EntityAI itemClothing;
|
|
EntityAI itemEnt;
|
|
ItemBase itemBs;
|
|
float rand;
|
|
|
|
// top
|
|
itemClothing = player.FindAttachmentBySlotName( "Body" );
|
|
if ( itemClothing )
|
|
{
|
|
SetRandomHealth( itemClothing );
|
|
|
|
itemEnt = itemClothing.GetInventory().CreateInInventory( "Rag" );
|
|
if ( Class.CastTo( itemBs, itemEnt ) )
|
|
{
|
|
SetRandomHealth( itemEnt );
|
|
itemBs.SetQuantity( 4 );
|
|
itemBs.SetCleanness( 1 );
|
|
}
|
|
player.SetQuickBarEntityShortcut( itemEnt, 0 );
|
|
|
|
itemEnt = itemClothing.GetInventory().CreateInInventory( "RoadFlare" );
|
|
SetRandomHealth( itemEnt );
|
|
itemEnt = itemClothing.GetInventory().CreateInInventory( "RoadFlare" );
|
|
SetRandomHealth( itemEnt );
|
|
player.SetQuickBarEntityShortcut( itemEnt, 1 );
|
|
}
|
|
|
|
// pants
|
|
itemClothing = player.FindAttachmentBySlotName( "Legs" );
|
|
if ( itemClothing )
|
|
{
|
|
SetRandomHealth( itemClothing );
|
|
|
|
itemEnt = itemClothing.GetInventory().CreateInInventory( "Heatpack" );
|
|
SetRandomHealth( itemEnt );
|
|
|
|
int throwDice = Math.RandomInt( 0, 2 );
|
|
if ( throwDice == 0 )
|
|
itemEnt = itemClothing.GetInventory().CreateInInventory( "dzn_tool_watch" );
|
|
else
|
|
itemEnt = itemClothing.GetInventory().CreateInInventory( "dzn_tool_watch2" );
|
|
player.SetQuickBarEntityShortcut( itemEnt, 2 );
|
|
}
|
|
|
|
// shoes
|
|
itemClothing = player.FindAttachmentBySlotName( "Feet" );
|
|
if ( itemClothing )
|
|
{
|
|
SetRandomHealth( itemClothing );
|
|
}
|
|
|
|
// bump fresh spawn water and energy values (to compensate for the frozen food and harder-to-get wells)
|
|
player.GetStatWater().Set( 900 );
|
|
player.GetStatEnergy().Set( 1100 );
|
|
}
|
|
};
|
|
|
|
Mission CreateCustomMission(string path)
|
|
{
|
|
return new CustomMission();
|
|
};
|