No one likes or uses the pollution multiplier feature I added.
Feedback suggests that it spawning at outposts makes the cause too obvious, so people complain about it. And it requires that outposts have to be defended.
Yet, people still complain crash site is too easy.
By moving the pollution spawning to the centre of the base the effect of more outposts is spread over the whole base and will trigger more attacks, but will challenge the whole base defences rather than just a single outpost.
- Create builder functions for ring_pattern and ring_weighted_pattern.
- Use main ore rorate to rotate start ores.
- Shuffle start ores.
- Use same land tiles for start ores.
- Shuffle shapes rather than mutating the config.
- Rename scenario template from danger-ore-cricle to danger-ore-circles.
- Set restart command to use 'danger-ore-circles'.
- change Restart command to use server.start_game (offers setting the mod pack).
- Change danger ores and crashsite maps to use the new restart command.
- Removed events.on_player_mined_item from outpost_builder because we don't want to add coins every time they mine and it's duplicated in player_stats.
- Removed events.on_player_mined_item from player_stats because it doesn't tell us what entity the items came from.
- Added coin tracking to events.on_pre_player_mined_item event instead. Checks if the mined item was a chest with coins in it and adds to the player stats if so.
- Tested that coins from trees and rocks still track when market is enabled
- While I was at it, added a pretty coin floating text for when RNG gives coins from mining trees/rocks
- Players get an increment to entities built when a robot they own builds something
- Players don't get an increment if they placed the blueprint and the base's roboport con bots build the entity OR if another players robots do the building.
- Replaced furance with furnace in all files
- Attempted to fix global desync issue, but probably not right
- Added server_player so /get_pollution_multiplier can be called from server
My plan is to make a harder crash site version where getting free resources from outposts creates pollution.
My intention is to balance it so it's still better to get items from outposts, but this commit is intended to give me a way to take saved games and test different amounts of pollution to check for balance. I don't intend to test this on live for a while but want to test it offline, this will give me the ability to turn it on half way through a game.
Need to consider how it doesn't take into account what the item is so it will be better to get free end-game items and probably limit how much iron we let into base later in the game. Might also create interesting meta where we are careful about what resources we take from outposts depending upon the pollution making setting.
- Added function to check distance between two entities as I couldn't find one in utils
- Added call to check how far from destroyer to wagon
- Since there's now a check I removed the 2 second wait between spawning and starting to fire in favour of using distance instead (384, 386)
- fixed code indenting
- added comments to warm about potential issues with surface names
- modified check for chest containing poison so it only happens once per /strike command
- If it couldn't find a non-colliding position it errored when trying to use the worm position to spawn biters
- This would cause the callback to stop working and the roboport wouldn't spawn worms.
- Fixed by adding check for nil worm position
It's handy to know who's doing the upgrading so I've added their name to all the crash site toasts. This branch depends on the arrakis/dunes one as in that branch I moved some things into a features folder.
sandworms.lua
- Added feedback to player that places the roboport
- Added floating text *thump* as warning when roboport placed and 30 seconds before attack
- Changed worm/biter spawn balance
- Fixed failed lua check
- Changed spawn time to 5 to 15 minutes instead of 6 to 20 minutes
repair_cars.lua:
- Removed surplus else statement as requested
- Added ability for tanks to repair. Cars were very underwhelming past medium worms, their health is too low to be useful.
others:
- Fixed multiline strings in ScenarioInfo
- Saves more kill data to Scoreboard
- Displays total kills in score board
- Saves player data to crash site scenario data set
- Added scenario name to data set so that if we later want to add data for danger ores we can filter it out
- Reduced intervals for each level from 3, 2, 1, 0.5 seconds to 2, 1.5, 1, 0.5 seconds.
- Reduced cost from 7500 per level to 4000 per level.
These changes should make the tank useful in the period of the game for which it's designed. I will watch the next few games to check balance and adjust if it's too OP.
- Made changes suggested by grilledham
- Disabled market item when research levels complete so that the tooltip can still be seen
- Changed cost to 7500 extra per level
Previously we couldn't tell if a restart was due to game win or fail. Statistics are now saved that include the start and end epoch, the game time in ticks (so we can gauge activity), how many biters, worms and nests were killed, how many enemy_entities remain (so we can tell if the map was cleared) and how many players participated in total.
The strike count and cost described by the market was correct but the actual number of capsules sent and the number of capsules removed from the chest was wrong. Bug due to starting index, have now updated the maths to be correct.
Tested and the market description, number of shots fired and the number of capsules removed from the chest are now correct.
Rearranged the order of the code so that it's more performant and added comments to further explain the logic and reasons for the complications, ie. the cheesing with artillery.
Previously the airstrike was not reaching the corners of the map. There was a default max_range value of 1000 that limited how far the poison capsules could travel. Have set it to 1400 so that it can reach the corners of the map.
THIS NEEDS PLAY TESTING. Please don't merge until I've confirmed I've play tested it.
- Current behaviour is that when destroyers/defenders are created their target position is set to the entity that killed them.
- If a player picks up the artillery after the capsules spawn then they lose their cause.target and stop, not reaching the cause of the turret death.
- I've changed this behaviour so that if the target.cause is artillery then it spawns a defender/destroyer projectile NOT an entity. The projectile target can therefore be a position not an entity. So the capsules won't stop if the artillery is picked up.
- If the cause is not artillery turret or wagon then a destroyer/defender capsule entity is spawned instead of a projectile because a projectile cannot track the player.
- If the player picks up the artillery turret before the projectile that kills a turret arrives then the event cause.name will be missing and no bots spawn at all. I have changed the behaviour so that "if not cause" then we assume they're doing something fucky. We won't have the entity cause name or position, so let's just spawn double the normal amount of destroyers and just send them at 0, 0 since we know nothing else to do with them.
- Type `/strike [gps=x,y,surface] to send a large cloud of poison into the enemy
- Searches a chest near spawn for poison capsules. Current cost for command is 100 capsules but could be balanced.
- Needs market items adding for technology research, bought with coins.
- Variables strikeCount and strikeRadius start low. As the market upgrades are made (start at 5k each?) the size of teh strike and amount of capsules increases.
- Should be balanced to allow use from mid-game onwards. Don't allow early game use as manual throwing is fine for early outposts. This should be to speed up the boring end-game clearing of worms.
- Added spidetron to artillery_target_entities list
- Added code to fire a rocket at spidertrons as well as the non-damaging artillery
- Tested effect of 4 and 8 artillery rockets on spidertron. Kills shields quick but spidertron takes about a minute to die. Enough to deter them from staying too long but not too OP.
When a combat robot expires and is targeting an artillery wagon, it will now explode. This is a work around for a factorio bug where combat robots do not attack artillery wagons.
- Changed get_inventory(1) to get_inventory(defines.inventory.character_main) to make it clearer which inventory we're getting.
- changed area charted to 3x3 full chunks cented on the chunk containing the pinged coordinate. Will now charta 96x96 tile area which is more reasonable considering the cost of /spy
Players were using remotely located artillery wagons in lakes to cheesily clear the map with no repercussions. Swarms of destroyer capsules would hover over the artillery but not target it. They would timeout and the player could then refill the wagon with ammo.
I've changed the entity_died_events file to events.lua since it now has on_entity_died, on_player_died and on_combat_robot_expired.
I have added the on_combat_robot_expired event so that when the robots timeout they explode, damaging nearby entities.
Added lines to store the unix time the restart happens as well as how many ticks the game lasted. Starting storing these now so I have some interesting data to use in a week or two.
Added changed requested by grilledham:
- Used format_time function
- Added local var to show that text string was role ID.
- Added another commented var with the ID of a test role in case we want to test something and not ping @crash_site
- Added markdown to make printed string bold
Added discord notification for the @crash site role when crash site is restarted using the /restart command. Pings users with @Crash Site role and prints the map time to add to competitiveness.
Space race has a bug that sometimes a rock will spawn where the silo needs to be. But the code only removes trees. This will allow me to call a function to delete rocks.
- Changed behaviour for non-admins. Now checks for spawners, biters and turrets but doesn't require walls and power structures to be destroyed for restart
- Added checks to limit non-admins from changing the scenario by using an argument after /restart. Now defaults to current scenario for non-admins.
Updated crash site /restart command so that guests and regulars can call it when map is cleared
- Only admin can abort, once the map is cleared.
- Guests and Regular can both call /restart when all enemy units and structures are dead
- Tested on S10 by running this command:
/c local surface=game.player.surface
for key, entity in pairs(surface.find_entities_filtered({force="enemy"})) do
entity.destroy()
end
- Need to merge into develop to test on live server in case conditions at the end of the game are different
- Thought about adding rocket launched condition but decided against it.