User panel stuff on forum
  6 posts on 1 page  1
Help
2016-10-24, 15:55
Member
8 posts

Registered:
Oct 2016
Spent several hours trying to figure out a way to give the frogbots in the nQuake package custom names but came up empty. The assigning of names to each loaded bot seems to be located in frogbot.pk3 > qwprogs.dat file. I was able to find the string that assigned the name variables to the bots, but changing it in any of the editors I tried caused the file to be unusable.

Anyone have a dummy version on how I can give my nQuake bots custom names?

Thanks!
2016-10-24, 16:57
Administrator
284 posts

Registered:
Sep 2015
They're hard-coded strings so your best bet is to change SetNetName() function in botimp.qc, then recompile.

When I was fiddling with bots I did the following to give bots on my team a different set of names than the all-bot team:

string() SetTeamNetName =
{
local float playersOnThisTeam, playersOnOtherTeams, frogbotsOnThisTeam;
local string attemptedName;

playersOnThisTeam = 0;
frogbotsOnThisTeam = 0;
playersOnOtherTeams = 0;

search_entity = first_client;
while(search_entity)
{
if (!search_entity.frogbot)
{
if (search_entity.team == self.team)
playersOnThisTeam = playersOnThisTeam + 1;
else
playersOnOtherTeams = playersOnOtherTeams + 1;
}
else if (search_entity.team == self.team)
{
frogbotsOnThisTeam = frogbotsOnThisTeam + 1;
}
search_entity = search_entity.next;
}

if (playersOnOtherTeams > 0 && playersOnThisTeam == 0)
attemptedName = EnemyTeamName();
else if (playersOnThisTeam > 0 && playersOnOtherTeams == 0)
attemptedName = FriendTeamName();
else
return SetNetName();

if (attemptedName)
return attemptedName;

return SetNetName();
}


Then add functions EnemyTeamName() and FriendTeamName(), similar to SetNetName(), and finally change "self.netname = SetNetName();" to

if (teamplay)
self.netname = SetTeamNetName();
else
self.netname = SetNetName();
2016-10-24, 22:22
Member
8 posts

Registered:
Oct 2016
meag wrote:
They're hard-coded strings so your best bet is to change SetNetName() function in botimp.qc, then recompile.

When I was fiddling with bots I did the following to give bots on my team a different set of names than the all-bot team:

string() SetTeamNetName =
{
local float playersOnThisTeam, playersOnOtherTeams, frogbotsOnThisTeam;
local string attemptedName;

playersOnThisTeam = 0;
frogbotsOnThisTeam = 0;
playersOnOtherTeams = 0;

search_entity = first_client;
while(search_entity)
{
if (!search_entity.frogbot)
{
if (search_entity.team == self.team)
playersOnThisTeam = playersOnThisTeam + 1;
else
playersOnOtherTeams = playersOnOtherTeams + 1;
}
else if (search_entity.team == self.team)
{
frogbotsOnThisTeam = frogbotsOnThisTeam + 1;
}
search_entity = search_entity.next;
}

if (playersOnOtherTeams > 0 && playersOnThisTeam == 0)
attemptedName = EnemyTeamName();
else if (playersOnThisTeam > 0 && playersOnOtherTeams == 0)
attemptedName = FriendTeamName();
else
return SetNetName();

if (attemptedName)
return attemptedName;

return SetNetName();
}


Then add functions EnemyTeamName() and FriendTeamName(), similar to SetNetName(), and finally change "self.netname = SetNetName();" to

if (teamplay)
self.netname = SetTeamNetName();
else
self.netname = SetNetName();


Thanks! That's exactly what I'm trying to achieve. The only problem is I don't know how to "change SetNetName() function in botimp.qc, then recompile."

I'm not a coder, so I have no idea what programs I need to view this code. Tried editing qwprogs.dat in Notepad++ but the code in the file looked nothing like what you posted. Am I supposed to be able to decomple qwprogs.dat into numerous .qc files that I can edit? Sorry, I'm a newb.
2016-10-29, 01:14
Member
8 posts

Registered:
Oct 2016
Shameless bump. Anyone with more experiencing modding Quake that can help point me in the right direction?
2016-10-29, 18:52
Administrator
284 posts

Registered:
Sep 2015
spectrefax wrote:
Shameless bump. Anyone with more experiencing modding Quake that can help point me in the right direction?


Sorry, forgot about this - if you download frogbots they usually come with fteqccgui.exe in the same directory as the .qc files. Run that and click compile, it will generate a new qwprogs.dat file - replace the one in frogbots.pk3 or <quakedir>/fbca directory.

Original fbca here
Trinca's pak here

(though nquake version might be different from the two above)
2016-10-29, 21:13
Member
8 posts

Registered:
Oct 2016
meag wrote:
spectrefax wrote:
Shameless bump. Anyone with more experiencing modding Quake that can help point me in the right direction?


Sorry, forgot about this - if you download frogbots they usually come with fteqccgui.exe in the same directory as the .qc files. Run that and click compile, it will generate a new qwprogs.dat file - replace the one in frogbots.pk3 or <quakedir>/fbca directory.

Original fbca here
Trinca's pak here

(though nquake version might be different from the two above)


Yes, the nQuake version is different. It only contains frogbot.pk3 and no .qc files. I'll give your method a try and replace the nQuake frogbot qwprogs.dat in the manner you suggested and report back. Thanks!
  6 posts on 1 page  1