Minetest logo

IRC log for #minetest, 2020-05-10

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:00 galex-713 joined #minetest
00:00 freelikegnu I have an item that I need the description text for so that I can append some text and drop it
00:11 rubenwardy where are you showing that description text?
00:11 rubenwardy you don't want to break translation
00:16 freelikegnu it will be an item dropped by a mob that a player will be able to use like default:pick_steel only the description will be like "Nugnug's favorite pick"
00:17 kaeza joined #minetest
00:17 freelikegnu er "Nugnug's favorite <whatever the original description of that item was>"
00:18 rubenwardy ok, so you should do this
00:18 nowhere_man joined #minetest
00:18 rubenwardy local S = minetest.get_translator("yourmodname")
00:18 rubenwardy S("@1's favorite @2", username, def.description)
00:18 rubenwardy and it'll magically work
00:19 rubenwardy tbh, concating should also just work
00:21 freelikegnu so I can use the funky output I'm getting as def.description ?
00:21 rubenwardy yeah, the funky output allows client-side translations
00:22 rubenwardy so one person will see it as wood, another will see bois
00:22 freelikegnu ok I'll try that then. Thanks for the help!
00:34 erlehmann joined #minetest
00:45 freelikegnu yay! https://i.imgur.com/SsV0biz.png TY so much!
00:48 freelikegnu I really have to start incorporating translations into my mod now...
01:04 FennecCode joined #minetest
01:18 behalebabo joined #minetest
01:24 ANAND joined #minetest
01:34 nephele_ joined #minetest
01:35 awell left #minetest
01:47 FrostRanger joined #minetest
02:13 kaeza joined #minetest
02:53 Hawk777 joined #minetest
04:17 oil_boi joined #minetest
04:18 oil_boi texmex: I've been testing the new treecapitator and it makes the game feel more like RLcraft than FTB Horizons, so I'm gonna revert it and release the code on the forums instead
04:28 deltanedas joined #minetest
04:44 texmex oil_boi: I’m not too familiar with these concepts tbh, but is FTB Horizons kind of what you’re aiming for gameplay-wise? I’m mostly concerned with not having players cause floating treetrunks anyway.
04:54 fluxflux joined #minetest
05:11 calcul0n joined #minetest
05:23 DrFrankenstone joined #minetest
05:33 DrFrankenstone_ joined #minetest
05:37 est31 joined #minetest
05:48 oil_boi Oh yes, texmex, that's not a problem then!
05:48 oil_boi The old style fixes that
05:50 TomTom joined #minetest
06:13 texmex It’s funny because initially I didn’t imagine an animated entity for the tree at all, only that the tree nodes were to be rotated and laid out horizontally from the initial cutting. What do you think of that, oil_boi?
06:36 DrFrankenstone joined #minetest
06:38 DrFrankenstone_ joined #minetest
06:48 DrFrankenstone joined #minetest
06:57 oil_boi texmex: I'll be honest, that doesn't sound good, it kinda breaks the whole getting wood aesthetic to the game
07:00 DrFrankenstone_ joined #minetest
07:06 dabbill joined #minetest
07:06 absurb joined #minetest
07:08 dabbill joined #minetest
07:12 DrFrankenstone joined #minetest
07:16 texmex oil_boi: Yeah, I think you’re right.
07:17 texmex Then I’d favor the initial implementation + tool wear according to the amount of tree nodes being broken in the process.
08:00 ShadowNinja joined #minetest
08:04 oil_boi texmex: yes, I will work on this later then, that's a great idea
08:05 oil_boi I made it a mod prototype for default  game regardless https://forum.minetest.net/viewtopic.php?f=9&amp;t=24692
08:05 oil_boi I bet people will be able to create super cool stuff with this
08:08 texmex Excellent outlet for discarded features, oil_boi. :)
08:09 texmex Perhaps the Crafter treecap feature could have an optional ”break only one tree node” on Shift+dig?
08:15 _Zaizen_ joined #minetest
08:43 majochup joined #minetest
08:50 Flabb joined #minetest
08:58 nowhere_man joined #minetest
09:14 nowhereman joined #minetest
09:17 NetherEran joined #minetest
09:17 realzies joined #minetest
09:31 macc24 joined #minetest
10:19 longerstaff13 joined #minetest
10:21 calcul0n joined #minetest
10:23 luk3yx joined #minetest
10:30 sec^nd joined #minetest
10:35 Rafi59_ joined #minetest
10:35 Rafi59__ joined #minetest
10:47 luk3yx joined #minetest
10:54 luk3yx joined #minetest
11:18 fluxflux joined #minetest
11:18 Fixer joined #minetest
11:26 Soo_Slow joined #minetest
11:35 longerstaff13 joined #minetest
11:37 MinetestBot [git] Calinou -> minetest/minetest: Request the dedicated GPU when starting Minetest from the `.desktop` … 88bb8e5 https://git.io/JfWRq (2020-05-10T11:37:30Z)
11:38 MinetestBot [git] yamanq -> minetest/minetest_game: Add oddly_breakable_by_hand to glass stairs and slabs 3f42c6c https://git.io/JfWRm (2020-05-10T11:37:37Z)
11:41 Flabb joined #minetest
11:43 awell joined #minetest
11:57 majochup joined #minetest
11:57 nowhere_man joined #minetest
12:11 MinetestBot [git] sfan5 -> minetest/minetest_game: Switch TNT explosions to use add_player_velocity (#2674) e5b54c6 https://git.io/JfWEf (2020-05-10T12:10:29Z)
12:16 galex-713 joined #minetest
12:24 macc24 joined #minetest
12:34 xachman joined #minetest
12:36 longerstaff13 joined #minetest
12:55 jas_ ooh
12:56 jas_ my voice on #minetest-hub went away for some reason :(
12:59 Krock you're logged in so that shouldn't be the problem
13:02 Guest28503 joined #minetest
13:09 jas_ rubenwardy gave me voice the other night but i guess it was only temporary
13:10 jas_ ha, that channel is so elitist, with the many operators and auditorium mode
13:10 mars_ joined #minetest
13:10 jas_ i want my voice
13:12 majochup joined #minetest
13:13 jas_ !mod
13:13 MinetestBot jas_: Pokémon Rods [pkmn_rods] by general3214 - https://forum.minetest.net/viewtopic.php?t=7712
13:14 Krock dead link uh
13:14 jas_ i dunno what a rod is but yea
13:14 jas_ deader than dead
13:15 Krock Rod is like Rod Stewart but without the music
13:15 jas_ hmm
13:15 * jas_ puts rod stewart on
13:16 jas_ i was only joking
13:16 jas_ !title https://www.youtube.com/watch?v=MXu4h9vXy7s
13:16 MinetestBot jas_: Rod Stewart - I Was Only Joking (Official Video) - YouTube
13:19 jas_ i was only joking my dear; looking for a way to hide my fear
13:19 rubenwardy I don't have the permissions to autovoicr someone
13:19 jas_ that's ok!
13:20 jas_ i'll bug someone about it later :)
13:28 Verticen joined #minetest
13:54 macc24 joined #minetest
13:57 majochup joined #minetest
14:10 Pie-jacker875 joined #minetest
14:10 deltanedas joined #minetest
14:40 longerstaff13 joined #minetest
14:46 ANAND joined #minetest
14:47 riff-IRC joined #minetest
14:58 kamdard joined #minetest
15:14 macc24 joined #minetest
15:35 MDude joined #minetest
15:39 dalz joined #minetest
16:18 macc24 joined #minetest
16:20 Hirato_ joined #minetest
16:29 cheapie Out of curiosity, when you choose to migrate a world, what is MT actually *doing* during that two or three minutes when nothing seems to be happening, before the progress appears? Counting mapblocks in the DB so the progress indicator has something to go by?
16:44 sfan5 yes
16:47 freelikegnu is there a way to get text printed to the console to show as translated? print(S("some text about @1",thing) shows translation codes....
16:47 freelikegnu print(S("some text about @1",thing))
16:47 sfan5 minetest.get_translated_string
16:48 freelikegnu I tried to use that but I cant seem to get the player information to it...
16:49 sfan5 how are you calling it?
16:49 freelikegnu I mean the lang_code from the player
16:51 freelikegnu print(minetest.get_translated_string(lang_code,S("Assembling the @1",g_template.description)))
16:52 rubenwardy that only works with 5.3.0
16:52 rubenwardy and the lang code is found in minetest.get_player_information(name)
16:53 sfan5 and what does lang_code equal in that case?
16:53 freelikegnu I running 5.3.0 dev
16:53 freelikegnu I tried lang_code = "en" to test
16:54 freelikegnu ok so how do I get minetest.get_player_information(name)
16:54 freelikegnu if I dont have a name to put in?
16:55 freelikegnu this is just to print out some text to the console as the mod loads
16:55 sfan5 you cannot translate to "en" because that's the source language
16:56 sfan5 so what you actually want is not "translate this string for me" but "strip the translation codes from this string"
16:56 sfan5 unfortunately the engine doesn't have a function for that
16:56 freelikegnu yes thats fine too
16:56 freelikegnu oof
16:56 sfan5 (doesn't mean it's not doable)
16:56 rubenwardy err
16:56 rubenwardy you should be able to translate to en
16:56 rubenwardy that makes sense
16:57 rubenwardy I consider this a bug - you don't want to have an if-statement on lang_code == "en"
16:57 freelikegnu really I would pref that text to be translated to the users lang
16:57 rubenwardy also, you don't just want to strip translation code - you want to resolve the format string
16:57 freelikegnu but only the person with access to the console will see it
16:57 sfan5 the format string is resolved at the time S() is called
16:57 rubenwardy ie: stripping the translations from   S("Hello @1", name)   won't resolve it
16:58 sfan5 rubenwardy: regarding translating to "en", do you suggest mods include an english translation file with loads of "Assembling the @1=Assembling the @1" entries?
16:58 rubenwardy oh right, the english version is in the string to begin with
16:58 sfan5 freelikegnu: https://github.com/Uberi/Minetest-WorldEdit/blob/master/worldedit_commands/init.lua#L125
16:58 rubenwardy no, I suggest that the engine is clever and just strips the translation when asked to translate to en
16:59 sfan5 by the way "en" is not a valid value for lang_code
16:59 rubenwardy what value does it take when the language is en
16:59 rubenwardy nil?
16:59 sfan5 freelikegnu: I don't think there's a way to determine the system language the server is running on, so you'll have to give them english
16:59 sfan5 one of "" or nil
17:00 cheapie Yay for what seem to be minetest_game bugs :/
17:00 cheapie 2020-05-10 16:58:13: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'env_sounds' in callback environment_Step(): ...t/.minetest/games/minetest_game/mods/env_sounds/init.lua:22: find_nodes_in_area(): area volume exceeds allowed value of 4096000
17:00 rubenwardy well, I still think that lang_code and get_translated_string should both allow "en"
17:01 rubenwardy it's more consistent, and means you can just pass lang_code directly into get_translated_String
17:01 sfan5 "" is perfectly consistent for lang_code, since the strings are English there is no translation loaded
17:02 rubenwardy it's not though? Their lang_code isn't "", it's en
17:02 sfan5 cheapie: filed a bug report?
17:02 rubenwardy well, it doesn't matter too much
17:02 cheapie sfan5: Not yet, I'm trying to fix some other stuff first and then figure out what's going on here.
17:02 rubenwardy being able to directly plug lang_code into get_translated_string is the key thing
17:03 freelikegnu when lang_code = "" I get no text at all "P
17:03 sfan5 that would indeed be convenient but I'm not sure I like implicit different behavior for lang_code == ""
17:03 sfan5 instead I'd add a minetest.strip_translation_escape()
17:04 rubenwardy It's not different behaviour though.  The meaning of get_translated_string() is to get the translation of an encoded string in a specific locale
17:05 rubenwardy in fact, if a translation doesn't exist it probably falls back to en right?
17:05 sfan5 I think so
17:05 freelikegnu wouldn't that strip have to still format the "my @1 has @2,animal,parasite" ?
17:05 sfan5 get_translated_string might not however...
17:05 rubenwardy well, maybe not as shown by freelikegnu's tests
17:06 rubenwardy freelikegnu: that is done by S
17:06 freelikegnu ok
17:06 sfan5 formatting happens in such a way that stripping escaped will give you the correctly formatted string
17:06 sfan5 escapes*
17:06 rubenwardy it's sent like    (T@something)my animal has parasite
17:06 rubenwardy strip_translation_escapes would also be good
17:06 rubenwardy as well as strip_all_escapes for both color and translations
17:07 sfan5 hm not sure about that, who knows what escapes will added in the future
17:07 sfan5 better to have modders make an explicit choice
17:08 rubenwardy well, I meant escapes that specifically use the escape ASCII code  then (X@thing)
17:09 rubenwardy well, actually
17:09 rubenwardy nevermind - that's not that useful
17:09 freelikegnu sfan: the strip escapes link code works for now "Assembling the Goblin Fungiler"
17:09 freelikegnu gads it a wonder that my code even runs I typo so bad :P
17:10 yaman joined #minetest
17:10 rubenwardy I commonly make a typo when spelling typo
17:10 rubenwardy I spell it type instead
17:10 Krock s/typo/type/
17:10 freelikegnu hehe thats your coder auto correction :D
17:10 cheapie What's the format of the "pos" field in the sqlite3 map DB? I tried putting it into minetest.get_position_from_hash() and it teleported me way off the edge of the map.
17:10 cheapie (as in, tried to set my position to it)
17:11 Krock cheapie: * 4096 for each axis or so
17:11 rubenwardy that should work - it's be a chunk position as a hash?
17:11 Krock https://github.com/minetest/minetest/blob/b298b0339c79db7f5b3873e73ff9ea0130f05a8a/src/database/database.cpp#L59
17:11 cheapie The number I'm looking at is -1577050060, which MT says is -24524,8704,32767
17:11 rubenwardy it's an unsigned int
17:12 Krock and it's a mapblock position
17:12 cheapie Ah, so it is a different format then.
17:12 rubenwardy you need to be careful with handling those hashes in Lua- you shouldn't modify it
17:12 rubenwardy Lua only has doubles
17:12 sfan5 doubles do provide 48-bit precision IIRC
17:13 freelikegnu ooo do chunks have a pos?  I've been using minp_maxp
17:14 sfan5 chunks?
17:14 freelikegnu Get the Minimum of a Chunk https://forum.minetest.net/viewtopic.php?p=351592#p351592
17:16 sfan5 well what do you need that for?
17:16 freelikegnu in goblins each trib has thier territory defined by a chunk
17:17 deltanedas joined #minetest
17:17 freelikegnu each chuck is given a random name on creation and any goblin will get that territory name added to their def on first creation
17:18 sfan5 well you can use any arbitrary definition for that
17:18 sfan5 you do not necessarily need to use the same chunks the mapgen also uses
17:18 freelikegnu well I figured the mapgen defined chunks were good enough to define goblin territories
17:19 freelikegnu how else could I keep the territories from overlapping?
17:19 Wuzzy joined #minetest
17:21 cheapie Krock: OK, I ported that to Lua and it seems to work, thanks.
17:25 Lone_Wolf joined #minetest
17:30 calcul0n_ joined #minetest
17:35 Krock !next
17:35 MinetestBot Another satisfied customer. Next!
17:44 Soo_Slow joined #minetest
17:49 Taoki joined #minetest
17:50 calcul0n joined #minetest
17:56 NetherEran joined #minetest
18:10 erlehmann joined #minetest
18:24 erlehmann joined #minetest
18:36 FrostRanger joined #minetest
18:51 mars_ joined #minetest
18:59 emacsomancer joined #minetest
19:02 dalz joined #minetest
19:02 franzpow joined #minetest
19:03 franzpow Hello!
19:04 frostsnow .1
19:04 frostsnow ack
19:14 swift110 joined #minetest
19:27 Hawk777 joined #minetest
19:27 illwieckz joined #minetest
19:34 mizux joined #minetest
19:45 deltanedas joined #minetest
19:49 cheapie So I've noticed this line in craftitem definitions in a few not-so-great mods now... did it *ever* do anything?
19:49 cheapie on_place_on_ground = minetest.craftitem_place_item,
19:50 Krock looks like deprecated API
19:51 cheapie If it is some old stuff that was removed ages ago then I'm curious what (if anything) it did back then.
19:51 cheapie Otherwise it almost looks like the mod author is just kinda making stuff up :P
19:52 Krock https://github.com/minetest/minetest/commit/918c507
19:52 cheapie Ah, so it used to just drop the item?
19:53 Krock no, it placed a noce
19:53 Krock *node
19:53 sfan5 it was remvoed somewhere between 0.4.dev-20111209-1 and 0.4.dev-20120606
19:53 Krock or what no. an item, you're right
19:55 cheapie That still doesn't really make the rest of this mod any better, though... it's registering 10 different things with minetest.register_on_dignode(), none of which need to be, and using some pretty frequent ABMs to do things that should just be done on place...
19:57 Krock It Works On My Machine
19:57 Krock to ba fair, there weren't as many good practice examples around
19:57 cheapie The part with minetest.register_on_dignode() is kinda funny, it's expecting 4 parameters, one of which doesn't match what it's actually called with and one that will always be nil since it's always(?) called with 3, and then immediately throwing out all but one.
19:58 cheapie That and it just shoves that function in a random global somewhere and triggers a warning about that.
20:17 NetherEran joined #minetest
20:22 fluxflux joined #minetest
20:25 Flabb joined #minetest
20:28 deltanedas joined #minetest
20:51 FrostRanger joined #minetest
21:18 deltanedas joined #minetest
21:23 DrFrankenstone joined #minetest
21:32 NetherEran joined #minetest
21:33 longerstaff13 joined #minetest
21:43 oil_boi joined #minetest
21:44 BillyS joined #minetest
22:06 Pie-jacker875 joined #minetest
22:13 franzpow I just streamed minetest tonight. Thank you for this awesome game!
22:13 franzpow If you want to see the stream here it is the link (I have an Open source gaming channel on Twitch):
22:13 franzpow https://twitch.tv/opensource_gaming
22:27 franzpow joined #minetest
22:52 franzpow joined #minetest
22:53 jas_ that's nice
22:53 jas_ thanks
23:32 jas_ !mod
23:32 MinetestBot jas_: Dice [dice] by ch98 - https://forum.minetest.net/viewtopic.php?t=4926
23:32 jas_ yes!
23:33 jas_ another dead one anyway
23:42 scorps44 joined #minetest
23:51 deltanedas joined #minetest

| Channels | #minetest index | Today | | Google Search | Plaintext