Tower Defense Evolution - Pure Kills System


Pure tower defense: progress by killing biters, dense nest placement, periodic waves with bosses, Master Ammo Chest system. No pollution attacks, only evolution.

Overhaul
2 months ago
2.0
580
Combat Environment

b Uhm no ammo in turret - Master Ammo Chest

2 months ago

Hey, it appears that the Master Ammo Chest is not working as it should

It will take all ammo, if there's not enough ammo for all turrets then it just takes it - now that I manually removed 3 of the turrets it will input it.
After I got it to store some ammo, then it starts redistributing - but if they got no ammo, or I needed to reach a threshold I got no clue about, then it wont - atleast upto 83 magazines crafted - I crafted ~2 magazines before it took it, had 4 basic turrets

2 months ago
(updated 2 months ago)

Okay I found a few other bugs, like tech wont get upgraded. - fixed it on my end
You forgot to set the welcome msg/which made me change the global variables to actually use the map settings.

Variables changed to: -- control.lua
"
local SAFE_ZONE_RADIUS = settings.global["tde-safe-zone-radius"].value -- 150-200 tiles safe zone
local NEST_SPACING = settings.global["tde-nest-spacing"].value -- 1 nest every 5 tiles
local WAVE_INTERVAL = settings.global["tde-wave-interval"].value * 60 * 60 -- 10 minutes in ticks (10 * 60 * 60 = 36000)

"

changed the line in show_welcome_messages(player)
to have
"
player.print(string.format("• Waves come every %d minutes, bosses every 10 waves",(WAVE_INTERVAL/60/60)), {r = 1, g = 0.8, b = 0})

"
so it shows the wave time

Research related, I did add
"
if game.tick % 600 == 0 then
local tech_t = game.forces.player.current_research
if (tech_t and not tech_t.researched) then
unlock_technology_with_dynamic_cost(tech_t.name)
end
end
"

to the nth 60 tick event

Added a simple:
"
script.on_event(defines.events.on_research_started, function(event)
local research = event.research -- This is a LuaTechnology object
local research_name = research.name

unlock_technology_with_dynamic_cost(research_name)
end)
"

I also changed the unlock_technology_with_dynamic_cost to be really strict, as in it will use ressources if you got it to research as far as it can or finish whatever research your currently doing
"
local inventory = base_heart.get_inventory(defines.inventory.chest)
-- Check prerequisites
for _, prereq in pairs(tech.prerequisites) do
if not prereq.researched then
return false, string.format("Missing prerequisite: %s", prereq.name)
end
end

if available_tokens <= 0 then
return false, string.format("No tokens available! Need %d.", required_tokens)

elseif available_tokens < required_tokens then
local prog = math.min(1, math.max(0, available_tokens / required_tokens))
game.forces.player.research_progress = game.forces.player.research_progress + prog
inventory.remove({name = "tde-dead-biter", count = available_tokens})
return false, string.format("Partial progress: Used %d / %d tokens.", available_tokens, required_tokens)

elseif available_tokens >= required_tokens then
-- Full research; handle completion here if needed
game.forces.player.research_progress = 1
inventory.remove({name = "tde-dead-biter", count = required_tokens})
-- Research the technology
tech.researched = true
-- Increment research count and show notifications
increment_research_count()
return true, string.format("Technology unlocked: %s (Cost: %d tokens)", tech_name, required_tokens)
end
" - this is more for inspiration if you want it :p

2 months ago
(updated 2 months ago)

Hey! Thanks actually, I am very new to modding games, and Factorio has been great so far. If you want, as the mod is open source, DM me on Discord to implement your fixes and changes in the next update, and of course, I'll put you as a collaborator/creator of the mod too!

and well i can learn some things from you too! have a great day! ill keep studying for my tests

my discord: manuel_mackenney

2 months ago

Sure thing, added and shared the fixes in a bit better markup :p

Well as long as you have fun and play around with it, and see what others have done then you will get to wherever you want to be after some time

enjoy the study

2 months ago

Sounds to me like opening a github for this mod might be a good idea :D

2 months ago

Sounds to me like opening a github for this mod might be a good idea :D
hey! there is a github of the mod, im new to this still so im trying my best xd

New response