Inside3D!
     

Frikbots & Skins
Goto page 1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Artificial Intelligence
View previous topic :: View next topic  
Author Message
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Tue Jun 26, 2007 5:01 am    Post subject: Frikbots & Skins Reply with quote

Does anyone know how to give custom skins to Frikbots?
When I spawn them in QW the always use the base skin.
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Tue Jun 26, 2007 3:01 pm    Post subject: Reply with quote

First, you'll need a player.mdl with some different skins on it. Second, look for BotName in bot_misc.qc. Just stick in some self.skin = X where X is the skin number.
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Tue Jun 26, 2007 4:34 pm    Post subject: Reply with quote

Can you explain how to create / modify the player.mdl file?
I tried to read the file but it was all garbled Sad .
Thanks.
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Tue Jun 26, 2007 4:35 pm    Post subject: Reply with quote

quakeworld doesn't use the player.mdl skin hack
Back to top
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Tue Jun 26, 2007 9:49 pm    Post subject: Reply with quote

CheapAlert wrote:
quakeworld doesn't use the player.mdl skin hack


...It doesn't?

God, I loathe QuakeWorld. :/
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Tue Jun 26, 2007 11:57 pm    Post subject: Reply with quote

You need to change this code found in bot_qw.qc:

Code:

   // FIXME: do teams properly
   // note this has no effect on infokey
   WriteByte(2, 92 );  // \
   WriteByte(2, 115); // s
   WriteByte(2, 107); // k
   WriteByte(2, 105); // i
   WriteByte(2, 110); // n
   WriteByte(2, 92);  // \
   WriteByte(2, 98);  // b
   WriteByte(2, 97);  // a
   WriteByte(2, 115); // s
   WriteByte(2, 101); // e
   WriteByte(2, 92);  // \


Good luck!
Back to top
View user's profile Send private message Send e-mail
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Wed Jun 27, 2007 8:12 pm    Post subject: Reply with quote

Is there a way for each bot to have their own skin?
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Wed Jun 27, 2007 8:49 pm    Post subject: Reply with quote

Yes.
Back to top
View user's profile Send private message Send e-mail
Supa



Joined: 26 Oct 2004
Posts: 122

PostPosted: Thu Jun 28, 2007 12:45 am    Post subject: Reply with quote

First a disclaimer:
1) My only real experience in QW modding is from my stupid QW speedmod, FishQuake.
2) I'm not actually looking at the FBX code right now, just working from FrikaC's post, thusly I have no way of actualy checking wheter or not this will work.
3) I am a muppet.

That said:

Code:

97    a   104   h   111   o   118   v
98    b   105   i   112   p   119   w
99    c   106   j   113   q   120   x
100   d   107   k   114   r   121   y
101   e   108   l   115   s   122   z
102   f   109   m   116   t
103   g   110   n   117   u


So if you want one bot to use skin 'foo', you'd do:

Code:

   WriteByte(2, 92 ); // \
   WriteByte(2, 115); // s
   WriteByte(2, 107); // k
   WriteByte(2, 105); // i
   WriteByte(2, 110); // n
   WriteByte(2, 92);  // \
   WriteByte(2, 102); // f
   WriteByte(2, 111); // o
   WriteByte(2, 111); // o
   WriteByte(2, 92);  // \


Taking this further you could try this:

Code:

   WriteByte(2, 92 ); // \
   WriteByte(2, 115); // s
   WriteByte(2, 107); // k
   WriteByte(2, 105); // i
   WriteByte(2, 110); // n
   WriteByte(2, 92);  // \

   if (somenumber == 0)
   {
         WriteByte(2, 98);  // b
         WriteByte(2, 97);  // a
         WriteByte(2, 115); // s
         WriteByte(2, 101); // e
   }
   else if (somenumber == 1)
   {
         WriteByte(2, 102); // f
         WriteByte(2, 111); // o
         WriteByte(2, 111); // o
   }
   else if (somenumber == 2)
   {
         WriteByte(2, 98);  // b
         WriteByte(2, 97);  // a
         WriteByte(2, 114); // r
   }

   WriteByte(2, 92);  // \

(And so on..)

Of course, I could be wrong. =)
Back to top
View user's profile Send private message Send e-mail
Electro



Joined: 29 Dec 2004
Posts: 241
Location: Brisbane, Australia

PostPosted: Thu Jun 28, 2007 1:15 am    Post subject: Reply with quote

Another step to take that to would be to make use of string manipulation stuff in newer engines

but of course that's probably not desirable because backwards compatibility would be shot

If it's not an issue then you could rather easily write a function that iterates through every letter in the skin and substitues it for the number and does the writebyte accordingly.

What a hassle!
_________________
Unit reporting!
http://www.bendarling.net/
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Thu Jun 28, 2007 3:13 am    Post subject: Reply with quote

FrikaC, how would you do it?
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Thu Jun 28, 2007 4:26 am    Post subject: Reply with quote

And the next question you would ask is, hmm. But how would Jesus do it?
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Thu Jun 28, 2007 4:29 am    Post subject: Reply with quote

he'd say use quake2.
Back to top
View user's profile Send private message
Teiman



Joined: 03 Jun 2007
Posts: 309

PostPosted: Thu Jun 28, 2007 8:00 am    Post subject: Reply with quote

Jesus is a crank. He will use a hack like totally different models.

http://en.wikipedia.org/wiki/Crank_%28person%29
Back to top
View user's profile Send private message
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Thu Jun 28, 2007 2:16 pm    Post subject: Reply with quote

Supa wrote:
First a disclaimer:
1) My only real experience in QW modding is from my stupid QW speedmod, FishQuake.
2) I'm not actually looking at the FBX code right now, just working from FrikaC's post, thusly I have no way of actualy checking wheter or not this will work.
3) I am a muppet.

That said:

Code:

97    a   104   h   111   o   118   v
98    b   105   i   112   p   119   w
99    c   106   j   113   q   120   x
100   d   107   k   114   r   121   y
101   e   108   l   115   s   122   z
102   f   109   m   116   t
103   g   110   n   117   u


So if you want one bot to use skin 'foo', you'd do:

Code:

   WriteByte(2, 92 ); // \
   WriteByte(2, 115); // s
   WriteByte(2, 107); // k
   WriteByte(2, 105); // i
   WriteByte(2, 110); // n
   WriteByte(2, 92);  // \
   WriteByte(2, 102); // f
   WriteByte(2, 111); // o
   WriteByte(2, 111); // o
   WriteByte(2, 92);  // \


Taking this further you could try this:

Code:

   WriteByte(2, 92 ); // \
   WriteByte(2, 115); // s
   WriteByte(2, 107); // k
   WriteByte(2, 105); // i
   WriteByte(2, 110); // n
   WriteByte(2, 92);  // \

   if (somenumber == 0)
   {
         WriteByte(2, 98);  // b
         WriteByte(2, 97);  // a
         WriteByte(2, 115); // s
         WriteByte(2, 101); // e
   }
   else if (somenumber == 1)
   {
         WriteByte(2, 102); // f
         WriteByte(2, 111); // o
         WriteByte(2, 111); // o
   }
   else if (somenumber == 2)
   {
         WriteByte(2, 98);  // b
         WriteByte(2, 97);  // a
         WriteByte(2, 114); // r
   }

   WriteByte(2, 92);  // \

(And so on..)

Of course, I could be wrong. =)


You are absolutely correct. As far as actual implementation, somenumber can be self.b_num, which is the bot template number for names & colors. Also, if you want to make the code FrikQCC/fteqcc specific you can use single quoted letters instead of the ascii-code.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Artificial Intelligence All times are GMT
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group