[WIP] Comcraft Mod Loader

Posted by simon816 simon816
Options
This is a WIP (work in progress) mod set out to allow easy install/uninstall mods and a user can have multiple mods running at the same time. Project is on github: https://github.com/simon816/ComcraftModLoader

Update:
Homepage for this mod can now be found here

70 Comments

classic Classic list List threaded Threaded
1234
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

sorry,
  EventHandler.bindEvent('Game.Command',function(command)){
             Console.log("The command '"+command+"' was entered")
          EventHandler.bindEvent('Render.Init', function(background){
          background.setColor(0x000000)}
})
I understood, how to make sure that the color change?
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
  EventHandler.bindEvent('Game.Command',function(command)){
             Console.log("The command '"+command+"' was entered")
          EventHandler.bindEvent('Render.Init', function(background){
          background.setColor(0x000000)}
          if Console.log(("The command '"+command+"' was entered") function(background){
          background.setColor(0300000)}
})  
I thought so (
simon816 simon816
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by MassimoS
Render.Init is called on game launch, you've got it to bind the event when any command is entered which therefore will not initialize. It must be bound in the global scope to work.
I cannot make an example right now but in a few hours if you're still stuck I will make an example for your code based on what you've posted.

Your difficulties highlight to me some constraints on the current system and I may improve it (more flexibility) if I find a way
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
Thank you
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
Make a multiplayer that will update only the blocks put the players, not the players ..
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
That is just the world, players will not be visible
simon816 simon816
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

I could try a multiplayer mode but it won't be anytime soon

Here is an example from your code, I haven't tested it but I hope it works:

EventHandler.bindEvent("Render.Init", function(background) { // When the render engine starts
	background.setColor(0x000000) // Set the default color

	EventHandler.bindEvent("Game.Command", function(command) { // When the player enters a command
		Console.log("The command '" + command + "' was entered") // Log the command for debugging

		if (command == "mycommand") { // If the command entered matches 'mycommand'
			background.setColor(0x000000) // Set the background color
		}
		else if (command == "anothercmd") { // If the command entered matches 'anothercmd'
			background.setColor(0x300000) // Set the background color 
		}
	})
})
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
Can I add some some function that will be responsible for the number of units and the variable to 0 .. When a player breaks the block which is variable 1, and if the variable is 0 then the unit can not be set, and if it is greater than 0 + it is possible to.
simon816 simon816
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

I'm confused by what you are trying to say, perhaps rephrase your question or write a sample pseudo-code
And by the way I got a simple multiplayer server working so maybe I could release a test version sooner than I thought
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
Thank you, I really want to play
simon816 simon816
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

A very early version of multiplayer is available on the Downloads Page
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
Thank you very much!
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
I have everything working! I went to the server!thank you thank you thank you thank you thank you thank you
simon816 simon816
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

Thats great though it is so early in development the world doesn't even save
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
Yes, I noticed
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
There are two cards? or two places spawn?
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
Can we see the other players on the server?
simon816 simon816
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

No, that would be very difficult. Remember it is just a test an I hope to fix bugs before releasing the multiplayer version
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
I wish you good luck!The main thing is to save the buildings on the server...
MassimoS MassimoS
Reply | Threaded
Open this post in threaded view
|

Re: [WIP] Comcraft Mod Loader

In reply to this post by simon816
There is a problem in the version with multiplayer worlds are generated .. not the server, and the world .. Well my friend often knocks often mistake .. And the people in my group on the server can not go
1234