[Mod] Player Classes [0.1.3] [classes]
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
[Mod] Player Classes [0.1.3] [classes]
Playable Classes
Introducing some role-play into minetest. Playable character classes, currently include human, dwarf and elf.
To change class issue the chat command: /class human | dwarf | elf
To view your current class simply type /class
Changing class requires the 'class' privilege.
Default class can be set via minetest.conf, eg: classes_default_class = dwarf
Screenshot:
Minetest version: 0.4.7
Depends: default
License Textures:
character_human.png - Sam II by Jordach (CC-BY-SA-NC)
character_dwarf.png, character_elf.png - Copyright (C) 2013 Stuart Jones (CC-BY-SA)
License Source Code: Copyright (C) 2013 Stuart Jones - WTFPL
Download: https://github.com/stujones11/minetest- ... master.zip
GitHub: https://github.com/stujones11/minetest-classes
Mod Release: Fri, 15 Mar 2013
Version: 0.1.1 Mon, 18 Mar 2013
Made some minor code improvements and updated dwarf models. Functionality should not be affected.
Version: 0.1.2 Thu, 11 Jul 2013
Classes now effect the player physics and base armor level.
Dwarf is the toughest but moves more slowly.
Elf is the quickest but is more susceptible to damage.
Human is currently unchanged.
Restructured the code to allow for easy customization with classes:register_class()
see init.lua for example usage.
Added default skins for the elf and dwarf models.
Note, these will be overridden if you use any skin changing mods.
Currently not compatible with the minetest-3d_armor modpack, however, support will be re-added as soon as possible.
Mod Updated: Sat, 13 Jul 2013
Version: 0.1.3
Updated models and textures.
Added human model & skin (Sam II by Jordach)
To Do
Maybe play with the scale of the models some more, opinions are welcome here.
Please let me know if you find any bugs.
Cheers!
Introducing some role-play into minetest. Playable character classes, currently include human, dwarf and elf.
To change class issue the chat command: /class human | dwarf | elf
To view your current class simply type /class
Changing class requires the 'class' privilege.
Default class can be set via minetest.conf, eg: classes_default_class = dwarf
Screenshot:
Minetest version: 0.4.7
Depends: default
License Textures:
character_human.png - Sam II by Jordach (CC-BY-SA-NC)
character_dwarf.png, character_elf.png - Copyright (C) 2013 Stuart Jones (CC-BY-SA)
License Source Code: Copyright (C) 2013 Stuart Jones - WTFPL
Download: https://github.com/stujones11/minetest- ... master.zip
GitHub: https://github.com/stujones11/minetest-classes
Mod Release: Fri, 15 Mar 2013
Version: 0.1.1 Mon, 18 Mar 2013
Made some minor code improvements and updated dwarf models. Functionality should not be affected.
Version: 0.1.2 Thu, 11 Jul 2013
Classes now effect the player physics and base armor level.
Dwarf is the toughest but moves more slowly.
Elf is the quickest but is more susceptible to damage.
Human is currently unchanged.
Restructured the code to allow for easy customization with classes:register_class()
see init.lua for example usage.
Added default skins for the elf and dwarf models.
Note, these will be overridden if you use any skin changing mods.
Currently not compatible with the minetest-3d_armor modpack, however, support will be re-added as soon as possible.
Mod Updated: Sat, 13 Jul 2013
Version: 0.1.3
Updated models and textures.
Added human model & skin (Sam II by Jordach)
To Do
Maybe play with the scale of the models some more, opinions are welcome here.
Please let me know if you find any bugs.
Cheers!
Last edited by stu on Sat Jul 13, 2013 21:04, edited 1 time in total.
- BrandonReese
- Member
- Posts: 839
- Joined: Wed Sep 12, 2012 00:44
- GitHub: bremaweb
- IRC: BrandonReese
- In-game: BrandonReese
- Location: USA
Obviously dwarves would be able to mine faster, or their mining tools last longer.
My Twitch Channel - https://www.twitch.tv/brandonreese81/profile
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
I THINK you can set the max HPs of players on the fly using ObjectRef:set_properties just like you can update the visual (mesh, textures). I haven't tried it though. Maybe also makes_footstep_sound (for stealthy elves)?
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Interesting, too late tonight but I will definitely be looking into that tomorrow. Love the footsteps idea also, if that can be done.prestidigitator wrote:I THINK you can set the max HPs of players on the fly using ObjectRef:set_properties just like you can update the visual (mesh, textures). I haven't tried it though. Maybe also makes_footstep_sound (for stealthy elves)?
Thanks for the tip!
- Likwid H-Craft
- Member
- Posts: 1113
- Joined: Sun Jan 06, 2013 14:20
- Location: Lost in Crypt
■IDEA■
Class Should spawn with some different weapons, and if you can make it work we can make TFTest
Class Should spawn with some different weapons, and if you can make it work we can make TFTest
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
http://likwidtest.hj.cx/ (Not Done)
Good work and thanks for using some of my skins in your mods.
Sometimes, it's harder to think up a mod than it is to create it.
Mods: Orichalcum Stonebricks Extra Chests
Mods: Orichalcum Stonebricks Extra Chests
This might be a interesting direction for minetest to go to.
For expansion:
Elves could have better/stronger/faster/further bows. Run faster, sneak further.
Dwarves could have more hearts, but no fast.
Humans could stay default, but maybe have strong longswords, ability to use horses (ostriches)
Other races: Orc's, undead, giants, babarians, mechanical race etc...
Just the standard Fantasy settings.
Edit: Typo
For expansion:
Elves could have better/stronger/faster/further bows. Run faster, sneak further.
Dwarves could have more hearts, but no fast.
Humans could stay default, but maybe have strong longswords, ability to use horses (ostriches)
Other races: Orc's, undead, giants, babarians, mechanical race etc...
Just the standard Fantasy settings.
Edit: Typo
Last edited by Topywo on Sat Mar 16, 2013 13:19, edited 1 time in total.
lol that is what i am doing with my npcs
Topywo wrote:This might be a interesting direction for minetest to go to.
For expansion:
Elves could have better/stronger/faster/further bows. Run faster, sneak further.
Dwarves could have more hearts, but no fast.
Humans could stay default, but maybe have strong longswords, ability to use horses (ostriches)
Other races: Orc's, undead, giants, babarians, mechanical race etc...
Just the standard Fantasy settings.
Edit: Typo
Coding;
1X coding
3X debugging
12X tweaking to be just right
1X coding
3X debugging
12X tweaking to be just right
By overriding the regular crafting grid with your own, you can make it so each craft turns into a different object. For instance, if the class is dwarf, you get classes:pick_mese_dwarf, which has different properties then classes:pick_mese_elf. When changing classes, loop through the inventory to update these. Chests are a problem, though.jojoa1997 wrote:lol that is what i am doing with my npcsTopywo wrote:This might be a interesting direction for minetest to go to.
For expansion:
Elves could have better/stronger/faster/further bows. Run faster, sneak further.
Dwarves could have more hearts, but no fast.
Humans could stay default, but maybe have strong longswords, ability to use horses (ostriches)
Other races: Orc's, undead, giants, babarians, mechanical race etc...
Just the standard Fantasy settings.
Edit: Typo
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
I was wrong about the HP thing. I just found a place in the C++ source code that where it is very obvious the number of max HP of a player is static. I believe you can change it for Lua (non-player) entities, but you definitely can't (at this point) for players.prestidigitator wrote:I THINK you can set the max HPs of players on the fly using ObjectRef:set_properties just like you can update the visual (mesh, textures). I haven't tried it though. Maybe also makes_footstep_sound (for stealthy elves)?
First of all congratulations, I have not tried this mod but I think that is the right way.
I have already written about this topic:http://forum.minetest.net/viewtopic.php?id=2434&p=12
What that could differentiate the races:
-a different diet (dwarf like potatoes, but are allergic to apples);
-different mobile capabilities (max speed, acceleration, max jump height);
-physical characteristics (collision box, weight);
different-sized inventory (4x8, 5x9, 3x7);
These are just examples.
So we would have a system roguelike.
I have already written about this topic:http://forum.minetest.net/viewtopic.php?id=2434&p=12
What that could differentiate the races:
-a different diet (dwarf like potatoes, but are allergic to apples);
-different mobile capabilities (max speed, acceleration, max jump height);
-physical characteristics (collision box, weight);
different-sized inventory (4x8, 5x9, 3x7);
These are just examples.
So we would have a system roguelike.
sorry for bad english
Linux debian 7 wheezy 64
kde
Linux debian 7 wheezy 64
kde
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
Love your skins Chinchow, thank you for making them available.Chinchow wrote:Good work and thanks for using some of my skins in your mods.
Interesting ideas, I will try to incorporate as many as I can. Although we do need to be careful not to give one particular class an obvious unfair advantage over others.Topywo wrote:This might be a interesting direction for minetest to go to.
For expansion:
Elves could have better/stronger/faster/further bows. Run faster, sneak further.
Dwarves could have more hearts, but no fast.
Humans could stay default, but maybe have strong longswords, ability to use horses (ostriches)
Other races: Orc's, undead, giants, babarians, mechanical race etc...
More classes may well be added in future. I'm really leaving it up to the community to decide the direction of this mod.
I was thinking along these same lines myself but then what about tools/weapons included by other mods?rarkenin wrote:By overriding the regular crafting grid with your own, you can make it so each craft turns into a different object. For instance, if the class is dwarf, you get classes:pick_mese_dwarf, which has different properties then classes:pick_mese_elf. When changing classes, loop through the inventory to update these. Chests are a problem, though.
No problem, I kinda suspected this. Thanks for your help all the same.prestidigitator wrote:I was wrong about the HP thing. I just found a place in the C++ source code that where it is very obvious the number of max HP of a player is static. I believe you can change it for Lua (non-player) entities, but you definitely can't (at this point) for players.
Once again, great ideas, not sure which are easily doable with the current lua api.pandaro wrote:First of all congratulations, I have not tried this mod but I think that is the right way.
I have already written about this topic:http://forum.minetest.net/viewtopic.php?id=2434&p=12
What that could differentiate the races:
-a different diet (dwarf like potatoes, but are allergic to apples);
-different mobile capabilities (max speed, acceleration, max jump height);
-physical characteristics (collision box, weight);
different-sized inventory (4x8, 5x9, 3x7);
These are just examples.
So we would have a system roguelike.
collision box is certainly possible, though I'm not sure what the effects would be.
different-sized inventory is an interesting one too.
Really glad you like it Mito, much of the inspiration to do this came from seeing your Dwarves game. I would especially like to hear your ideas to expand on this mod.Mito551 wrote:you know who already screams like a little girl seeing this mod? that' right, i do! added in my dwarves game
Thanks to everyone who has replied.
PS. There has been a minor update. I added registration of the 'class' privilege and removed some redundant code. It worked fine for me without the reg but I thought I best include it for completeness.
I also updated the 3d_armor dwarf model as I added the wrong one in the initial commit.
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
How about this? It should be pretty easy to add things in the world (nodes and entities) that behave differently toward different races. For example:
- Dwarven Furnace: Produces output faster, produces more output, and/or consumes less fuel when stoked by a dwarf.
- Secret Door/Chest/Compartment: Every time you pass by or somehow interact with this item, it has a chance of revealing a secret in some way, and different races might have different chances of detecting the secret (e.g. twice as likely for elves). This could be a door that becomes visible when you get close, a clue that pops up to a player in chat or with a formspec, an extra secret compartment that appears when you open a chest, etc.
- Racist NPCs: Certain mobs could react differently to different races. For example, trolls might really like to eat elves, having a higher probability of going after them, or always attacking them instead of other targets if both are in range. Or some shop keepers may refuse to sell to anyone who isn't human.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
I recommend you either add a mod_pack.txt file to the root folder, or move the init.lua file to the root file.
It allows for better mod editing with git. (you can test your mod with out moving the files to minetest/mods and then moving them back)
It allows for better mod editing with git. (you can test your mod with out moving the files to minetest/mods and then moving them back)
Last edited by rubenwardy on Mon Mar 18, 2013 13:11, edited 1 time in total.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Also, it might be better to use register_chatcommand on this function
i haven't noticed the update in the topic...?stu wrote: I also updated the 3d_armor dwarf model as I added the wrong one in the initial commit.
and where are the textures?
Last edited by Mito551 on Mon Mar 18, 2013 13:52, edited 1 time in total.
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
I added modpack.txt though I have no idea why it is needed. I have seen this file in other mods before but never understood its purpose. Any idea where I can find documentation on this?rubenwardy wrote:I recommend you either add a mod_pack.txt file to the root folder, or move the init.lua file to the root file.
It allows for better mod editing with git. (you can test your mod with out moving the files to minetest/mods and then moving them back)
Also, it might be better to use register_chatcommand on this function
My appologies, the topic has now been updated.Mito551 wrote:i haven't noticed the update in the topic...?
There are no textures. The skins pictured in the screenshot are from Player Skins, default and Chinchow respectively, they were used solely to demonstrate compatibility with the skins mod.Mito551 wrote:and where are the textures?
Last edited by stu on Mon Mar 18, 2013 20:16, edited 1 time in total.
-
- Member
- Posts: 647
- Joined: Thu Feb 21, 2013 23:54
I think it might be in the main wiki under mods somewhere. But in any case it is really simple. The presence of the text file tells Minetest not to use the directory as a mod (look for init.lua), but to instead treat each of its subdirectories as a mod. There doesn't have to be anything IN the text file; it can be (and I think it is supposed to be) empty (except for optional comment lines beginning with # that have absolutely no effect on behavior).stu wrote:I added modpack.txt though I have no idea why it is needed. I have seen this file in other mods before but never understood its purpose. Any idea where I can find documentation on this?
Last edited by prestidigitator on Mon Mar 18, 2013 20:29, edited 1 time in total.
- stu
- Member
- Posts: 923
- Joined: Sat Feb 02, 2013 02:51
- GitHub: stujones11
- Location: United Kingdom
I managed to find the relevant info right near the top of lua_api.txt and what you are saying is perfectly correct of course. Thanks again.prestidigitator wrote:I think it might be in the main wiki under mods somewhere. But in any case it is really simple. The presence of the text file tells Minetest not to use the directory as a mod (look for init.lua), but to instead treat each of its subdirectories as a mod. There doesn't have to be anything IN the text file; it can be (and I think it is supposed to be) empty (except for optional comment lines beginning with # that have absolutely no effect on behavior).stu wrote:I added modpack.txt though I have no idea why it is needed. I have seen this file in other mods before but never understood its purpose. Any idea where I can find documentation on this?
Last edited by stu on Mon Mar 18, 2013 20:46, edited 1 time in total.
Who is online
Users browsing this forum: Bing [Bot] and 71 guests