What I'm coding for XMP...

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

takwu

cXp coder Tak®
Feb 5, 2004
614
0
0
www.mif.vu.lt
For the last month and a half, I've been trying to make a new mod for XMP. But to make this mod work, I needed a bot.

Originally I started looking at the Unreal2 code, because I think the NPC (Non-player character) AI is pretty good. But to my disappointment the code structure of the characters is completely different from XMP. They share almost nothing beyond the engine code (written by Epic). Plus it's complex beyond believe... about a dozen different classes to look at. It took a very long time to figure out everything and then decide to abandon that direction.

Then I looked at the existing code in XMP for the auto turrets. Not expecting much really. The code is too simple to transform into a search and destroy, moving enemy.

Finally I started looking at the UT2003 code. First the Bot code - computer behaving as actual players, is way too complex. It's 4500 lines of code in one class, plus other classes it depends on (Squad AI etc). It's a lot better than the U2 situation, but there is still no way I can port all of that over. Afterall the Epic Bot was probably designed to be as versatile as possible for all kinds of different games that the Unreal engine can be used for.

Looking a bit deeper, UT2003 also has the Monster code - controls monsters that simply kill players in the Invasion gametype. It's a much simplified version of Bot (about half the size) and it's exactly what I'm looking for... except of course it doesn't just work in XMP. It took me another week to understand everything so I can make the XMP character code (Pawn) compatible with any AI - it was designed to be human controlled only. Now I am going thru the AI code to (hopefully) properly control the Pawn.

2600 lines of code is still not easy to go thru all at once. After hoping everything to automagically work together has proved to be futile, I decided to go thru it step by step. I cut down the code to be as simple as possible, and then I'll put each feature back in and fix it up that way.

At this point I have cut all the "awareness" of the Monster, and put in the first feature: wandering (now at just over 500 lines). It works - thank the Artis. The screenshot I made doesn't "prove" anything: it's just some Gunner named "Bot1" walking. But trust me, that is not a player, it's computer controlled. And it walks around in different directions randomly.

I picked RGB as my test bed for obvious reasons... But something hilarious happened. I watched the bot wander for a while, and eventually he walked over the jumppad! He landed in the middle "bridge" and kept wandering as if nothing happened :lol:

Now I am way overdue for the other project - real life. The bot issue was very optimistically thought to be solved by last month, so I still have this month to work on the mod. But now we're one week into the month and I have a "zombie" that only wanders around. So the status of this whole project now becomes "I'll work on it if I feel like it."

The reality is I am back to school in September, and if possible I would like to get a part-time job to pay for this school too. In that case I'll have zero time to even touch any games. We'll see what happens with the rest of these days I'm still free. In all likelihood the project will be on hold after that.

If there is anyone interested in continuing the AI part of the project, feel free to contact me and we'll talk. Oh, and what's the rest of this mod thing? I was going to announce it once the bot issue is solved... So let's hope it will be solved soon, or you'll have to wait until who knows when.

Meanwhile let's just keep the party going and play XMP as it is every week hehehe...
 

Attachments

  • Shot00010.JPG
    Shot00010.JPG
    270.9 KB · Views: 52

GreatEmerald

Khnumhotep
Jan 20, 2008
4,042
1
0
Lithuania
Nice :) Yea, I code by the same way - copy some code, hope that it works, see that it doesn't, disable what doesn't, see if everything else works, repeat, fix what I can, ask people at the UT2004 forums for advice. ;)
 

Dusty

New Member
Jun 3, 2008
18
0
0
Stop seeing H4X everywhere.
Bot and player are same team.
UIscripts:
Component=PIDHealthBars in PID.ui
 

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
What happened with the "alpha" code? Did it work, did you look into it?
 

takwu

cXp coder Tak®
Feb 5, 2004
614
0
0
www.mif.vu.lt
Leo I looked at the U2 Alpha version and it wasn't really that different from the release version. Unless I missed something?
 

takwu

cXp coder Tak®
Feb 5, 2004
614
0
0
www.mif.vu.lt
OMF OMF a leak! Leak!

I found a leaked Alpha version (a5) of this mod, called Ruby!

http://members.shaw.ca/takwu/XMP/Ruby_a5.zip

Ok so I leaked it :eek: You can all thx Killer... Tak: but it doesn't die, it just lies there waiting to be revived, you sure you still want it? Killer: So it doesn't respawn? Tak: maybe I'll make one that dies and respawns...

So I did. lol. Have fun!
 

Attachments

  • Shot00000.JPG
    Shot00000.JPG
    287.4 KB · Views: 24
Last edited:
Mar 6, 2004
3,566
0
36
Thank you Killer.:D

edit- where do we save it to? no bot spawns and i extracted it to my system folder.

edit 2- Hmm, i read the readme but it still does not show a bot in my server, i did both things the readme says also. :(

Can't find file for package 'Ruby_a5'

Does that when i load the ruby map, or it does that when i load a map that has the stuff the readme says.
 
Last edited:
Mar 6, 2004
3,566
0
36
Thank you Killer.:D

edit- where do we save it to? no bot spawns and i extracted it to my system folder.

edit 2- Hmm, i read the readme but it still does not show a bot in my server, i did both things the readme says also. :(



Does that when i load the ruby map, or it does that when i load a map that has the stuff the readme says.

Nevermind, i did it wrong. I put it in u2 folder, instead of system folder. Put the bot rgb map in the maps folder and you will see a bot named Bot1. He just stands there.

Ok, bot cannot get ko'd or revived, lays dead forever. Already let Tak know.
 
Last edited:
Mar 6, 2004
3,566
0
36
Ok it's fixed, the download link is good to go.A slight bug in it, since it's beta. Bot 1 leaves the game as the game starts, you kill it and bot 2 enters the server and kill it bot 3 enters. They all leave after u kill them and a new one enters.
 

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
Leo I looked at the U2 Alpha version and it wasn't really that different from the release version. Unless I missed something?

It's a lot different than final, at least at weapons and such stuff. I thought it might work.
 

GreatEmerald

Khnumhotep
Jan 20, 2008
4,042
1
0
Lithuania
Hey Tak, tried to look at the UTXMP code?
http://pastebin.com/m5122b5ca - Gunner pawn code Oh wait, you ALREADY have the pawn code! The same is at Pawns.Gunner! Then all you need is a good Controller! By the way, it seems that there are tests of a Bot already at GTestB (Gunner Test Bot)... http://unreal.student.utwente.nl/uncodex-u2/Source_pawns/gtestb.html
http://pastebin.com/m1e3c520a - XMP Bot code (needs XBot class)
http://unreal.student.utwente.nl/uncodex-ut2004/Source_xgame/xbot.html.gz - XBot class, a controller, needs Bot... ScriptedController... AIController... And Controller... Luckily you already have Controller, AIController and even ScriptedController! Maybe it could work then! You still need Bot then:
http://unreal.student.utwente.nl/uncodex-ut2004/Source_unrealgame/bot.html.gz

Also the Bot must be replicated.. You need a RepicationInfo:
http://unreal.student.utwente.nl/uncodex-ut2004/Source_unrealgame/teamplayerreplicationinfo.html.gz
And then the XMP Player Replication Info:
http://pastebin.com/ma77d40b

For pathing, AssaultPaths would be useful:
http://unreal.student.utwente.nl/uncodex-ut2004/Source_unrealgame/assaultpath.html.gz
Strangely, everything else seems to be already set up for bots! :S

With all this you should get a fully working DeathMatch bot, but with nothing to attract it as there are no pickups... So basically they would only wander around. To make them steal artifacts, you need an Objective...
First you need a JumpSpot (if the bot can't get on that platform at Sirocco, you have to tell him to jump!): http://unreal.student.utwente.nl/uncodex-ut2004/Source_unrealgame/jumpspot.html.gz
Then a GameObjective to attract it: http://unreal.student.utwente.nl/uncodex-ut2004/Source_unrealgame/gameobjective.html.gz
And finally a fresh Icon Node: http://pastebin.com/m54ff2743

I know, a hellish lot of links, but I can send you the full UTXMP code if you wish ;)
 
Last edited:
Mar 6, 2004
3,566
0
36
He is nolonger doing this, and hasn't for a while. Maybe next summer he told me a while back. School and work take up alot of time.
 

takwu

cXp coder Tak®
Feb 5, 2004
614
0
0
www.mif.vu.lt
Yep. In the summer I had foreseen that I would be way too busy when school starts. That is the reason for the very rush release (or "leak") of Ruby Alpha.

All I can do now is try to be there on Wednesdays ;)

As I have originally explained, Bot is 4500 lines, so good luck trying to debug that for XMP. Everything, including the UTXMP bot, that subclasses Bot will need Bot to work perfectly.

Monster, on the other hand, is very similar to Bot, with a lot less features. RubyBot is Monster stripped down to basic wandering only. It's a subclass of AIController.

GTestB is an AIController that tells the pawn to repeat an animation. That's it.

xBot uses xPawn. U2XMP pawns are not xPawns.

...

Well I hope that doesn't discourage anyone who wants to continue developing a bot for U2XMP. The fact that RubyBot works means it is possible, only that considerable work is required to continue porting over the rest of Monster or Bot.

If you are interested, please extract RubyBot code from Ruby Alpha, compare it to Monster and Bot, and carefully read my comments in code. I traced the code all over the place to figure out some of the things that's needed to make it compatible with XMP.

For examples, look at the weapon preference code and the physics mode stuff. They seem trivial, but without them even RubyBot wouldn't wander around, and you would have no idea why.

I will not have time to work on it again in the immediate future... But yeah next summer I will see what happens in my life :D
 

GreatEmerald

Khnumhotep
Jan 20, 2008
4,042
1
0
Lithuania
Monster, on the other hand, is very similar to Bot, with a lot less features. RubyBot is Monster stripped down to basic wandering only. It's a subclass of AIController.
Yet you need a Bot, not a Monster! :D It needs teamwork and the use of weapons.
GTestB is an AIController that tells the pawn to repeat an animation. That's it.
No it's not, it's a Pawn. It doesn't have a (usable) AIController and that's why it won't work.
xBot uses xPawn. U2XMP pawns are not xPawns.
Yes, but that doesn't seem to be essential.

As I have originally explained, Bot is 4500 lines, so good luck trying to debug that for XMP.
Bot of UT2004 is 5744 lines, Bot of UT2003 is 4357 lines. Monsters are 2542-8.

And can you give us the extracted code? GPL FTW :D

Oh, and also we could look at U2's bots. They even have 2 options:
http://unreal.student.utwente.nl/uncodex-u2xmp/Source_u2aiold/u2npccontrollerbaseold.html - Old NPC Controller Base (6887 lines, but heck loads of comments), used for U2 Bots!
http://unreal.student.utwente.nl/uncodex-u2xmp/Source_u2ai/u2npccontrollerbase.html - New NPC Controller Base (W00t, only 3132 lines! And still a lot of comments!)
 
Last edited:

Leo(T.C.K.)

I did something m0tarded and now I have read only access! :(
May 14, 2006
4,794
36
48
The alpha bots too, but he said they are no use for him.
 
Mar 6, 2004
3,566
0
36
Typhoon told me he will make bots for u2xmp sometime, of course it will probably be a few years from now when he's done making xmp for ut3 (starting from scratch), he's almost a pro coder now.