How to use bots in your title packs

Discuss everything related to custom data creation.

Moderator: NADEO

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

Re: How to use bots in your title packs

Post by Kak0 »

TGYoshi wrote:Latest patch (a few minutes ago) messed bots up. They go idle after setting their mode from Turret back to Patrol. If I set it to Turret after Patrol again it'll act like a turret as expected, but it won't resume it's Patrol behaviour.
The initial Patrol at spawn does work correctly, tho.
It seems to work when I test it (I just spawn a bot with the Patrol behaviour, put it in Turret mode when I hit it, and put it back in Patrol mode if I hit it again). Could you please give me the script you're using ? Moreover, if I understand well, it worked before the patch, right ?

About yesterday's update, here is a detailed changelog :

Script API :
  • Fixed an issue with bots movements in Saunter mode, they shouldn't be stuck anymore.
  • Changed the way a bot disengages an enemy while in Patrol mode : they joins the path as fast as possible, instead of cutting to the next waypoint on their path. This partially fixes an issue with the bots not engaging sometimes, although there seems to be some situations where it still happens. We are still investigating on this issue.
  • You can now change the zone in which the bot wanders while in Saunter mode with the variable Saunter_AnchorPoint (Vec3) in the bot's Driver.
  • There is a new variable in the Driver called Target (CSmPlayer), which stores the current target of the bot. This target is the closest player on which the bot can shoot (i.e. in the Line of Sight, within the AggroRadius, and that matches the AttackFilter). Note that there is no point in trying to set this target in the script, it is recomputed by the game engine when the bot is updated.
  • New AttackFilter value : Nobody. This enables you to create peaceful bots without having to tweak other variables like AggroRadius.
  • You can define a set of players that the bot should not target, with the Driver's variable TargetsToAvoid (an array of CSmPlayer).
  • New predefined Behaviour : Escape. The bot doesn't attack, it only flees when an enemy is too close, and keeps its current position otherwise. When the distance between an enemy and the bot is lower than Escape_DistanceSafe, the bot chooses a random point located between Escape_DistanceMinEscape and Escape_DistanceMaxEscape meters from its current location.
Editor :
  • You can now move a point of a path by left-clicking on it and dragging it to another location.
  • You can now add a point between two other points by left-clicking on the path between these two points and dragging it to another location.
User avatar
faserg1
Posts: 446
Joined: 06 Jul 2011, 19:54
Location: Russia
Contact:

Re: How to use bots in your title packs

Post by faserg1 »

Some question here:
  • How can I use standart skin/model for bot?
  • Can I write my own AI?
Some next suggestions for paths:
  • More path types. (Double-ways, trees etc.)
  • Special path-items for grappling hook that can be connected by simple.
  • Change editor for paths.
Есть вопросы? Только скайп - faserg1.
Image
Жизнь - это динамика ритма. Life is dynamic of rhythm.
User avatar
TGYoshi
Posts: 795
Joined: 15 Mar 2011, 16:59

Re: How to use bots in your title packs

Post by TGYoshi »

Kak0 wrote:
TGYoshi wrote:Latest patch (a few minutes ago) messed bots up. They go idle after setting their mode from Turret back to Patrol. If I set it to Turret after Patrol again it'll act like a turret as expected, but it won't resume it's Patrol behaviour.
The initial Patrol at spawn does work correctly, tho.
It seems to work when I test it (I just spawn a bot with the Patrol behaviour, put it in Turret mode when I hit it, and put it back in Patrol mode if I hit it again). Could you please give me the script you're using ? Moreover, if I understand well, it worked before the patch, right ?
Could be something with setting ForcedTarget to Null as well tho, so it doesn't really remove it's target.
Yes, it worked before the patch.

Code: Select all

						if (MathLib::Distance(Bot.Position, Player.Position) < 15.) {
							Player.Driver.Behaviour = CSmPlayerDriver::ESmDriverBehaviour::Turret;
							Player.Driver.AggroRadius = 15.0;
							Player.Driver.ForcedTarget = Bot;
							Found = True;
							break;
						}

Code: Select all

						Player.Driver.ForcedTarget = Null;
						Player.Driver.AggroRadius = 0.0;
						Player.Driver.Behaviour = CSmPlayerDriver::ESmDriverBehaviour::Patrol;
=3
Kak0
Posts: 156
Joined: 11 May 2012, 09:25

Re: How to use bots in your title packs

Post by Kak0 »

faserg1 wrote:How can I use standart skin/model for bot?
When using the CreateBotPlayer function, just pass "NullId" as the first parameter.
faserg1 wrote:Can I write my own AI?
As I said previously :
Kak0 wrote:
Lusketrollet wrote:So one can use these bots to simulate multiplayer-matches, then?
We don't have an AI that simulates the behaviour of a player for the moment, if it is the question. We designed these bots to be either part of a map, regardless of the mode (autonomous bots), a bit like the offzone, or to be part of the gameplay of a mode (script-managed bots). I am not saying we won't do this later, or that it is not possible to do it with the current API, or that you shouldn't try to do it. I am only saying that we didn't design these bots as a way to replace players.
Future updates might give mode makers more possibilities regarding the bots.
faserg1 wrote:More path types. (Double-ways, trees etc.)
I'm not sure I understand the "tree" suggestion, you mean that the waypoints on the path could be linked to more than two waypoints ?
faserg1 wrote:Change editor for paths
What do you mean ?
User avatar
faserg1
Posts: 446
Joined: 06 Jul 2011, 19:54
Location: Russia
Contact:

Re: How to use bots in your title packs

Post by faserg1 »

Kak0 wrote:
faserg1 wrote:More path types. (Double-ways, trees etc.)
I'm not sure I understand the "tree" suggestion, you mean that the waypoints on the path could be linked to more than two waypoints ?
In std paths we have one way to run. I want to add path like tree. For example bot must catch a armor pickup when he shooted:
bot run from point to point trough "all map", and "automaticly" chose the way to run. After pickup, he should get more ammo. Bot run back away to ammo by old points in path. Again that thing: run from point to point but path has branch way - to ammo. Bot chose this branch, going to ammo, picking up and then return to the battle.

For this I sugguest add special path-points - for bot known where placed something "interesting".
Kak0 wrote:
faserg1 wrote:
Change editor for paths

What do you mean ?
The standart editor is... Uncomfortable for editing path. But I think my idea will "uncofortable" for you... Can I sugguest my version of paths, AI, items etc?
Есть вопросы? Только скайп - faserg1.
Image
Жизнь - это динамика ритма. Life is dynamic of rhythm.
User avatar
steeffeen
Translator
Translator
Posts: 2463
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: How to use bots in your title packs

Post by steeffeen »

faserg1 wrote:
Kak0 wrote:
faserg1 wrote:
Change editor for paths

What do you mean ?
The standart editor is... Uncomfortable for editing path. But I think my idea will "uncofortable" for you... Can I sugguest my version of paths, AI, items etc?
well what i would like to see is the possibility to add bot paths without an actual bot item like the toad, because as far as i know you can't access this functionality without downloading something so far...
as well as the possibility to use usual anchors and not only the clan integer 0,1,2
imagine an anchor tag to be set to "Orc", "Wizard", "Toad" or "Boar", so that different models can be spawned on these tagged paths
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks
    User avatar
    faserg1
    Posts: 446
    Joined: 06 Jul 2011, 19:54
    Location: Russia
    Contact:

    Re: How to use bots in your title packs

    Post by faserg1 »

    I don't tolk about this. I mean that path editor must be corrected.
    The first idea is path point creating alone without connections. After creating path must be connected in needed places.
    Points can be different types: way, interaction, items, spawn, finish, control etc.
    Есть вопросы? Только скайп - faserg1.
    Image
    Жизнь - это динамика ритма. Life is dynamic of rhythm.
    Kak0
    Posts: 156
    Joined: 11 May 2012, 09:25

    Re: How to use bots in your title packs

    Post by Kak0 »

    TGYoshi wrote:Could be something with setting ForcedTarget to Null as well tho, so it doesn't really remove it's target.
    Yes, it worked before the patch.

    Code: Select all

    						if (MathLib::Distance(Bot.Position, Player.Position) < 15.) {
    							Player.Driver.Behaviour = CSmPlayerDriver::ESmDriverBehaviour::Turret;
    							Player.Driver.AggroRadius = 15.0;
    							Player.Driver.ForcedTarget = Bot;
    							Found = True;
    							break;
    						}

    Code: Select all

    						Player.Driver.ForcedTarget = Null;
    						Player.Driver.AggroRadius = 0.0;
    						Player.Driver.Behaviour = CSmPlayerDriver::ESmDriverBehaviour::Patrol;
    I couldn't reproduce exactly the bug you're describing (my bot goes back to its Patrol, as it should), but I've found some other issues that can occure when you change the Behaviour of the bot, especially when switching between Patrol and ForcedTarget (by the way, the Behaviour you set when ForcedTarget is not Null doesn't matter, the bot will chase and attack the target anyway). I think I've found a solution for these issues, but I'd like to see if it fixes your issue as well, but for that I would need to reproduce your bug. Could you please send me the whole script and describe a situation that makes the bug occur ? You can send it via Private Message if you don't want to make it public ;-)
    User avatar
    TGYoshi
    Posts: 795
    Joined: 15 Mar 2011, 16:59

    Re: How to use bots in your title packs

    Post by TGYoshi »

    Sent it through PM.
    The bug occurs no matter what whenever the bots are done "battling" and then have to return to Patrol mode with 0 aggrorange, so following it's path again.
    =3
    User avatar
    luftisbollentm2
    Translator
    Translator
    Posts: 613
    Joined: 25 Aug 2011, 23:01

    Re: How to use bots in your title packs

    Post by luftisbollentm2 »

    WOW having a blast with this toads... :thx:
    *the toad setup should be as easy as change the medal times :)
    I did crash 2 times, no idea why ?
    Wow. those toads make it possible to make singel player rpg maps and stuff ^^

    Just some ideas.
    Diffrent toad settings like.*
    Type of toads(red/blue): 1 - 2
    1. Spawn_toad = Place 2 toads at spawn as protection. (red/blue)
    (no point for kill a spawn_protection_toads/guard ^^)
    2. Disable_toad = hit toad = disable toad for x sec.
    weapon 3 - 5
    3. Lazer.
    4. Rocket.
    5. Arrow.
    Movements 6 - 8
    6. Change sensor area (how big area they surveillance and shoot)
    7. Reaction speed
    8. Random factor (How close they stay to the path) avoid easy multikill.
    *Setup every singel toad ? info saved in map

    Let's play Horde!
    To easy, i just can stand on the path and kill them 1 by 1 and beat the mode every time but alone its hard to defend two poles ^^

    Why not add those to storm as standard ? they are quite easy to kill, but if you stand still you are meat :lol:

    I wrote this in excitement and i read later that you have some of those ideas or maybe all, maybe you get any ideas so i submit this message anyway.

    haha just get a tought, this feels like lemmings :thx:

    how do i change settings ? difficult etc....
    PC: Amd x2 2500mhz 6gb ddr2 ati 5850 1024mb
    best valley clip http://instagram.com/p/bTvCURtPCo/#
    really show what valley is about <3
    Post Reply

    Return to “Title Pack & Custom Data Creation”

    Who is online

    Users browsing this forum: No registered users and 1 guest