View previous topic :: View next topic |
Author |
Message |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Thu Mar 29, 2007 9:24 pm Post subject: |
|
|
It worked!
Next problem, getting 2 lines of MOTD. This is what I tried:
float modelindex_eyes, modelindex_player;
void() CheckMOTD =
{
if ((self.motd_count < 7) && (self.motd_time < time)) // 7 == seconds MOTD will display
{
self.motd_time = time + 1;
self.motd_count = self.motd_count + 1;
centerprint(self, "Welcome to Spisi's fragfest!"\n"FFA 15 fraglimit 7 timelimit\"); //Type in you're message here "\n" = new line
return;
}
I can't get that second line to work. "FFA 15 fraglimit 7 timelimit" _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
scar3crow Inside3D Staff

Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV
|
Posted: Thu Mar 29, 2007 9:51 pm Post subject: |
|
|
You had
Code: | centerprint(self, "Welcome to Spisi's fragfest!"\n"FFA 15 fraglimit 7 timelimit\"); |
I believe, and Im no expert, it should be
Code: | centerprint(self, "Welcome to Spisi's fragfest!\nFFA 15 fraglimit 7 timelimit\"); |
Notice that I removed the inside quotes from the line, because its all the same text message being passed to centerprint. Telling it to end the quote before telling it to linebreak with \n confuses it, and besides, you werent done with the quote yet =)
You might also want to spruce up the language, like "Fraglimit is 15 and the timelimit is 7", its easier to read.
For further example, take a look at the end of episode text here and jump down to void() ExitIntermission =
From that you can see the use of breaklines in quotes as done by id for the epic poetry it displays when you successfully grab a rune. Hope that helps. |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Thu Mar 29, 2007 10:37 pm Post subject: |
|
|
Sweet! Now we're cooking! You guys are extremely helpfull!
Let's see, I've learned to use the compiler
and I've learned to create a MOTD Nice!
Now, I read in a frikbot readme file that I could change the name of the bots by editing bot_misc.qc which I did. But it did not work. Now I know why, it needed to be compiled!
Now that I am an expert compiler , I tried to re-compile the frikbot qwprog.dat file. Of course it won't work.
I copied fteqcc.exe and the frikbot qwprog.dat to the folder with all the frikbot.qc files. Then I ran the compiler. It did not create a new qwprog.dat file.
I looked in my qw folder and saw a progs.cfg file. So I copied that as well and changed the filenames within the file to match the frikbot .qc files. That failed as well. What am I doing wrong? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
scar3crow Inside3D Staff

Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV
|
Posted: Thu Mar 29, 2007 10:40 pm Post subject: |
|
|
Compiling qwprogs is different because of how QW changes things to make it more optimized for bandwidth - and thus is out of my range, Ive never compiled a qwprogs before (never tried to, never wondered how honestly). I assume its done via command line argument in the compilers, but couldnt say what. Hopefully someone else will respond on that matter. |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Thu Mar 29, 2007 11:26 pm Post subject: |
|
|
What do you make of this:
* Comment out the following functions in defs.qc
sound, stuffcmd, sprint, aim, centerprint, setspawnparms
WriteByte, WriteChar, WriteShort, WriteLong, WriteCoord
WriteAngle, WriteString, WriteEntity
I'm following FrikaC's directions of getting his bots in Quakeworld.
I was doing pretty good until this.
What does he mean comment out? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
scar3crow Inside3D Staff

Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV
|
Posted: Thu Mar 29, 2007 11:38 pm Post subject: |
|
|
This is some code
Code: | makevectors (self.v_angle);
source = self.origin + '0 0 16'; |
This is the same code with a line commented out
Code: | // makevectors (self.v_angle);
source = self.origin + '0 0 16'; |
A // tells the compiler "ignore everything on this line past this point
It is used, obviously, to comment your code with what youre intending to do in that spot, or labeling for quick reference.
For example there is a line in defs.qc that is
Code: | void(entity e) setspawnparms = #78; |
To comment out that line, as I believe he is wanting, I may be wrong, would be
Code: | // void(entity e) setspawnparms = #78; |
Heres a little extra, if you wanted to leave a larger comment in some code, say a paragraph, you would use blockquotes, like this
Code: | /* This is my comment, but it may wrap around some or just be too long to look orderly in a qc file and so for organization's sake I am putting it in this block quote. I hope I didnt get it wrong because it would make a fool out of myself on these forums in front of all of my friends */ |
The compiler will ignore all of that- but it will remain for the coder to see and bring back at a later point if they wish to by removing any form of the comment tags. |
|
Back to top |
|
 |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Thu Mar 29, 2007 11:40 pm Post subject: |
|
|
Maybe you should first try to compile the bots for NQ (non-quakeworld) first, to make sure you have compiling down.
In your source directory (with all the *.qc files), you should have another file called progs.src. This contains where to output the compiled file (progs.dat/qwprogs.dat), and the list of files to compile. If your source files are in /quake/frikbot/qc, then the first line should read '../progs.dat', which would place it one directory up, where the progs.dat is supposed to be.
Don't copy the progs.dat beforehand, you can delete progs.dat before compiling, because compiling will create a new one and if you deleted it it will be easy to see if it worked.
The compiler (FTEQCC.exe, whatever) goes in the same directory as the source files (and the progs.src). If there's something wrong with your code, the compiler will tell you the error (and if nothing is wrong, it will tell you that it succeeded).
Now if you're using a console version of a compiler, the window might close right away so you can't read it. So, try opening up a DOS prompt window (assuming you're on Windows), and running FTEQCC.exe from there, so you can see the output.
And one last thing, in your MOTD centerprint, there is one thing scar3crow forgot to fix.
Code: | centerprint(self, "Welcome to Spisi's fragfest!\nFFA 15 fraglimit 7 timelimit\"); |
should be
Code: | centerprint(self, "Welcome to Spisi's fragfest!\nFFA 15 fraglimit 7 timelimit"); |
Without that backslash near the end.
EDIT: Nevermind this last bit, scar3crow beat me to it :p
You can comment out lines of code by putting '//' before them. For example:
Code: | self.health = 100;
//self.ammo_shells = 25;
self.ammo_shells = 100; |
The // at the beginning tells the compiler to ignore that line. You can use this to annotate your code, or temporarily disable code as above in case you might want to bring it back later, or whatever _________________ 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 |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Thu Mar 29, 2007 11:51 pm Post subject: |
|
|
OK, I'll give it a go. Thanks to the both of you! _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Fri Mar 30, 2007 2:48 am Post subject: |
|
|
Hey guys, I'm going insane now.
I followed FrikaC's instructions:
======================================
These installation instructions only apply to QuakeWorld (as does this entire
file). For Normal Quake, please refer to bot.qc
--------------------------------------
To install on a new mod, do all this:
--------------------------------------
Place all included bot*.qc files in the subdirectory "frikbot"
in your source folder, then...
* Add the following lines to progs.src right after the defs.qc line
frikbot/bot_qw.qc
frikbot/bot_way.qc
frikbot/bot_fight.qc
frikbot/bot_ai.qc
frikbot/bot_misc.qc
frikbot/bot_phys.qc
frikbot/bot_move.qc
--------------------------------------
* Comment out the following functions in defs.qc
sound, stuffcmd, sprint, aim, centerprint, setspawnparms
WriteByte, WriteChar, WriteShort, WriteLong, WriteCoord
WriteAngle, WriteString, WriteEntity
--------------------------------------
* Add this to worldspawn() in world.qc, right at the very top, before InitBodyQue();
BotInit(); // FrikBot
--------------------------------------
* add this line to StartFrame() in world.qc, at the very top
BotFrame(); // FrikBot
--------------------------------------
* Add these two lines to PlayerPreThink in client.qc at the very top
if (BotPreFrame()) // FrikBot
return;
--------------------------------------
* Add this line to PlayerPostThink in client.qc at the very top
if (BotPostFrame()) // FrikBot
return;
--------------------------------------
* Add the following line to the very top of Client Connect in client.qc
ClientInRankings(); // FrikBot
--------------------------------------
* Add these lines to the very top of ClientDisconnect in client.qc
ClientDisconnected(); // FrikBot
--------------------------------------
* Add these lines to the very top of SpectatorConnect in spectate.qc
ClientFixRankings(); // FrikBot
--------------------------------------
I'm confident that I edited correctly. Still won't compile.
I'm getting errors:
Couldn't open file frikbot\bot_qw.qc
Error in defs.qc on line 739
I have all .qc files and fteqcc.exe in the same folder with progs.src.
My progs.src looks like this:
./qwprogs.dat
defs.qc
frikbot/bot_qw.qc
frikbot/bot_way.qc
frikbot/bot_fight.qc
frikbot/bot_ai.qc
frikbot/bot_misc.qc
frikbot/bot_phys.qc
frikbot/bot_move.qc
subs.qc
combat.qc
items.qc
weapons.qc
world.qc
client.qc
spectate.qc
player.qc
doors.qc
buttons.qc
triggers.qc
plats.qc
misc.qc
server.qc
All of this is in my C:\Quakeworld\Frikbot folder.
subs.qc
combat.qc
items.qc
weapons.qc
world.qc
client.qc
spectate.qc
player.qc
doors.qc
buttons.qc
triggers.qc
plats.qc
misc.qc
These files are in my C:\Quakeworld\qw folder as well. (I copied them from here to the Frikbot folder, seemed like the compiler was looking for them)
Does anyone have the qwprogs.dat file thats created from this process? Can FrikaC help?
The bots are really good, I really want them on my server.
Thank you guys for all your help! _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
Urre

Joined: 05 Nov 2004 Posts: 1073 Location: Sweden
|
Posted: Fri Mar 30, 2007 2:14 pm Post subject: |
|
|
You keep mentioning you want frikbots on your server. I hope you're aware of that you don't need to mess with any code or compiling whatsoever if that's all you want to do. You just run the frikbot mod on your server. But if you still want to mess with compiling, here goes some info I think you've missed:
You sure you have the non-frikbot related files in a folder above the frikbot folder? As you can see, progs.src states that the frikbot related files are to be in a folder called "frikbot", and the rest are in the same folder the "frikbot" folder exists in. In other words, your files should look like this:
Code: | #Quake/modfolder/qc/
defs.qc
client.qc
progs.src
blah...
/frikbot/
bot_qw.qc
bot_way.qc
bot_blah... |
Modfolder can be replaced with whatever you like to call the mod, if that's "Frikbot" or whatever you wish.
As you should see, I called the source-code folder "qc", you could call it "src", or "source", or whatever tickles your fancy. There you have all the Quake related files (this includes progs.src). Then there's a subfolder called "frikbot", in there you have all the files which begin with "bot". The compiler is to reside in the "qc" folder, not the "frikbot" folder. That should cure your problems, if you've followed the rest of Frik's instructions correctly  _________________ Look out for Twigboy |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Fri Mar 30, 2007 2:29 pm Post subject: |
|
|
Thanks, I think that should help. I had the compiler in the wrong folder! I'll give it a go when I get home from work.
The reason why I have to do this is b/c the progs.dat as is, does not allow the bots to transfer between maps. So i'm hoping by following those instructions that it will allow them to transfer. Also, the server crashes alot when I run the mod, so I hope it helps there too. Thanks  _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Fri Mar 30, 2007 3:55 pm Post subject: |
|
|
Make sure you're watching the output from the compiler, which tells you whether it actually compiled properly or not. _________________ 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 |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Fri Mar 30, 2007 4:07 pm Post subject: |
|
|
ok, i'm running it under the dos prompt window now. Thanks. _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
Dr. Shadowborg Inside3D Staff

Joined: 16 Oct 2004 Posts: 726
|
Posted: Fri Mar 30, 2007 5:44 pm Post subject: |
|
|
redrum wrote: | The reason why I have to do this is b/c the progs.dat as is, does not allow the bots to transfer between maps. |
See Advanced Options under Playing here:
http://www.inside3d.com/frikbot/fbx/readme.html _________________ "Roboto suggests Plasma Bazooka." |
|
Back to top |
|
 |
redrum

Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York
|
Posted: Fri Mar 30, 2007 9:02 pm Post subject: |
|
|
I tried that. It didn't work.
I put localinfo b_options 1 in my server.cfg file.
I then restarted the server, loaded a new map, and the bots still did not transfer.
Did I miss something?
I keep getting compiler errors in the file bot_qw.qc in line 945.
Which should be the last line of code. Here is the last lines of code in the file. Does anyone see an error?
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Bot Impulses. Allows the player to perform bot
related functions.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/
void() BotImpulses =
{
local float f;
local string h;
if (self.impulse == 100)
{
h = infokey(world, "skill");
f = stof(h);
BotConnect(0, f);
}
else if (self.impulse == 102)
KickABot();
else
return;
self.impulse = 0;
}; _________________ Welcome to the Overlook Hotel 69.113.123.178:27500 |
|
Back to top |
|
 |
|
|
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
|