AAO25.com

America's Army => General Chat => Topic started by: Spanky on Thursday, August 25, 2016, 01:19:07 AM

Title: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Spanky on Thursday, August 25, 2016, 01:19:07 AM
Credits to LEEFFM for this.

https://www.youtube.com/watch?v=GRi-nCf7Rtk (https://www.youtube.com/watch?v=GRi-nCf7Rtk)
! No longer available (http://www.youtube.com/watch?v=GRi-nCf7Rtk#)
Title: Re: When OpFor invade your empty server
Post by: -Vegeta- on Friday, August 26, 2016, 04:30:36 AM
yes this really deserves credit. but dont bother doing what your here for.
Title: Re: When OpFor invade your empty server
Post by: Spanky on Friday, August 26, 2016, 13:30:53 PM
I'm surprised this didn't get more attention or curiosity.
Title: Re: When OpFor invade your empty server
Post by: Vanoke on Friday, August 26, 2016, 13:43:36 PM
uuhhh ! what duss this mean in Game ! is this that ther can be bots in game 25Assist
Title: Re: When OpFor invade your empty server
Post by: Possessed on Friday, August 26, 2016, 16:17:34 PM
I'm surprised this didn't get more attention or curiosity.
Looks lame :) good start anyway..
Title: Re: When OpFor invade your empty server
Post by: Ganja on Friday, August 26, 2016, 16:21:34 PM
I'm surprised this didn't get more attention or curiosity.

AA players should be gratefull ? Please ... :D
Title: Re: When OpFor invade your empty server
Post by: Spanky on Friday, August 26, 2016, 16:56:45 PM
Looks lame :) good start anyway..
I'd expect more from you. Offline is one thing, the bots work there. These guys are replicating on an online server, moving independently of one another with their own individual desires. That's the hard part. Giving them a gun, placing them and making them own your ass should be relatively easy.

AA players should be gratefull ? Please ... :D
I don't expect players to be grateful. I did expect a "oh that's cool" or "neat" reply.
Title: Re: When OpFor invade your empty server
Post by: Koden on Friday, August 26, 2016, 18:34:35 PM
I'd expect more from you. Offline is one thing, the bots work there. These guys are replicating on an online server, moving independently of one another with their own individual desires. That's the hard part. Giving them a gun, placing them and making them own your ass should be relatively easy.
I don't expect players to be grateful. I did expect a "oh that's cool" or "neat" reply.
Do they make use of some kind of pre-determined/assigned path? These ones look a bit like they're gone crazy for hide n'seek but can't find a place to hide.
Title: Re: When OpFor invade your empty server
Post by: Spanky on Friday, August 26, 2016, 20:11:08 PM
Do they make use of some kind of pre-determined/assigned path? These ones look a bit like they're gone crazy for hide n'seek but can't find a place to hide.

There are paths laid out but they're totally ignoring them which I kind of like, it's more random and less work to create.
Title: Re: When OpFor invade your empty server
Post by: Koden on Saturday, August 27, 2016, 14:06:46 PM
There are paths laid out but they're totally ignoring them which I kind of like, it's more random and less work to create.
I would have been really interested if they were actually pursuing something...but well, if that's the uncompleted AI from the older versions of the game, not much to expect.
Title: Re: When OpFor invade your empty server
Post by: Spanky on Saturday, August 27, 2016, 16:01:59 PM
I would have been really interested if they were actually pursuing something...but well, if that's the uncompleted AI from the older versions of the game, not much to expect.
Many people know that I know a lot about the editor but when it comes to AI, path nodes, random spawns and coding, I know next to nothing. It may be that the bots don't know how to follow a path or that they aren't assigned a path to follow, I don't know. The randomness is nice but if there's hope of having AI indoors, we'll definitely need paths to walk around.
Title: Re: When OpFor invade your empty server
Post by: LEEFFM on Sunday, August 28, 2016, 21:28:23 PM
the AI you see in the video are Mercenary's i created a new file extended from NPC_Soldier and added code from a tutorial i found online for the NailCrow, im currently trying to fiqure out how to make them navigate the PathNodes i have placed in the map, the main problem is i have to write a controller for it and i really dont know as much about unrealscript as i should for this project, its really just a learning process for me i was interested in the AI i wanted online bots that acted like human players so im learning as much as i can about it by messing around with the code, currently i can get the AI to chase me. im only now trying to write a controller for it.
Title: Re: When OpFor invade your empty server
Post by: Alex on Monday, August 29, 2016, 20:16:58 PM
the AI you see in the video are Mercenary's i created a new file extended from NPC_Soldier and added code from a tutorial i found online for the NailCrow, im currently trying to fiqure out how to make them navigate the PathNodes i have placed in the map, the main problem is i have to write a controller for it and i really dont know as much about unrealscript as i should for this project, its really just a learning process for me i was interested in the AI i wanted online bots that acted like human players so im learning as much as i can about it by messing around with the code, currently i can get the AI to chase me. im only now trying to write a controller for it.
Great job so far man. Good luck on the rest. I'm so glad that Epic went away from unrealScript in favor of C++ for Unreal 4.
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: LEEFFM on Tuesday, August 30, 2016, 00:45:42 AM
Thanks! :), spanky should be uploading another video i added a state to the controller that should allow it to navigate the PathNodes now, meaning they chase you better now :P

my knowledge of C++ is very limited more limited then UnrealScript at this point, i could probably still write a Hello World program (console program)  thats about it lol
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: teddy_grizzly_bear on Tuesday, August 30, 2016, 01:15:17 AM
Thanks! :), spanky should be uploading another video i added a state to the controller that should allow it to navigate the PathNodes now, meaning they chase you better now :P

my knowledge of C++ is very limited more limited then UnrealScript at this point, i could probably still write a Hello World program (console program)  thats about it lol
As much as I've heard (mostly in my C++ lecture), a lot of modern games are made in C++ so there must be something good :)
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Spanky on Tuesday, August 30, 2016, 03:02:33 AM
Here's the new video, it hasn't finished uploading but will be done in 50 minutes or so but I'm going to bed.

*EDIT* Video in later post.
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Ganja on Tuesday, August 30, 2016, 05:04:11 AM
Looks really cool !! (And I don't say it to make you guys happy)
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Koden on Tuesday, August 30, 2016, 07:50:40 AM
Lol, its cool that they're finally tracking the player up to some degree, the sliding is funny :D I guess there's not walking/running animation for them in the older versions, right?
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: ronski on Tuesday, August 30, 2016, 07:52:08 AM
yea the crab-slide was funny :D he shot as accurate as I do!
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Koden on Tuesday, August 30, 2016, 10:33:33 AM
yea the crab-slide was funny :D he shot as accurate as I do!
Hmm, why haven't we played Csgo togedah, then? :D I'd be curios to see your native Finn-like, crab-style enduring, amazing-horse featuring - shooting approach ^^

P.s. and on a sidenote, Leffm, how does this basically work? I was reallyy wondering because at some point I noticed the AI walking straight into a wall and I wondered if it was somehow following players coordinates by each step the player moved or nearly so (perhaps).
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: ronski on Tuesday, August 30, 2016, 10:52:43 AM
Hmm, why haven't we played Csgo togedah, then? :D I'd be curios to see your native Finn-like, crab-style enduring, amazing-horse featuring - shooting approach ^^
lol just watch out, what can be seen cannot be unseen
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Koden on Tuesday, August 30, 2016, 11:27:10 AM
lol just watch out, what can be seen cannot be unseen
T'sWSS
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Possessed on Tuesday, August 30, 2016, 12:10:15 PM
Cool, but laughed hard the way npc moves lol
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Spanky on Tuesday, August 30, 2016, 13:55:00 PM
I'm not sure why there's no animations. If you look at the first video, some of them do have animations properly while others are sliding around. There's still a lot of errors in the server log so it's likely something to do with the controller.

As far as I know, the pawns aren't following the players footsteps, just walking in the direction of the player. This gets a bit tricky as you see early on in the video with the brown/yellow wall, the pawn is walking into it at a slight angle and eventually walks around it. This should be fixable with paths.

Frankly I was blown away by the fact that they're following you, shouting and shooting randomly.
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Spanky on Tuesday, August 30, 2016, 13:56:53 PM
Oh shit, the 2nd half of the video didn't upload... bugger. Let me fix that.
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Spanky on Tuesday, August 30, 2016, 15:28:28 PM
Here's the real video, full length with the best part; me being owned by a computer.
https://www.youtube.com/watch?v=01iMpmS9TcE (https://www.youtube.com/watch?v=01iMpmS9TcE)
! No longer available (http://www.youtube.com/watch?v=01iMpmS9TcE#)
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: teddy_grizzly_bear on Tuesday, August 30, 2016, 23:42:04 PM
Here's the real video, full length with the best part; me being owned by a computer.
https://www.youtube.com/watch?v=01iMpmS9TcE (https://www.youtube.com/watch?v=01iMpmS9TcE)
! No longer available (http://www.youtube.com/watch?v=01iMpmS9TcE#)
Shot by the familiar "someone" :)
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: -Vegeta- on Wednesday, August 31, 2016, 04:50:53 AM
AI had sense to go auto
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Vanoke on Wednesday, August 31, 2016, 15:08:13 PM
Here's the real video, full length with the best part; me being owned by a computer.
https://www.youtube.com/watch?v=01iMpmS9TcE (https://www.youtube.com/watch?v=01iMpmS9TcE)
! No longer available (http://www.youtube.com/watch?v=01iMpmS9TcE#)
  you must be very curious were this ends and how human it will be later in action.  for now I feel its scary when they follow you this way. Scary assist part 09
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: assist_fan41 on Wednesday, August 31, 2016, 17:22:29 PM
This is absoluetly amazing!!!!!!! Spanky thanks for the heads up and LEEFFM damn good job mate!. I am so looking forward to fully working bots. This is absolutely incredible and a very big damn shock to me!. Thank you so much LEEFFM and i fully support this project all the way through! Till you got it fully completed. Very impressing stuff =). I have a few questions. Is it possible to add A.I to your team eswell? That would be very convienient to have the ultimate aa experience! And if they can shoot eachother eswell. Would they also be able to do objectives? Do the best that you can LEEFFM, this is a very good damn good start! Keep up the good work and i and many others who havnt posted yet or not know about this GREATLY support this mod! This has big potential and will turn out to be great!

Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: TICUS on Friday, September 02, 2016, 10:04:08 AM
Good job! LEEFFM keep it up. The bot looks like he was on rollerblades! :D
Title: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: LEEFFM on Sunday, December 25, 2016, 13:36:37 PM
Ive been working more on the AI Mod, the AI now uses some Path finding to patrol the PathNode network i have setup while patrolling if they see a player they will follow you using path finding so if you run from one building to the next they will attempt to follow you even if they cant see you anymore and they will shoot at you, they are really accurate and will fire full-auto at you.

the reason when the AI kill you the deathmessage says "YourPlayerName has been shot by someone" is because in class AGP_DeathMessage if the controller whether it be a HumanController or a AIController doesnt have a PlayerReplicationInfo Class (in this case its the AIController that doesnt have a PlayerReplicationInfo class).

Code Snippet from AGP_DeathMessage.uc:
Code: [Select]
var localized string KilledString, SomeoneString;

static function string GetString(
optional int Switch,
optional PlayerReplicationInfo RelatedPRI_1,
optional PlayerReplicationInfo RelatedPRI_2,
optional Object OptionalObject,
optional string ExtraText
)
{
local string KillerName, VictimName;

if (Class<DamageType>(OptionalObject) == None){
return "";
}

if (RelatedPRI_2 == None)
VictimName = Default.SomeoneString;
else
VictimName = RelatedPRI_2.PlayerName;

if ( Switch == 1 )
{
// suicide
return class'GameInfo'.Static.ParseKillMessage(
VictimName,
VictimName,
Class<DamageType>(OptionalObject).Static.SuicideMessage(RelatedPRI_2) );
}

if (RelatedPRI_1 == None)
KillerName = Default.SomeoneString;
else
KillerName = RelatedPRI_1.PlayerName;

return class'GameInfo'.Static.ParseKillMessage(
KillerName,
VictimName,
Class<DamageType>(OptionalObject).Static.DeathMessage(RelatedPRI_1, RelatedPRI_2) );
}

defaultproperties
{
     KilledString="was killed by"
     SomeoneString="someone"
}

Spanky will be posting a new video to show the AI's new behavior.
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Koden on Sunday, December 25, 2016, 14:01:05 PM
Ive been working more on the AI Mod, the AI now uses some Path finding to patrol the PathNode network i have setup while patrolling if they see a player they will follow you using path finding so if you run from one building to the next they will attempt to follow you even if they cant see you anymore and they will shoot at you, they are really accurate and will fire full-auto at you.

the reason when the AI kill you the deathmessage says "YourPlayerName has been shot by someone" is because in class AGP_DeathMessage if the controller whether it be a HumanController or a AIController doesnt have a PlayerReplicationInfo Class (in this case its the AIController that doesnt have a PlayerReplicationInfo class).

Code Snippet from AGP_DeathMessage.uc:
Code: [Select]
var localized string KilledString, SomeoneString;

static function string GetString(
optional int Switch,
optional PlayerReplicationInfo RelatedPRI_1,
optional PlayerReplicationInfo RelatedPRI_2,
optional Object OptionalObject,
optional string ExtraText
)
{
local string KillerName, VictimName;

if (Class<DamageType>(OptionalObject) == None){
return "";
}

if (RelatedPRI_2 == None)
VictimName = Default.SomeoneString;
else
VictimName = RelatedPRI_2.PlayerName;

if ( Switch == 1 )
{
// suicide
return class'GameInfo'.Static.ParseKillMessage(
VictimName,
VictimName,
Class<DamageType>(OptionalObject).Static.SuicideMessage(RelatedPRI_2) );
}

if (RelatedPRI_1 == None)
KillerName = Default.SomeoneString;
else
KillerName = RelatedPRI_1.PlayerName;

return class'GameInfo'.Static.ParseKillMessage(
KillerName,
VictimName,
Class<DamageType>(OptionalObject).Static.DeathMessage(RelatedPRI_1, RelatedPRI_2) );
}

defaultproperties
{
     KilledString="was killed by"
     SomeoneString="someone"
}

Spanky will be posting a new video to show the AI's new behavior.

That's a really cool addition, nice job!
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: LEEFFM on Sunday, December 25, 2016, 14:32:14 PM
Thanks!, i have now made it so my AIController now has a PlayerReplicationInfo class and i have set the Playername to Assist_bot, now they shoot at eachother as they are not assigned to any team so i see deathmessages that say "Assist_Bot was shot by Assist_bot, and when they kil me ".neXus[LEEFFM] was shot by Assist_bot"

this addition will not be included in the video.
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Koden on Sunday, December 25, 2016, 15:18:50 PM
Thanks!, i have now made it so my AIController now has a PlayerReplicationInfo class and i have set the Playername to Assist_bot, now they shoot at eachother as they are not assigned to any team so i see deathmessages that say "Assist_Bot was shot by Assist_bot, and when they kil me ".neXus[LEEFFM] was shot by Assist_bot"

this addition will not be included in the video.
That must be funny to look at...did you work on any map in particular, in order to set the pathfinding?
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: LEEFFM on Sunday, December 25, 2016, 15:21:10 PM
I have setup Pathnodes on Urban Assault and renamed it to UrbanAI for testing purposes. the pathfinding itself is done by using native functions from Controller.uc

Code Snippet from Controller.uc
Code: [Select]
native(517) final function Actor FindPathToward(actor anActor, optional bool bWeightDetours);

native(502) final latent function MoveToward(actor NewTarget, optional Actor ViewFocus, optional float DestinationOffset, optional bool bUseStrafing, optional bool bShouldWalk);
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Spanky on Monday, December 26, 2016, 13:19:24 PM
Little late but here's the first video (might upload a second):
https://www.youtube.com/watch?v=0x_yOHGl32g (https://www.youtube.com/watch?v=0x_yOHGl32g)
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Ganja on Monday, December 26, 2016, 13:35:37 PM
AI 1 - 0 Spanky :D
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Koden on Monday, December 26, 2016, 14:12:26 PM
It still looks kind of funny because of the lack of animations for the AI, and it also makes it harder to predict which action they're performing (although I guess they only walk, right?), but overall it is definitely working.
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: LEEFFM on Monday, December 26, 2016, 15:32:49 PM
Actually they have animations if you spawn them using a command i added "summonmercenary", but the ones placed in the map editor dont seem to have/use animations.

I think i need to make the path node network better because bots seem to work best in the middle building where you could see 4 of them wandering, after killing those i can spawn more using "summonmercenary" and they start wandering/patroling but if i use "summonmercenary" in other places like around the 2 spawn areas for example they just stand there and cant find a path to the movetarget whis is set to be a random pathnode in the pathnode network but if they see an enemy they are supposed to follow/shoot but the path to the enemy cannot be found and i get errors in the log file say pawn accessed none still working out the issues, i put thoose issues to the side as im now trying to get them to spawn at the beginning of the match to play in place of human players untill human players join the game.

At this point the Bots have a default state named Busy which checks to see if the pawn has a weapon and if it does not it gives the pawn a weapon, then it tells the bot to go to state MPatorl (a state for of course patrolling the pathnode network) in that state it picks a random pathnode attempt to find  a path to it and then moves to the first pathnode towards the Destination pathnode.

While the bot is in state Mpatrol if he sees a player he will set the player as his movetarget and enemy, then he will go to state Follow where the Destionation is the player that was seen, the bot wil try to find a path to the enemy then it will move toward the first pathnode towards the enemy and will shoot at the enemy player.

When the Enemy the bot saw dies the bot will stop shooting and go back to state busy to start the process over again.
Title: Re: When OpFor invade your empty server (AKA LEEFFM's AI Mod)
Post by: Ganja on Monday, December 26, 2016, 17:51:18 PM
Very impressive and neat :)