[Mod] XP [1.0][experience]
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
[Mod] XP [1.0][experience]
This adds in XP orbs, and rewards from xp.
How does one get xp? Well you have to assign some ores to the group xp=1 for this to work. when you dig an ore with xp=1 group, you get an orb and you just might level up.
a player loses all xp on death.
There is a neat level up sound.
SCREENSHOT
Download
License: dwtfywt
How does one get xp? Well you have to assign some ores to the group xp=1 for this to work. when you dig an ore with xp=1 group, you get an orb and you just might level up.
a player loses all xp on death.
There is a neat level up sound.
SCREENSHOT
Download
License: dwtfywt
Last edited by jordan4ibanez on Thu Oct 04, 2012 18:09, edited 1 time in total.
hello, am program. do language in rust. make computer do. okay i go now.
+1PilzAdam wrote:Yay! We are finaly Minecraft! </ironic>
Last edited by Mito551 on Thu Oct 04, 2012 18:47, edited 1 time in total.
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
-
- Member
- Posts: 211
- Joined: Tue Jul 31, 2012 20:37
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
in an ore's group, like {cracky=1,chewy=2,xp=1}leo_rockway wrote:I'm sorry, I don't see where to add this. Can you be more specific? Thank you.jordan4ibanez wrote:This adds in XP orbs, and rewards from xp.
How does one get xp? Well you have to assign some ores to the group xp=1 for this to work.
hello, am program. do language in rust. make computer do. okay i go now.
-
- Member
- Posts: 211
- Joined: Tue Jul 31, 2012 20:37
Oh, gotcha. Thanks a lot.jordan4ibanez wrote:in an ore's group, like {cracky=1,chewy=2,xp=1}leo_rockway wrote:I'm sorry, I don't see where to add this. Can you be more specific? Thank you.jordan4ibanez wrote:This adds in XP orbs, and rewards from xp.
How does one get xp? Well you have to assign some ores to the group xp=1 for this to work.
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
what kind of rewards? how do you use them. i'm not convinced
the mc lacks it as well. proper xp usage.
the mc lacks it as well. proper xp usage.
Last edited by Mito551 on Fri Oct 05, 2012 04:04, edited 1 time in total.
-
- Member
- Posts: 211
- Joined: Tue Jul 31, 2012 20:37
Mito551 wrote:what kind of rewards?
level1 = 100
level1_drop = "default:steelblock 10"
level2 = 200
level2_drop = "default:steelblock 99"
level3 = 300
level3_drop = "default:mese 1"
level4 = 400
level4_drop = "default:mese 2"
level5 = 500
level5_drop = "default:mese 10"
level6 = 700
level6_drop = "default:mese 20"
level7 = 1000
level7_drop = "default:mese 30"
level8 = 1400
level8_drop = "default:mese 50"
level9 = 1800
level9_drop = "default:mese 70"
level10 = 2500
level10_drop = "default:mese 99"
- snakevenom
- Member
- Posts: 119
- Joined: Sat Sep 22, 2012 12:56
- Location: worthing
how can you assign ores to give you xp?
minetest rules!
http://minetest.net/forum/profile.php?id=3063
http://minetest.net/forum/profile.php?id=3063
-
- Member
- Posts: 570
- Joined: Fri Feb 17, 2012 21:55
- Location: Canada
Either a) edit init.lua or b) write a mod that redefines the defaults
We are what we create.
I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.
My github:
https://github.com/tinoesroho/
I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.
My github:
https://github.com/tinoesroho/
- SegFault22
- Member
- Posts: 872
- Joined: Mon May 21, 2012 03:17
- Location: NaN
Hmm, this could be useful - in the future when an experience system and job system is implemented (RPG forks of minetest), experience can add up as one does something according to their job (knight gives XP for killing mobs/enemies with a sword, giving special abilities like cover and guard as the levels increase; miner gives XP for mining ores and making new pickaxes, could increase drop rate from ores; etc etc etc.), causing them to be able to equip a job and abilities depending on the job (knight/mage gives 1 open slot for abilities and the other is for the default ability of that job; ''bare'' gives 2 free slots for abilities).
Thank you for making this great addition to Minetest.
Thank you for making this great addition to Minetest.
"All we need it the right major crisis and the nations will accept the new world order."
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
no problem bud, i wrote a better one, i will release it later thoughSegFault22 wrote:Hmm, this could be useful - in the future when an experience system and job system is implemented (RPG forks of minetest), experience can add up as one does something according to their job (knight gives XP for killing mobs/enemies with a sword, giving special abilities like cover and guard as the levels increase; miner gives XP for mining ores and making new pickaxes, could increase drop rate from ores; etc etc etc.), causing them to be able to equip a job and abilities depending on the job (knight/mage gives 1 open slot for abilities and the other is for the default ability of that job; ''bare'' gives 2 free slots for abilities).
Thank you for making this great addition to Minetest.
hello, am program. do language in rust. make computer do. okay i go now.
Re: [Mod] XP [1.0]
Hi
I get this error and the server crashes when i activate the mod in my server. In singleplayer mode is working. I use Minetest version 4.10.
I get this error and the server crashes when i activate the mod in my server. In singleplayer mode is working. I use Minetest version 4.10.
Code: Select all
terminate called after throwing an instance of 'ServerError'
what(): /home/spiros/.minetest/mods/experience/init.lua:68: attempt to index global 'xp' (a nil value)
stack traceback:
/home/spiros/.minetest/mods/experience/init.lua:68: in function '?'
/usr/share/minetest/builtin/game/register.lua:348: in function </usr/share/minetest/builtin/game/register.lua:336>
Aborted
- DevilRomeoAPLUS
- Member
- Posts: 38
- Joined: Sun Dec 14, 2014 10:53
- In-game: DevilRomeo2
- Location: Malaysia
Re: [Mod] XP [1.0]
Is this mod not compatible with better hud and hunger? I tried it and the xp bar is not shown
- TailsTheFoxDoes MT
- Member
- Posts: 415
- Joined: Mon Jan 18, 2016 20:50
- In-game: TailsTheFox
- Location: Mobius
Re: [Mod] XP [1.0]
Can u make it work for mobs upon death?jordan4ibanez wrote:This adds in XP orbs, and rewards from xp.
How does one get xp? Well you have to assign some ores to the group xp=1 for this to work. when you dig an ore with xp=1 group, you get an orb and you just might level up.
a player loses all xp on death.
There is a neat level up sound.
SCREENSHOT
Download
License: dwtfywt
I'm the TailsTMM of minetest, in other words, i rock.
BRAAAAAZZZZAAAA!!!!!!!!!!!!!!!!!!!!!!!!!!!
BTW it means TailsTheMeseMinecart, but that isn't my name, it's just a way of saying that i basically do the same thing Dantdm does but i do it with minetest And you problably can't see the invisible ink.
My mods:
My first mod:tails_boss
Mob_pack now has voice acting! Do you want YOUR VOICE included? Look in my posts for the thread!
BRAAAAAZZZZAAAA!!!!!!!!!!!!!!!!!!!!!!!!!!!
BTW it means TailsTheMeseMinecart, but that isn't my name, it's just a way of saying that i basically do the same thing Dantdm does but i do it with minetest And you problably can't see the invisible ink.
My mods:
My first mod:tails_boss
Mob_pack now has voice acting! Do you want YOUR VOICE included? Look in my posts for the thread!
- D00Med
- Member
- Posts: 949
- Joined: Sat Feb 07, 2015 22:49
- GitHub: D00Med
- Location: Australia...somewhere
Re: [Mod] XP [1.0]
Really nice mod!
I made some changes, which might be useful.
I made the texture much smaller(to be closer to the default textures) and added a hudbar. Fewer xp is required to gain levels but some of the rewards aren't as valuable(in my opinion).
Also, if anyone wants mobs from mobs_redo to drop experience when they die, add this to line 287 of api.lua in the mobs folder:
I made some changes, which might be useful.
I made the texture much smaller(to be closer to the default textures) and added a hudbar. Fewer xp is required to gain levels but some of the rewards aren't as valuable(in my opinion).
Also, if anyone wants mobs from mobs_redo to drop experience when they die, add this to line 287 of api.lua in the mobs folder:
Code: Select all
minetest.env:add_entity(pos, "experience:orb")
- Attachments
-
- experience(with hudbar).zip
- (49.85 KiB) Downloaded 165 times
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242
My subgame: viewtopic.php?f=15&t=14051#p207242
- TailsTheFoxDoes MT
- Member
- Posts: 415
- Joined: Mon Jan 18, 2016 20:50
- In-game: TailsTheFox
- Location: Mobius
Re: [Mod] XP [1.0]
ONLY mobs_redo?D00Med wrote:Really nice mod!
I made some changes, which might be useful.
I made the texture much smaller(to be closer to the default textures) and added a hudbar. Fewer xp is required to gain levels but some of the rewards aren't as valuable(in my opinion).
Also, if anyone wants mobs from mobs_redo to drop experience when they die, add this to line 287 of api.lua in the mobs folder:Code: Select all
minetest.env:add_entity(pos, "experience:orb")
I'm the TailsTMM of minetest, in other words, i rock.
BRAAAAAZZZZAAAA!!!!!!!!!!!!!!!!!!!!!!!!!!!
BTW it means TailsTheMeseMinecart, but that isn't my name, it's just a way of saying that i basically do the same thing Dantdm does but i do it with minetest And you problably can't see the invisible ink.
My mods:
My first mod:tails_boss
Mob_pack now has voice acting! Do you want YOUR VOICE included? Look in my posts for the thread!
BRAAAAAZZZZAAAA!!!!!!!!!!!!!!!!!!!!!!!!!!!
BTW it means TailsTheMeseMinecart, but that isn't my name, it's just a way of saying that i basically do the same thing Dantdm does but i do it with minetest And you problably can't see the invisible ink.
My mods:
My first mod:tails_boss
Mob_pack now has voice acting! Do you want YOUR VOICE included? Look in my posts for the thread!
- D00Med
- Member
- Posts: 949
- Joined: Sat Feb 07, 2015 22:49
- GitHub: D00Med
- Location: Australia...somewhere
Re: [Mod] XP [1.0]
It would have to be placed somewhere else for other mob mods. For creatures, I think you would need to add this into the code for each monster/animal:
I haven't tried it though.
For other mob mods it would be similar -just look for the effects after a mobs death and add the code there.
Code: Select all
if self.object:get_hp() < 1 then
minetest.env:add_entity(pos, "experience:orb")
end
For other mob mods it would be similar -just look for the effects after a mobs death and add the code there.
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242
My subgame: viewtopic.php?f=15&t=14051#p207242
-
- Member
- Posts: 136
- Joined: Sat Aug 16, 2014 02:44
Re: [Mod] XP [1.0]
I got errors...
Any fix?
Code: Select all
2016-06-16 10:35:46: [Main]: Using world specified by --worldname on the command line
2016-06-16 10:35:46: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2016-06-16 10:35:46: ACTION[Server]: Announcing to servers.minetest.net
2016-06-16 10:35:46: ACTION[Main]: Announcing to servers.minetest.net .__ __ __
2016-06-16 10:35:46: ACTION[Main]: _____ |__| ____ _____/ |_ ____ _______/ |_
2016-06-16 10:35:46: ACTION[Main]: / \| |/ \_/ __ \ __\/ __ \ / ___/\ __\
2016-06-16 10:35:46: ACTION[Main]: | Y Y \ | | \ ___/| | \ ___/ \___ \ | |
2016-06-16 10:35:46: ACTION[Main]: |__|_| /__|___| /\___ >__| \___ >____ > |__|
2016-06-16 10:35:46: ACTION[Main]: \/ \/ \/ \/ \/
2016-06-16 10:35:46: ACTION[Main]: World at [C:\Users\Mykhaylo\Desktop\Server\minetest-0.4.14-win64\minetest-0.4.14\bin\..\worlds\Mykie]
2016-06-16 10:35:46: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:30000.
2016-06-16 10:35:57: ACTION[Server]: MykieDoesStuff [192.168.1.1] joins game.
2016-06-16 10:35:57: ACTION[Server]: MykieDoesStuff joins game. List of players: MykieDoesStuff
2016-06-16 10:35:57: WARNING[Server]: Assignment to undeclared global "xp" inside a function at ...14-win64\minetest-0.4.14\bin\..\mods\experience\init.lua:56.
2016-06-16 10:35:58: ERROR[Main]: Access denied. Reason: This server has experienced an internal error. You will now be disconnected.
2016-06-16 10:35:58: ERROR[Main]: ServerError: Runtime error from mod 'experience' in callback environment_Step(): ...14-win64\minetest-0.4.14\bin\..\mods\experience\init.lua:85: attempt to index global 'xp' (a nil value)
2016-06-16 10:35:58: ERROR[Main]: stack traceback:
2016-06-16 10:35:58: ERROR[Main]: ...14-win64\minetest-0.4.14\bin\..\mods\experience\init.lua:85: in function <...14-win64\minetest-0.4.14\bin\..\mods\experience\init.lua:82>
2016-06-16 10:35:58: ERROR[Main]: ...4-win64\minetest-0.4.14\bin\..\builtin\game\register.lua:369: in function <...4-win64\minetest-0.4.14\bin\..\builtin\game\register.lua:349>
Code: Select all
--hudbar
minetest.register_on_joinplayer(function(player)
xp = io.open(minetest.get_worldpath().."/"..player:get_player_name().."_experience", "r")
experience = xp:read("*l")
xp:close()
local playername = player:get_player_name()
player:hud_add({
hud_elem_type = "statbar",
position = {x=0.5,y=1},
size = {x=24, y=24},
text = "experience_hud_bg.png",
number = 50,
alignment = {x=0,y=1},
offset = {x=-300, y=-10},
}
)
xp_hud = player:hud_add({
hud_elem_type = "statbar",
position = {x=0.5,y=1},
size = {x=24, y=24},
text = "experience_hud.png",
number = experience/20,
alignment = {x=0,y=1},
offset = {x=-300, y=-10},
}
)
end)
Any fix?
For fast response... send me a PM
- D00Med
- Member
- Posts: 949
- Joined: Sat Feb 07, 2015 22:49
- GitHub: D00Med
- Location: Australia...somewhere
Re: [Mod] XP [1.0]
Aaah serves me right for only testing on my subgame.
I had a quick look, and I don't really know how to fix it, I'll work on it though
I had a quick look, and I don't really know how to fix it, I'll work on it though
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242
My subgame: viewtopic.php?f=15&t=14051#p207242
Who is online
Users browsing this forum: No registered users and 15 guests