How to use bots in your title packs

Discuss everything related to custom data creation.

Moderator: NADEO

Kak0
Posts: 156
Joined: 11 May 2012, 09:25

Re: How to use bots in your title packs

Post by Kak0 » 11 Apr 2013, 10:35

TitiShu wrote:Is it posisble to decrease a little the time betwen each bots spawn ???

Because on a map with more "relief" they block each other
You can modify the script to do so. About the fact that they block each other, in the future the AI may be able to avoid this kind of behaviours (a bot running fast should be able to get around a slow bot).
TitiShu wrote:And is it possible to make them walk in the shoal (haut-fond) ?? Like an invasion coming from the water... xD
For the moment it isn't possible, because sometimes the bot would chase its target and step in the water instead of staying on the land, making it lose all its speed. We will work on a solution, yet I don't know when it will be available ;-)

Fadden
Posts: 172
Joined: 10 May 2011, 18:21
Contact:

Re: How to use bots in your title packs

Post by Fadden » 11 Apr 2013, 11:05

Hi,

What are the conditions needed for bots follow path ? In a test mode, I spawn bot but they never move. The map is Horde_single and the spawn function the same as the horde script one, so the driver behaviour is patrol. I don't understand why they don't move.
Elle est où la poulette ?
[url=htp://forumrocket.forumactif.fr]Team Rocket[/url]

Kak0
Posts: 156
Joined: 11 May 2012, 09:25

Re: How to use bots in your title packs

Post by Kak0 » 11 Apr 2013, 11:27

Fadden wrote:Hi,

What are the conditions needed for bots follow path ? In a test mode, I spawn bot but they never move. The map is Horde_single and the spawn function the same as the horde script one, so the driver behaviour is patrol. I don't understand why they don't move.
Mmm I don't really see where it can come from, all the bot needs is a path and the Patrol behaviour. You didn't change the map I guess ? Can I see your script ?
viperML wrote:Can we use as skin (Skins/Models/ArenaPlayer) the OrganicSmall.zip? Or would it be weird?
You should not use it to play with others on Storm. The hitbox would still be the same but your character will appear much smaller than the common ShootMan (which will make it quite weird indeed). This would give you an unfair advantage on other players, which may make them angry and kick/ban you from the servers ;)

User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: How to use bots in your title packs

Post by steeffeen » 11 Apr 2013, 11:35

we played some time as toads! so funny :lol:
it would be great if we could just place usual bots which look like players, i'm missing the fake players which did just stand in the spawns, they were helpful for debugging and stuff
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

    User avatar
    w1lla
    Posts: 2373
    Joined: 15 Jun 2010, 11:09
    Location: Netherlands
    Contact:

    Re: How to use bots in your title packs

    Post by w1lla » 11 Apr 2013, 11:40

    steeffeen wrote:we played some time as toads! so funny :lol:
    it would be great if we could just place usual bots which look like players, i'm missing the fake players which did just stand in the spawns, they were helpful for debugging and stuff
    Well using SetNbFakePlayers() seems to be broken? in Maniascript.

    So this is quite a nice alternative.
    TM² Info
    SM Info
    QM Info

    OS: Windows 10 x64 Professional
    MB: MSI 970A-G46
    Processor: AMD FX-6300 3500 mHz
    RAM Memory: 16 GB DDR3
    Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
    KB: Logitech G510s
    Mouse: Logitech G300s
    Mode Creation
    ManiaScript Docs

    Kak0
    Posts: 156
    Joined: 11 May 2012, 09:25

    Re: How to use bots in your title packs

    Post by Kak0 » 11 Apr 2013, 11:55

    w1lla wrote:Well using SetNbFakePlayers() seems to be broken? in Maniascript.
    I don't think it is broken, but I think the problem comes from the fact that other parts of the script API changed. For instance, the array Players does NOT contain the bots anymore, it contains only the human players. SO if you use a loop on this array in order to spawn the players and the fake players, the fake ones won't be spawned. To acces all the players (humans + bots), use the array AllPlayers (and if you want only the bots, use BotPlayers).

    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2472
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: How to use bots in your title packs

    Post by steeffeen » 11 Apr 2013, 12:07

    oops totally right, i will see if that works (i'm quite sure)
    thanks :thumbsup:

    still the question if it will be possible to plant common bots somewhen? so that players don't need to download anything to use moving bots
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks

      Kak0
      Posts: 156
      Joined: 11 May 2012, 09:25

      Re: How to use bots in your title packs

      Post by Kak0 » 11 Apr 2013, 12:21

      steeffeen wrote:still the question if it will be possible to plant common bots somewhen? so that players don't need to download anything to use moving bots
      For the bots managed by the script, if you use an unassigned Ident as ModelId (you can try it in the Horde script by either commenting the call that adds the OrganicSmall skin or by declaring a new Ident variable without initializing it and using it instead of "ModelId"), the bots will be StormMen. For the autonomous bots however, as they are considered as custom items, there is no way to do what you suggested.

      Fadden
      Posts: 172
      Joined: 10 May 2011, 18:21
      Contact:

      Re: How to use bots in your title packs

      Post by Fadden » 11 Apr 2013, 12:57

      Kak0 wrote:
      Fadden wrote:Hi,

      What are the conditions needed for bots follow path ? In a test mode, I spawn bot but they never move. The map is Horde_single and the spawn function the same as the horde script one, so the driver behaviour is patrol. I don't understand why they don't move.
      Mmm I don't really see where it can come from, all the bot needs is a path and the Patrol behaviour. You didn't change the map I guess ? Can I see your script ?
      For example with this very simple script that does nothing except spawing bots and players, bots don't move. They shoot when you approach, stop shoot when you are too far, and never shoot again if you are anew next to them.
      The map used is Horde_single. I suppose I do something wrong...

      Code: Select all

      #Extends "Modes/ShootMania/ModeBase.Script.txt"
      
      #Include "MathLib" as MathLib
      #Include "TextLib" as TextLib
      #Include "Libs/Nadeo/ShootMania/SM.Script.txt" as SM
      
      
      /********************************************/
      ***StartServer***
      ***
      UseClans = True;
      UseForcedClans = True;
      
      MB_UseSectionRound = True;
      ***
      
      ***StartMap***
      ***
      SM::SetupDefaultVisibility();
      ***
      
      ***StartRound***
      ***
      UIManager.UIAll.ScoreTableVisibility = CUIConfig::EVisibility::Normal;
      
      SM::UnspawnAllPlayers();
      DestroyAllBotPlayers();
      
      UIManager.UIAll.UISequence = CUIConfig::EUISequence::Playing;
      
      StartTime = Now + 3500;
      
      foreach(Spawn in BotPaths)
      {
      	VSpawnBot(Spawn);
      }
      foreach(Player in Players)
      {
      	VSpawnPlayer(Player);
      }
      
      EndTime = StartTime + 90 * 1000;
      ***
      
      ***PlayLoop***
      ***
      foreach (Event in PendingEvents) 
      {
      	
      }
      
      if (Now >= EndTime && !MB_StopRound) 
      {
      	MB_StopRound = True;
      }
      ***
      
      ***EndRound***
      ***
      EndTime = Now;
      
      SM::UnspawnAllPlayers();
      DestroyAllBotPlayers();
      UIManager.UIAll.CountdownEndTime = -1;
      
      UIManager.UIAll.UISequence = CUIConfig::EUISequence::EndRound;
      UIManager.UIAll.ScoreTableVisibility = CUIConfig::EVisibility::ForcedVisible;
      MB_Sleep(7000);
      
      foreach (Score in Scores) 
      {
      	if (Score.Points >= 10) 
      	{
      		MB_StopMap = True;
      		break;
      	}
      }
      ***
      
      ***EndMap***
      ***
      UIManager.UIAll.ScoreTableVisibility = CUIConfig::EVisibility::ForcedVisible;
      UIManager.UIAll.UISequence = CUIConfig::EUISequence::Podium;
      MB_Sleep(8000);
      ***
      
      /////////FUNCTIONS///////////////////////////////////////////////////////////////////////////
      
      // Spawn player
      Void VSpawnPlayer(CSmPlayer Player)
      {
      	Player.ArmorMax = 100;
      	SetPlayerWeapon(Player, CSmMode::EWeapon::Laser, True);
      	SM::SpawnPlayer(Player, 1, BlockSpawns[0]);
      }
      
      Void VSpawnBot(CSmScriptBotPath Spawn)
      {
      	declare BotPlayer = CreateBotPlayer(NullId, 2, 100, Spawn, -1);
      	assert (BotPlayer != Null && BotPlayer.Driver != Null);
      	BotPlayer.Driver.Behaviour = CSmPlayerDriver::ESmDriverBehaviour::Patrol;
      	BotPlayer.Driver.Patrol_Mode = CSmPlayerDriver::ESmDriverPatrolMode::Loop;
      	BotPlayer.Driver.ShootPeriodMin 	= 50;
      	BotPlayer.Driver.ShootPeriodMax 	= 500;
      	BotPlayer.Driver.Accuracy 			= 0.5;
      	BotPlayer.Driver.ReactionTime		= 100;
      	BotPlayer.Driver.RocketAnticipation	= True;
      	BotPlayer.Driver.DisengageDistance 	= 20.;
      	BotPlayer.Driver.AggroRadius 		= 15.;					
      	BotPlayer.EnergyLevel				= 0.;
      	BotPlayer.SpeedPower				= 1.;
      }
      Elle est où la poulette ?
      [url=htp://forumrocket.forumactif.fr]Team Rocket[/url]

      User avatar
      steeffeen
      Translator
      Translator
      Posts: 2472
      Joined: 14 Oct 2012, 16:22
      Location: Germany

      Re: How to use bots in your title packs

      Post by steeffeen » 11 Apr 2013, 13:37

      Kak0 wrote:I don't think it is broken, but I think the problem comes from the fact that other parts of the script API changed. For instance, the array Players does NOT contain the bots anymore, it contains only the human players. SO if you use a loop on this array in order to spawn the players and the fake players, the fake ones won't be spawned. To acces all the players (humans + bots), use the array AllPlayers (and if you want only the bots, use BotPlayers).
      Kak0 wrote:For the bots managed by the script, if you use an unassigned Ident as ModelId (you can try it in the Horde script by either commenting the call that adds the OrganicSmall skin or by declaring a new Ident variable without initializing it and using it instead of "ModelId"), the bots will be StormMen. For the autonomous bots however, as they are considered as custom items, there is no way to do what you suggested.
      both completely right! big thanks for the input! :thx:
        Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

        ManiaControl, FancyManiaLinks

        Post Reply

        Return to “Title Pack & Custom Data Creation”

        Who is online

        Users browsing this forum: No registered users and 1 guest