Git Product home page Git Product logo

comfyfactorio's People

Contributors

alphaone89 avatar awesomepatrol avatar bilka2 avatar danielmartin0 avatar datmlgtaco avatar etk03 avatar galestar306 avatar gerkiz avatar hanakocz avatar itamzxm avatar jacobwatkinsgit avatar klugemonkey avatar m3wm3w avatar maemikozue avatar manolck avatar mattneumayer avatar muppet9010 avatar nekobaron avatar pacificmottledlumpsucker avatar parrotparrot avatar pingpong2011 avatar quadrum1 avatar randomdud3 avatar tomfyuri avatar zzh8829 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

comfyfactorio's Issues

Quick and easy optimization

local function on_entity_damaged(event)

Quick and easy, use local references, don't keep doing API calls for the same value, etc.

local floor = math.floor
local round = math.round
local function on_entity_damaged(event)
	local biter = event.entity
	if not (biter and biter.valid) then return end
	if biter.force.index ~= 2 then return end
	if biter.type ~= "unit" then return end

	local biter_health_boost_units = global.biter_health_boost_units

	local unit_number = biter.unit_number

	--Create new health pool
	local health_pool = biter_health_boost_units[unit_number]
	if not health_pool then
		health_pool = {
			floor(biter.prototype.max_health * global.biter_health_boost),
			round(1 / global.biter_health_boost, 5),
		}
		biter_health_boost_units[unit_number] = health_pool
		--Perform a table cleanup every 5000 boosts
		global.biter_health_boost_count = global.biter_health_boost_count + 1
		if global.biter_health_boost_count % 5000 == 0 then clean_table() end
	end

	--Reduce health pool
	health_pool[1] = health_pool[1] - event.final_damage_amount

	--Set entity health relative to health pool
	biter.health = health_pool[1] * health_pool[2]

	--Proceed to kill entity if health is 0
	if biter.health > 0 then return end

	--Remove health pool
	biter_health_boost_units[unit_number] = nil

	if event.cause then
		if event.cause.valid then
			event.entity.die(event.cause.force, event.cause)
			return
		end
	end
	biter.die(biter.force)
end```

player_modifiers.lua hard overwrites other bonuses

player_modifiers.lua assigns the player modifiers, disregarding any bonuses from technology or other mods.

I wrote a patch to save the previous modifiers [for each player]. The last modifier is subtracted before the new modifier is added.

I'm new to using git, so I'm going to do a pull request and may screw it up.

Tested single-player, but I tried to get it right for multiplayer.

Sync locale files with online Localization Service

Players often ask if scenarios and GUI's can be translated to match active game language. While every can download the locale text files in the repo and translate them i suggest services such as https://crowdin.com/ or https://www.transifex.com/ to handle that task.
These are very easy to set up and manage ,and moves lots of the workload over to the community. The translators don't need to have technical knowledge or GitHub experience to use them, with opens up the task for lots of people.

The services lets you put people in different groups such as project manager, coordinators, translators, and reviewers.

As an example, here is the dashboard for Transifex on the project Citra, which is the lead 3DS Emulator. I have been translating very many emulators recently using these services, they have such a good workflow and tools that i sometimes push out full translations within a few hours or within a day.
I strongly recommend a such website is put to use.

Skjermbilde 2020-04-30 kl  13 36 41

Cave Miner Scenario crashes with Factorio 0.18.27 on multiplayer server

This may affect other scenarios in your pack too but I haven't tested.

The scenario runs fine in Factorio 0.18.28 in single player.

But crashed on startup with 0.18.27 on my Servernetic server.

Unfortunately the log file has been overwritten, but I have the dump file if you would like access to it.

Comfy RPG

Hello,
can you create a github repository for ComfyRPG mod?

Improve admin logs : readibility

Right now it is hard to read logs, it should be :
=>Timestamp at each line
=>Filters by force
=>Filters by items (show belts, hide...)
=>Red line when pumps or critical items are picked up
=>Orange line when a new player (<3h) is doing anything

Biters get stuck in Fish Defender when doing a bunker run

image
When building a bunker to defend the market, biters in the later waves can get stuck on the sides. This is a game breaking bug because they take up the spawn buffer preventing waves from spawning new biters. While this could be abused to make the game trivial, however, this has the disadvantage of crippling coin income. The most likely outcome is this crippling turret slot purchases for the very last waves at which point it only takes pulling a wave once to spawn the toughest biters with a crippled turret count.

The best fix is to add a counter to look for stuck groups. Most likely they have no commands being issued to them. Should be simple to increment through biter groups with no commands or stalling commands and adding an attack command.

Bugs and improvement on mutagen logs : summary / filters/ team names

To keep a trace, goals for the next mutagen updates :
->Fix custom names of team (if someone switchs name in a match, then the oldest line will have the previous name, new lines will have the new line)
->Add total summary for throw
->Add force filter(North/south/all)
->Add science filter (high tier white purple yellow, then all other sciences one by one only)
->Add passive feed information

Noticeable delay every 1.5-2 seconds

Seem to be getting a noticeable/consistent delay every second or two on a clean install, with one user. Server cpu and network is not taxed, is something in game happening on nth tick that could cause this?

Not the best way to do probability tables

This is a horrible way to do probabilities (no offense)

This is the way I would recommend to do it:

function select_unit(units)

  local roll_max = 1
  for k, unit in pairs (units) do
      roll_max = roll_max + unit.probability
    end
  end

  local roll_value = math.random(roll_max)
  for k, unit in pairs (units) do
    roll_value = roll_value - unit.probability
    if (roll_value < 0) then
      return unit.name
    end
  end

end

--And the raffle table will just be like:

local raffle = 
{
  {name = "small-biter", probability = 50},
  {name = "medium-biter", probability = 20},
  {name = "big-biter", probability = 10},
}

[Bug v0.167 + v0.28] Oasis map does not work when game is modded

Hi there,

I noticed that the oasis map does not work, when the game is modded.

In the scenario files freeplay.lua does a lot of testing against is_game_modded and does things differently if mods are installed. Maybe that is the cause.

Anyways, when the game is modded, the oasis map does not draw the oasis tiles and does not relocate the resources.

more_attacks.lua "Given entity doesn't exist anymore"

4668.799 Script @C:/Users/Jacob/AppData/Roaming/Factorio/temp/currently-playing/utils/event_core.lua:33: Given entity doesn't exist anymore.
stack traceback:
...Factorio/temp/currently-playing/modules/more_attacks.lua:55: in function 'send_biters'
...Factorio/temp/currently-playing/modules/more_attacks.lua:98: in function <...Factorio/temp/currently-playing/modules/more_attacks.lua:85>
[C]: in function 'pcall'
...ing/Factorio/temp/currently-playing/utils/event_core.lua:31: in function 'call_handlers'
...ing/Factorio/temp/currently-playing/utils/event_core.lua:68: in function <...ing/Factorio/temp/currently-playing/utils/event_core.lua:66>

This is stoneblock, more_attacks is a normal module for it.

I checked for invalid entities and then nil'ed them out of the "biters to send" table. I got viciously attacked by hundreds of biters. Don't know what else I was expecting :(

Huge lags when walking through resources on the ground with full inventory and high reach bonus (magic stat)

So it's getting more and more annoying for me that I need to pause my exploration (MultiDungeons scenario) when my inventory gets full, because otherwise everyone starts to get huge lags. One of the situations even led me to being disconnected.

I'd suggest to look for solutions in the following order:

  • check if RPG mod can be optimized so it doesn't consume that much time when you have a lot of resources in your reach range and a full inventory (maybe a check for full inventory to disable auto pickup of resources from the ground, or just enable that bonus for 1 tick per second?)
  • if the RPG system uses native Factorio features report that issue to wube and hope for an optimization?

Overgrowth error with trees_defeated, line 192

8396.743 Script @C:/Users/User/AppData/Roaming/Factorio/temp/currently-playing/utils/event_core.lua:33: ...ming/Factorio/temp/currently-playing/maps/overgrowth.lua:192: attempt to perform arithmetic on field 'trees_defeated' (a nil value)

It was never defined 0 anywhere, so the line does nil + 1 and the function exists prematurely. No gui, no coins from chopping trees, no market, everything broke :(

Missing parts

a few parts, like double_biter_hp, are missing, so some of the maps dont work

Suggestion - Disable Spidertron

Short: in the same way as nukes are disabled on some tagetted maps, I suggest to disable Spidertron

Long: I have run a streamer event on Comfy_Cave_Chopy map, and when a Spidertron goes in combat in the rocks, it kills a lot of rocks along with biters, creating at the same time an insane amount of ores that makes the server lag a lot, in addition to the spider having access to areas without needing any mining.
Then, I suggest the Spidertron to be disabled the same way nukes are for all maps that need to mine your way through resources

BiterBattlesV2: configuration file feature

For hosting BiterBattles matches between Twitch Streamers, we modify scripts, it would be easier, if there was one configuration file, where we can toggle following:

  • Name of teams in GUI, especially JOIN button. Defaults: south and north
  • Amount of chunks to generate before game start. Now it takes about 10 minutes, which is fine, but big exploration causes lag during game. We can have game running before event to pre-generate lot of chunks.
  • Team balancing on/off

Super heavy function

for _, unit in pairs(surface.find_entities_filtered({type = "unit", force = key})) do

This is a pretty hefty function call, depending on your map size, and you will be doing it every 1200 ticks for every force

It would probably be smoother if you just kept track of new units when they are created, or just not worry about pre-existing biters

Blue beach, wrong wave_defense lua breaks map

11: local WD = require "modules.wave_defense.main"
This causes the error:
AppData/Roaming/Factorio/temp/currently-playing/utils/event_core.lua:33: ...ming/Factorio/temp/currently-playing/maps/blue_beach.lua:191: attempt to call field 'get_table' (a nil value)

I looked at scrapyard, cause I knew that one worked:
require "modules.wave_defense.main"
local WD = require "modules.wave_defense.table"

Edit: the level loads, but the enemies haven't come for me... (wave 7). Thought it would take a while, like with some of the other WD maps.

Feature: Biter Battles training mode

Teams are planning strategies with team balancing off. Disadvantage is that feeding science causes other (empty) team silo being destroyed too soon, making strategy/build planning tricky.

Proposed solution:
Introduce training_mode option. By default it's false to keep current behavior. If enabled, science packs are fed to biters on own side of river instead of biters on enemy side.

Advantage:
Allows not only enemy silo to survive, but also allows to include defense planning into solo-team play.

fish_defender_v1 references fish_defender files (missing map_intro)

fish_defender_v1 fails to load because maps.fish_defender.map_intro is "missing". There are other require's that reference fish_defender, but since fish_defender has those, it silently succeeds even though that's (probably?) not what is intended

I can't tell if fish_defender_v1 is supposed to be an older or newer version of fish defender, so there's some confusion on my part.

perpetual chugging from chunk generation

I'm trying out deepjungle, and I'm running into a UPS issue I believe I had on some other maps:

About once a second, the game has a very long update tick, dropping ups to 50-55 and the game just start-stops because of it. I traced it to map_generator from the debug times, and then if show-detailed-info is on, I see the chunks are increasing about one a second. I just started the game (don't have any research done) and even when standing still, more and more chunks are requested. Currently it shows 64-70 chunks active, and more than a thousand in the debug info (it just says: "Chunks:")

By the time I finished writing this post and going back and forth to look at debug info, an additional 200 chunks were generated (from 1400 to 1600), and a total of 154,745 entities. My ram usage isn't increasing significantly, but the map is nearly unplayable.

Edit: I posted for help on the forum, because it turns out the base mod alone is enough to cause 1 chunk request per second. I don't think that's necessarily a bad thing, but combined with a mod that does a lot on chunk generation... the game constantly chugs. I'm hoping I can at least defer the loading until I visit new chunks / pollution gets there.

Pickup option for bb

Random thoughts :
=>When you join the game or if you are already inside and the mode "pickup" is enabled (force tournament mode), shows a popup with multiple choices :
-teampicker (must know players and often play bb to have balanced team)
-vet or architects (knows well bb/builds) intermediate (know some stuff of bb, but won't be able to do -massive optimized builds...
-new player
-observers (do not participate)

Probably make them auto join group.
=>Probably have a popup for each teampicker (what side they want to be, and if same choice for both, random)
=>Then random first is selected to pick
=>Maybe popup with list of players+ group, so he can select one (each time selected auto switch to team)...
=>Iterate until end with a "abort option".
=>Once finished, 5 minutes default time for thinking, but team picker can force ready their side...
=>Once over, unfreeze players

add translation support?

Multilingual support will be great.

  • lua
local l = frame.add {type = "label", caption = info}
local l = frame.add {type = "label", caption = {"fishdefense.info"}}
  • locale\en\fishdefense.cfg
[fishdefense]
info=The biters have catched the scent of fish in the market。\nFend them off as long as possible!\n\nYour ultimate goal is to evacuate all the fish to cat planet!\nPut them in your rocket's cargo and launch them into space.\nDon't worry, you will still get space science.\n\nThe Market will gladly take any coin you might find.\n\nAdditional turret slots can be bought at the market.\n\nThe railgun has been enhanced greatly.\n\nResearching Laser Turret Damage will improve it even further.\n\nThe shotgun has recieved a damage buff.\n\nResearching Tanks will unlock the artillery tech early\nallowing you to produce shells.

Spectator = Team 3

Suggestion - Instead of having to join Team North / South, then go to Spectator mode, change would be to have Spectator Mode as essentially a Team 3.

  • Prevents abuse from going from Team N to Spectate then back to Team N
  • Can lock teams & define who can Spectate vs. Team N/S
  • Can more easily define Spectator abilities
    Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.