[Mod] Pathogen [0.3][pathogen]

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

[Mod] Pathogen [0.3][pathogen]

by Bas080 » Tue Feb 03, 2015 05:32

PATHOGEN
A minetest mod that enables users to get a pathogen. This mod is in testing faze. Let me know if you bump into something irregular. I will fix it asap.

Image

To get it to work simply make sure you have the "pathogen" privilige and execute the following commands

/pathogens
--list all pathogens and their descriptions

/infect <player name> <pathogen name>
--infect the player

/immunize <player name> <pathogen name>
--make player immune to particular pathogen

Features
- Adds pathogens that have symptoms that occur in intervals.
- Easily define a new pathogen using the pathogen API
- Demo pathogens that are infectious and sometimes deadly.

Diseases

Gravititus
Occurs when ascending too quickly. Symptons include hiccups and random sense of gravity. There is no known cure yet. ( any suggestions? stone soup anyone? )

Influencia
Highly contagious as it is airborne. Being around someone that has the diseases
increases the chances of getting the virus drastically. It is advised to eat well
and keep your distance from players that are coughing. Death is very unlikely.
Symptoms include coughing and sneezing. When not fed well it can have an
effect on your health.

Panola
Contagious through body fluids. It is ok to be near someone that has the diseases.
Make sure that when cleaning up after someone that has expelled fluids, to
decontaminate the fluids first. This can be done with the Decontaminator.
Some may find this pathogen sickening. Use with caution.

Gosirea
Symptons include gas and burps. Occasionaly a shard. Carrier contaminates nearby surfaces when symptoms show. Not deadly for those that have good health.

Changelog

Items
- Comes with nodes like vomit, blood and feces that are infectious when dug.
- A bio hazard warning fence, in case a quarantine is required.
- A decontaminater for removing infectious fluids.

Crafts

Download: https://github.com/bas080/pathogen/archive/master.zip
or browse the source code:https://github.com/bas080/pathogen
Last edited by Bas080 on Fri Feb 20, 2015 16:58, edited 4 times in total.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: [Mod] Pathogen [0.2][pathogen]

by Krock » Tue Feb 03, 2015 08:53

Whoa. That's a great idea.
I hope you can add more diseases :)
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

Re: [Mod] Pathogen [0.2][pathogen]

by Topywo » Tue Feb 03, 2015 09:46

*cough* very original, nice.

A sick mod.
 

User avatar
Oussamarer
Member
 
Posts: 49
Joined: Sat Jan 10, 2015 14:56
GitHub: Oussamarer
IRC: Oussamarer
In-game: Oussamarer

Re: [Mod] Pathogen [0.2][pathogen]

by Oussamarer » Tue Feb 03, 2015 12:04

Topywo wrote:*cough* very original, nice.

A sick mod.

i see what you did there :)
I make lets plays on minetest and other games , feel free to check me out and drop some suggestions : https://www.youtube.com/watch?v=g-tWCtruQAQ
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

Re: [Mod] Pathogen [0.2][pathogen]

by Bas080 » Tue Feb 03, 2015 15:34

Krock wrote:Whoa. That's a great idea.
I hope you can add more diseases :)


The pathogens I'm adding are there to test and demo the functionalities of the pathogen API. It should be easy to add a new disease. This project might be my first minetest project that is descently documented. For those willing to contribute, I advice them to start looking there. The demo pathogens are just as helpfull.

To demo the contamination part of the API, I made another pathogen named "Gosirea".

Thins to expect in the future are syringes, cures and antidotes. Spawning of pathogens by themselves etc. The more people help the richer this mod willl get. I must have forgotten to mention that the licence is WTFPL for most parts. The sounds are from freesound and are CC. The images are WTFPL.
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Pathogen [0.2][pathogen]

by Hybrid Dog » Tue Feb 03, 2015 16:41

You could use some parts of these mods…
viewtopic.php?id=4783
viewtopic.php?f=9&t=8917#p141887
 

User avatar
Caleneledh
New member
 
Posts: 7
Joined: Sun Dec 21, 2014 15:52
GitHub: Caleneledh
IRC: Caleneledh
In-game: Caleneledh

Re: [Mod] Pathogen [0.2][pathogen]

by Caleneledh » Wed Feb 04, 2015 11:49

Possible disease suggestion: one that cause random digging around the player.
I know you, Raziel. You are worthy.
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

Re: [Mod] Pathogen [0.2][pathogen]

by Bas080 » Thu Feb 05, 2015 02:01

I have written a simple test function and tests for this mode. If you are interested take a look here:
The test function(library):
https://github.com/bas080/pathogen/tree ... ment/lunit
and the tests:
https://github.com/bas080/pathogen/tree ... ogen_tests
Inspired by qunit for javascript.

After bumping in to one error after another I started writting this mod using tests, making it much more robust and easier to write. My advice to you is to do the same. That way you can make better and more extensive mods while quickly testing if your changes cause bugs and or errors.

EDIT: fixed broken links
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

Re: [Mod] Pathogen [0.3][pathogen]

by Bas080 » Fri Feb 20, 2015 16:59

Pathogens aren't always a menace.

Gravititus
Occurs when ascending too quickly. Symptons include hiccups and random sense of gravity. There is no known cure yet. ( any suggestions? stone soup anyone? )
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Pathogen [0.3][pathogen]

by Sokomine » Sat Mar 07, 2015 17:28

Nice idea, although I don't think it ought to spread too wild on servers :-) Now, where was my decontamination airlock again...
A list of my mods can be found here.
 

User avatar
davidthecreator
Member
 
Posts: 179
Joined: Mon Aug 18, 2014 19:48
In-game: DavidDoesMinetest

Re: [Mod] Pathogen [0.3][pathogen]

by davidthecreator » Sat Mar 21, 2015 16:56

I got some ideas : at these days people are worrying about Ebola you could add that the symptoms are bleeding trough eyes and mouth and after some time it insta kills the infected one . Also you should add cold: well everyone knows the symptoms player should be slower when infected and the last one the z virus should turn people into zombies they should be slower and infect others when touching or punching others also players skin should be changed too look like a zombie
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

Re: [Mod] Pathogen [0.3][pathogen]

by Bas080 » Tue Mar 24, 2015 16:37

davidthecreator wrote:I got some ideas : at these days people are worrying about Ebola you could add that the symptoms are bleeding trough eyes and mouth and after some time it insta kills the infected one . Also you should add cold: well everyone knows the symptoms player should be slower when infected and the last one the z virus should turn people into zombies they should be slower and infect others when touching or punching others also players skin should be changed too look like a zombie


I have an analog for the Ebola virus called Panola. Remember that ebola is not a death sentence. Currently the virus requires you to keep an eye on your hp and to eat small amounts frequently to avoid vomiting.

Currently the cold virus called "influencia" only damages the player when his HP is lower than a certain amount. The symptom also includes sneazing and couching. Making the player walk a bit slower is would be a nice addition. It would also work for the panola virus.

Zombies virus! love it!

Maybe you would like to help me implement the features.
 

User avatar
davidthecreator
Member
 
Posts: 179
Joined: Mon Aug 18, 2014 19:48
In-game: DavidDoesMinetest

Re: [Mod] Pathogen [0.3][pathogen]

by davidthecreator » Sun Mar 29, 2015 17:24

What kind of help do you need ?
 

User avatar
mahmutelmas06
Member
 
Posts: 355
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Pathogen [0.3][pathogen]

by mahmutelmas06 » Sat May 30, 2015 00:47

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
03:42:39: WARNING: Undeclared global variable "xpanes" accessed at ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29
2015-05-30 03:42:39: ERROR[main]: ========== ERROR FROM LUA ===========
2015-05-30 03:42:39: ERROR[main]: Failed to load and run script from
2015-05-30 03:42:39: ERROR[main]: D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua:
2015-05-30 03:42:39: ERROR[main]: ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29: attempt to index global 'xpanes' (a nil value)
2015-05-30 03:42:39: ERROR[main]: stack traceback:
2015-05-30 03:42:39: ERROR[main]:    ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29: in main chunk
2015-05-30 03:42:39: ERROR[main]:    [C]: in function 'dofile'
2015-05-30 03:42:39: ERROR[main]:    ...\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua:12: in main chunk
2015-05-30 03:42:39: ERROR[main]: ======= END OF ERROR FROM LUA ========
2015-05-30 03:42:39: ERROR[main]: Server: Failed to load and run D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua
2015-05-30 03:42:39: ERROR[main]: ModError: ModError: Failed to load and run D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua
2015-05-30 03:42:39: ERROR[main]: Hata ayrıntıları için debug.txt dosyasını inceleyin.
My Mods:

Beverage
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: [Mod] Pathogen [0.3][pathogen]

by Hybrid Dog » Sat May 30, 2015 08:58

mahmutelmas06 wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
03:42:39: WARNING: Undeclared global variable "xpanes" accessed at ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29
2015-05-30 03:42:39: ERROR[main]: ========== ERROR FROM LUA ===========
2015-05-30 03:42:39: ERROR[main]: Failed to load and run script from
2015-05-30 03:42:39: ERROR[main]: D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua:
2015-05-30 03:42:39: ERROR[main]: ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29: attempt to index global 'xpanes' (a nil value)
2015-05-30 03:42:39: ERROR[main]: stack traceback:
2015-05-30 03:42:39: ERROR[main]:    ...Kurulan\Minetest\bin\..\mods\pathogen\pathogen/nodes.lua:29: in main chunk
2015-05-30 03:42:39: ERROR[main]:    [C]: in function 'dofile'
2015-05-30 03:42:39: ERROR[main]:    ...\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua:12: in main chunk
2015-05-30 03:42:39: ERROR[main]: ======= END OF ERROR FROM LUA ========
2015-05-30 03:42:39: ERROR[main]: Server: Failed to load and run D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua
2015-05-30 03:42:39: ERROR[main]: ModError: ModError: Failed to load and run D:\Oyun\Kurulan\Minetest\bin\..\mods\pathogen\pathogen\init.lua
2015-05-30 03:42:39: ERROR[main]: Hata ayrıntıları için debug.txt dosyasını inceleyin.

Do you use a different xpanes mod?
https://github.com/bas080/pathogen/blob ... des.lua#L5
minetest.get_modpath shouldn't be used, better use rawget(_G, "xpanes")
 

User avatar
mahmutelmas06
Member
 
Posts: 355
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Pathogen [0.3][pathogen]

by mahmutelmas06 » Sat May 30, 2015 12:12

Yes i use different xpanes mod by davedevils. I have changed xpanes line in pthogen init and fixed.
Just wanted to make Bas080 know about the issue.
My Mods:

Beverage
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

Re: [Mod] Pathogen [0.3][pathogen]

by Bas080 » Sat Jul 18, 2015 10:59

I thought mod names had to be unique for every mod. So modpath should work if everyone follows the rules. I assume rawget checks if the variable exists. That is not a foolproof check either.
 

User avatar
programmingchicken
Member
 
Posts: 537
Joined: Sat Apr 18, 2015 02:20
GitHub: ProgrammingChicken
IRC: gamer chicken
In-game: gamerdude

Re: [Mod] Pathogen [0.3][pathogen]

by programmingchicken » Sat Jul 18, 2015 14:53

Perhaps there should be a de-contamination block?
Or maybe if you get the disease and survive it you become immune to it.
And then if you don't get it in a few minetest days you become vulnerable...
this mod has many ways to go/there are many paths to choose from.
realism
-You die and lose your stuff because of diseases, you need to go to a doctor, need to wash your hands, etc.
skills
-You toughen yourself up by getting diseases and fighting mobs and players. RPG-style stuff.
I'm bold. I'm sarcastic. I'm PChicken.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Pathogen [0.3][pathogen]

by Nathan.S » Tue Sep 01, 2015 15:17

I can't seem to get sick, I've got this code, which should, I think trigger Influencia.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local chance_level = math.random(0,10)
      print ('chance is '..chance_level)
      if chance_level < chance then
         print ('should get sick')
         pathogen.infect = function(Influencia, player_name)
      end

I don't get any errors, and the debug text will print should get sick, so I know the chance mechanics are working, so I can only assume I'm calling the pathogen.infect function incorrectly. The chance variable is defined in a table that has all the foods with the hydration and hunger values.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
Bas080
Member
 
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080

Re: [Mod] Pathogen [0.3][pathogen]

by Bas080 » Fri Sep 04, 2015 15:25

Nathan.S wrote:I can't seem to get sick, I've got this code, which should, I think trigger Influencia.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local chance_level = math.random(0,10)
      print ('chance is '..chance_level)
      if chance_level < chance then
         print ('should get sick')
         pathogen.infect = function(Influencia, player_name)
      end

I don't get any errors, and the debug text will print should get sick, so I know the chance mechanics are working, so I can only assume I'm calling the pathogen.infect function incorrectly. The chance variable is defined in a table that has all the foods with the hydration and hunger values.


You first have to get the pathogen and then with that pathogen you can infect a player.

Be careful with the pathogen namespace. That's why the local variable there is _pathogen and not pathogen.

# get the pathogen
local _pathogen = pathogen.get_pathogen( <pathogen_name> )

# infect the player
local infection = pathogen.infect( <_pathogen>, <player_name> )
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Pathogen [0.3][pathogen]

by Nathan.S » Sat Sep 05, 2015 01:03

Sorry to be as dense as a brick, but I'm hitting a wall.

I have this as my new code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
38.  if chance_level < chance then
39.      print ('should get sick')
40.    local _pathogen = pathogen.get_pathogen( influencia )
41.    pathogen.infect = function(_pathogen, singleplayer)
42.  end


I'm getting this error now, which honestly I may have been getting all along, just never noticed it before.
WARNING: Undeclared global variable "influencia" accessed at /home/nathan/.minetest/games/Survive/mods/food/meats.lua:40
Looking at the init.lua file in the pathogen folder in the pathogen mod I do see the table that lists a table called pathogens in the pathogen table, but I don't understand LUA well enough to know if that is a mistake.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
programmingchicken
Member
 
Posts: 537
Joined: Sat Apr 18, 2015 02:20
GitHub: ProgrammingChicken
IRC: gamer chicken
In-game: gamerdude

Re: [Mod] Pathogen [0.3][pathogen]

by programmingchicken » Sat Sep 05, 2015 03:06

Try no whitespace in your get_pathogen call.
I'm bold. I'm sarcastic. I'm PChicken.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Pathogen [0.3][pathogen]

by Nathan.S » Sat Sep 05, 2015 12:44

I get the same thing with or without whitespace. :\
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
ArguablySane
Member
 
Posts: 116
Joined: Sun Oct 12, 2014 21:29

Re: [Mod] Pathogen [0.3][pathogen]

by ArguablySane » Sat Sep 05, 2015 12:47

Nathan.S wrote:Sorry to be as dense as a brick, but I'm hitting a wall.

I have this as my new code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
38.  if chance_level < chance then
39.      print ('should get sick')
40.    local _pathogen = pathogen.get_pathogen( influencia )
41.    pathogen.infect = function(_pathogen, singleplayer)
42.  end


I'm getting this error now, which honestly I may have been getting all along, just never noticed it before.
WARNING: Undeclared global variable "influencia" accessed at /home/nathan/.minetest/games/Survive/mods/food/meats.lua:40
Looking at the init.lua file in the pathogen folder in the pathogen mod I do see the table that lists a table called pathogens in the pathogen table, but I don't understand LUA well enough to know if that is a mistake.


You probably need to provide the pathogen name as a string, ie.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local _pathogen = pathogen.get_pathogen("influencia")
The above post and any ideas expressed therein are released to the public domain under a Creative Commons CC0 license.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Pathogen [0.3][pathogen]

by Nathan.S » Sun Sep 06, 2015 12:50

providing the pathogen name as a string does remove the error, but doesn't do anything. I modified the pathogen code to print a message when the pathogen infects the player, and never got the message in the debug, so unfortunately that isn't the solution either.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
ArguablySane
Member
 
Posts: 116
Joined: Sun Oct 12, 2014 21:29

Re: [Mod] Pathogen [0.3][pathogen]

by ArguablySane » Sun Sep 06, 2015 13:12

Nathan.S wrote:providing the pathogen name as a string does remove the error, but doesn't do anything. I modified the pathogen code to print a message when the pathogen infects the player, and never got the message in the debug, so unfortunately that isn't the solution either.


Try
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local influencia = pathogen.get_pathogen("influencia")
pathogen.infect(influencia, "singleplayer")


What you were doing was declaring an empty function and assigning it to the "infect" field of the pathogen table, effectively overwriting the real function.
The above post and any ideas expressed therein are released to the public domain under a Creative Commons CC0 license.
 

User avatar
Nathan.S
Member
 
Posts: 679
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: [Mod] Pathogen [0.3][pathogen]

by Nathan.S » Sun Sep 06, 2015 13:27

Duh, what a fool I am. I'll have to try that out.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Pathogen [0.3][pathogen]

by TenPlus1 » Tue Sep 08, 2015 08:33

It would be kewl to have a T-Virus like in Resident Evil and if the player doesn't find a cure within the time limit then the player model changes into a monster... :)
 

User avatar
wilkgr76
Member
 
Posts: 680
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76
IRC: wilkgr
In-game: wilkgr

Re: [Mod] Pathogen [0.3][pathogen]

by wilkgr76 » Sun Mar 13, 2016 05:56

Plague Inc 3D Edition? jk, but very nice
☻☻☻☻☺
I do not care.
 

Griiimon
Member
 
Posts: 11
Joined: Sun Jan 08, 2017 13:20
IRC: TelepathicVampire
In-game: Griiimon

Re: [Mod] Pathogen [0.3][pathogen]

by Griiimon » Wed Jan 11, 2017 23:00

Is there any concern with reducing the players speed temporarily as a result of diseases? As i understand, it's merely a factor in the player's physics section. As long as other mods don't mess with movement..

I'd gladly help to code, although i'm complete minetest noob just learning my way around the API. I wrote a similar thingy as part of my minecraft hardcore survival mod.

Edit: Nevermind, just discovered [playereffects] :)

In my mod, if you have a cold and sneeze while holding a piece of paper in your hand (active inventory slot) you wouldn't spread the virus ( and people close to you otherwise being sneezed on wouldn't get pissed, because there was a frustration mechanic, too :D ). The used paper was substracted from the inventory stack.
Also sneezing would change your pointing angle instantly, interrupting the harvesting process. Unfortunately I couldn't implement a little push back effect. Since you were warned about second prior to (potentially) sneezing, you would have had time to get away from dangerously high edges or lava.

Anyways, i'm porting my mc mod to minetest as a game and looking forward to using your mod!
 

Next

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 29 guests

cron