[Mod] [GitHub] CreativeChanger - per-player gamemode [creativechanger]

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

[Mod] [GitHub] CreativeChanger - per-player gamemode [creativechanger]

by Traxie21 » Post

This mod allows you to change from survival to creative and back with /gamemode.

Features:
  • Priv based: Only players with the "gamemode" priv can change gamemodes.
  • Change other player's gamemodes! /gamemode [name]
  • Break blocks instantly! Faster than normal creative and with any block!
  • When in creative mode, you do not use up blocks!
  • Game modes are saved as they are changed, a crash will not make you lose your gamemode.
  • Configurable default gamemode. (Default_Mode variable in config.txt) Players with a gamemode not set will be automatically switched to the default mode.

Download:
https://github.com/Traxie21/CreativeCha ... master.zip
NOTE: you must delete the default creative mod.
Not immediately compatable with other mods that edit the players inventory, eg. Inventory_Plus or Unified_Inventory.

GitHub:
https://github.com/Traxie21/CreativeChanger/

License: Code - WTFPL

Dependencies: default
Last edited by Traxie21 on Wed Apr 03, 2013 14:47, edited 1 time in total.

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

No comments? :C

UPDATE: No longer depends on ServerExtended, you can now change other player's gamemode.

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

No Comments since I think no one seen it yet..

Anyways I think we should have it inport like the sound.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

This is something if working fine should be added to default
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Switched to GitHub, Added Infinite blocks in creative mode. Fixed changing other's names.
Priv is now gamemode.
Last edited by Traxie21 on Tue Apr 02, 2013 20:13, edited 1 time in total.

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

Traxie21 wrote:Switched to GitHub, Added Infinite blocks in creative mode. Fixed changing other's names.
Priv is now gamemode.
Hey do you think you can make it, a way to set it, on and off in pause menu or, you have to Hardcode it to do that?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

I believe you have to edit C++ to do that. Its no big deal to make it toggleable in inventory, but I don't really want to do that.

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

I get an error message saying: ServerError: LuaError: error:
/creative_changer/init.lua:33: attempted to index field
Back from the dead!

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

Fixed that error, but I have this one. It happens for awhile before finally allowing the player to join.

Does anyone else have this problem?

Code: Select all

00:40:35: ERROR[ServerThread]: register_ore: clust_scarcity and clust_num_oresmust be greater than 0Server: peer_id=2: failed to emerge player

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

uh that is a game bug not your mod bug
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

Traxie21 wrote:Fixed that error, but I have this one. It happens for awhile before finally allowing the player to join.

Does anyone else have this problem?

Code: Select all

00:40:35: ERROR[ServerThread]: register_ore: clust_scarcity and clust_num_oresmust be greater than 0Server: peer_id=2: failed to emerge player
That happens to me once but it fixed now but the peer_id=2: failed to emerge player still pops up hope 0.4.6 will be fixed.
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

It has something to do with this mod, I think it takes too long to run through all the code on joining.

User avatar
Calinou
Moderator
Posts: 3166
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Traxie21 wrote:When in creative mode, you do not use up blocks!
That's not a new feature added by your mod, in the default game, nodes are also infinite.

User avatar
markveidemanis
Member
Posts: 211
Joined: Thu Sep 27, 2012 15:41

by markveidemanis » Post

Can you make it work with 2 other mods i have?
They are an edited creative mod and inventory plus also edited to work with the creative mod.
I would like all these mods to work together.

Link: http://ompldr.org/vaHozNw/INV.zip

The biggest problem is that the buttons from inventory_plus dont appear in the survival.
They appear when i start the game, it is survival but when i do /gamemode, it removes the buttons and says survival mode.

I need it to be edited so that the creativechanger could use the creative inventory i have included.
Last edited by markveidemanis on Wed Apr 03, 2013 11:52, edited 1 time in total.
BitCoin: 1Eq4arvykGNa1YC2DbJpWcwGfMvtFGjAoR

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

markveidemanis wrote:Can you make it work with 2 other mods i have?
They are an edited creative mod and inventory plus also edited to work with the creative mod.
I would like all these mods to work together.

Link: http://ompldr.org/vaHozNw/INV.zip

The biggest problem is that the buttons from inventory_plus dont appear in the survival.
They appear when i start the game, it is survival but when i do /gamemode, it removes the buttons and says survival mode.

I need it to be edited so that the creativechanger could use the creative inventory i have included.
To do this, you simply need to replace the formspec definitions in CC with the ones from your creative mod and inventory plus. Unfortunately, I will probably not be able to do this until next week, I'm going off on a trip.

I'ts quite easy, as I've done it with MiniTest

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

I get an error for loine 33 about indexing a unknown field
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

New version that fixes the above bug, Fixes the long loading time for players in Creative mode, Fixes the long loading time when changing modes, adds better compatability for other mods which add items into the game. Adds a SURVIVAL_FORMSPEC variable for changing the survival formspec to use other formats, Adds a hidden CREATIVE_FORMSPEC variable for changing the creative formspec, although I do not reccommend using this unless you know what you're doing.

@Calinou: I had to re-implement everything about creative mode, and I did this probably a different way then the default.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

would this help?
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

would what help?

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

oh well it was a link to github about a couple days ago. go to common and look at the commit
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
Traxie21
Member
Posts: 753
Joined: Mon Dec 31, 2012 10:48
Location: McKinney, Texas U.S.A.
Contact:

by Traxie21 » Post

jojoa1997 wrote:would this help?
Oh yea, that will help a bit.

User avatar
Slain
Member
Posts: 18
Joined: Tue Jun 25, 2013 20:20

by Slain » Post

Can you make support for craftingpack mod?

User avatar
Slain
Member
Posts: 18
Joined: Tue Jun 25, 2013 20:20

by Slain » Post

or for now, make it compatible with 'search your creative inventory' mod

User avatar
sfan5
Moderator
Posts: 3944
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Traxie21 wrote:Configurable default gamemode.  (Default_Mode variable in config.txt)
Y U NO USE minetest.conf?
Last edited by sfan5 on Thu Jul 04, 2013 18:52, edited 1 time in total.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
rubenwardy
Moderator
Posts: 6381
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

This is very cool.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests