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

Compatibility with Enemy Race Manager #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OndrejMus
Copy link

Hi,
Following discussion https://mods.factorio.com/mod/biter-power/discussion/63c971875c81d75079c5696f I have updated your mod to work with biters from Enemy Race Manager.

Change is only in control.lua, where I'm checking for presence of ERM mod and parsing biter name to match your config. This approach seems more durable to me as it is not reliant on specific number in name and it is also using your configs for biters so there is no need to modify multiple records.

I also had to introduce variable for biter name so few following steps work properly.

I have tested capturing biter with trap (which spawned caged biter and unlocked tech), hatchting one from egg and loop from treadmill to revitalizer and back. Escape also seems to work.

So far it seems to work on my end.

Best regards,
Ondřej

Copy link
Owner

@heinwessels heinwessels left a comment

Choose a reason for hiding this comment

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

Weird, I never got a notification for this, sorry that I'm only getting back to you now.

Thanks for your submission! However, it will not work where you currently put it. It only needs changes to config.lua. I've added a spot where it can be added in the following way:

if enabled_mods["enemyracemanager"] then
    config.biter.types["your-custom-biter"] = { --[[ table containing all required traits, just like vanilla biters ]] }
end

I hope you find the time to fix it :)

@heinwessels
Copy link
Owner

Or actually, I spoke to quickly. You're attempting to drop the vanilla caged biters even when catching the caged biters? Can you explain what their names look like and why you decided this route?

@heinwessels heinwessels self-assigned this Feb 3, 2023
@OndrejMus
Copy link
Author

Hi,
no worries, I was also busy lately. You already have a nice structure in research, biter power capacity etc. and Enemy race managed (ERM) does not add some new biter versions like Armored biters, it adds tiers.

There will always be a configuration for vanila but there might be diferent number of tiers per biter variant and there might be various power of biters that should transition to biter power capacity so balancing would be quite dificult.

So it seems like a good idea to build up on your work and just normalize ERM biters to vanila by connecting traped ERM biter to vanila configuration.

Biter names in ERM have following structure "erm_vanila/small-biter/1". Vanila means we are talking about usual biters. There are other new races available from creator of ERM like zerg or protoss from StarCraft 1 and few more.

@heinwessels
Copy link
Owner

@OndrejMus Ah yes. Had a look at ERM and it indeed does not make sense to add an item for each tier of biter.

However, I would still like to have it part of config.lua so that we can possibly add additional tooltips to all biter units about the energy value and escape change.

So I'm thinking you could add an alias table in config.biter.aliases that points to the appropirate biters, f.i:

config.biter.aliases = {
     ["this-erm-tiered-small-biter"] = "small-biter",
     -- ...
}

Then you only need to account for that in the cage-trap code by also looking at the aliases table.

Would you be up for that? I could add the custom tooltips later.

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