[Mod] SkillsFramework [0.4] [skillsframework]

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] SkillsFramework [0.2] [skillsframework]

by 4aiman » Wed May 13, 2015 07:09

I haven't read all those previous messages - I've got 1 simple question: You haven't find a way to speed-up digging times with Lua, have you? ;)
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.2] [skillsframework]

by domtron vox » Mon May 18, 2015 02:52

4aiman wrote:I haven't read all those previous messages - I've got 1 simple question: You haven't find a way to speed-up digging times with Lua, have you? ;)


I have not tried to solve that problem yet. Testing has been very rudimentary since the mod is still under heavy development. Just enough testing has been done to root out obvious bugs.
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.3] [skillsframework]

by domtron vox » Mon May 18, 2015 02:53

Update 0.3


Changes
  • Formspec added. (TeTpaAka)
  • Try skill removed. Use setters for modifying level/experience values and getters for making tests (threshold, level of success, ect).
  • Skillsets only store uniqe information (level & experience) instead of just coping the skill definition. Old skillset save files are now invalid. Skillset save files should be much smaller.
  • Skills are now refrenced with modname:skillname form that MT uses.
  • define_skill renamed to register_skill. Now takes a table instead of 3 aguments. Table must have registering mod name, skill name, and level cost function or the registration will fail.
  • Level caps now implemented. See updated readme for how to set it.
  • Updated chat command: /skills lists skill names; /skills <name> lists skill level and experience; /skills @gui opens skills formespec.

Issues
  • Formspec shows the same skills on each page.
  • Sometimes formspec does not open when the chat command is called.
  • Only rudementry testing has been done. Other bugs may exist and high load testing has not been done.

Features for Next Version (post feedback below please)
  • New callback: on_levelup. Called when a natural level up occures, that is when set or add experience causes a level up. Will NOT be called if set level is called.
  • Adding skills to a skill set. Function for adding an individual skill. Function for adding a collection of skills.
  • Other things as they come up.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] SkillsFramework [0.3] [skillsframework]

by Minetestforfun » Fri Jul 17, 2015 13:40

Is this mod keep is updates ? the Questframwork is now over, so combined with this mod we can create RPG world :)
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.3] [skillsframework]

by domtron vox » Wed Jul 29, 2015 17:58

I am still alive and was working on this mod just the other day. I have lost my internet connection for a while but should be getting it back soon.

I found a major bug with .3. When a skill cap isn't defined bad stuff happens. It is fixed on my local repository but I haven't been able to push it out to github. Sorry.

I should have .4 done soon.

I do have a question. I'm trying to fix an issue where clicking on the different tab header buttons actually shows different skills. Aparently my function that is passed to register_on_player_recived_fields never gets called. this is where it is in the code: https://github.com/DomtronVox/minetest- ... it.lua#L53

Aparently something gets printed by minetest when I click on the tab buttons. Only thing I can think of is that my minetest version is old. (don't know it off the top of my head but it was the latest git 4 months back maybe?) Help would be appreciated.
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.3] [skillsframework]

by domtron vox » Fri Jul 31, 2015 23:53

@everamzah: The show_formspec called in that function is the SkillsFramework one which sets up the skills formspec then calls minetest.show_formspec correctly so that isn't it. :/ Thank you for looking at it though. :)
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.3] [skillsframework]

by domtron vox » Wed Aug 05, 2015 14:07

Hi, just letting people know I pushed my local repo to the github one(14 commits). I'm not quite at a release yet, still need to work the api changes into the README file, but I have added two pieces of functionality and did some bug fixes. Skillsets can have individual skills added to them at creation with attach_skillset or anytime with append_skills. Also added an on_levelup callback. Also note that define_skill's data table now expects "cost_func" key instead of "level_func".

There is documentation in the code so you could go ahead and use it if you want or wait a week or so for the release. I may also switch over to the 'self' notation someone mentioned earlier in the post. If you use it and find bugs please post the error message you get(the whole log so I can look for any messages put out by SkillsFramework). Thanks.
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by domtron vox » Sun Aug 09, 2015 21:39

Update .4

Changes
  • SkillsFramework.attach_skillset can be given an array of skills as the second argument which will be added to the new skillset. Passing it nil will add all defined skills.
  • SkillsFramework.append_skills was added. It takes a set_id and a list of skills or a single skill and adds them to an existing skillset.
  • Added the settings option starting_skills which lets you list what skills a new player will be given. Set it to empty table to give them no skills or nil to give them all defined skills.
  • Changed the "level_func" key to "cost_func" in the define_skill data table. You will get errors if you do not update your skill definition tables.
  • Added an "on_levelup" key to the define_skill data table. Assign a function to this value and it will be called after a natural levelup, experience >= next level's experience cost.
  • Standardized error messages.
  • Added three internal functions for common tests and made sure all the code was calling them.
  • fixed a few bugs.

Features for Next Version (post feedback below please)
  • Try to get tabs on the formspec to work.
  • Basic server environment testing.
  • Work on issue where adding new skills to an existing server/game does not get propagated to all players.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun
 

mad science
New member
 
Posts: 2
Joined: Wed Jul 08, 2015 18:40
GitHub: bwildman14

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by mad science » Tue Sep 22, 2015 01:40

I'm trying to put together a game with this.
but my lua is not so good
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by domtron vox » Tue Sep 22, 2015 21:55

Hay I'm really busy but if you want to learn lua there are lots of tutorials online like this one: http://www.lua.org/pil/contents.html (actually this is the official one)

also one of the minetest members have put together an online book specifically for minetest modding which will help you in making a game as well as your own mods. This is the url http://rubenwardy.com/minetest_modding_book/

You should start by making a few mods before tackling a game since making a good game is much harder then making a good mod, but both use the same concepts.

Specifically for my mod the skillframework_example archive attached to the first post is a working example with lots of comments explaining what is going on. If it is unclear please tell me so I can improve it for others.

I hope that helps. :)
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by TheReaperKing » Wed Sep 07, 2016 00:42

I haven't successfully got it working yet but I absolutely love the idea!! Please don't give up on this! :)
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by domtron vox » Wed Sep 07, 2016 01:02

@TheReaperKing: glad to hear you are interested in it and sorry to hear you are having trouble with it. I have been very busy this summer and am just starting my last(I hope) year of college so I haven't had time to work on this.

If I remember right the repo has commits for 0.5 but I needed to test them before doing an "actual release." So if you are having problems you might want to try checking out the 0.4 tag instead of master. Also feel free to post your error message or other problem here. While I don't check the forms right now I will get an email notification of your post. However, I can't guaranteee I'll have time to look into it right away, Because School. ;.;

0.5 was supposed to introduce "migrations" so that people will not lose saved skill data between updates that change the skillset save file. I have no clue why I didn't think of it before. There were some other things also but I cannot remember them.

Also a big thing holding back skills being effective is that you cannot really change overall speed of a tool without redefining that tool. (To my knowledge anyway) I have a vauge idea on how to fix it but that requires 1)fleshing the idea out, 2) proposing the engine changes to the devs, and 3)Implementing them myself or waiting for someone else to do so.

Aaaand this is longer than I was meaning to do. As usual. >.> :P
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by TheReaperKing » Wed Sep 07, 2016 02:21

The main problem I was having, and it simply could be just from needing more testing, was I loaded your .4 example and the mod and when I did /skills it mentioned the Digging, Sword um fighting I think, and Woodcutting but when I did /skills Digging it said that it was not a proper skill. I was also trying to find out how to load that nice GUI you have of the progress but maybe I didn't read enough. I'm testing it with my middle school students which probably isn't the best test environment since they are always complaining about something haha.

This also reminds me of a minecraft mod I once played where what actions you do increases your skill and for me I did a lot of archery so it made me a very good hunter. It added so much more to the game and I think I'm correct in that your mod does something very similar. It also adds kind of a natural "jobs" talent increase too. I'd love to even hopefully be able to expand it to say an engineer crafting wires would be able to produce extra wires as he got better or even new items. Maybe I'm getting ahead of myself, but I think your mod has so much potential.

Also I haven't looked at it in a bit but I believe cd2 is doing something similar to this in rpgtest and also this progress tree mod:
viewtopic.php?f=9&t=14052

I'm mentioning that just for inspiration and possible collaboration purposes but perhaps even the progress tree and your mod could even work together so after a certain level it opens a new tree of skills or whatever. Just ideas.

I'm so excited to see that you are still kicking and thank you for responding. I'll be sure to have the gremlins testing more tomorrow :)

For the tool problem, what if you just created new default tools that had the ability to scale? Like maybe even level one, level 2, etc and they do different damage amounts. They could even look the same as the default and use the majority of the code. Perhaps even a "fleshy = flesh+1" on level ups for example of the bow. Of course I'm a horrible coder so that could be not a great idea but hopefully it can help :)

I realize how busy college is and no rush and thanks for the time you've given me! Have a great night and good luck on your courses! Take care.
-Mike
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by domtron vox » Wed Sep 07, 2016 02:44

ok. The chat commands are a bit picky as I didn't put too much time into them. They are sensitive to capitalization so if you typed "/skills Digging" and the skill is actually called digging it will have an error. So use the exact name that "/skills" provides.

As for the gui there is some sort of engine bug where it will not always pull up when you send the chat command, which is "/skills @gui". I have had to do it twice in a row and sometimes have to walk the character around a bit and send the command again before it will pull up. I know, it is wired. I actually intened the gui part to be used in conjunction with an inventory mod that allows custom buttons. (I think inventory+ does?) If you go that route you need the button to call SkillsFramework.show_formspec(). I never got around to trying it myself though so no clue if it will work.

Edit: also that mod you linked looks interesting. The way I do it should work with that mod. Basically you just enable a skill for a specific skillset. So you can enable a skill for a player when he finishes a quest, reads a book, talks to an npc, gets a certain level in another skill (the example does this for digging>mining), ect.
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by TheReaperKing » Wed Sep 07, 2016 03:02

Thanks for the heads up on the gui! I'll give that a whirl at school tomorrow. I did try both digging and Digging. It does have it as "Digging" when I typed /skills so I tired it both ways just in case. Also I did do mining but not sure I had a chance to do any actual digging so maybe that was the problem. In any case I'd be excited to keep you posted. Thank you again for your hard work! Hopefully my feeble mind can comprehend all of the awesomeness you put into it :)
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by domtron vox » Wed Sep 07, 2016 03:06

With how it was set up you won't get any mining experiance without geting like level 3 digging. Glad you like it. :)
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by TheReaperKing » Wed Sep 07, 2016 03:12

I'm going to dig it to the max tomorrow!!
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by TheReaperKing » Thu Sep 15, 2016 15:14

At school we are running into this error which seems to end up being player specific. I haven't been able to verify it yet but I believe right when a certain player joins the server that it gives the crash, after they've first created the crash. I thought it might be level related so I had another student do the same activity (in this case digging stone) but he was unable to make it crash. It has happened in two different classes/worlds as well. If there are other things you'd like to me try to test to help diagnose the problem please let me know. In the meantime I will be trying to make it crash myself and perhaps having the kids whose accounts are crashing the server just make new ones. Thanks for your time!

Looks like I didn't remember to include it in the code but I believe of mining stone, and I believe that it was the the same for both servers.

Code: Select all
2016-09-14 10:49:29: ERROR[Main]: ServerError: Lua: Runtime error from mod '*builtin*' in callback luaentity_Step(): /home/m/.minetest/mods/skillframework_examples/init.lua:93: attempt to index local 'digger' (a nil value)
2016-09-14 10:49:29: ERROR[Main]: stack traceback:
2016-09-14 10:49:29: ERROR[Main]:    /home/m/.minetest/mods/skillframework_examples/init.lua:93: in function 'callback'
2016-09-14 10:49:29: ERROR[Main]:    /usr/local/share/minetest/builtin/game/falling.lua:92: in function </usr/local/share/minetest/builtin/game/falling.lua:43>


EDIT - I'm testing with digger = String, and it seems to work so far. I went on the students account and haven't gotten it to crash. Going to test with the other class tomorrow too.
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
domtron vox
Member
 
Posts: 111
Joined: Thu Feb 20, 2014 21:07
GitHub: DomtronVox
IRC: Domtron
In-game: Domtron

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by domtron vox » Thu Sep 15, 2016 20:37

I'm am please it is working at all on a server. I did next to no testing in a multiple user environment. :)

I don't know how much I can help you right now with school and all. I'm having some trouble understanding the situation exactly from what you said. Basically you have a number of people on a server and the server sometimes crashes right after someone joins and you think it might only be happening for a specific person. Does that sound about right?

Try putting a print statement just before line 93 where the error is happening. Looks like it has something to do with the digger object not being a player object which doesn't make sense to me but is the only thing I can think of off the top of my head. Maybe there was an API change I did not know about.

Also try sending me the skillset save file that is in your world data folder. It has player names in it so if you want to keep that private for some reason (I know this is a school setting) you can PM/email it to me. If your not comfortable for me to have the names either, the file is just a text file that can be edited in most text editors so you could redact usernames.
 

twoelk
Member
 
Posts: 1353
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by twoelk » Thu Sep 15, 2016 21:06

maybe the username itself or something attached to the user avatar like his personal inventory or skills data is the problem. maybe the mod cannot parse the input when interacting with this username. Does he have any special characters in his name or is it overly long? does he have a speciall set of skills?
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by TheReaperKing » Thu Sep 15, 2016 23:23

I'm at home now so I don't have access to those files but I'll be sure to add in the print.

You are correct, it seemed to crash if only one specific student was trying to login. He was successfully using skills for a bit but once he crashed it, it was every time he logged in, I'm not sure he was able to even do anything before it'd crash. There were no special characters in his first name and no extra skills, only what is in the 0.4 example.

It did crash with my other class too that is in survival so I'll be trying with the "digger = String," addin I did too and see if it still crashes. The class I tried it with today I was unable to make it crash even when I went on his account and mined stone and dug sand, the main things he had been doing before the initial crash.
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
TheReaperKing
Member
 
Posts: 531
Joined: Sun Nov 22, 2015 21:36

Re: [Mod] SkillsFramework [0.4] [skillsframework]

by TheReaperKing » Fri Sep 16, 2016 22:35

Just an update, ever since I added "digger = String," it hasn't crashed for either class and the students are successfully leveling up. I saw the variable wasn't initialized anywhere so that's why I tried that and it seemed to work. Not that I know much about coding but hopefully that was the correct idea :)
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

PreviousNext

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 15 guests