Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO: Silo Defense scenario #1403

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

RedRafe
Copy link
Contributor

@RedRafe RedRafe commented Mar 17, 2024

G'day, I'd like to add this new PvE scenario to the DangerOres folder

Objective: Launch 666 rockets while defending your own silo against biters in a DO map

Setting: regular DO rules apply, with:

  • enemies ON
  • 20x tech cost
  • all landfill tiles
  • 666 launches to win
  • mods: Deadlock's (ore only), RedMew-data, Memory Storage

Relevant code changes:

  • map_gen/maps/danger_ores/modules/restart_command.lua now also prints on Discord if the players won or lose the map. Optional global map_won_objective may be present to set win/lose, map is considered victorious by default
  • map_gen/maps/danger_ores/modules/map.lua added optional config param enemy_radius to map(config) of DO
  • map_gen/maps/danger_ores/modules/memory_storage_control.lua added module for Memory Storage management (Memory Units are infinite warehouses). The module simply disables tech/recipe & spawns 4 of these special warehouses at spawn. If a player griefs them & disconnects, their inventory is immediately spilled. Can be used in other scenarios independently

Other than that, everything else is for The Silo defense scenario itself:

  • spawn callbacks for silo/turrets placement
  • listen on biters grouping to direct them towards the silo
  • use rocket_launched module to do waves on satellites
  • disabled terraforming, blue concrete, & biter drops

I'm not 100% sure on how rocket_launched works. I've tested on single player & I didn't manage to get the win condition/reset message.

I'm attaching a few screenshots of the map below

Spawn area

Screenshot from 2024-03-17 14-22-33

Biter waves

Screenshot from 2024-03-17 14-28-05

Map lost

Screenshot from 2024-03-17 14-29-48

Anti grief

Screenshot from 2024-03-17 15-02-01

@RedRafe
Copy link
Contributor Author

RedRafe commented Mar 17, 2024

Obviously I'd like to test it with actual players before adding it. The satellite module I straight up copied from danger_ores_angelsbobs just changing the sat count

local position = player.position

for i=1, #inv do
spill_stack(position, inv[i], true, nil, false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if spilling items is the best idea here. Isn't this punishing the other players who now have to clean up the mess.

What if we spawned a player corpse instead. You can set the corpse to inactive to prevent it from despairing. You can look at dump_offline_inventories.lua for inspiration.

Also I wonder if only dumping the memory storage items instead of the whole inventory would make more sense? Logging off with a memory storage item might be accidently rather than deliberate/griefing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I made it harsh on purpose since there are only 4 of the in game, & you can't get others, so it would act both as anti-grief & punishment if you log off with one of them in your inventory, since you're not supposed to have any

(Memory Storages have a scripted inventory so when picking up one Memory Storage, it appends a tag with the stored quantity to the item. So you can have 1000, 1M, 100Billions items stored in 1 inventory slot of yours)

But this may be indeed too harsh, I can tone it down by spilling just the MUs

Copy link
Collaborator

@grilledham grilledham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested, but seems mostly fine. if I get time later, I'll try to test the win condition.

@RedRafe
Copy link
Contributor Author

RedRafe commented Mar 25, 2024

Updating this based on feedbacks from test runs. Todo before merging (more of a memo to me when I'll come back to this in a week or so):

  • refactor MUControl to not drop full inventory but only MemUnits
  • boss biters instead of big waves to reduce lag?
  • add market back? Farefang's on Discord
  • boss wave every 5?

Data side:

  • increased turret range?
  • copper ammos?

@ grilled - the rocket launched module worked fine (it start counting after reaching 1 evo, thats why I didn't get it on editor testing) but after 50-60 waves becomes unplayable due to the lag of biters moving towards base. So for higher wave count (>50/100) it needs some boss mechanic maybe so instead of creating 4'000 biters, only a bunch of them are created with better stats. Below a couple images from the last run

do_path
do_path_2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants