[Solved] How to get current pollution?

Place to get help with not working mods / modding interface.
zurisar
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sun Mar 13, 2016 8:31 pm
Contact:

[Solved] How to get current pollution?

Post by zurisar »

Hi guys, I worked on new mod and already done with some new weapons (Ak-47, M60, etc) but they are a little imbalanced, I try to safe real stats for new weapons and it make it too overpowered.

For now I have an idea how I can balance it, main idea that biters and spitters HP will be increased with the pollution:

More pollution -> more science research -> more powered weapons -> more monsters HP

I thinks it's a good way for first time, while I worked at main mod part, people can test 'weapons part', without ruinning gameplay.

What I need, I want to get current pollution value at script, and use it like modifier for changing base monsters max_health

Also as I understand I can't use some random event or timer and best way just copy enemies.lua from base mod and add my function for HP increasing, because I don't want use on_tick event and I didn't found any other way to do this.

Do I mind right?
weapons preview
Last edited by zurisar on Mon Mar 21, 2016 4:47 pm, edited 1 time in total.
zurisar
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sun Mar 13, 2016 8:31 pm
Contact:

Re: How to get current pollution?

Post by zurisar »

I did some research, I see where starting variables for pollution progressing are sets
From map_settigs.lua
And I know how to change factor, so I can increase or decrease pollution progress anytime, anyway I still can't get pollution value at current time, I try to print some virable via console, but can't find right :(

I can go another way and rebalance damage for new weapons in my mod, but I don't want to do this, because if Glock 17 do 2 dmg (like pistol) and AWP do 15 dmg, this is sick...
I already finished with sounds and fire rate balance, and last stage before testing is changing enemies HP via pollution factor. So I'll continue searching for right values :)
zurisar
Burner Inserter
Burner Inserter
Posts: 13
Joined: Sun Mar 13, 2016 8:31 pm
Contact:

Re: How to get current pollution?

Post by zurisar »

I found how to get it!
If you want to use some value of game progress you can get evolution factor
http://lua-api.factorio.com/0.12.27/Lua ... ion_factor

for check current evolution factor at any moment you can use command

Code: Select all

/c game.local_player.print(game.evolution_factor)
Post Reply

Return to “Modding help”