Page 1 of 1

[1.1.57] Prototype/Technology ignore_tech_cost_multiplier flag is ignored for infinite technology levels

Posted: Tue Apr 19, 2022 3:24 am
by SkyKiwi
What did you do?

I was writing a mod to make infinite technologies ignore the technology cost multiplier. While troubleshooting, I set ALL technologies to ignore the technology cost multiplier. The source code is as follows:
for techname, tech in pairs(data.raw["technology"]) do
tech.ignore_tech_cost_multiplier = true
end
What happened?

All non-infinite technology levels ignored the cost multiplier, but infinite levels did not.

What did you expect to happen?

Expected all levels of all technologies to ignore the cost multiplier.

Steps to Reproduce

Run the game with the given mod code in data-final-fixes (Infinite-Unadjusted has been attached for this purpose), create a new game with the technology cost multiplier increased.

All non-infinite technology levels will have unmodified costs, but infinite technology levels will be modified.

Re: [1.1.57] Prototype/Technology ignore_tech_cost_multiplier flag is ignored for infinite technology levels

Posted: Tue Apr 19, 2022 3:35 am
by FuryoftheStars
According to the API docs, this is specifically for the tech cost multiplier setting.
https://lua-api.factorio.com/latest/Lua ... multiplier

As such, I’m not sure if they’ll actually consider this a bug or not.

Personally, I wouldn’t. Instead, if a method for what you want gets implemented, it should be a separate attribute, that way you can control both behaviors separately. (So, a modding interface request.)

Re: [1.1.57] Prototype/Technology ignore_tech_cost_multiplier flag is ignored for infinite technology levels

Posted: Tue Apr 19, 2022 4:03 am
by SkyKiwi
FuryoftheStars wrote:
Tue Apr 19, 2022 3:35 am
According to the API docs, this is specifically for the tech cost multiplier setting.
Sorry if I was unclear, the multiplier I was talking about the entire time is the setting. Specifically, this one:
Image

I don't see why any of the verbiage, both in-game and in the docs, would mean it does not apply to the infinite research levels.
For a more specific example, it applies to levels 1-7 of Laser Turret Damage, but does not apply to levels 7+.

If "tech cost multiplier setting" is referring to something else, I would still consider this to be an issue - though like you said, at that point it becomes more of a feature request post. In fact, even if this is considered a bug, I would lean towards it being fixed with a separate attribute anyway as that gives more flexibility.

Re: [1.1.57] Prototype/Technology ignore_tech_cost_multiplier flag is ignored for infinite technology levels

Posted: Tue Apr 19, 2022 4:09 am
by FuryoftheStars
Yeah, sorry, I’m unclear on the issue.

Infinite techs increase in cost naturally, even with this multiplier setting set for 1. My assumption based on your post was that the attribute you set to true was not also disabling this cost increase.

Re: [1.1.57] Prototype/Technology ignore_tech_cost_multiplier flag is ignored for infinite technology levels

Posted: Tue Apr 19, 2022 6:01 pm
by Rseding91
Thanks for the report. It's now fixed for the next release.