Bot for training

Get support for anything JK2 related, find tutorials for in-game and modding topics, and post any suggestions for the site here.
Post Reply
User avatar
FerjoMabar
Posts: 6
Joined: 18 Feb 2016, 20:57
Location: Catalonia
Contact:

Bot for training

Post by FerjoMabar »

Hello,

There is a bot for training with jk2 not to move?
Greetings and thanks !
FerjoMabar (Si)
User avatar
C4N
Posts: 31
Joined: 12 Mar 2016, 11:42

Re: Bot for training

Post by C4N »

I used back in my first days a second jk2 window on a devmap with god, late, a mapper called MageC did a map Cjs_CouncilV2. The bot path of that map routes the bot to a training room where you can stuck them with a pillar (one of the buttons of the room spawns the pillar).
Steam - RSI

You may found me somewhere with this nicknames:
(Cjs|Canseco|Ms)
Khan Katarn
Canseco.
C4N
User avatar
Boothand
Administrator
Posts: 986
Joined: 24 Feb 2015, 08:21
Contact:

Re: Bot for training

Post by Boothand »

My preferred method is a second JK2 window + god mode, but if cheats are enabled you can use /bot_forgimmick 1 to stop them from moving, and g_spawninvulnerability 99999 to keep them from dying if you wish, with the consequence of an ugly spawnbubble :D
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: Bot for training

Post by Tr!Force »

in the server console type: /bot_forgimmick 1

u need to have cheats enabled (reload the map using /devmap ffa_bespin for example)

:)
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Bot for training

Post by Daggolin »

You were too late triforce. Boothand was faster. :p

But ye, I think the ways Boothand described are your best options. But the bots still get knock back, which might be what you want. If not, there might be a cvar for it. I know 1.04 has one for sabers and I know 1.02 was different regarding that - I am just not sure if 1.02 had one for weapons&saber or none at all. For 1.03 I don't know either. Might have been something like g_saberDmgVelocityScale on 1.04 (and maybe 1.03). I am not on the pc, so I can't look anything up right now, but I can do that sometime when I am on the computer. ;)
User avatar
Boothand
Administrator
Posts: 986
Joined: 24 Feb 2015, 08:21
Contact:

Re: Bot for training

Post by Boothand »

Otherwise, knockback for the less picky would be g_knockback :P
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Bot for training

Post by Daggolin »

That might actually be the cvar I was referring to. Thanks! :)
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: Bot for training

Post by Tr!Force »

Daggolin wrote:You were too late triforce. Boothand was faster. :p
yes, i seen his post after i posted mine, LOL
Daggolin wrote:But ye, I think the ways Boothand described are your best options. But the bots still get knock back, which might be what you want. If not, there might be a cvar for it. I know 1.04 has one for sabers and I know 1.02 was different regarding that - I am just not sure if 1.02 had one for weapons&saber or none at all. For 1.03 I don't know either. Might have been something like g_saberDmgVelocityScale on 1.04 (and maybe 1.03). I am not on the pc, so I can't look anything up right now, but I can do that sometime when I am on the computer. ;)
g_saberDmgVelocityScale is in 1.03 and 1.04, and when is enabled, this make players fly back from saber attacks like 1.02 mode
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
Kevin
Administrator
Posts: 393
Joined: 07 Jun 2015, 08:36

Re: Bot for training

Post by Kevin »

As I remember g_saberDmgVelocityScale is only related to the Damage, while g_knockback is related to the knockback :P Can't remember if g_saberDmgVelocityScale has a slight effects on knockback too though, but not as far as I recall :)
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: Bot for training

Post by Tr!Force »

Kameleon wrote:As I remember g_saberDmgVelocityScale is only related to the Damage, while g_knockback is related to the knockback :P Can't remember if g_saberDmgVelocityScale has a slight effects on knockback too though, but not as far as I recall :)
g_saberDmgVelocityScale is how much u get "fly" when someone hit u, if the saber do a little damage ur player gets only a little "jump" if is a high damage u get a "higher jump" or "fly" from the actual position, idk how to explain, but is like 1.02

about g_knockback idk whats do
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Bot for training

Post by Daggolin »

I think I saw the part about g_saberDmgVelocityScale in the source code once. The cvar war introduced in 1.03 and it affects how much knock back the saber does. Since the introduction of the cvar the default knock back for the saber is 0. Before that the default was 1. That's why on 1.02 the sabers knock people around. If you set the cvar to 1 on 1.03 and later you get the knock back there, too.

I think before the introduction of the g_saberDmgVelocityScale cvar both, saber and other damage used the g_knockback cvar, but I am not sure. Someone could just look it up, the code is in g_combat.c. I am not sure if it was in G_Damage or another function. ;)
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Bot for training

Post by Daggolin »

1.02:

Code: Select all

		VectorScale (dir, g_knockback.value * (float)knockback / mass, kvel);
		VectorAdd (targ->client->ps.velocity, kvel, targ->client->ps.velocity);
1.03+:

Code: Select all


		if (mod == MOD_SABER)
		{
			VectorScale (dir, (g_knockback.value * (float)knockback / mass)*g_saberDmgVelocityScale.integer, kvel);
		}
		else
		{
			VectorScale (dir, g_knockback.value * (float)knockback / mass, kvel);
		}
		VectorAdd (targ->client->ps.velocity, kvel, targ->client->ps.velocity);
As I expected: on 1.02 g_knockback affects saber and other weapons. On later versions the cvar for weapons is g_knockback, for saber it is g_knockback and g_saberDmgVelocityScale, as the second cvar is used to "scale" the result of the first calculation. So g_saberDmgVelocityScale 1 should roughly get the same results on 1.03+ as knockback did on 1.02, unless the cvar is also used in other parts of the code, but I didn't look into that. By the way, the g_saberDmgVelocityScale cvar only seems to work with integers (..., -2, -1, 0, 1, 2, ...).
User avatar
Tr!Force
Posts: 433
Joined: 26 Feb 2015, 12:25
Location: Chile
Contact:

Re: Bot for training

Post by Tr!Force »

i thought that is in g_combat right? i remember that code when i did the gameplay changer command.

ive used g_saberDmgVelocityScale as a float value for 1.02 mode, something like 0.2 or something, but that was before 1.02 src release, just guessing the correct value :lol:
Image
"The dark side? I've been there. Do your worst." - Kyle Katarn
  • JK2 & JK3 Code-Mod Developer
  • Jedi Knight Plus Mod Project: Click Here
  • E-Mail: triforce@gznetwork.com
  • Discord: TriForce#8785
User avatar
FerjoMabar
Posts: 6
Joined: 18 Feb 2016, 20:57
Location: Catalonia
Contact:

Re: Bot for training

Post by FerjoMabar »

Thanks to all !
I'll try.

Regards!
FerjoMabar (Si)
User avatar
FerjoMabar
Posts: 6
Joined: 18 Feb 2016, 20:57
Location: Catalonia
Contact:

Re: Bot for training

Post by FerjoMabar »

Thank you very much, I've tried it and it works perfectly.
I have also tried the option timescale!

Thanks to everyone s!
FerjoMabar (Si)
User avatar
Daggolin
Administrator
Posts: 794
Joined: 23 Feb 2015, 13:05

Re: Bot for training

Post by Daggolin »

Glad we could help. :D
Post Reply
Created by Matti from StylesFactory.pl and Warlords of Draenor (modified by jk2.info)
Powered by phpBB® Forum Software © phpBB Limited