Author Topic: How to make Add-ons and Maps?  (Read 996 times)

You guys might laugh at this post, but at least it's in the right section.
How do you make add-ons and maps? And what websites/ softwares do you use. I'm sorts new at blockland!

Here, let me give you some sample coding on how to make an add - on:

Code: [Select]
egisterGameMode("Deathmatch","DM",0,0,0);
setGameModeHelp("Deathmatch","Add-Ons/Gamemode_TeamDeathmatch/rules_dm.txt");
addGameModeRule("Deathmatch","Time","int 0 30",0);
addGameModeRule("Deathmatch","Lives","int 0 10",0);
addGameModeRule("Deathmatch","Points","int 0 10000",0);

//For an explanation of when these functions are used, see Gamemode_EXAMPLE.cs

function GameMode_DM_onModeUpdateRule0(%mini,%rulevalue,%oldvalue,%modestart)
{
   //Don't reset the minigame if it's the mode start and the setting is off, as a normal deathmatch shouldn't reset the minigame
   return !(%modestart && %rulevalue == 0);
}

function GameMode_DM_onModeUpdateRule1(%mini,%rulevalue,%oldvalue,%modestart)
{
   //Don't reset the minigame if it's the mode start and the setting is off, as a normal deathmatch shouldn't reset the minigame
   return !(%modestart && %rulevalue == 0);
}

function GameMode_DM_onModeUpdateRule2(%mini,%rulevalue,%oldvalue,%modestart)
{
   //Don't reset the minigame if it's the mode start and the setting is off, as a normal deathmatch shouldn't reset the minigame
   return !(%modestart && %rulevalue == 0);
}

function GameMode_DM_onMiniReset(%mini,%client)
{
   if(%mini.tdmModeRule[0] != 0)
      %mini.messageAll('',"\c5This round lasts \c3" @ %mini.tdmModeRule[0] @ "\c5 minute" @ (%mini.tdmModeRule[0] == 1 ? "" : "s") @ ".");
   
   if(%mini.tdmModeRule[1] != 0)
      %mini.messageAll('',"\c5You have \c3" @ %mini.tdmModeRule[1] @ "\c5 " @ (%mini.tdmModeRule[1] == 1 ? "life" : "lives") @ " remaining.");
   
   if(%mini.tdmModeRule[2] != 0)
      %mini.messageAll('',"\c5The first player to reach \c3" @ %mini.tdmModeRule[2] @ "\c5 point" @ (%mini.tdmModeRule[2] == 1 ? "" : "s") @ " wins.");
   
   %mini.setTimeLimit(%mini.tdmModeRule[0]);
   %mini.setLivesLimit(%mini.tdmModeRule[1]);
   %mini.setPointsLimit(%mini.tdmModeRule[2]);
}

function GameMode_DM_onTimeLimit(%mini)
{
   //Edited version of Minigame::roundEnd to find the highest scores and make those people win
   //Removed the team checks as they're unnecessary, see Gamemode_Team Deathmatch.cs for that
   //Multiple players can win the round at once
   
   if(%mini.roundWon)
      return;
   
That's from Space Guy's TDM thing.

Here, let me give you some sample coding on how to make an add - on:

Code: [Select]
egisterGameMode("Deathmatch","DM",0,0,0);
setGameModeHelp("Deathmatch","Add-Ons/Gamemode_TeamDeathmatch/rules_dm.txt");
addGameModeRule("Deathmatch","Time","int 0 30",0);
addGameModeRule("Deathmatch","Lives","int 0 10",0);
addGameModeRule("Deathmatch","Points","int 0 10000",0);

//For an explanation of when these functions are used, see Gamemode_EXAMPLE.cs

function GameMode_DM_onModeUpdateRule0(%mini,%rulevalue,%oldvalue,%modestart)
{
   //Don't reset the minigame if it's the mode start and the setting is off, as a normal deathmatch shouldn't reset the minigame
   return !(%modestart && %rulevalue == 0);
}

function GameMode_DM_onModeUpdateRule1(%mini,%rulevalue,%oldvalue,%modestart)
{
   //Don't reset the minigame if it's the mode start and the setting is off, as a normal deathmatch shouldn't reset the minigame
   return !(%modestart && %rulevalue == 0);
}

function GameMode_DM_onModeUpdateRule2(%mini,%rulevalue,%oldvalue,%modestart)
{
   //Don't reset the minigame if it's the mode start and the setting is off, as a normal deathmatch shouldn't reset the minigame
   return !(%modestart && %rulevalue == 0);
}

function GameMode_DM_onMiniReset(%mini,%client)
{
   if(%mini.tdmModeRule[0] != 0)
      %mini.messageAll('',"\c5This round lasts \c3" @ %mini.tdmModeRule[0] @ "\c5 minute" @ (%mini.tdmModeRule[0] == 1 ? "" : "s") @ ".");
   
   if(%mini.tdmModeRule[1] != 0)
      %mini.messageAll('',"\c5You have \c3" @ %mini.tdmModeRule[1] @ "\c5 " @ (%mini.tdmModeRule[1] == 1 ? "life" : "lives") @ " remaining.");
   
   if(%mini.tdmModeRule[2] != 0)
      %mini.messageAll('',"\c5The first player to reach \c3" @ %mini.tdmModeRule[2] @ "\c5 point" @ (%mini.tdmModeRule[2] == 1 ? "" : "s") @ " wins.");
   
   %mini.setTimeLimit(%mini.tdmModeRule[0]);
   %mini.setLivesLimit(%mini.tdmModeRule[1]);
   %mini.setPointsLimit(%mini.tdmModeRule[2]);
}

function GameMode_DM_onTimeLimit(%mini)
{
   //Edited version of Minigame::roundEnd to find the highest scores and make those people win
   //Removed the team checks as they're unnecessary, see Gamemode_Team Deathmatch.cs for that
   //Multiple players can win the round at once
   
   if(%mini.roundWon)
      return;
   
T
WTF

That's what I thought you would say.

Hmm that's a good strategy....

Use Torque Game Engine to code for add-ons. If you do not want to learn how to code, copy the coding off another add-on and change a few things. The full version of Torque costs money, im pretty sure. Map2dif is a map maker also by Garage Games. Besides maps in blockland, I suggest you check out Instantaction.com which has some maps and games which im pretty sure are made with Torque and Map2dif.

However, im not completely sure on any of this, so you might want to ask someone more knowlegeable about the subject.

Hope this helps

Use Torque Game Engine to code for add-ons. If you do not want to learn how to code, copy the coding off another add-on and change a few things. The full version of Torque costs money, im pretty sure. Map2dif is a map maker also by Garage Games. Besides maps in blockland, I suggest you check out Instantaction.com which has some maps and games which im pretty sure are made with Torque and Map2dif.

However, im not completely sure on any of this, so you might want to ask someone more knowlegeable about the subject.

Hope this helps
Wrong.