Page 1 of 2
[Mod] Potions (API) and PotionsPack (Mod)

Posted:
Wed Apr 10, 2013 19:58
by Traxie21
[h]Potions API/PotionsPack[/h]
This mod allows you to create custom potions with specific functions.
POTIONS: Adds api function, potions.register_potion(name, color, exptime, action, expaction)
^Contains no default potions
Downloads (Potions)https://github.com/Traxie21/potions/archive/master.zipGithub (Potions)https://github.com/Traxie21/potions/POTIONSPACK: Adds some cool potions, AntiGravity, AntiGravity II, Speed, Speed II, Confusion, Inversion, and Whatwillthisdo?
^Depends on Potions
Screenshot
Downloads (PotionsPack)https://github.com/Traxie21/potionspack/archive/master.zipGithub (PotionsPack)https://github.com/Traxie21/potionspack/Dependencies: potions
Screenshots and video (possibly) coming in a day or 3.
License: Code/Textures: WTFPL

Posted:
Wed Apr 10, 2013 20:12
by Calinou
Idea: add a way to make nodes that give an effect (for varying amounts of time) when left or right clicked (one could make elevators this way). :D

Posted:
Wed Apr 10, 2013 20:27
by jojoa1997
it doesnt work. i cant give error cause i just got segfaults but i did get that the prefix is not right. mainly because the potions pack prefix is "potionspack:" while potions/init.lua makes the prefix "potions:". from the looks of it you did not test your mod. please test it before releaseing it

Posted:
Wed Apr 10, 2013 21:45
by Traxie21
I fixed that right afterwards :P
You managed to download it in the 3 minutes that elapsed between then and the fix.
EDIT: I take that back, I forgot to push to the repo.
Anyhow, screenshots added.

Posted:
Wed Apr 10, 2013 23:09
by jojoa1997
haha. btw the next version of minitest is ready to come out soon

Posted:
Wed Apr 10, 2013 23:24
by Traxie21
Ah good, want to add this to it?

Posted:
Wed Apr 10, 2013 23:57
by jojoa1997
i already did but could you add all the potions here? also there should be a potion that negates all effects i think mnecraft has it but idk. another tip maybe is to add a brewing stand like minecraft. i would do this myself bu i dont have the time to learn how. here is the link
http://www.minecraftwiki.net/wiki/Brewing

Posted:
Thu Apr 11, 2013 00:01
by Likwid H-Craft
License Please.

Posted:
Thu Apr 11, 2013 00:13
by jojoa1997
FIRST POST wrote:License: Code/Textures: WTFPL
maybe you should read the entire first post. also traxie the game is ready for release i just have to upload it

Posted:
Thu Apr 11, 2013 02:50
by jordan4ibanez
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
potions.register_potion("Jupiter Gravity", "dull", 60,
function(itemstack, user, pointed_thing)
user:set_physics_override(1,1,2)
minetest.chat_send_player(user:get_player_name(), "Oh no! Jupter gravity! (60 seconds)")
end,
function(itemstack, user, pointed_thing)
user:set_physics_override(1,1,1)
minetest.chat_send_player(user:get_player_name(), "Jupiter gravity has diminished.")
end)
And make a crafting recipe for the cauldron! I want to use this in my videos. :D

Posted:
Thu Apr 11, 2013 03:38
by jordan4ibanez
A healing and poisoning potion.
A potion of nodularity, which wherever you go, you add a node to your position if it's air.
A potion of acidity, which wherever you are, it removes the node below you if it's not air.
A potion of flying.
A potion of limbo, which transfers you to 12000 and sets your gravity to 0, then when it wears off, transfers you back to your old position.
(When luaside FOV is included) A potion of shortsightedness (Fov at like 200)
A potion of farsightedness (Fov at like 20)
A potion of explosiveness.
A green thumb potion. (Trees, and tall grass are added wherever you are if you are walking on dirt or grass)
A potion of flatulence. (A fart sound is looped and attached to your character)
A potion of slowness.
A potion of awareness. (Particles are spawned at your position and shoot straight up, alerting other players of your position)
A potion of claustrophobia. (You cannot move at all)
Whispering of the winds. (You can see player's text who are using the /whisper command)
A potion of anxiety. (You can only move in one direction)
A potion of teleportation. (When you drink this, you randomly teleport around)
A potion of repulsion. (Item drops are pushed away from you in the radius of 5)

Posted:
Thu Apr 11, 2013 07:25
by Calinou
jordan4ibanez wrote:(Fov at like 200)
It is technically impossible to see with a field of view => 180 (except if you're using fisheye :P).

Posted:
Thu Apr 11, 2013 10:24
by jojoa1997
For those who wasn't to get a sense of how minecraft potions work and get ideas on potions and how they can be made.
I case you miss this it is easier to see. Also i suggest having potions. that turn off potions(i think i said it before) and one that gives and removes privs. also you could have one that turns into a node or a couple items. a nrewing stand would be nice and cauldrons holding potions are nice also

Posted:
Thu Apr 11, 2013 11:54
by Traxie21
@jordan4ibanez: Most of your suggestions will work with this API. :D
Unfortunately, I have little time left this week, maybe update PotionsPack Friday.
@jojoa, Ah, thanks.
ATM you have to make your own recipes, I was having trouble with the cauldron yesterday. One is coming though, and it will be quite easy to specify a recipe for it.
Potions already reset previous effects.
Potions tha do anything with the player or environment around the player, or wat the player is looking at are possible. You could even make a potion that restarts the server or ban's someone. :P

Posted:
Thu Apr 11, 2013 12:24
by jojoa1997
There should be throwing potions and I think that potions should merge effects and adding a crafting recipe to the finctio. Would help. Also maybe just make the brewing stand stuff but no function to it.

Posted:
Thu Apr 11, 2013 12:29
by Traxie21
Oh yeah, forgot about throwing potions. Merging effects would be very complicated for some potions. HOWEVER, potions that effect player physics already merge with those that don't.
The Cauldron (brewing stand) will be released once completed.
Crafting recipes will eventually be as simple as adding "default:item, modname:item" to the potion definition.

Posted:
Thu Apr 11, 2013 12:47
by Evergreen
Good idea! One thing though, in my opinion I don't like the server telling you that you have been blessed with: (potion effect)

Posted:
Thu Apr 11, 2013 13:51
by Traxie21
We need some way to know what you have on you, but I agree, it is kinda ugly.

Posted:
Thu Apr 11, 2013 18:45
by Evergreen
Traxie21 wrote:We need some way to know what you have on you, but I agree, it is kinda ugly.
Yeah. One thing I noticed is that the particle effects fly up a lot farther then they should. Can you fix that? Another thing is they should be drinkable. The particles should also match the color of the potions.

Posted:
Thu Apr 11, 2013 19:28
by Traxie21
I wanted the particles to last for a long time, but I will decrease them.
The coloring will come later, It's just a pain to make an overly for every color.
Idk how to make them really drinkable, but they shouldn't use up the bottle.

Posted:
Thu Apr 11, 2013 19:39
by jojoa1997
make it a food. i will look into it.

Posted:
Thu Apr 11, 2013 19:43
by Evergreen
Traxie21 wrote:I wanted the particles to last for a long time, but I will decrease them.
The coloring will come later, It's just a pain to make an overly for every color.
Idk how to make them really drinkable, but they shouldn't use up the bottle.
I was thinking of making them empty once you drank them

Posted:
Thu Apr 11, 2013 19:58
by jojoa1997
yeah. also here is a plan i made of the cauldron

Key:
p=potin
I=items
W=water glass
f=fuel

Posted:
Fri Apr 12, 2013 12:24
by jojoa1997
This is how you make items.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
for throwing just do on use and set the velocity to ssommmmmmmmmethiiiiiiiing. look at the bows mood by pilzadaam for thhrowing itemms..

Posted:
Fri Apr 12, 2013 12:27
by Traxie21
Oke, thanks jojo, I had no idea there was an actual eat function.

Posted:
Fri Apr 12, 2013 12:39
by nextmissinglink
add one that adds HP,
one that decreases HP,
one that makes you grow,
and one that makes you shrink

Posted:
Fri Apr 12, 2013 20:29
by jojoa1997
Could you please paste what code you have for cauldrons right now
jojoa1997 wrote:This is how you make items.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
for throwing just do on use and set the velocity to ssommmmmmmmmethiiiiiiiing. look at the bows mood by pilzadaam for thhrowing itemms..
the eating goes like this on_use = minetest.item_eat(health, returned item)

Posted:
Sat Apr 13, 2013 01:18
by lord_james
+100 Cool mod. But I'll suggest some improvements:
-Stop potion's effects when the player die.
-Reduce player's speed in the potion of gravitation (It's cheaty that a player flies very quickly on the air)
Thanks for this mod

Posted:
Sat Apr 13, 2013 01:32
by jojoa1997
lord_james wrote:+100 Cool mod. But I'll suggest some improvements:
-Stop potion's effects when the player die.
-Reduce player's speed in the potion of gravitation (It's cheaty that a player flies very quickly on the air)
Thanks for this mod
keep speed default would be better

Posted:
Sat Apr 13, 2013 05:51
by jordan4ibanez