[MOD] Brewing (Magic) (WIP) [v0.15.3]

What should be the next?

Poll ended at Thu Feb 07, 2019 19:49

Lycanthropy: Become a Werewolf
1
33%
The Crazy Gnome: Treasures, mushroom houses and other things.
2
67%
Cute unicorns
0
No votes
 
Total votes : 3

CalebJ
Member
 
Posts: 179
Joined: Sat Dec 29, 2018 19:21
Location: Tunnelers' Abyss
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by CalebJ » Mon Jul 15, 2019 14:42

Herbalism/Food should be extended IMO. You need some new types of food from the wide variety of herbs, that are currently uneatable. Also, the herbs that are eatable raw, should be able to be farmed (Example: Arctic Carrot, Mandragora, Mint). I'd suggest also adding: Sweet potato, Eggplant and Marama and letting these be farmed, maybe some 'magic' uses for all of them are possible :-)

Also, I don't think Sugarcane farming is possible with the code used. Maybe I'm wrong, it just looks a bit suspicious (the farming.lua). Thank you very much for looking, your mods keep getting better and more advanced! :D
If you want realism, you're in the wrong place. Get off your mobile.
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by runs » Mon Jul 15, 2019 22:59

CalebJ wrote:Herbalism/Food should be extended IMO. You need some new types of food from the wide variety of herbs, that are currently uneatable. Also, the herbs that are eatable raw, should be able to be farmed (Example: Arctic Carrot, Mandragora, Mint). I'd suggest also adding: Sweet potato, Eggplant and Marama and letting these be farmed, maybe some 'magic' uses for all of them are possible :-)

Also, I don't think Sugarcane farming is possible with the code used. Maybe I'm wrong, it just looks a bit suspicious (the farming.lua). Thank you very much for looking, your mods keep getting better and more advanced! :D


The Artic Carrot can be 'planted' on ground, but no farming :-D

Yes, this mod needs some improvement.

The sugarcane is a to-do. I want to redo as a separated mod, rooted-plant, farming. But probably will break the old one. So I do not dare :-/

Best Regards.
 

CalebJ
Member
 
Posts: 179
Joined: Sat Dec 29, 2018 19:21
Location: Tunnelers' Abyss
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by CalebJ » Tue Jul 16, 2019 01:11

Thanks for the info!
If you want realism, you're in the wrong place. Get off your mobile.
 

ThorfinnS
Member
 
Posts: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by ThorfinnS » Sat Jul 27, 2019 19:12

Tried to use the magic wand to see if it makes any difference in terms of growing stuff. (Normally, I just plant with seed in hand with Farming Redo and it works fine, though the roses take FOREVER to grow.)

Code: Select all
2019-07-27 13:38:29: ACTION[Server]: singleplayer uses brewing:magic_wand, pointing at [node under=77,18,26 above=77,19,26]
2019-07-27 13:38:29: WARNING[Server]: Undeclared global variable "above" accessed at C:\games\mt\mt510-38b\bin\..\mods\brewing\brewing/wands.lua:17
2019-07-27 13:38:29: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): C:\games\mt\mt510-38b\bin\..\mods\Farming\init.lua:466: attempt to index local 'itemstack' (a nil value)
2019-07-27 13:38:29: ERROR[Main]: stack traceback:
2019-07-27 13:38:29: ERROR[Main]:    C:\games\mt\mt510-38b\bin\..\mods\Farming\init.lua:466: in function 'place_seed'
2019-07-27 13:38:29: ERROR[Main]:    C:\games\mt\mt510-38b\bin\..\mods\brewing\brewing/wands.lua:44: in function <C:\games\mt\mt510-38b\bin\..\mods\brewing\brewing/wands.lua:10>
2019-07-27 13:38:29: ACTION[Server]: singleplayer leaves game. List of players:
2019-07-27 13:38:29: ACTION[Main]: Server: Shutting down
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by runs » Sat Jul 27, 2019 21:32

ThorfinnS wrote:Tried to use the magic wand to see if it makes any difference in terms of growing stuff. (Normally, I just plant with seed in hand with Farming Redo and it works fine, though the roses take FOREVER to grow.)

Code: Select all
2019-07-27 13:38:29: ACTION[Server]: singleplayer uses brewing:magic_wand, pointing at [node under=77,18,26 above=77,19,26]
2019-07-27 13:38:29: WARNING[Server]: Undeclared global variable "above" accessed at C:\games\mt\mt510-38b\bin\..\mods\brewing\brewing/wands.lua:17
2019-07-27 13:38:29: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): C:\games\mt\mt510-38b\bin\..\mods\Farming\init.lua:466: attempt to index local 'itemstack' (a nil value)
2019-07-27 13:38:29: ERROR[Main]: stack traceback:
2019-07-27 13:38:29: ERROR[Main]:    C:\games\mt\mt510-38b\bin\..\mods\Farming\init.lua:466: in function 'place_seed'
2019-07-27 13:38:29: ERROR[Main]:    C:\games\mt\mt510-38b\bin\..\mods\brewing\brewing/wands.lua:44: in function <C:\games\mt\mt510-38b\bin\..\mods\brewing\brewing/wands.lua:10>
2019-07-27 13:38:29: ACTION[Server]: singleplayer leaves game. List of players:
2019-07-27 13:38:29: ACTION[Main]: Server: Shutting down


Hi, I will check the growing time. But are magic roses, so...

Brewing is to be used with default faming mod, not farming_redo

There is a problem with Farming Redo, in the line:

itemstack:take_item()

That line remove seed from player's hand, but I send itemstack = nil because it is not a seed but a wand, so do not remove one seed nor wand.

Ten Plus should change, or you, this line in code:

Code: Select all
if placer and not farming.is_creative(placer:get_player_name()) then

to
Code: Select all
if placer and not farming.is_creative(placer:get_player_name()) and itemstack then


This checks if itemstack exists. It should be exist but how to I use the default farming function not.

I will send a PR.
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by runs » Sun Jul 28, 2019 14:33

The request was accepted so download the last version of farming redo from the repo
 

ThorfinnS
Member
 
Posts: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by ThorfinnS » Sun Jul 28, 2019 18:37

Thanks!

I've been AFK more or less since mentioning it. Don't change the rate on my account -- it was slow but a good way to put a limit on potions. I was just curious how planting with the wand worked, as no one had ever tried it.
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by runs » Sun Jul 28, 2019 23:31

ThorfinnS wrote:Thanks!

I've been AFK more or less since mentioning it. Don't change the rate on my account -- it was slow but a good way to put a limit on potions. I was just curious how planting with the wand worked, as no one had ever tried it.


You are welcome!
 

User avatar
TumeniNodes
Member
 
Posts: 2827
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [MOD] Brewing (Magic) (WIP) [v0.1.9]

by TumeniNodes » Mon Jul 29, 2019 02:16

texmex wrote:Yes you do! Those people obviously don’t understand licensing because at the same time they’ve licensed it Apache License 2.0 which grants you all the rights that you need. You don’t even have to ask them. Go ahead and use it, just keep a copy in case they choose to change that for new updates.
Image
Image


The entire 3rd party Minecraft community, is a licensing catastrophe, if you ask me.
If you had the means to hire a law firm, they would have a field day with it all... and maybe even make a few bucks from the outing. But most would be frivolous with frivolous awards, and court orders.
Hardly worth the effort but interesting at the very least.
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by runs » Mon Jul 29, 2019 02:56

John Smith License is a mess, even that page links to another in github (https://github.com/John-Smith-Modded/) with another license, no a known license, but one with its own rules. I think Apache allow derivative licensing.

That's why I put for my Petz mod, with all the textures created for me, the GPLv3 license, to me the best.
 

User avatar
Imk
Member
 
Posts: 243
Joined: Mon Nov 05, 2018 19:15
Location: Crimea, Russia
In-game: Imk

Re: [MOD] Brewing (Magic) (WIP) [v0.15.1]

by Imk » Thu Aug 29, 2019 02:06

Image
HP +5
HP red bar scales and goes beyond the borders

Image

Image

used hudbars, hbhunger mod
Attachments
screenshot_20190829_044848.jpg
(28.42 KiB) Not downloaded yet
screenshot_20190829_044324.jpg
(33.42 KiB) Not downloaded yet
screenshot_20190829_044436.jpg
(40.64 KiB) Not downloaded yet
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy
 

User avatar
Imk
Member
 
Posts: 243
Joined: Mon Nov 05, 2018 19:15
Location: Crimea, Russia
In-game: Imk

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by Imk » Thu Aug 29, 2019 23:26

Respect is all ok. After testing, the mod was adopted by Сrimea HiTech & Magic server viewtopic.php?f=23&t=21055
viewtopic.php?f=23&t=21055
Busina really liked.
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by runs » Fri Aug 30, 2019 01:27

Imk wrote:Respect is all ok. After testing, the mod was adopted by Сrimea HiTech & Magic server viewtopic.php?f=23&t=21055
viewtopic.php?f=23&t=21055
Busina really liked.


Cool that my mods can be useful.
 

User avatar
Imk
Member
 
Posts: 243
Joined: Mon Nov 05, 2018 19:15
Location: Crimea, Russia
In-game: Imk

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by Imk » Mon Sep 23, 2019 18:19

Sorry it happened, we use your mods and they are hooligans
help out
Code: Select all
2019-09-23 21:05:10: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): /home/imk/minetest/bin/../mods/farming/init.lua:463: attempt to index local 'itemstack' (a nil value)
2019-09-23 21:05:10: ERROR[Main]: stack traceback:
2019-09-23 21:05:10: ERROR[Main]:       /home/imk/minetest/bin/../mods/farming/init.lua:463: in function 'place_seed'
2019-09-23 21:05:10: ERROR[Main]:       ...e/imk/minetest/bin/../mods/brewing/brewing/wands.lua:44: in function <...e/imk/minetest/bin/../mods/brewing/brewing/wands.lua:10>
Last edited by Imk on Tue Sep 24, 2019 05:48, edited 2 times in total.
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by runs » Mon Sep 23, 2019 19:35

Imk wrote:Sorry it happened, we use your mods and they are hooligans
help out
Code: Select all
2019-09-23 21:05:10: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnUse(): /home/imk/minetest/bin/../mods/farming/init.lua:463: attempt to index local 'itemstack' (a nil value)
2019-09-23 21:05:10: ERROR[Main]: stack traceback:
2019-09-23 21:05:10: ERROR[Main]:       /home/imk/minetest/bin/../mods/farming/init.lua:463: in function 'place_seed'
2019-09-23 21:05:10: ERROR[Main]:       ...e/imk/minetest/bin/../mods/brewing/brewing/wands.lua:44: in function <...e/imk/minetest/bin/../mods/brewing/brewing/wands.lua:10>


If you use farming redo you have to use its very last version, fixed. This issue it was reported before:

https://forum.minetest.net/viewtopic.php?f=9&t=21051&start=50#p352709
 

User avatar
Imk
Member
 
Posts: 243
Joined: Mon Nov 05, 2018 19:15
Location: Crimea, Russia
In-game: Imk

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by Imk » Tue Sep 24, 2019 05:50

ок

my jamb updated thanks
(it is not often updated, and so the month missed the difference from the one set by us)
 

User avatar
Imk
Member
 
Posts: 243
Joined: Mon Nov 05, 2018 19:15
Location: Crimea, Russia
In-game: Imk

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by Imk » Tue Oct 01, 2019 18:38

Code: Select all
2019-10-01 21:24:16: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'brewing' in callback item_OnUse(): /home/imk/minetest/bin/../builtin/game/item.lua:260: attempt to index local 'itemstack' (a nil value)
2019-10-01 21:24:16: ERROR[Main]: stack traceback:
2019-10-01 21:24:16: ERROR[Main]:       /home/imk/minetest/bin/../builtin/game/item.lua:260: in function 'item_place_node'
2019-10-01 21:24:16: ERROR[Main]:       ...k/minetest/bin/../mods/cool_trees/jacaranda/init.lua:103: in function <...k/minetest/bin/../mods/cool_trees/jacaranda/init.lua:102>
2019-10-01 21:24:16: ERROR[Main]:       (tail call): ?
2019-10-01 21:24:16: ERROR[Main]:       ...e/imk/minetest/bin/../mods/brewing/brewing/wands.lua:44: in function <...e/imk/minetest/bin/../mods/brewing/brewing/wands.lua:10>
[Thread 0x7fffe10de700 (LWP 7364) exited]
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by runs » Tue Oct 01, 2019 20:33

Related to farming_redo.

In farming redo edit the init.lua file and change the line 424
from
if placer and def and def.on_rightclick then
to
if placer and itemstack and def and def.on_rightclick then

Please report this issue to TenPlus1

Imk wrote:
Code: Select all
2019-10-01 21:24:16: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'brewing' in callback item_OnUse(): /home/imk/minetest/bin/../builtin/game/item.lua:260: attempt to index local 'itemstack' (a nil value)
2019-10-01 21:24:16: ERROR[Main]: stack traceback:
2019-10-01 21:24:16: ERROR[Main]:       /home/imk/minetest/bin/../builtin/game/item.lua:260: in function 'item_place_node'
2019-10-01 21:24:16: ERROR[Main]:       ...k/minetest/bin/../mods/cool_trees/jacaranda/init.lua:103: in function <...k/minetest/bin/../mods/cool_trees/jacaranda/init.lua:102>
2019-10-01 21:24:16: ERROR[Main]:       (tail call): ?
2019-10-01 21:24:16: ERROR[Main]:       ...e/imk/minetest/bin/../mods/brewing/brewing/wands.lua:44: in function <...e/imk/minetest/bin/../mods/brewing/brewing/wands.lua:10>
[Thread 0x7fffe10de700 (LWP 7364) exited]
 

User avatar
Imk
Member
 
Posts: 243
Joined: Mon Nov 05, 2018 19:15
Location: Crimea, Russia
In-game: Imk
 

User avatar
Imk
Member
 
Posts: 243
Joined: Mon Nov 05, 2018 19:15
Location: Crimea, Russia
In-game: Imk

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by Imk » Sat Oct 05, 2019 20:25

a big request and offer
brewing_magic_blue_star_amulet_inv
it gives you the speed of running.Very powerful.Players like sprinters will open up a lot of chunks in a short time.

We need to limit the mana run
It's not hard to implement but I want it to be not just my server, but in your fashion as well.

mod mana
Code: Select all
API documentation for Mana 1.2.0
================================

## Introduction
The API of the Mana mod allows you to set and receive
the current and maxiumum mana reserves of a player,
and to subtract and add mana.

## The basic rules
For integrity reasons, this mod will ensure that the following assumptions
are true at all times for all players:

* Current and maximum mana can never be smaller than 0
* The current value must not be greater than the maximum value
* Only integer numbers are permitted for mana values

It should be not possible to break these rules using this API alone.
If you somehow manage to break one ofthe rules, please report a bug.

If a real number is used as input for a value, it will be rounded
(“round up half” rule).

## Functions
Of not specified otherwise, all functions return `nil`.
`playername` always refers to the name of a player, as string.
`value` always refers to a number and for most functions it must always be equal to or greater than 0.


### `mana.set(playername, value)`
Sets the mana reserve of the specified player to `value`.
If `value` is smaller than 0, the mana will be set to 0.
If `value` is greater than the maximum, the mana will be set to the maximum.


### `mana.setmax(playername, value)`
Sets the maximum of the player to `value`.

If the new maximum would become smaller than the current value,
the current value will automatically be set to
the new maximum.

### `mana.setregen(playername, value)`
Sets the mana regeneration per mana tick of the player to `value`.
Floating-point numbers are also permitted, in which the generation
of 1 mana takes longer than 1 mana tick. I.e. `0.5`. means
that 1 mana is generated every 2 mana ticks. A negative value means the
player loses mana.


The length of one “mana tick” is specified as the server-wide setting
`mana_default_regen` in seconds.


### `mana.get(playername)`
Returns the current mana of the specified player as number.


### `mana.getmax(playername)`
Returns the current maximum mana of the specified player as number.


### `mana.getregen(playername)`
Returns the current mana regneration per mana tick of the specified
player as number.
The length of one “mana tick” is specified as the server-wide setting
`mana_default_regen` in seconds.


### `mana.add(playername, value)`
Adds the specified non-negative amount of mana to the player, but only
if the sum would not be greater than the maximum,

#### Return value
* `true` on success, all mana has been added
* `false` on failure, no mana has been added


### `mana.subtract(playername, value)`
Subtracts the specified non-negative amount of mana from the player,
but only if the player has sufficient mana reservers.

#### Return value
* `true` on success, all mana has been subtracted
* `false` on failure, no mana has been subtraceed


### `mana.add_up_to(playername, value)`
Adds the specified non-negative amount of mana to the player, but it will
be capped at the maximum.

#### Return value
* `true, excess` on success, where `excess` is the amount of Mana which could not be added because it would have exceeded the maximum. `excess` equals `0` if all mana has been added
* `false` on failure (mana could not be added)


### `mana.subtract_up_to(playername, value)`
Subtracts the specified non-negative amount of mana from the player,
but if the difference is smaller than 0, the mana will be set to 0.

#### Return value
* `true, missing` on success, where `missing` is the amount of Mana which could not be subtracted because it would have exceeded 0. `missing` equals `0` if all mana has been subtracted
* `false` on failure (mana could not be subtracted)


## Appendix
### General recommendations
If you want your mod to be portable, it is recommended that you balance your mod in such a way that it assumes
that every player starts with the following default mana values:

* Max. mana: 200
* Mana regeneration: 1 mana every 0.2 seconds

Also assume that the max. mana never changes.
This should (hopefully) ensure that multiple independent mana-using mods are more or less balanced when using
the default settings.

Also, to make life easier for subgame makers, define custom minetest.conf settings for your mod in order to
overwrite the mana costs (and other relevant values) used by your mod. That way, subgame makers only have to edit
minetest.conf, and not your mod.

You do not have to bother about default values if you want to directly integrate your mod in a subgame and do
not plan to release the mod independently.

The best way to reliable balance the mana values used by several mods is to create a standalone subgame. It is
highly recommended that you tweak the mana values of the mods to fit the subgame's needs.
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by runs » Sat Oct 05, 2019 21:36

Imk wrote:a big request and offer
brewing_magic_blue_star_amulet_inv
it gives you the speed of running.Very powerful.Players like sprinters will open up a lot of chunks in a short time.

We need to limit the mana run
It's not hard to implement but I want it to be not just my server, but in your fashion as well.

mod mana
Code: Select all
API documentation for Mana 1.2.0
================================

## Introduction
The API of the Mana mod allows you to set and receive
the current and maxiumum mana reserves of a player,
and to subtract and add mana.

## The basic rules
For integrity reasons, this mod will ensure that the following assumptions
are true at all times for all players:

* Current and maximum mana can never be smaller than 0
* The current value must not be greater than the maximum value
* Only integer numbers are permitted for mana values

It should be not possible to break these rules using this API alone.
If you somehow manage to break one ofthe rules, please report a bug.

If a real number is used as input for a value, it will be rounded
(“round up half” rule).

## Functions
Of not specified otherwise, all functions return `nil`.
`playername` always refers to the name of a player, as string.
`value` always refers to a number and for most functions it must always be equal to or greater than 0.


### `mana.set(playername, value)`
Sets the mana reserve of the specified player to `value`.
If `value` is smaller than 0, the mana will be set to 0.
If `value` is greater than the maximum, the mana will be set to the maximum.


### `mana.setmax(playername, value)`
Sets the maximum of the player to `value`.

If the new maximum would become smaller than the current value,
the current value will automatically be set to
the new maximum.

### `mana.setregen(playername, value)`
Sets the mana regeneration per mana tick of the player to `value`.
Floating-point numbers are also permitted, in which the generation
of 1 mana takes longer than 1 mana tick. I.e. `0.5`. means
that 1 mana is generated every 2 mana ticks. A negative value means the
player loses mana.


The length of one “mana tick” is specified as the server-wide setting
`mana_default_regen` in seconds.


### `mana.get(playername)`
Returns the current mana of the specified player as number.


### `mana.getmax(playername)`
Returns the current maximum mana of the specified player as number.


### `mana.getregen(playername)`
Returns the current mana regneration per mana tick of the specified
player as number.
The length of one “mana tick” is specified as the server-wide setting
`mana_default_regen` in seconds.


### `mana.add(playername, value)`
Adds the specified non-negative amount of mana to the player, but only
if the sum would not be greater than the maximum,

#### Return value
* `true` on success, all mana has been added
* `false` on failure, no mana has been added


### `mana.subtract(playername, value)`
Subtracts the specified non-negative amount of mana from the player,
but only if the player has sufficient mana reservers.

#### Return value
* `true` on success, all mana has been subtracted
* `false` on failure, no mana has been subtraceed


### `mana.add_up_to(playername, value)`
Adds the specified non-negative amount of mana to the player, but it will
be capped at the maximum.

#### Return value
* `true, excess` on success, where `excess` is the amount of Mana which could not be added because it would have exceeded the maximum. `excess` equals `0` if all mana has been added
* `false` on failure (mana could not be added)


### `mana.subtract_up_to(playername, value)`
Subtracts the specified non-negative amount of mana from the player,
but if the difference is smaller than 0, the mana will be set to 0.

#### Return value
* `true, missing` on success, where `missing` is the amount of Mana which could not be subtracted because it would have exceeded 0. `missing` equals `0` if all mana has been subtracted
* `false` on failure (mana could not be subtracted)


## Appendix
### General recommendations
If you want your mod to be portable, it is recommended that you balance your mod in such a way that it assumes
that every player starts with the following default mana values:

* Max. mana: 200
* Mana regeneration: 1 mana every 0.2 seconds

Also assume that the max. mana never changes.
This should (hopefully) ensure that multiple independent mana-using mods are more or less balanced when using
the default settings.

Also, to make life easier for subgame makers, define custom minetest.conf settings for your mod in order to
overwrite the mana costs (and other relevant values) used by your mod. That way, subgame makers only have to edit
minetest.conf, and not your mod.

You do not have to bother about default values if you want to directly integrate your mod in a subgame and do
not plan to release the mod independently.

The best way to reliable balance the mana values used by several mods is to create a standalone subgame. It is
highly recommended that you tweak the mana values of the mods to fit the subgame's needs.


You can try to reduce the 'star_blue_amulet_speedup' setting in the 'brewing.conf' file.
 

User avatar
Imk
Member
 
Posts: 243
Joined: Mon Nov 05, 2018 19:15
Location: Crimea, Russia
In-game: Imk

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by Imk » Sun Oct 06, 2019 20:35

You can try to reduce the 'star_blue_amulet_speedup' setting in the 'brewing.conf' file.

I understand that. I'll tell you more.
then the running is permanent.
mana
gives flow rate
mana=0 amulet doesn't work.
There's a mana regeneration in progress [0/200]
it turns out pause on the run

If you do that, I don't need to add changes to the next releases your mods.
I understand if you have any other plans.Just let me know.
mana mods viewtopic.php?t=11154
 

ThorfinnS
Member
 
Posts: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [MOD] Brewing (Magic) (WIP) [v0.15.2]

by ThorfinnS » Sun Oct 06, 2019 21:04

I would think it makes more sense to just code the stamina mod to recognize the amulet. If stamina is installed it lets you sprint, maybe without tiring, maybe tiring at a reduced rate
 

PreviousNext

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 6 guests