View previous topic :: View next topic |
Author |
Message |
hondobondo
Joined: 26 Sep 2006 Posts: 102
|
Posted: Sun Feb 21, 2010 9:56 pm Post subject: Re: SDQuake -> Working under Linux with DarkPlaces...Yipp |
|
|
Dark$oul71 wrote: | Hi hondobondo,
it seems to me that you misunderstood me. I do not wanted you do run or compile anything for/on Linux.
The issues with DarkPlaces and SDQuake are simply caused by the case sensitivity for filenames which Linux has.
I'm afraid that I used the wrong QCC sources for my experiment. Using the latest sources of SDQuake from the nohrp directory I was able to "fix" the problem.
The only uppercased file references I could find within your QuakeC code are located within the bondo.qc for Homer Simpson.
This starts in line 188 with the code line "void () HomerPrecache =" and ends in line 422. I've included the modified bondo.qc to a package which also includes the "lowercase" perl script I've used to rename all files within the sdquake directory to lowercased form. Simply copy the script into the sdquake dir under Linux and launch it.
Since it's written in Perl you have to have Perl installed though *ggg*
May be it works for Windows ?
Well other than that I found a few pages with Renametools for Windows:
http://www.snapfiles.com/Freeware/system/fwfilerename.html
At least the Ant renamer is free and could do the job for you:
http://www.antp.be/software/renamer/
I think other Linux Quakers are happy if you do the additional work to change all filenames to lowercase and add the "patched" bondo.qc to your sources.
After playing half an hour SDQuake 2.66 with Darkplaces-glx under Linux I am pretty confident that now problems will occur anymore.
You can grab the tiny 5 kB archive via megaupload:
http://www.megaupload.com/?d=KR5VGWD2
Thanks for your contiuous work on SDQuake and releasing your olders works also.
Have a fine weekend fellow quakers !
Cheers,
D$
Additional comment:
The perl script I added to the package somehow didn't rename all files to lower case. Thus a few models were missing.
I used the Ant renamer on my Windows machine to rename all files to lowercase and everything is fine now. So in order to make SDQuake Linux-compatible there is little more to do than compiling SDQ with the modded bondo.qc and renaming all files within the SQD folder.
@Hondobondo: Could you do so for the next release ?
Pleaassseee..  |
i'll take a look at it. thanks! |
|
Back to top |
|
 |
Dark$oul71
Joined: 05 Dec 2009 Posts: 55
|
Posted: Thu Apr 29, 2010 12:31 pm Post subject: Less suicidal / destructive bots ? |
|
|
Hi hondobondo,
are there any chances that in the future update the bots within SDQuake behave less suicidal ?
I am not shure what causes this behaviour but I often experience being in the middle of multiple MIRV, orbital bombardement, etc. when I play SDQuake together with bots. This is a pitty since esp. in a bit "tighter" more boxlike maps with 4 to 5 bots they not only nuke themself away each other but I also find myself in the middle of multiple nukes which makes me sometimes die 2-3 times in a row after bouncing around and protection wearing off.
I've found a small function within bot_fight.qc:
Code: |
*
bondo's mod to frikbot to return weapon type and try to avoid close quarters nuking
*/
float (entity boob) weapon_type = {
...
|
No offence but is it possible that this function fails ?
Is there a simple way as "workaround" to exclude "bombardement weapons" from the bots weapons selection ?
I think this is done within bot_fight.qc with the function "bot_weapon_switch"
To my limited qc knowledge
Code: |
nerd = weapon_type(self); //bondo
v = weapon_range(flag, nerd);
if (brange < v_y || brange > v_z)
it = it - flag;
else
{
if (pulse)
self.impulse = pulse;
return;
}
|
Or is this stuff related to the following code within "vector(float wep, float typ) weapon_range ="
Code: |
else if (wep == 64) // IT_LIGHTNING
{
if (typ == 0) return '192 64 2048'; //plasma
else if (typ == 1) return '512 256 2048'; //positron
else if (typ == 2) return '128 0 512'; //proton storm
else if (typ == 3) return '350 0 600'; //lg
else if (typ < 6) return '128 0 512'; //holo/grav well
else return '512 256 2048'; //orb bomb/napalm
}
else if (wep == IT_EXTRA_WEAPON) //
{
if (typ == 0) return '128 64 2048'; //double blazegun
else if (typ == 1) return '128 0 1024'; //nailgun
else if (typ == 2) return '128 0 512'; //twin chaingun
else if (typ < 5) return '256 128 1024'; //twin antimatter
else return '192 64 1024'; //freedom bombs
}
|
Sorry for my dump questions. As I stated my knowledge how qc or the frikbot itself works is very limited
My native language description would be:
Use bombs / mass desctruction weapons (in case of coop mode) if no other bot or player in range of the damage radius of the weapon.
Not shure how to "say" this in QC though
TIA,
D$ |
|
Back to top |
|
 |
frag.machine

Joined: 25 Nov 2006 Posts: 728
|
Posted: Thu Apr 29, 2010 2:06 pm Post subject: |
|
|
I'd suggest to remove any WMD entirely from bot's arsenal. Or, at least, be a last resort measure: if the bot is outnumbered or about to die or cannot use any other weapon, then and only then is okay to nuke everything - including the bot itself. _________________ frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/ |
|
Back to top |
|
 |
Dark$oul71
Joined: 05 Dec 2009 Posts: 55
|
Posted: Thu Apr 29, 2010 8:33 pm Post subject: |
|
|
frag.machine wrote: |
I'd suggest to remove any WMD entirely from bot's arsenal.
|
Agreed ! That would be the simplest approach. I can live with the bots not being able to nuke as long as I can nuke myself
Unfortunately I am not completely shure what triggers the weapons change for the frikabot inside SDQuake.
Iīve pasted the source code here:
http://pastebin.com/NiktjXFk
To what I understand the function "weapon_type" (line 334) triggers the weapon type somehow.
Based on the type (e.g. "IT_EXTRA_WEAPON") I think that damage radius is set in the function "weapon_range" (line 258). The "connect" I do not understand is where the weapons used by the bots are really defined.
I would be thankful for a short hint.
Sry...QC noob here
P.S.: Stuff like "bots nuke only if they are outgunned" would be cool but is currently way out of my QC knowledge. Itīs a pitty since I coded C++ for some time to earn money during studies but for QC I still do not get the full picture. I am happy if I understand at least a few relations. |
|
Back to top |
|
 |
Dark$oul71
Joined: 05 Dec 2009 Posts: 55
|
Posted: Fri Apr 30, 2010 9:16 am Post subject: |
|
|
@frag.machine:
OK, I've take a colser look to the bot_fight.qc and think I understand where the weapons are selected.
It's within "void(float brange) bot_weapon_switch =" (line 373) where the impulse command is set.
What I still do not get is which impulse triggers each weapon. From what I know each weapon inside quake is triggered by impulse command. So if I use a weapon with is enable by pressing key 5 three times my understanding would be that the command impulse 42 (for example) is executed three times. This is something I am missing inside the bot_fight.qc.
@hondobondo:
I think that also other users of sdquake share the same problem. May be you can simply add a variable to control if the bots are able to use WMD (= weapons of mass destruction) although it would be way cooler if the behaviour of the bots could be fixed. Something speaking like BOTS_NO_WMD would be great.
What do you think ? |
|
Back to top |
|
 |
frag.machine

Joined: 25 Nov 2006 Posts: 728
|
Posted: Fri Apr 30, 2010 1:36 pm Post subject: |
|
|
Havent' checked the SDQ sources, but the weapon inventory system surely is different from vanilla QC. _________________ frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/ |
|
Back to top |
|
 |
Dark$oul71
Joined: 05 Dec 2009 Posts: 55
|
Posted: Fri Apr 30, 2010 2:15 pm Post subject: |
|
|
frag.machine wrote: | Havent' checked the SDQ sources, but the weapon inventory system surely is different from vanilla QC. |
Hm, SDQ doesn't seem so different to me right now. There is a weapons.qc which essentially has all the "logic" encapsuled for all the weapons.
I've found now the code part with the impulse inside weapons.qc. The problem I see in here:
The code itself avoids that I can "forbid" a certain weapon for the bots unless I complete leave out the category.
Have a look here:
Code: |
else if ( (self.impulse == MOVETYPE_TOSS) )
{
fl = IT_GRENADE_LAUNCHER;
if ( (self.ammo_rockets < TRUE) )
am = TRUE;
if (self.weapon == IT_GRENADE_LAUNCHER)
{
if (self.grenadetype == 5)
self.grenadetype = 0;
else
self.grenadetype = self.grenadetype + 1;
}
if (self.grenadetype == 0)
msg = "DEVASTATOR\n";
else if (self.grenadetype == 1)
msg = "perimeter defense system\n";
else if (self.grenadetype == 2)
msg = "vortex\n";
else if (self.grenadetype == 3)
msg = "nuclear grenade\n";
else if (self.grenadetype == 4)
msg = "SuperDuper Death Blossom\n";
else
msg = "DEATH'S HEAD\n";
}
|
As I understand it the same "impulse command" circles through all wepons inside the same category based on the current weapon you have. So I can only "forbid" a complete category of weapon for bots and not limit the usage to lets say nuclear grenade and exclude Death's head or MIRV.
I think I'll contact hondobondo on this one.
Have a nice weekend,
D$ |
|
Back to top |
|
 |
frag.machine

Joined: 25 Nov 2006 Posts: 728
|
Posted: Fri Apr 30, 2010 6:09 pm Post subject: |
|
|
Actually, it can be easier than you may think:
Code: |
// pseudocode
if (self == human)
{
if (self.grenadetype == 0)
msg = "DEVASTATOR\n";
else if (self.grenadetype == 1)
msg = "perimeter defense system\n";
else if (self.grenadetype == 2)
msg = "vortex\n";
else if (self.grenadetype == 3)
msg = "nuclear grenade\n";
else if (self.grenadetype == 4)
msg = "SuperDuper Death Blossom\n";
else
msg = "DEATH'S HEAD\n";
}
else
{
// force bots to always use vortex
self.grenadetype = 2;
msg = "vortex\n";
}
|
So, all we need to do is to find a way to check if self is a human player or a bot.
EDIT: Not sure if this would work (can't see actual source ATM), but you can try this:
Code: |
if (self.classname == "player") {
// humans can use whatever weapon they desire
if (self.grenadetype == 0)
msg = "DEVASTATOR\n";
else if (self.grenadetype == 1)
msg = "perimeter defense system\n";
else if (self.grenadetype == 2)
msg = "vortex\n";
else if (self.grenadetype == 3)
msg = "nuclear grenade\n";
else if (self.grenadetype == 4)
msg = "SuperDuper Death Blossom\n";
else
msg = "DEATH'S HEAD\n";
}
else
{
// force bots to always use vortex
self.grenadetype = 2;
msg = "vortex\n";
}
|
_________________ frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/ |
|
Back to top |
|
 |
hondobondo
Joined: 26 Sep 2006 Posts: 102
|
Posted: Sun May 02, 2010 10:47 pm Post subject: great stuff |
|
|
good ideas guys. i'll see what i can do and post it tonight. here's the idea in weapons.qc in W_ChangeWeapon:
Code: |
if (self.weapon == IT_GRENADE_LAUNCHER)
{
if (self.ishuman)
{
if (self.grenadetype == 6)
self.grenadetype = 0;
else
self.grenadetype = self.grenadetype + 1;
}
else
{
if (self.grenadetype == 3)
self.grenadetype = 0;
else
self.grenadetype = self.grenadetype + 1;
}
}
if (self.grenadetype == 0)
msg = "DEVASTATOR\n";
else if (self.grenadetype == 1)
msg = "Twin Rocket Shotgun\n";
else if (self.grenadetype == 2)
msg = "FBomb Turret\n";
else if (self.grenadetype == 3)
msg = "Missile Turret\n";
else if (self.grenadetype == 4)
msg = "vortex\n";
else if (self.grenadetype == 5)
msg = "nuclear grenade\n";
else
msg = "SuperDuper Death Blossom\n";
|
that's probably the easiest. maybe later i'll code if health < 25 and do a findradius and count the number of class 5 monsters in the vicinity or something. that's a great idea. i hate when those retards spam vortexes. i tried to do a fix in bot_fight just to keep everything neat and smart but this will definitely work better |
|
Back to top |
|
 |
frag.machine

Joined: 25 Nov 2006 Posts: 728
|
Posted: Mon May 03, 2010 1:03 am Post subject: |
|
|
Cool! Add some kind of battle cry/warning to the bot just before it going berserk so people can run away.  _________________ frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/ |
|
Back to top |
|
 |
Dark$oul71
Joined: 05 Dec 2009 Posts: 55
|
Posted: Mon May 03, 2010 6:36 am Post subject: |
|
|
@hondobondo:
Thnx for your reply ! It would be nice if you could post the modified qc code here. I would be willing to test
@frag.machine:
Thanks for your replies. I am afraid that it would take aeons until I understand the sdq sources good enough to make a clean modification.
I like the idea with the war cry. May be we should here a "GERONIMOOOOOO..." before the bot blews up himself *ggg*
Edit: I think Dirty Harry's "Make my day..." would fit in as well
Edit2: It would be cool if the issues of "close quarter nuking" could be solved. I've seen the corresponding part in the qc code but something seems to go wrong. |
|
Back to top |
|
 |
frag.machine

Joined: 25 Nov 2006 Posts: 728
|
Posted: Mon May 03, 2010 12:43 pm Post subject: |
|
|
google by "Wilhem scream", it would be an epic LOL  _________________ frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/ |
|
Back to top |
|
 |
frag.machine

Joined: 25 Nov 2006 Posts: 728
|
Posted: Sun May 09, 2010 1:04 am Post subject: |
|
|
A small map I cooked for SDQuake 2.5. Not exactly a box, but nothing special either.
Maybe I can make some others later.
Feedback is welcome. _________________ frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/ |
|
Back to top |
|
 |
Dark$oul71
Joined: 05 Dec 2009 Posts: 55
|
Posted: Sun May 09, 2010 12:14 pm Post subject: |
|
|
@frag.machine:
a nice map ! Thanks...
Just a few comments:
- I find a map a bit too dark. Could have a higher light level.
- It could be a bit bigger. Generally I rather like to play the more open maps with wider areas. Esp. with the weapons of mass destruction *ggg*
- You could add a tunnel with a big cave in between which connects both ends of the canyon
While tighter maps are also cool to play in SDQuake I think that bigger maps suit more the higher skill levels. Both for the big mass of enemies as well as for the more powerful weapons. Not shure if you have ever played it but compare it to Serious Sam or Painkiller.
@hondobondo:
Have you had a chance to modify weapons.qc in regard to avoid close quarter nuking ?
For the "wilhelm scream" I like this one from the Dark Knight:
http://www.youtube.com/watch?v=QGGArPVeG_Q
BTW: SDQuake seems to have a bug when you are in observer mode. When I play with bots, die too often and then run around in observer mode I still seem to pick up items. At least the items vanish and I hear the pickup sound when I run over it.
Yesterday I experienced another strange behaviour:
I was in observer mode and had around 6 bots still alive in the level. The bots seemed to follow me as observer and were, well, passiv. Although there were tons of monsters still around they didnīt kill them.
Any ideas on this ? |
|
Back to top |
|
 |
frag.machine

Joined: 25 Nov 2006 Posts: 728
|
Posted: Sun May 09, 2010 2:30 pm Post subject: |
|
|
Dark$oul71 wrote: | @frag.machine:
a nice map ! Thanks...
Just a few comments:
- I find a map a bit too dark. Could have a higher light level.
|
Yeah, I realized this after playtesting it a bit more. I'll fix it.
Dark$oul71 wrote: |
- It could be a bit bigger. Generally I rather like to play the more open maps with wider areas. Esp. with the weapons of mass destruction *ggg*
|
The original idea was a 4096-wide box, but in the end I just made the main corridor because SDQuake does not favour complex map geometries - the game works better when all the monsters can see you at the same time. I'll figure out a way to expand the map without breaking the gameplay.
Dark$oul71 wrote: |
- You could add a tunnel with a big cave in between which connects both ends of the canyon
|
You have two not so obvious ways to the other side of the map (to the room where the ring of power lies), either jumping the gap where the borders are closer, or jumping by the small ledge I left in one of the corridor ends. _________________ frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/ |
|
Back to top |
|
 |
|