[Abandoned] [Mod] Ores' Statistics [1.1.0] [ores_stats]
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
[Abandoned] [Mod] Ores' Statistics [1.1.0] [ores_stats]
Provides informations about ores' percentages collected on map generation.
Version: 1.1.0
Source code's license: EUPL v1.2 or later.
Dependencies: default, sfinv (found in Minetest Game)
Supported: More Ores
To update the page just switch to another tab.
Advanced option: Settings -> All Settings -> Mods -> orestats
Downloads:
Archives: .zip .tar.gz
Source code: Codeberg
Installation
Unzip the archive, rename the folder to ores_stats and place it in
../minetest/mods/
If you only want this to be used in a single world, place it in
../minetest/worlds/WORLD_NAME/worldmods/
GNU+Linux - If you use a system-wide installation place it in
~/.minetest/mods/
For further information or help see:
https://wiki.minetest.net/Installing_Mods/
- Attachments
-
- ores_stats_2.png (23.16 KiB) Viewed 1887 times
-
- ores_stats_1.png (23.08 KiB) Viewed 1887 times
Last edited by Hamlet on Fri Oct 02, 2020 17:35, edited 16 times in total.
My repositories: Codeberg.org | My ContentDB's page
- Andrey01
- Member
- Posts: 2574
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: [Mod] Ores' Statistics [0.1.0] [ores_stats]
Wow! I think it is very useful mod!
- AlexYst
- Member
- Posts: 109
- Joined: Fri Mar 20, 2015 01:24
- GitHub: y-st
- IRC: AlexYst
- In-game: AlexYst
- Contact:
Re: [Mod] Ores' Statistics [0.1.0] [ores_stats]
Nice! I've frequently wondered about the ore distribution percentages; usually when I'm trying to decide on craft recipes in mods, as I try to balance the cost with the usefulness.
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Ores' Statistics [0.1.0] [ores_stats]
Thanks to both for your appreciation. :)
I've started this mod thinking about commerce: how many iron ingots for a gold ingot? And how many gold ingots for a diamond?
Indeed it can be used for other purposes: checking the effective percentage of a newly introduced ore or node, testing a map generator, and so on.
Currently it lacks a database: a text file in the world's directory where the collected data could be saved for later reference. I don't know how to deal with files input-output, thus at the moment nothing is recorded.
I've planned to extend the available commands, by introducing a converter; example:
-> /orestats diamond steel
<- "a diamond is worth X steel ingots"
If anyone is willing to help, s/he's very welcome.
I've started this mod thinking about commerce: how many iron ingots for a gold ingot? And how many gold ingots for a diamond?
Indeed it can be used for other purposes: checking the effective percentage of a newly introduced ore or node, testing a map generator, and so on.
Currently it lacks a database: a text file in the world's directory where the collected data could be saved for later reference. I don't know how to deal with files input-output, thus at the moment nothing is recorded.
I've planned to extend the available commands, by introducing a converter; example:
-> /orestats diamond steel
<- "a diamond is worth X steel ingots"
If anyone is willing to help, s/he's very welcome.
My repositories: Codeberg.org | My ContentDB's page
Re: [Mod] Ores' Statistics [0.1.0] [ores_stats]
For misc development tests I wrote QA-Block that is able to call misc lua checks / files. For development testing reason may you can write a Check-file for qa-block.
The most checks does just a print() that is wrote to the logfile and redirected to chat. But some (if usefull) does write to world directory. For example the intllib_pot_file_converter.lua that you can use to look how writting files works. It is easy, just write strings as textfile-lines using the IO write method
The most checks does just a print() that is wrote to the logfile and redirected to chat. But some (if usefull) does write to world directory. For example the intllib_pot_file_converter.lua that you can use to look how writting files works. It is easy, just write strings as textfile-lines using the IO write method
Code: Select all
-- Expamle is smart_inventory groups texts
local filename_po = minetest.get_worldpath().."/converter_out.po"
local file_po = io.open(filename_po, "w")
for key, text in pairs(smart_inventory.txt) do
file_po:write('msgid "'..key..'"\n')
file_po:write('msgstr "'..text..'"\n')
file_po:write('\n')
end
file_po:close()
Last edited by bell07 on Mon Apr 09, 2018 18:54, edited 1 time in total.
Re: [Mod] Ores' Statistics [0.1.0] [ores_stats]
You could use mod_storage:Hamlet wrote:Thanks to both for your appreciation. :)
Currently it lacks a database: a text file in the world's directory where the collected data could be saved for later reference. I don't know how to deal with files input-output, thus at the moment nothing is recorded.
Code: Select all
ore_store = minetest.get_mod_storage()
...
ore_store:set_float("coal_percent",coal_percent)
...
coal_percent = ore_store:get_float("coal_percent")
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Ores' Statistics [0.1.0] [ores_stats]
Thanks for your input, so far I'm rewriting the mod from scratch because I wrote it a month ago when I didn't knew about hardware colorization and some other things.
I've tried the mod_storage method, and I'm happy with it as there is no performance hit. :)
I've tried the mod_storage method, and I'm happy with it as there is no performance hit. :)
My repositories: Codeberg.org | My ContentDB's page
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Ores' Statistics [0.1.1] [ores_stats]
Released v0.1.1
- rewritten from scratch
- temporarily removed support for third party ores
- check the first post for more info
This version is meant to be used by singleplayers and/or mod developers.
The whole code has been rewritten to allow developers to easily and quickly add support for their own ores; it is self explanatory ("self commented") and broken into various sections (variables, functions, etc.) to make the customization process as easy as possible.
Before you think "I'll add <ore_name_here>" check this viewtopic.php?f=47&t=20105 because it seems that there's already a ton. :)
- rewritten from scratch
- temporarily removed support for third party ores
- check the first post for more info
This version is meant to be used by singleplayers and/or mod developers.
The whole code has been rewritten to allow developers to easily and quickly add support for their own ores; it is self explanatory ("self commented") and broken into various sections (variables, functions, etc.) to make the customization process as easy as possible.
Before you think "I'll add <ore_name_here>" check this viewtopic.php?f=47&t=20105 because it seems that there's already a ton. :)
My repositories: Codeberg.org | My ContentDB's page
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Ores' Statistics [0.2.0] [ores_stats]
Released v0.2.0
Added:
- Support for translations.
Changed:
- License changed to EUPL v1.2.
- mod.conf set to follow MT v5.x specifics.
Removed:
- Support for MT v0.4.x
Added:
- Support for translations.
Changed:
- License changed to EUPL v1.2.
- mod.conf set to follow MT v5.x specifics.
Removed:
- Support for MT v0.4.x
My repositories: Codeberg.org | My ContentDB's page
Re: [Mod] Ores' Statistics [0.2.0] [ores_stats]
I am interested in your mod, but I fearr I will ask some questions now to understand it, that unmask me as very uninformed.
Is the map generated completely if you create a new world?
Or are subunits like mapchunks and areas generated if the player enters them for the first time?
If you change the distribution of ores in a mob after creating a new world, will the changes take effect?
Is the map generated completely if you create a new world?
Or are subunits like mapchunks and areas generated if the player enters them for the first time?
If you change the distribution of ores in a mob after creating a new world, will the changes take effect?
CFS - still widely unknown
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Ores' Statistics [0.2.0] [ores_stats]
You should ask those questions to "Mr. Mapgen" (as Rubenwardy once called him), that is, paramat.Nordal wrote:I am interested in your mod, but I fearr I will ask some questions now to understand it, that unmask me as very uninformed. [...]
I only have a vague idea of how map generation and ores' distribution works, someone could skin me and put me into a barrel of salt, should I write something not exactly exact.
My repositories: Codeberg.org | My ContentDB's page
-
- Member
- Posts: 4276
- Joined: Sun Sep 09, 2012 17:31
- GitHub: Sokomine
- IRC: Sokomine
- In-game: Sokomine
Re: [Mod] Ores' Statistics [0.2.0] [ores_stats]
No, that's not possible. Even large servers which have run for a long time have only a tiny fraction of the possible map generated - and that takes up several GB of space.Nordal wrote: Is the map generated completely if you create a new world?
That's how it is: When a player comes near or a mod initiates generation, that mapchunk will be created and stored in a database.Nordal wrote: Or are subunits like mapchunks and areas generated if the player enters them for the first time?
They will take effect - in newly generated mapchunks. A mapchunk is usually 5x16 nodes wide in each direction. Already generated mapchunks are not affected. Thus, if you add a new mod that adds new things at mapgen time to an already existing world, you've got to explore new land in order to see those changes.Nordal wrote: If you change the distribution of ores in a mob after creating a new world, will the changes take effect?
A list of my mods can be found here.
Re: [Mod] Ores' Statistics [0.2.0] [ores_stats]
Thank you very much Sokomine! Your answers exactly meet the point. That's the informations I needed. :)
CFS - still widely unknown
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Ores' Statistics [0.2.0] [ores_stats]
So... you are selling 1 gold ingot for 99 dirt
or maybe one chest filled of cobble for a diamond...
or exchanging a steel block for 10 coal blocks
or 10 apples for 2 steel ingots
maybe you need this:
anyone interested?
EDIT: the current version doesn't have this feature, just in case...
or maybe one chest filled of cobble for a diamond...
or exchanging a steel block for 10 coal blocks
or 10 apples for 2 steel ingots
maybe you need this:
anyone interested?
EDIT: the current version doesn't have this feature, just in case...
- Attachments
-
- ores_stats_next.png (8.44 KiB) Viewed 1887 times
My repositories: Codeberg.org | My ContentDB's page
- Festus1965
- Member
- Posts: 4181
- Joined: Sun Jan 03, 2016 11:58
- GitHub: Festus1965
- In-game: Festus1965 Thomas Thailand Explorer
- Location: Thailand ChiangMai
- Contact:
Re: [Mod] Ores' Statistics [0.2.0] [ores_stats]
I used it short,
after digging about 50.000 nodes to get a statistic about this (but I have also mithril and moreores) to make a more fair XP digging point system, depending on the % based on diamonds.
Sure, helpful, to know how much is something worth (depending also on depths digging)
The Idea is good, but missing ores, and looking through the code I didn't feel to be able to enlarge ... it
after digging about 50.000 nodes to get a statistic about this (but I have also mithril and moreores) to make a more fair XP digging point system, depending on the % based on diamonds.
Sure, helpful, to know how much is something worth (depending also on depths digging)
The Idea is good, but missing ores, and looking through the code I didn't feel to be able to enlarge ... it
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)
If urgend, you find me in Roblox (as CNXThomas)
- Hamlet
- Member
- Posts: 766
- Joined: Sat Jul 29, 2017 21:09
- IRC: H4mlet
- In-game: Hamlet
- Location: Lombardy, Italy
Re: [Mod] Ores' Statistics [0.2.0] [ores_stats]
This mod will be completely rewritten, it is old and its code is not very good.Festus1965 wrote: ↑Sat Jul 11, 2020 10:15Sure, helpful, to know how much is something worth (depending also on depths digging)
The Idea is good, but missing ores, and looking through the code I didn't feel to be able to enlarge ... it
I will try to make it easier to add third party ores' mods, probably I will re-add native support for More Ores' silver and mithril because it seems that More Ores is widely used.
My repositories: Codeberg.org | My ContentDB's page
Re: [Mod] Ores' Statistics [1.0.0] [ores_stats]
Released v1.0.0
Added:
- Inventory's page (switch tab to update).
- Ores' relative values.
- Option to change gold's value via Settings -> All settings -> Mods -> ores_stats
Changed:
- Code rewritten from scratch.
- Version updated to 1.x, non backward compatible.
Removed:
- Console and chat output.
Added:
- Inventory's page (switch tab to update).
- Ores' relative values.
- Option to change gold's value via Settings -> All settings -> Mods -> ores_stats
Changed:
- Code rewritten from scratch.
- Version updated to 1.x, non backward compatible.
Removed:
- Console and chat output.
Re: [Mod] Ores' Statistics [1.1.0] [ores_stats]
Released v1.1.0
Added
- Support for "More Ores"
Added
- Support for "More Ores"
Who is online
Users browsing this forum: No registered users and 20 guests