Minetest logo

IRC log for #minetest-mods, 2013-06-04

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

All times shown according to UTC.

Time Nick Message
01:57 ShadowNinja_ joined #minetest-mods
02:41 ecube joined #minetest-mods
10:48 PilzAdam joined #minetest-mods
11:14 rubenwardy joined #minetest-mods
11:56 rubenwardy_ joined #minetest-mods
16:07 BrandonReese joined #minetest-mods
17:19 freezeminer joined #minetest-mods
17:19 freezeminer hello
17:20 freezeminer can sombody help me to make a hungergames server
18:31 ch98 joined #minetest-mods
18:46 ecube joined #minetest-mods
18:47 Someguy1234 joined #minetest-mods
20:37 ExcaliburZero joined #minetest-mods
20:44 MinerofLands joined #minetest-mods
20:44 MinerofLands hey PilzAdam do you think something like this is posible?
20:44 MinerofLands http://forum.minetest.net/viewtopic.php?pid=93133#p93133
20:45 MinerofLands i think the easiest way of doing that...is create new privs like craft, cook, etc etc
20:45 PilzAdam well, have you tried one of the workbench mods?
20:45 PilzAdam they dont refill the craftresult field when you take an item
20:46 thexyz it's possible
20:46 PilzAdam you will have the same problem since you have to write your own craft functions in Lua
20:46 thexyz PilzAdam: why don't they?
20:47 PilzAdam the players craftresult list has a special handling
20:47 thexyz can't the same be implemented with inventory callbacks?
20:47 PilzAdam but it uses the builtin craft mechanics; and they cant be used here
20:47 PilzAdam thexyz, Im talking about how the API currently is, not what could be done in the engune
20:47 PilzAdam *engine
20:48 thexyz I'm also talking about the api
20:48 thexyz there are allow_put, allow_take, on_take
20:48 PilzAdam currently you cant have this behaviour for other lists
20:48 thexyz which should be enough to implement default crafting grid in Lua
20:48 thexyz or am I wrong?
20:49 PilzAdam callbacks are called when you placed the stack somewhere else, having the item "at the mouse" isnt "taking"
20:49 thexyz oh, I get it now
20:49 MinerofLands so its not possible :(
20:49 thexyz it's possible
20:50 MinerofLands ok im not that good i LUA or anthing for that matter lol...ill see how i do it
20:50 PilzAdam it is, but it will be a bit annyoing to craft many items
20:50 PilzAdam +possible
20:50 MinerofLands can you guys be so kind to make a small template for me?
20:50 thexyz PilzAdam: can't we have a pseudo-inventory for that? named like player_name_mouse
20:51 thexyz in 0.4.7+
20:52 PilzAdam I guess that goes against the current design(?)
20:52 PilzAdam Im not familiar with the engine internals of the inventories
20:55 ExcaliburZero I am working on an item that, when used, plays a music file, but I can't seem to get it to work. Does anyone know what it isn't working? Code: http://codepad.org/zTGqlnL4
20:56 MinerofLands PilzAdam or thexyz can you make me a simple template, so i can build from there? i need a little lift
20:56 thexyz PilzAdam: yes, I guess that'll lag a lot
20:57 thexyz ExcaliburZero: -function(handle) +function()
20:57 thexyz oh, wait
20:58 thexyz that's not it
20:58 PilzAdam ExcaliburZero, why dont you do "object = placer"?
20:58 thexyz hm.. I wonder if there's a need to pass handle like that though
20:59 PilzAdam thexyz, yes
20:59 PilzAdam is oog a valid ogg file extention?
21:00 ExcaliburZero PilzAdam: I think so.
21:00 PilzAdam have you checked the filename?
21:00 PilzAdam oh, wait
21:01 PilzAdam dont add the file extention
21:01 PilzAdam just do "Zelda_Song_of_Storms"
21:01 PilzAdam IIRC minetest expects the filename without the extention
21:02 ExcaliburZero PlizAdam: Okay, I'll try those changes.
21:02 thexyz PilzAdam: you mean, closures won't work there?
21:02 thexyz like they do here http://codepad.org/uenukS80
21:03 thexyz that's odd but I'm too lazy to test it
21:03 PilzAdam dunno
21:03 ExcaliburZero It works!
21:03 MinerofLands PilzAdam did you read my message above :D
21:04 PilzAdam maybe add a note in lua-api.txt that file extentions have to be removed?
21:04 PilzAdam MinerofLands, the mod will be pretty complex
21:04 PilzAdam give me some time to come up with something useful
21:05 thexyz Sounds are referred to by their name with a dot, a single digit and the
21:05 thexyz file extension stripped out.  When a sound is played, the actual sound file
21:05 thexyz is chosen randomly from the matching sounds.
21:05 thexyz it's already here
21:05 thexyz there's also an example in devwiki http://dev.minetest.net/sound_play
21:06 thexyz MinerofLands: I doubt a working example will help you
21:06 kaeza ExcaliburZero, also, if possible, remove the empty items ('') from the recipe
21:06 PilzAdam oh, yea, was only reading the "SimpleSoundSpec:" part
21:09 ExcaliburZero I was wondering for the tool, could there be a way to have it pop-up a window, when used, and a song could be selected from that window?
21:10 PilzAdam MinerofLands, would you be ok if every register_craft(), get_craft_result() and get_craft_recipe() call of existing mods will be not compatible?
21:11 PilzAdam you would need to rewrite the crafting of every mod you want to add
21:11 MinerofLands yeah
21:11 MinerofLands that would be alright
21:13 PilzAdam https://gist.github.com/PilzAdam/5709653
21:14 PilzAdam it would look somewhat like this
21:15 PilzAdam do you also want my to have my suggestion that crafting takes time like cooking in the furnace?
21:15 PilzAdam -my
21:15 MinerofLands yeah
21:15 * BrandonReese nods
21:15 MinerofLands please
21:16 PilzAdam ok, this may take a day or so :-)
21:16 BrandonReese is the furnance completely written in lua?
21:17 MinerofLands ok pilz no hurrys heh
21:17 MinerofLands i mean adam
21:17 MinerofLands :d
21:20 ExcaliburZero What is the code to display a window (with text and buttons).
21:47 ExcaliburZero I found that it is a formspec, but how do I use a formspec?
21:48 MinerofLands have you seen the api? or any other docs on modding?
21:48 MinerofLands i.e the wiki
21:50 ExcaliburZero I've looked at the wiki, but I'm not sure how to use a formspec. The wiki article on it doesn't give an example on how to display it, it just shows how to define it.
21:50 ExcaliburZero http://dev.minetest.net/formspec
22:04 PilzAdam MinerofLands, I got the furnace working :D
22:04 MinerofLands awsome
22:04 MinerofLands it will be so cool
22:36 Immaculator joined #minetest-mods
22:42 Immaculator left #minetest-mods
22:42 PilzAdam MinerofLands, it works!
22:44 MinerofLands great :D .....did you finish it that quick?
22:45 PilzAdam https://github.com/PilzAdam/economy
22:45 PilzAdam only the level stuff, though
22:45 PilzAdam let me explain how it works:
22:45 PilzAdam each player has levels, each level has a name and a rating
22:45 PilzAdam the levels are stored in this table: https://github.com/PilzAdam/economy/blob/master/mods/crafting/init.lua#L2
22:47 PilzAdam craftings can say that the player has to have at least a certain rating for a level
22:47 PilzAdam like this: https://github.com/PilzAdam/economy/blob/master/mods/default/crafting.lua#L22
22:47 PilzAdam in this example only players, that have the a rating of 1 or higher in "wood" can craft sticks
22:48 PilzAdam todo: save the playerlevels table to a file
22:48 PilzAdam add the crafting time thing
22:49 PilzAdam I also need to implement it for the furnace
22:50 MinerofLands nice
22:50 MinerofLands very nice
22:50 PilzAdam also a way for players to raise their levels is needed
22:51 PilzAdam MinerofLands, can you make all the levels for the default craftings?
22:51 PilzAdam this wood thing is just for testing
22:52 MinerofLands sure i guess...is this gonna be in the default game?
22:52 PilzAdam no, it will stay a seperate game
22:52 MinerofLands ohh ok :D
22:52 PilzAdam it also doesnt break the default craftings
22:52 MinerofLands so i add this to everything? level = {wood=1},
22:53 PilzAdam yea, but also things like "stone", "tool" or whatever you want
22:53 PilzAdam e.g. an iron pickaxe can require tool=2 and iron = 1
22:53 MinerofLands ahh ok
22:54 PilzAdam smelting iron could be iron=2, so making a pickaxe is easier than making the iron yourself
22:54 PilzAdam -> you need to buy it
22:54 PilzAdam (until your iron level is high enough)
22:55 PilzAdam this has a lot of potential
22:56 MinerofLands ok...when im done with it..should i commit?
22:56 PilzAdam do you have a github account? I can add you to the repo
22:56 PilzAdam or you fork and pull request
22:58 MinerofLands this is my github
22:58 MinerofLands https://github.com/LandMineMT
22:58 PilzAdam but I really suggest you to think about a good system before doing anything
22:58 MinerofLands ok ill give it some thought
22:58 PilzAdam also, I have no idea how players can get the levels
22:59 PilzAdam the crafting levels are based on that, so you need an idea for that first
22:59 PilzAdam maybe you can buy levels? or increase them by doing stuff, e.g. stone gets increased when digging stone
23:00 MinerofLands yeah when you dig the nodes
23:00 MinerofLands and buy them
23:00 MinerofLands also learn them from books of some sort
23:00 PilzAdam I guess this will only work in multiplayer
23:00 MinerofLands yeah
23:01 MinerofLands like swords can be require swordman = 1 and will increase with mobs killed (simplemobs) or players killed
23:04 MinerofLands the more swordman level you have, you can make better swords and if possible do a bit more damage
23:04 MinerofLands so a wood sword would be swordman = 1, wood = 1
23:04 MinerofLands etc
23:08 PilzAdam ok, good furnace working
23:08 MinerofLands nice
23:08 PilzAdam it checks the levels when the player tries to place the item in the furnace
23:10 MinerofLands k...did you add me to the repo? if no ill just fork it lol that way you can review it
23:10 MinerofLands first
23:10 PilzAdam yea, better fork it
23:11 PilzAdam easier to handle merge conflicts
23:11 PilzAdam https://github.com/PilzAdam/economy/commit/fe17aa3dc550859cf4e623787a4eb402f6d7f378
23:13 MinerofLands how does my fork update when you commit?
23:16 PilzAdam https://help.github.com/articles/fork-a-repo#step-3-configure-remotes
23:26 PilzAdam MinerofLands, https://github.com/PilzAdam/economy/commit/6bd53c97564906c61e750416f09f7c03d62061e8
23:26 MinerofLands it writes it to a file ?
23:26 PilzAdam syntax for the comman is: /set_skill singleplayer wood 1
23:27 PilzAdam yes, its saved in worldirectory/playerskills
23:28 MinerofLands nice...but that means i have to give them skills they cant get them on their own rihgt?
23:29 PilzAdam well, currently there is only the command; but there definetly needs to be an automatic way to set the skills
23:29 PilzAdam e.g. it increases if you killed 10 mobs or so
23:29 PilzAdam but the basic system is pretty much done now
23:30 MinerofLands yup...its gonna be cool
23:30 PilzAdam hmmm.... I dont know if the crafing time thing is really needed
23:30 MinerofLands no i really dont think so
23:31 PilzAdam it would be a PITA to implement
23:31 MinerofLands lol yeah
23:32 PilzAdam oh, you need to give each player his own workbench at the beginning
23:32 MinerofLands should i add the levels to the crafts now? or later? and ok i will
23:32 MinerofLands is it in the default?
23:32 PilzAdam I suggest to do this when granting people interact
23:32 MinerofLands or use the workbench mod
23:32 PilzAdam the itemname is "crafting:workbench"
23:33 MinerofLands ohh ok
23:33 MinerofLands got it
23:33 PilzAdam I guess you can do the levels now; and also add all the mods you want
23:34 PilzAdam then we only need to implement the skill increasing thing and we are done
23:34 MinerofLands alrighty..just let me get this upstream working :D
23:35 PilzAdam I guess it would be best if someone writes down a whole skill system
23:35 PilzAdam wich contains how you get the skills and what skills are needed to craft things
23:35 PilzAdam I can implement the rest
23:35 PilzAdam s/the rest/it
23:36 MinerofLands ohh like in a notepad?
23:36 MinerofLands lol
23:37 PilzAdam maybe ask at the forum for some ideas
23:38 MinerofLands alright...ill make a thread containing how i think it should be and let others build on it
23:38 PilzAdam make sure to explain how the undelying system works
23:39 MinerofLands alright
23:40 PilzAdam and we also need to add the economy stuff
23:41 MinerofLands i was thinking this mod
23:41 MinerofLands http://forum.minetest.net/viewtopic.php?id=4111
23:43 PilzAdam hmmm
23:43 MinerofLands what? or did you want to make a custom one?
23:44 PilzAdam that doesnt really fit what I think (http://forum.minetest.net/viewtopic.php?pid=93126#p93126)
23:44 PilzAdam just one shop at the spawn that sells every node
23:44 PilzAdam player should not craft money, the only way to get it is by selling nodes
23:45 MinerofLands that is true
23:45 PilzAdam I guess I have to write my own
23:45 MinerofLands but still players should have the ability to seel stuff
23:45 MinerofLands sell**
23:45 PilzAdam sure
23:45 PilzAdam and since we can modify every single node the "worthiness" field would be quite nice
23:46 MinerofLands indeed
23:46 MinerofLands so the pirce iwll depend on worthiness? not a custom one?
23:46 MinerofLands price will**
23:46 PilzAdam yes, buying = worhtiness + 10% and selling worhtiness - 10%
23:47 PilzAdam this could work quite well since there are only one (or maybe a few more) shops in the world that are owned by "the server"
23:48 PilzAdam they have infinite resource, of course
23:48 PilzAdam somewhat like the creative inventory
23:48 MinerofLands ahhh i see
23:49 PilzAdam the benefit of this is that it doesnt depend on the number of players that are playing
23:50 PilzAdam the downside is that it isnt a "real" economy
23:50 PilzAdam but a "real" economy would impossible, I think
23:50 PilzAdam so this should work quite well for a normal minetest server
23:51 MinerofLands yeah
23:52 MinerofLands still ill add the levels tomorrow im busy atm heh....ill make the thread though in a couple of minutes
23:53 PilzAdam sure, not hurry
23:53 PilzAdam *no
23:53 PilzAdam I need some textures for the shop sometimes

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