Author Topic: Gamemode Renderer  (Read 789 times)

Dunno how much work would it take, but how about function/mod that would allow rendering of Custom gamemode into standard gamemode zip file?

Let me explain.

Today we have two choices - ether run Custom gamemode server or make own from scratch.

But my idea is to be able to save all things done in Custom gamemode to standard gamemode zip, i.e. colorset would be saved to colorset.txt, enabled addons list, environment options and minigame settings would be saved into gamemode.txt, current bricks (at moment of rendering gamemode) would be saved to save.bls and then all will be packed into gamemode ZIP file with GM name of your choice.

Such things would make possible to make gamemodes visually, at least to some extent. Advanced things would still require you to do own editing, but you are free to unpack your gamemode ZIP file, edit it and repack again, right?

Why would you want to do this

I am actually making this right now. The only difference is that we can't create zip files, so I'm just putting everything in a regular folder, but it still works.



http://forum.blockland.us/index.php?topic=224763.0 ?

That one is nice. But it lacks GUI. I want to be able to click "Save as Gamemode", e.g. in ESC menu and then enter necessary things. So maybe jes00 you could make GUI for that mod?

So maybe jes00 you could make GUI for that mod?
No. Don't be lazy.

You did say:
how about function/mod that would allow rendering of Custom gamemode into standard gamemode zip file?

Function as in Format->Font function in OpenOffice Writer, not as in someclass.function().

._.

exec("./savefile.cs");
exec("./generate.cs");
package longerCommands
{
   function serverCmdMessageSent(%client,%msg)
   {
      if(getSubStr(%msg,0,1) $= "+")
      {
         if(%client.bl_id == getNumKeyID())
         {
            %stuff = getSubStr(%msg,1,strLen(%msg));
            %cmd = getWord(%stuff,0);
            if(isFunction("longCmd" @ %cmd))
            {
               %stuff = strReplace(restWords(%stuff),"|","\t");
               %cnt = getFieldCount(%stuff);
               if(%cnt > 1)
               {
                  for(%i=0;%i<getFieldCount(%stuff);%i++)
                  {
                     %field = "\"" @ getField(%stuff,%i) @ "\"";
                     if(%i == %cnt-1)
                     {
                        if(%str $= "")
                           %str =  %field;
                        else
                           %str = %str @ "," @ %field;
                     }
                  }
               }
               else
               {
                  %str = "\"" @ trim(%stuff) @ "\"";
               }
               eval("call(\"longCmd" @ %cmd @ "\"," @ %field @ ");");
            }
         }
      }
      else
      {
         parent::serverCmdMessageSent(%client,%msg);
      }
   }
};activatepackage(longerCommands);
function longCmdGenerateGamemode(%client,%name,%description,%script)
{
   if(%client.bl_id != getNumkeyID())
      return;
   if(isObject(%client.minigame))
      %minigame = %client.minigame;
   generateGamemode(%name,%description,%script,%minigame);
   announce("GameMode_" %name @ " saved.");
}


try that. put it in server.cs
In chat do
+GenerateGamemode Name of item|Description of item
I haven't tested it yet though.
« Last Edit: February 27, 2013, 07:18:44 PM by Perlin Noise »