示例#1
0
 protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
 {
     // no triggers, only manual triggering through the event when it starts
     spawnList.CreatePreset(interval: 10, padding: 0.5, useSectorDensity: false)
     .AddExact <MobPsiGrove>()
     .SetCustomPaddingWithSelf(10);
 }
示例#2
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            // (please note when changing this value to adjust the destruction timeout in ObjectMineralPragmiumNode)
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(30)));

            spawnList.CreatePreset(interval: 9, padding: 2)
            .Add <ObjectMineralPragmiumNode>();

            // mob spawn
            var presetLizard = spawnList.CreatePreset(interval: 22, padding: 0.5)
                               .AddExact <MobFireLizard>()
                               .SetCustomPaddingWithSelf(12);

            var presetScorpion = spawnList.CreatePreset(interval: 26, padding: 0.5)
                                 .AddExact <MobScorpion>()
                                 .SetCustomPaddingWithSelf(15);

            var presetBeetle = spawnList.CreatePreset(interval: 15, padding: 0.5)
                               .AddExact <MobPragmiumBeetle>()
                               .SetCustomPaddingWithSelf(5);

            // define custom spawn padding between different mobs
            presetLizard.SetCustomPaddingWith(presetScorpion, 5);
            presetLizard.SetCustomPaddingWith(presetBeetle, 5);
            presetBeetle.SetCustomPaddingWith(presetScorpion, 5);
        }
示例#3
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(10)));

            // regular trees
            var regularTrees = spawnList.CreatePreset(interval: 4, padding: 1.5)
                               .Add <ObjectTreeBirch>()
                               .Add <ObjectTreeOak>()
                               .SetCustomPaddingWithSelf(2.1);

            // rubber trees
            var rubberTrees = spawnList.CreatePreset(interval: 20, padding: 1.5)
                              .Add <ObjectTreeRubber>()
                              .SetCustomPaddingWithSelf(5.0);

            // clusters of pines
            spawnList.CreatePreset(interval: 10, padding: 1.5, useSectorDensity: false)
            .Add <ObjectTreePine>()
            .SetCustomPaddingWith(regularTrees, 6)
            .SetCustomPaddingWith(rubberTrees, 6)
            // not directly near (left, right, etc.), but diagonally - ok!
            .SetCustomPaddingWithSelf(1.1);
        }
        protected sealed override void PrepareProtoZone(Triggers triggers)
        {
            var spawnList = new SpawnList();

            this.PrepareZoneSpawnScript(triggers, spawnList);
            this.SpawnList = spawnList.ToReadOnly();
        }
示例#5
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            .Add(GetTrigger <TriggerWorldInit>())
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(SpawnRuinsConstants.SpawnInterval));

            var lizard = spawnList.CreatePreset(interval: 15, padding: 0.5)
                         .AddExact <MobCloakedLizard>()
                         .SetCustomPaddingWithSelf(18);

            var crawler = spawnList.CreatePreset(interval: 15, padding: 0.5)
                          .AddExact <MobCrawler>()
                          .SetCustomPaddingWith(lizard, 18)
                          .SetCustomPaddingWithSelf(18);

            var scorpion = spawnList.CreatePreset(interval: 20, padding: 0.5)
                           .AddExact <MobScorpion>()
                           .SetCustomPaddingWith(lizard, 18)
                           .SetCustomPaddingWith(crawler, 18)
                           .SetCustomPaddingWithSelf(18);

            // spawn only few mutants in radtowns and central town to make a rare surprise
            var mutants = spawnList.CreatePreset(interval: 80, padding: 0.5, useSectorDensity: false)
                          .AddExact <MobMutantBoar>()
                          .AddExact <MobMutantHyena>()
                          .AddExact <MobMutantWolf>()
                          .SetCustomPaddingWith(lizard, 8)
                          .SetCustomPaddingWith(crawler, 8)
                          .SetCustomPaddingWith(scorpion, 8)
                          // very large padding with self to prevent spawning mutants nearby
                          .SetCustomPaddingWithSelf(79);
        }
示例#6
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            this.spawnRateMultiplier = RateResourcesPvPDepositOilMultiplier.SharedValue;

            // this resource is not spawned on the world init
            triggers
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>()
                 .Configure(
                     intervalFrom: TimeSpan.FromHours(0.5),
                     intervalTo: TimeSpan.FromHours(1)));

            var restrictionPresetPragmium = spawnList.CreateRestrictedPreset()
                                            .Add <ObjectMineralPragmiumSource>();

            var restrictionDepletedDeposit = spawnList.CreateRestrictedPreset()
                                             .Add <ObjectDepletedDeposit>();

            var restrictionInfiniteOilSeep = spawnList.CreateRestrictedPreset()
                                             .Add <ObjectDepositOilSeepInfinite>();

            var presetOilSeep = spawnList.CreatePreset(interval: 183, padding: 1, useSectorDensity: false);

            presetOilSeep.SpawnLimitPerIteration = 1;
            presetOilSeep.AddExact <ObjectDepositOilSeep>()
            .SetCustomPaddingWithSelf(79)
            .SetCustomPaddingWith(restrictionInfiniteOilSeep, 59)
            .SetCustomPaddingWith(restrictionDepletedDeposit, 49)
            // ensure no spawn near Pragmium
            .SetCustomPaddingWith(restrictionPresetPragmium,
                                  SpawnResourcePragmium.PaddingPragmiumWithOilDeposit)
            // ensure no spawn near cliffs
            .SetCustomCanSpawnCheckCallback(
                (physicsSpace, position)
                => ServerCheckAnyTileCollisions(physicsSpace,
                                                // offset on object layout center
                                                new Vector2D(position.X + 1.5,
                                                             position.Y + 1.5),
                                                radius: 7));

            // don't spawn close to roads
            var restrictionPresetRoads = spawnList.CreateRestrictedPreset()
                                         .Add <ObjectPropRoadHorizontal>()
                                         .Add <ObjectPropRoadVertical>();

            presetOilSeep.SetCustomPaddingWith(restrictionPresetRoads, 20);

            // special restriction preset for player land claims
            var restrictionPresetLandclaim = spawnList.CreateRestrictedPreset()
                                             .Add <IProtoObjectLandClaim>();

            // Let's ensure that we don't spawn oil seep too close to players' buildings.
            // take size of the largest land claim area
            var paddingToLandClaimsSize = (int)LandClaimSystem.MaxLandClaimSizeWithGraceArea.Value;

            // add few extra tiles (as the objects are not 1*1 tile)
            paddingToLandClaimsSize += 6;

            presetOilSeep.SetCustomPaddingWith(restrictionPresetLandclaim, paddingToLandClaimsSize);
        }
示例#7
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            // this resource is not spawned on the world init
            triggers
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(
                     intervalFrom: TimeSpan.FromHours(6),
                     intervalTo: TimeSpan.FromHours(10)));

            var presetPragmiumSource = spawnList.CreatePreset(interval: 180, padding: 3)
                                       .Add <ObjectMineralPragmiumSource>()
                                       .SetCustomPaddingWithSelf(75);

            var restrictionPresetDepositOilSeep = spawnList.CreateRestrictedPreset()
                                                  .Add <ObjectDepositOilSeep>();

            presetPragmiumSource.SetCustomPaddingWith(restrictionPresetDepositOilSeep,
                                                      PaddingPragmiumWithOilDeposit);

            // special restriction preset for player land claims
            var restrictionPresetLandclaim = spawnList.CreateRestrictedPreset()
                                             .Add <IProtoObjectLandClaim>();

            // Let's ensure that we don't spawn Pragmium Source too close to players' buildings.
            // take half size of the largest land claim area
            var paddingToLandClaimsSize = LandClaimSystem.MaxLandClaimSizeWithGraceArea.Value / 2.0;

            // add the explosion radius
            paddingToLandClaimsSize += Api.GetProtoEntity <ObjectMineralPragmiumSourceExplosion>()
                                       .DamageRadius;
            // add few extra tiles (as the objects are not 1*1 tile)
            paddingToLandClaimsSize += 6;

            presetPragmiumSource.SetCustomPaddingWith(restrictionPresetLandclaim, paddingToLandClaimsSize);
        }
示例#8
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(15)));

            // bushes
            var bushesBerry = spawnList.CreatePreset(interval: 13, padding: 1)
                              .Add <ObjectBushYellow>()
                              .Add <ObjectBushPurple>()
                              .Add <ObjectBushCoffee>()
                              .SetCustomPaddingWithSelf(5);

            var bushWaterbulb = spawnList.CreatePreset(interval: 10, padding: 2)
                                .Add <ObjectBushWaterbulb>()
                                .SetCustomPaddingWithSelf(5)
                                .SetCustomPaddingWith(bushesBerry, 5);

            var bushOilpod = spawnList.CreatePreset(interval: 25, padding: 2)
                             .Add <ObjectBushOilpod>()
                             .SetCustomPaddingWithSelf(5)
                             .SetCustomPaddingWith(bushesBerry, 5)
                             .SetCustomPaddingWith(bushWaterbulb, 5);

            var objectPineapple = spawnList.CreatePreset(interval: 16, padding: 1)
                                  .Add <ObjectSmallPineapple>()
                                  .SetCustomPaddingWithSelf(5)
                                  .SetCustomPaddingWith(bushesBerry, 5)
                                  .SetCustomPaddingWith(bushWaterbulb, 5)
                                  .SetCustomPaddingWith(bushOilpod, 5);
        }
示例#9
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(30)));

            // dead trees, stumps, etc.
            var deadTrees = spawnList.CreatePreset(interval: 13, padding: 1.5)
                            .Add <ObjectTreeDeadArctic1>()
                            .Add <ObjectTreeDeadArctic2>()
                            .Add <ObjectTreeStumpArctic>()
                            .Add <ObjectTreeFallenArctic>()
                            .SetCustomPaddingWithSelf(9);

            // plants
            spawnList.CreatePreset(interval: 10, padding: 1.5)
            .Add <ObjectSmallBushArctic1>()
            .Add <ObjectSmallBushArctic2>()
            .SetCustomPaddingWithSelf(5);

            // clusters of pines
            spawnList.CreatePreset(interval: 6, padding: 1.5)
            .Add <ObjectTreePineArctic>()
            .SetCustomPaddingWith(deadTrees, 5)
            // not directly near (left, right, etc.), but diagonally - ok!
            .SetCustomPaddingWithSelf(1.1);
        }
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            .Add(GetTrigger <TriggerWorldInit>())
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(15)));

            var crawler = spawnList.CreatePreset(interval: 12, padding: 0.5)
                          .AddExact <MobCrawler>()
                          .SetCustomPaddingWithSelf(12);

            var fireLizard = spawnList.CreatePreset(interval: 15, padding: 0.5)
                             .AddExact <MobFireLizard>()
                             .SetCustomPaddingWith(crawler, 15)
                             .SetCustomPaddingWithSelf(15);

            var blackBeetle = spawnList.CreatePreset(interval: 15, padding: 0.5)
                              .AddExact <MobBlackBeetle>()
                              .SetCustomPaddingWith(crawler, 15)
                              .SetCustomPaddingWith(fireLizard, 15)
                              .SetCustomPaddingWithSelf(15);

            var pragbear = spawnList.CreatePreset(interval: 70, padding: 1.5, spawnAtLeastOnePerSector: true)
                           .AddExact <MobLargePragmiumBear>()
                           .SetCustomPaddingWith(crawler, 15)
                           .SetCustomPaddingWith(fireLizard, 15)
                           .SetCustomPaddingWithSelf(79);
        }
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            .Add(GetTrigger <TriggerWorldInit>())
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromHours(3)));

            spawnList.CreatePreset(interval: 10, padding: 10)
            .Add <ObjectMineralGiantPragmiumSource>().SetCustomPaddingWithSelf(79);
        }
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            .Add(GetTrigger <TriggerWorldInit>())
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(30)));

            spawnList.CreatePreset(interval: 150, padding: 2.0, useSectorDensity: false)
            .AddExact <MobPragmiumBear>()
            .SetCustomPaddingWithSelf(65);
        }
示例#13
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            .Add(GetTrigger <TriggerWorldInit>())
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(10)));

            spawnList.CreatePreset(interval: 32, padding: 0.5, useSectorDensity: false)
            .Add <MobBurrower>()
            .SetCustomPaddingWithSelf(32);
        }
示例#14
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            .Add(GetTrigger <TriggerWorldInit>())
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(15)));

            spawnList.CreatePreset(interval: 35, padding: 0.5, useSectorDensity: false)
            .AddExact <MobHyena>()
            .SetCustomPaddingWithSelf(40);
        }
        protected sealed override void PrepareProtoZone(Triggers triggers)
        {
            var spawnList = new SpawnList();

            this.PrepareZoneSpawnScript(triggers, spawnList);
            this.SpawnList = spawnList.ToReadOnly();

            this.hasServerOnObjectSpawnedMethodOverride = this.GetType()
                                                          .HasOverride(nameof(this.ServerOnObjectSpawned),
                                                                       isPublic: false);
        }
示例#16
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(15)));

            spawnList.CreatePreset(interval: 10, padding: 3)
            .Add <ObjectMineralCoal>();
        }
示例#17
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            .Add(GetTrigger <TriggerWorldInit>())
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(15)));

            spawnList.CreatePreset(interval: 14, padding: 1)
            .Add <ObjectLootPileGarbage1>(weight: 3)
            .Add <ObjectLootPileGarbage2>(weight: 3)
            .Add <ObjectLootPileGarbage3>(weight: 1)
            .SetCustomPaddingWithSelf(14);
        }
示例#18
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(5)));

            spawnList.CreatePreset(interval: 25, padding: 2)
            .Add <ObjectLootPileStone>()
            .SetCustomPaddingWithSelf(10);
        }
示例#19
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(10)));

            // small shrubs
            spawnList.CreatePreset(interval: 20, padding: 2)
            .Add <ObjectSmallThornyShrub>();
        }
示例#20
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(10)));

            spawnList.CreatePreset(interval: 7, padding: 1)
            .Add <ObjectMineralSalt>()
            .SetCustomPaddingWithSelf(5.5);
        }
示例#21
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(10)));

            // sugarcane
            spawnList.CreatePreset(interval: 10, padding: 2)
            .Add <ObjectSmallSugarcane>()
            .SetCustomPaddingWithSelf(12);
        }
示例#22
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(SpawnRuinsConstants.SpawnInterval));

            var presetCrates = spawnList.CreatePreset(interval: 8, padding: 1, spawnAtLeastOnePerSector: true)
                               .Add <ObjectLootCrateIndustrial>(weight: 3)
                               .Add <ObjectLootCrateSupply>(weight: 2)
                               .SetCustomPaddingWithSelf(9);
        }
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(10)));

            // mushrooms
            spawnList.CreatePreset(interval: 12, padding: 2)
            .Add <ObjectSmallMushroomPennyBun>()
            .Add <ObjectSmallMushroomRust>();
        }
示例#24
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
                // trigger on world init
                .Add(GetTrigger<TriggerWorldInit>())
                // trigger on time interval
                .Add(GetTrigger<TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(15)));

            // bushes (barren landscape)
            spawnList.CreatePreset(interval: 20, padding: 2)
                     .Add<ObjectBushYucca>()
                     .SetCustomPaddingWithSelf(10);
        }
示例#25
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(5)));

            // add some pickupable objects
            spawnList.CreatePreset(interval: 20, padding: 2)
            .Add <ObjectLootTwigs>()
            .SetCustomPaddingWithSelf(10);
        }
示例#26
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(30)));

            spawnList.CreatePreset(interval: 6, padding: 1)
            .Add <ObjectLootPileGarbageLarge>(weight: 4)
            .Add <ObjectLootCrateHightech>(weight: 3)
            .Add <ObjectLootCrateMedical>(weight: 1)
            .SetCustomPaddingWithSelf(9);
        }
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(10)));

            // bushes
            spawnList.CreatePreset(interval: 12, padding: 2)
            .Add <ObjectBushRed>()
            .Add <ObjectBushOilpod>()
            .SetCustomPaddingWithSelf(5);
        }
示例#28
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().Configure(TimeSpan.FromMinutes(10)));

            // desert trees & cacti
            spawnList.CreatePreset(interval: 8, padding: 2)
            .Add <ObjectTreeBrevifolia>()
            .Add <ObjectTreeCactus>()
            .SetCustomPaddingWithSelf(5);
        }
示例#29
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(5)));

            // all basic mineral node types
            // excludes things like coal, saltpeter, sulfur and other advanced minerals
            spawnList.CreatePreset(interval: 10, padding: 3)
            .Add <ObjectMineralCopper>()
            .Add <ObjectMineralIron>()
            .Add <ObjectMineralStone>()
            .Add <ObjectMineralSand>()
            .Add <ObjectMineralClay>();
        }
示例#30
0
        protected override void PrepareZoneSpawnScript(Triggers triggers, SpawnList spawnList)
        {
            triggers
            // trigger on world init
            .Add(GetTrigger <TriggerWorldInit>())
            // trigger on time interval
            .Add(GetTrigger <TriggerTimeInterval>().ConfigureForSpawn(TimeSpan.FromMinutes(15)));

            // all trees
            spawnList.CreatePreset(interval: 3.5, padding: 1.5)
            .Add <ObjectTreeSwamp>()
            .Add <ObjectTreeWillow>()
            .AddExact <ObjectTreeDeadMossy1>(weight: 1.0 / 5.0)
            .AddExact <ObjectTreeDeadMossy2>(weight: 1.0 / 5.0)
            .AddExact <ObjectTreeStumpMossy>(weight: 1.0 / 5.0)
            .AddExact <ObjectTreeSnagMossy>(weight: 1.0 / 5.0)
            .SetCustomPaddingWithSelf(2.1);
        }