Announcement

Collapse
No announcement yet.

QC Coding Question...

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • jastolze
    started a topic QC Coding Question...

    QC Coding Question...

    Hi, I was wondering if it's possible to change the health of bots to something like 20000. (yes, i know it's weird don't ask, lol) But I'm not sure where to put it in the source. I see that in client.qc you can edit your starting health, but does it affect the bots as well? If not, what should I edit to make it work? Thanks!

  • jastolze
    replied
    Originally posted by dr_mabuse1981 View Post
    IDK how your mod handles the bots but if they are using the params from client.qc you can add something like this:

    (This was just written from my head but it should work that way)

    add this to defs.qc:

    Code:
    .float isbot
    Find the Botconnect function and add this:

    Code:
    self.isbot = TRUE;
    In client.qc find SetNewparms and add this:
    Code:
    void() SetNewParms =
    {
    	parm1 = IT_SHOTGUN | IT_AXE; 	
    	if(self.isbot == TRUE)		// IF I AM A BOT
    	parm2 = 400;			// GIMME 400 HEALTH
    	else				// IF NOT
    	parm2 = 100;			// GIMME 100 HEALTH		
    	parm3 = 0;
    	parm4 = 25;
    	parm5 = 0;
    	parm6 = 0;
    	parm7 = 0;
    	parm8 = 1;
    	parm9 = 0;
    };
    That should work, but it was just smashed togheter from my head..
    i have a similar thing for the frikbots for my game.
    Hey that might work. I can do this, but I'm not sure if there's a limit to how much health I can give a bot. I'm assuming it's 65536, but I could be wrong.

    Thanks, Mabuse!

    Leave a comment:


  • dr_mabuse1981
    replied
    IDK how your mod handles the bots but if they are using the params from client.qc you can add something like this:

    (This was just written from my head but it should work that way)

    add this to defs.qc:

    Code:
    .float isbot
    Find the Botconnect function and add this:

    Code:
    self.isbot = TRUE;
    In client.qc find SetNewparms and add this:
    Code:
    void() SetNewParms =
    {
    	parm1 = IT_SHOTGUN | IT_AXE; 	
    	if(self.isbot == TRUE)		// IF I AM A BOT
    	parm2 = 400;			// GIMME 400 HEALTH
    	else				// IF NOT
    	parm2 = 100;			// GIMME 100 HEALTH		
    	parm3 = 0;
    	parm4 = 25;
    	parm5 = 0;
    	parm6 = 0;
    	parm7 = 0;
    	parm8 = 1;
    	parm9 = 0;
    };
    That should work, but it was just smashed togheter from my head..
    i have a similar thing for the frikbots for my game.

    Leave a comment:


  • R00k
    replied
    Ok found more info on your cross-post on that nazi zombie forum.

    The code example i posted above will make all non players take 1/10th the damage from any weapon you shoot at it. So you can shoot 10 times longer.

    or look for ".health" use find in files in your editor (notepad+ is nice).
    until u find where the part of the code when the bot spawns.

    I cannot find the mod so I cant see the exact source.

    Leave a comment:


  • jastolze
    replied
    Originally posted by MadGypsy View Post
    It's not doing anything cause you changed the wrong thing o.O

    You probably need to find the "absolute" bot player function (?player_bot?) or maybe in (?bot_client.qc or client.qc if a new one was introduced with the mod?) there may be something like void() PutBotInServer - you want to change self.health somewhere. That's how I would have searched it, anyway.

    Or just do what r00k said

    EDIT:

    Open the entire mod (only) in notepad++ and do a "find all in all opened documents" on the term .health

    That will return an output panel of every place .health is set. You can click these results and go straight to the line. One of those results is what you are looking for.

    * self.health is a more refined search
    Thanks, I ended up just changing the rocket damage/ radius damage to 1. That way it lasts a LOT longer!

    Leave a comment:


  • MadGypsy
    replied
    It's not doing anything cause you changed the wrong thing o.O

    You probably need to find the "absolute" bot player function (?player_bot?) or maybe in (?bot_client.qc or client.qc if a new one was introduced with the mod?) there may be something like void() PutBotInServer - you want to change self.health somewhere. That's how I would have searched it, anyway.

    Or just do what r00k said

    EDIT:

    Open the entire mod (only) in notepad++ and do a "find all in all opened documents" on the term .health

    That will return an output panel of every place .health is set. You can click these results and go straight to the line. One of those results is what you are looking for.

    * self.health is a more refined search
    Last edited by MadGypsy; 02-21-2013, 02:56 PM.

    Leave a comment:


  • jastolze
    replied
    Originally posted by R00k View Post
    Ya i figured Frikbots but wasnt sure which bot mod...

    are u talking about the zues bots?

    in combat.qc why not just in t_damage
    if (!(targ.flags & FL_CLIENT)) damage = damage / 10;

    or something like that

    I'm assuming, you want to give your bots more health, (or take less damage) to prolong the battling?
    It's not called Zeus, it's the Killer QC Bot, and it was before the FrikBot I believe. Also, I've found some areas in thes source where it says health.amount or something like that, and it was at a set 100, but I changed it to like 9999 at first, but didn't notice any difference after recompiling it :/ The bot still dies with one rocket (in fact he's gibbed) So, not sure why it's not doing anything...

    Leave a comment:


  • R00k
    replied
    Ya i figured Frikbots but wasnt sure which bot mod...

    are u talking about the zues bots?

    in combat.qc why not just in t_damage
    if (!(targ.flags & FL_CLIENT)) damage = damage / 10;

    or something like that

    I'm assuming, you want to give your bots more health, (or take less damage) to prolong the battling?

    Leave a comment:


  • jastolze
    replied
    Originally posted by MadGypsy View Post
    ^I was wondering about that. I figured he had some mod.
    Sorry forgot to mention that I am using a mod. It's called Killer QC Bot and I have the source.

    Leave a comment:


  • MadGypsy
    replied
    ^I was wondering about that. I figured he had some mod.

    Leave a comment:


  • R00k
    replied
    What bots? Quake doesnt have bots originally.

    Leave a comment:


  • MadGypsy
    replied
    20000?

    That's crazy high. If you want a real tough enemy try 2000. I can't tell you where to change the bot code, cause I have never experimented with bots.
    Last edited by MadGypsy; 02-21-2013, 01:28 PM.

    Leave a comment:

Working...
X