Page 3 of 5

Re: [0.11.X] Oxygen

Posted: Tue Aug 11, 2015 10:43 am
by Cheata
Neomore wrote:For anyone better at coding than me, i was able to actually get the mod to load on .12 after having to add over 50 lines of code, and lots of underscores. However, currently only placing the oxygen dispenser down works. Picking it up breaks the mod. Haven't figured out how to fix that, yet.

Also, the smoke effect and the dispenser's shadow effects are also broken, as well as oxygen being added to the main menu (i believe). It at least doesn't in test mode.

But, hey. At least Factorio is able to turn on when the mod is installed. That's at least a bit of progress.

Here's the file. I will keep trying to work on it, but would appreciate someone more qualified to do this. Hopefully the mod author him/her self, but anyone will do.

you had to add code? interesting, i might have a look at it myself.

Did you happen to mark the code you added with comments?

**EDIT**
oh nvm i c, extra data in the type definitions to allow for the updates to the circuit network

ill see if i can get my flatmate to do some beta testing on it (as i don't have factorio installed atm) if so i might look at those bugs for u ;)
**EDIT

Re: [0.11.X] Oxygen

Posted: Mon Aug 24, 2015 10:43 pm
by ZombieMooose
Love the idea of this, and hope you can update it to 0.12.

Re: [0.11.X] Oxygen

Posted: Mon Nov 23, 2015 6:15 am
by goku90504
is there going to be an update for the newer game versions?

Re: [0.11.X] Oxygen

Posted: Thu Dec 31, 2015 10:53 pm
by QAstral
I tried to fix it for game version 0.12.20. But I have found several bugs which probably were in previous mod versions too, so I tried to fix them too... While I was fixing them I decided to add several changes for this mod which are not minor. I hope author will not by angry on me if I send it as unofficial update 1.3.8

Changes are those:
New features
- added config file which is used for some ingame parameters as radius from dispenser, replenishing speed, damages, etc.
- completely reworked dispenser. Now it does not give static amount of oxygen when player is close to it, but it depends on how far he is from it. When player creates several dispenser near to each other he will get even more oxygen per tick (there is still some maximum which he can reach per one tick). It means if you put 2 dispensers near each other you will get almost twice oxygen, but if you add third one you will not almost get any boost (you still get some minor)
- completely reworked tick check (how often is something happening). Now it checks twice per second (if it will creates lags, there is a config to change)
- reworked damages which are taken by player, enemies and spawners (because of tick changes)
- completely reworked how player checks if he is out of oxygen and out of bottles. The amount now is not integer but decimal (100.00 instead of 100). It was made because of dynamic dispensers. The player is always running out of oxygen, but this speed can be lessen if he stands near dispenser or even he can get some oxygen.
- by default bottles are not refilled when player stands near dispensers (in config it is possible to turn it back)
- added notification when bottle is used
- other minor changes which I do not remember :)

Fixes
- fixed bottle replenishing when per one tick were replenished bottle in main inventory and in belt too. Now first replenished are those in main inventory and then in belt. (I think similar were with emptying them too, but now it should be fixed too)

Known Bugs
- When there is an empty bottle in a belt and it is filled and there is no space to add to belt, this bottle will disappear (I think this bug were in previous versions too)
- Enemies still get static damage even if they are far away from dispensers. Maybe I'll change it in the future too, so it will work similar to oxygen replenishing.
- Unbalanced damages, speed of loosing or replenishing oxygen, too small or too big distance from dispensers etc. That is why there is a config file. Changes should by applied after game reload.

Mod
OxygenUnofficial_1.3.8.zip
(36.42 KiB) Downloaded 308 times
Just to add... I'm not a lua programmer and I do not want to keep on unofficial changes(not in a long term). I just wanted to fix this mod in a way I want to play it right now and just wanted to share those changes :).
Ah, yeah, and sorry for my English :)
Yeah, and a last thing... Author can use any of those changes in his official update without asking me, if he would like them.

Re: [0.11.X] Oxygen

Posted: Fri Jan 01, 2016 6:28 pm
by ZombieMooose
QAstral wrote:I tried to fix it for game version 0.12.20. But I have found several bugs which probably were in previous mod versions too, so I tried to fix them too... While I was fixing them I decided to add several changes for this mod which are not minor. I hope author will not by angry on me if I send it as unofficial update 1.3.8

Changes are those:
New features
- added config file which is used for some ingame parameters as radius from dispenser, replenishing speed, damages, etc.
- completely reworked dispenser. Now it does not give static amount of oxygen when player is close to it, but it depends on how far he is from it. When player creates several dispenser near to each other he will get even more oxygen per tick (there is still some maximum which he can reach per one tick). It means if you put 2 dispensers near each other you will get almost twice oxygen, but if you add third one you will not almost get any boost (you still get some minor)
- completely reworked tick check (how often is something happening). Now it checks twice per second (if it will creates lags, there is a config to change)
- reworked damages which are taken by player, enemies and spawners (because of tick changes)
- completely reworked how player checks if he is out of oxygen and out of bottles. The amount now is not integer but decimal (100.00 instead of 100). It was made because of dynamic dispensers. The player is always running out of oxygen, but this speed can be lessen if he stands near dispenser or even he can get some oxygen.
- by default bottles are not refilled when player stands near dispensers (in config it is possible to turn it back)
- added notification when bottle is used
- other minor changes which I do not remember :)

Fixes
- fixed bottle replenishing when per one tick were replenished bottle in main inventory and in belt too. Now first replenished are those in main inventory and then in belt. (I think similar were with emptying them too, but now it should be fixed too)

Known Bugs
- When there is an empty bottle in a belt and it is filled and there is no space to add to belt, this bottle will disappear (I think this bug were in previous versions too)
- Enemies still get static damage even if they are far away from dispensers. Maybe I'll change it in the future too, so it will work similar to oxygen replenishing.
- Unbalanced damages, speed of loosing or replenishing oxygen, too small or too big distance from dispensers etc. That is why there is a config file. Changes should by applied after game reload.

Mod
OxygenUnofficial_1.3.8.zip
Just to add... I'm not a lua programmer and I do not want to keep on unofficial changes(not in a long term). I just wanted to fix this mod in a way I want to play it right now and just wanted to share those changes :).
Ah, yeah, and sorry for my English :)
Yeah, and a last thing... Author can use any of those changes in his official update without asking me, if he would like them.
awesome work, but maybe making a new post in unofficial updates?

Re: [0.11.X] Oxygen

Posted: Sat Jan 16, 2016 5:56 pm
by Natha
Thangs to QAstral for make an unofficial post! I took the changes into the official version and will update it.

Re: [MOD 0.12.+] Oxygen

Posted: Thu Feb 25, 2016 7:32 pm
by Crawl
could it be that the mod doesnt work in multiplayer right now? using 12.20 stable.

our oxygen is getting up to -200 and we get no damage :/

could also that its conflicting with another mod, but i dont really see how it does because no other mod fiddles with my health.

edit: also not working with 12.24 (steam version)

Re: [MOD 0.12.+] Oxygen

Posted: Thu Feb 25, 2016 8:58 pm
by Bl00drav3n
Yes the current version is broken, because Lua.

To fix it, in control.lua, line 90 change

Code: Select all

return remove_bottle
to

Code: Select all

return removed_bottle
What was happening is remove_bottle() returned itself instead of the local variable, and the expression that checks if a bottle was removed never evaluates to false.
I like type safety.

Edit:

Also there is a critical bug when using this mod in multiplayer. The current version does not check if a player in the global player-list is connected and will continue to drain oxygen, up until the point where the offline player starts choking. Following line will then crash the server:

Code: Select all

v[1].character.damage(Config.ChokingDamage, v[1].force, "oxygen")
To fix the problem, simply check the player.connected property before entering the relevant codepaths (inside handle_players and handle_dispensers).

Here's the patched script:
control.lua
Patched v.1.3.8
(10.73 KiB) Downloaded 136 times

Re: [MOD 0.12.+] Oxygen

Posted: Tue Mar 15, 2016 4:10 pm
by FoolishBalloon
Hey! I'm using your mod alongside Bob's Mods and N.Tech Chemistry, and they do make the research chain a bit longer, so it was practically impossible for me to get to Oxygen Refill with the 5 bottles that I spawned with. I used Console to give me new bottles until I researched it, and with it being the 100% priority I had to use exactly 20 bottles before I was able to refill my first one. Better players could probably do it faster, either way, it'd be nice to receive more bottles if the mods detects Bob's mods and N.Tech Chemistry :)

Re: [MOD 0.12.+] Oxygen

Posted: Thu Mar 17, 2016 3:50 pm
by Natha
FoolishBalloon wrote:Hey! I'm using your mod alongside Bob's Mods and N.Tech Chemistry, and they do make the research chain a bit longer, so it was practically impossible for me to get to Oxygen Refill with the 5 bottles that I spawned with. I used Console to give me new bottles until I researched it, and with it being the 100% priority I had to use exactly 20 bottles before I was able to refill my first one. Better players could probably do it faster, either way, it'd be nice to receive more bottles if the mods detects Bob's mods and N.Tech Chemistry :)
I'll look for that :)

Re: [MOD 0.12.+] Oxygen

Posted: Mon Mar 28, 2016 1:16 pm
by thomas2003
Any help would be appreciated.My problem is that if you put this mod in then load an older save you will have no oxygen meter or anything, I can still research the oxygen things, but there is no oxygen meter.

Thanks in advance.


(If you start a new game you do see the oxygen meter.)

Re: [MOD 0.12.+] Oxygen

Posted: Mon Mar 28, 2016 5:55 pm
by Austin5003
A planet full of trees still needs oxygen production? :shock:

Re: [MOD 0.12.+] Oxygen

Posted: Mon Mar 28, 2016 6:05 pm
by Factorio2016
1) imagine that a lot of oxygen and your lungs burn.
2) a Different composition of the air you can't breathe normally.
3) you are not forced to use mod. :)

Re: [MOD 0.12.+] Oxygen

Posted: Mon Mar 28, 2016 7:35 pm
by seronis
Austin5003 wrote:A planet full of trees still needs oxygen production? :shock:
They're not earth trees. Why do you assume their trees release oxygen ?

Re: [MOD 0.12.+] Oxygen

Posted: Tue Mar 29, 2016 4:03 am
by Austin5003
seronis wrote:
Austin5003 wrote:A planet full of trees still needs oxygen production? :shock:
They're not earth trees. Why do you assume their trees release oxygen ?
There are a few reasons for me thinking the trees produce oxygen;
-If the planet had no oxygen, you wouldn't be able to burn fuels
-The trees reduce the amount of carbon dioxide in the air
-N.Tech chemistry lets chemical plants pull oxygen and nitrogen out of the atmosphere
-They're trees

Re: [MOD 0.12.+] Oxygen

Posted: Wed Mar 30, 2016 11:13 pm
by tetryon
One of our MP server users reported...
devilwarriors wrote:The oxygen mod crashed my game and the server when I equipped a power armor 1 for the first time...

Image

I fixed by adding 'armor' before 'grid' in 140.

for _,equip in pairs(grid.equipment) do
->
for _,equip in pairs(armor.grid.equipment) do


Additionally, Steve modified this (around line 187-189)
if v[1].controller_type == defines.controllers.character then
->
if v[1].controller_type == defines.controllers.character and v[1].connected then

He also made the initial config easier.
I've uploaded the zip we're now using.

Re: [0.11.X] Oxygen

Posted: Sun Apr 03, 2016 3:56 pm
by Ben Vagan
This mod sure looks promissing for the ones that want to add another resource to manage in game and making their survival a little bit harder.
darkshadow1809 wrote:How about making the aliens get damage from the oxygen you dispense? Since they have a whole other way of consuming another sort of oxygen. If they stay in the oxygen area to long they die :o And if a nests gets consumed in oxygen it will die of slowly. Dmg per tick? Could be really nice to just have your main base rid of those bugs! Overtime that is! Not to be too overpowered but since alot of people use Dytech or some other form that makes monsters ALOT harder this would definetly help!
Abou darkshadow suggestion, I wounder if instead of making oxygen do some dps on bitters you could add up something even more fancy, like another type of gas that could kill both of you, something harder to manage without a any care. It would also make a bit more sense since just because bitters don't breath the same type of "oxygen" it wouldn't harm them since oxygen doesn't have toxins (or at least, that's how I think about it, I'm no chem-pro).

Re: [MOD 0.12.+] Oxygen

Posted: Fri Apr 15, 2016 3:34 am
by Xalizar
@Natha: Thank you for making this mod, it is a nice addition to the game.

I started a new game with this mod, Hardcrafting, and N.Tech Chemistry and needed 36 bottles of Oxygen to get far enough to produce Oxygen. I'm definitely not the best at this game so I'm sure it can but done faster but it was still a fun experience trying to figure out how to become self sustaining before my Oxygen ran out. :)

@tetryon: I ran into the same problem when crafting the Basic modular armor. Thank you for posting the 1.3.10 zip file with the fix.

-Xalizar

Re: [MOD 0.12.+] Oxygen

Posted: Fri Apr 29, 2016 11:19 am
by Gromp
there are trees there
and any living being needs oxygen to survive
even aliens
there has to be oxygen over there

Re: [MOD 0.12.+] Oxygen

Posted: Fri Apr 29, 2016 8:23 pm
by seronis
Gromp wrote:there are trees there
and any living being needs oxygen to survive
there has to be oxygen over there
*facepalm*

OUR known life requires oxygen. That doesnt mean in the least that all life needs oxygen. There are microbial varieties of life on earth that dont require oxygen in their life cycle. If those had randomly been the early cells that evolved into later life then all life on earth might not have cared about oxygen. Assumptions about the unknown are bad in science