Page 1 of 1

Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 15:48
by TumeniNodes
I'm bummed out...
Why?
Because a couple weeks back I finally realized how to set my hotbar size to 23, full time. I copied a small bit of code from VanessaE's dreambuilder game folder I have and Yipee!!! 23 all the time, no resetting each and every time I opened Minetest.
Now, I have no idea how it could have changed other than the fact I got an update to ppa3, and like an idiot, I updated without thinking..., and then realized my hotbar is back to default setting, and I cannot remember which part I copied or where I added it too >:(
Now I'm really grumpy
If anyone has done the same, and can remember how they did it (or just knows in general) please let me know. I can't believe I can't remember how I did it before. (I shoulda remembered not to forget...)

DANG IT! That ppa3 update also wiped my custom changes to default mapgen and nodes.lua!!!!
If you ever make changes to items such as these, I advise making a copy and keeping it, in case the same happens to you, then you can still have your changes, in case you forgot about them and do any updates to Minetest

If anyone is interested, I am adding the quick mod with my textures : )

Re: Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 17:35
by Onyx
Hi,

Maybe you research this? https://github.com/VanessaE/dreambuilde ... 4dca647bc0
I hope this will help you. : )

Re: Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 18:23
by TumeniNodes
Onyx wrote:Hi,

Maybe you research this? https://github.com/VanessaE/dreambuilde ... 4dca647bc0
I hope this will help you. : )


Thank you very much Onyx.
I had done it using a small part of one of the scripts from her game, before she converted it to a modpack. And for some reason I cannot remember from where I got it, and then where I put it :P And now I can't even find it in the dreambuilder_game folder I have.
This may help though, I'll just have to tweak it a bit, so thank you again.

Re: Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 19:32
by TumeniNodes
Nope, that did not work... Dangit
I really need to get this figured out..., because I hate having to use chat/sethotbarsize = 23, every single time I go in and out of Minetest, especially when I am working on stuff >:(

Can't I set this in /usr/share/minetest/games/minetest_game minetest.conf ?

Re: Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 20:32
by ShadMOrdre
Tumeni,

Can you search the mods folder for the 'sethotbarsize' command? Alternatively, you could use the mods command in the client to find out the name of the mod that provides that command.

Unfortunately for me, Dreambuilder is to heavy to run on my machines.

Hope that helps...

Re: Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 20:59
by TumeniNodes
ShadMOrdre wrote:Tumeni,

Can you search the mods folder for the 'sethotbarsize' command? Alternatively, you could use the mods command in the client to find out the name of the mod that provides that command.

Unfortunately for me, Dreambuilder is to heavy to run on my machines.

Hope that helps...


The commands.lua in "default". I just can't remember how I achieved a f/t 23 hotbar before..., so I'm pretty frustrated haha
I'll figure it out eventually, thank you

Re: Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 21:34
by TumeniNodes
It really should not be this hard to set the hotbar to any size from 1-23 for creative mode. This is ridiculous
In a "game" I can understand, but not just to build.

Re: Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 23:26
by Napiophelios
you must change the image names to whatever you use.
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
minetest.register_on_joinplayer(function(player)
  player:hud_set_hotbar_itemcount(23)
  player:hud_set_hotbar_image("custom_hotbar.png")
  player:hud_set_hotbar_selected_image("custom_hotbar_selected.png")
  end)

Re: Permanent Hotbar size

PostPosted: Tue Jun 07, 2016 23:54
by TumeniNodes
Napiophelios wrote:you must change the image names to whatever you use.
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
minetest.register_on_joinplayer(function(player)
  player:hud_set_hotbar_itemcount(23)
  player:hud_set_hotbar_image("custom_hotbar.png")
  player:hud_set_hotbar_selected_image("custom_hotbar_selected.png")
  end)


I already use a custom image from my own TP, which was working fine the way I had it set. It works fine now as well, as it overrides the default ui images. My hotbar looks the same no matter what size I set the bar for

And, where do I put this code? It looks vaguely familiar, to what I had before..., I think :P

Re: Permanent Hotbar size

PostPosted: Wed Jun 08, 2016 00:19
by Napiophelios
yeah that image from your TP is the name that goes in the code above.

If you dont want it to change every time you update the Minetest Game,
Then create a mod folder..call it whatever you want,
and put the above code in an init.lua file with a depends.text
create another folder called textures and place your custom image there
...doesnt matter if its duplicated in your TP
..best to use normal naming convention though.
example: "hugehotbar" mod then--> hugehotbar_custom_hb.png

Re: Permanent Hotbar size

PostPosted: Wed Jun 08, 2016 00:28
by TumeniNodes
Napiophelios wrote:yeah that image from your TP is the name that goes in the code above.

If you dont want it to change every time you update the Minetest Game,
Then create a mod folder..call it whatever you want,
and put the above code in an init.lua file with a depends.text
create another folder called textures and place your custom image there
...doesnt matter if its duplicated in your TP
..best to use normal naming convention though.
example: "hugehotbar" mod then--> hugehotbar_custom_hb.png


Ahhhh, I see... it is a little mod unto itself. Cool, thanks : )
My hot bar image is the same name as the default hotbar image. so I shouldn't need another copy of it if it calls for the default
Bummer I need to add it as a mod because when I originally did it, I placed it in the usr/share/minetest/somewhereroundhere :P
But I'm happy any way it works at this point, thank you

nvr mind, I just remembered you DO need the images within the mod hehe...

Re: Permanent Hotbar size

PostPosted: Wed Jun 08, 2016 00:40
by TumeniNodes
Napiophelios..., you ROCK!!!!!
thank you, extremely much! See?? I have soooooo much learning to do. I'll get it in about..... 10 years

This is really nice because, now anyone else who is interested can do the same for any size they prefer

Re: Permanent Hotbar size

PostPosted: Wed Jun 08, 2016 04:47
by Napiophelios
It would be best to use a unique name for your texture.

If you ever experiment with other Texture packs,
you wont have to worry about any hiccups.

it also allows you to have a default sized hotbar texture available
if you ever experiment with servers that use a different hotbar size
(as most of them use default)

Re: Permanent Hotbar size

PostPosted: Fri Jun 10, 2016 02:59
by yyt16384
I think there used to be some logic to generate hotbar texture in dreambuilder, but it is not there anymore.

Also, how is the 23 limit chosen? Is there any technical restrictions, or is it just an arbitrary limit?

Re: Permanent Hotbar size

PostPosted: Fri Jun 10, 2016 14:43
by azekill_DIABLO
more than 23 and it leaves the screen.
+ Spoiler

Re: Permanent Hotbar size

PostPosted: Fri Jun 10, 2016 14:50
by TumeniNodes
azekill_DIABLO wrote:more than 23 and it leaves the screen.
+ Spoiler


Unless you're setup is in a movie theater... like mine :D

Re: Permanent Hotbar size

PostPosted: Fri Jun 10, 2016 14:57
by TumeniNodes
Napiophelios wrote:It would be best to use a unique name for your texture.

If you ever experiment with other Texture packs,
you wont have to worry about any hiccups.

it also allows you to have a default sized hotbar texture available
if you ever experiment with servers that use a different hotbar size
(as most of them use default)


Is there a way to make this mod call for gui_hotbar & gui_hotbar_selected, but then have the images depend on which TP is in use?

Re: Permanent Hotbar size

PostPosted: Fri Jun 10, 2016 15:03
by yyt16384
azekill_DIABLO wrote:more than 23 and it leaves the screen.
+ Spoiler


That depends on your screen size... For me there is enough room for 24.

Also, the engine will draw hotbar in two rows if screen is not wide enough. The texture will be broken, though.

Re: Permanent Hotbar size

PostPosted: Fri Jun 10, 2016 15:05
by TumeniNodes
yyt16384 wrote:
azekill_DIABLO wrote:more than 23 and it leaves the screen.
+ Spoiler


That depends on your screen size... For me there is enough room for 24.

Also, the engine will draw hotbar in two rows if screen is not wide enough. The texture will be broken, though.


Interesting..., I never even realized, nor thought about that.I wonder if this can be fixed via a taller image? I'll have to experiment :P (I need a small screen now : [ )

Re: Permanent Hotbar size

PostPosted: Fri Jun 10, 2016 20:14
by Napiophelios
TumeniNodes wrote:Is there a way to make this mod call for gui_hotbar & gui_hotbar_selected, but then have the images depend on which TP is in use?


You can use whatever name you want but if you use the default texture names used by Minetest game,
then your texture pack is the only one that will function without problems
...unless there are other texture packs that include a 23 slot hotbar texture.

Also the code is from a very old version of Carbon game by Calinou; I think.

Re: Permanent Hotbar size

PostPosted: Fri Jun 10, 2016 20:35
by TumeniNodes
Napiophelios wrote:You can use whatever name you want but if you use the default texture names used by Minetest game, then your texture pack is the only one that will function without problems... unless there are other texture packs that include a 23 slot hotbar texture.

Also the code is from a very old version of Carbon game by Calinou; I think.


Well, I also added in the descrip. or readme that the size of the bar can be set to whatever the user wants, by simply changing the number in the init.lua