PDA

View Full Version : SPRINT Mod For MeatBot COD2



G-Stuff002
19th February 2018, 01:49
Hi Everyone! I encountered a problem, if add "Tally's Sprint Mod" for MeatBot mod, bots stop shooting and constantly look at their hands, choosing something..

I deleted in the folder 'Weapons' the files: ...slow, medium, fast_run (this is animated hands for sprint) and bots come play good after this but Sprint mod no longer worked...

Have idea ? how fix.

Maybe bots use the button 'F' and 'F' does not respond to their request, because it is used for running...
And use key for sprint can not change to another, in order to 'F' stay only for 'use'

Guys, maybe exist another sprint mod ? I look at everywhere but not find. Or you know how increase the speed of movement for a bit on multiplayer ? some script or else

thanks..

IzNoGoD
19th February 2018, 11:05
Just edit your sprint mod so it doesnt work on bots.

G-Stuff002
19th February 2018, 11:46
Sprint work with bots but bots stop shooting and look at their hands sometimes, and i dont know whay. What i can edit ? I think that nothing editing in this case, have some kind of incompatibility...have no idea

IzNoGoD
19th February 2018, 12:23
disable. the. sprint. mod. for. bots.

Edit the code that starts the sprint code and disable it for bots.

G-Stuff002
19th February 2018, 13:21
Ok, look what i did.

1. In folder localizedstrings/sprint.str

I take "Q" key for replace
Before: (&"SPRINT_HOLD_ACTIVATE");


Change:

REFERENCE HOLD_Q
LANG_ENGLISH "^9Hold Q to activate"

2. In folder maps/mp/gametypes/_sprint.gsc

Change:

}

Precache()
{
//---Sprint
precacheItem("sprint_med_mp");
precacheItem("sprint_slow_mp");
precacheItem("sprint_fast_mp");
precacheString(&"SPRINT_HOLD_Q");
precacheShader("gfx/hud/hud@health_back.tga");
precacheShader("gfx/hud/hud@health_bar.tga");
precacheShader(game["sprint_minus"]);
precacheShader(game["sprint_cross"]);
precacheString(&"SPRINT_HEAVY_FLAG");
}

NEXT:
}

if(!isdefined(self.bfe_sprinthud_hint))
{
self.bfe_sprinthud_hint = newClientHudElem( self );
self.bfe_sprinthud_hint.color = (0.980,0.996,0.388);
self.bfe_sprinthud_hint setText(&"SPRINT_HOLD_Q");
self.bfe_sprinthud_hint.alignX = "right";
self.bfe_sprinthud_hint.alignY = "top";
self.bfe_sprinthud_hint.fontScale = .9;
self.bfe_sprinthud_hint.x = 220;
self.bfe_sprinthud_hint.y = y - 11;
self.bfe_sprinthud_hint.alpha = .9;
}

This is for change the use key for sprint. But doesnt not work. Other script for this not exist, not find

.."and disable it for bots."
The fact is that, Bots not use sprint mod nothing to disable..

G-Stuff002
19th February 2018, 13:35
I think there maybe a problem with this code inside _sprint.gsc, look:

if (!isMoving(self) || isHoldingNade(self) )
and
isHoldingNade(player)
and
if(isdefined (cw) && cw != "none" && !isHoldingNade(self))



Bots use F (Activate key) for throwing grenades on map but F use for sprinting and occurs some incompatibility...

I try change like this: if (!isMoving(self) || isHoldingluger(self) ) - did not help

G-Stuff002
19th February 2018, 13:43
I attached the file, maybe I forgot something, but I revised everything. Simple and interesting problem, but I can not decide

IzNoGoD
19th February 2018, 18:14
Ok, look what i did.

1. In folder localizedstrings/sprint.str

I take "Q" key for replace
Before: (&"SPRINT_HOLD_ACTIVATE");


Change:

REFERENCE HOLD_Q
LANG_ENGLISH "^9Hold Q to activate"

2. In folder maps/mp/gametypes/_sprint.gsc

Change:

}

Precache()
{
//---Sprint
precacheItem("sprint_med_mp");
precacheItem("sprint_slow_mp");
precacheItem("sprint_fast_mp");
precacheString(&"SPRINT_HOLD_Q");
precacheShader("gfx/hud/hud@health_back.tga");
precacheShader("gfx/hud/hud@health_bar.tga");
precacheShader(game["sprint_minus"]);
precacheShader(game["sprint_cross"]);
precacheString(&"SPRINT_HEAVY_FLAG");
}

NEXT:
}

if(!isdefined(self.bfe_sprinthud_hint))
{
self.bfe_sprinthud_hint = newClientHudElem( self );
self.bfe_sprinthud_hint.color = (0.980,0.996,0.388);
self.bfe_sprinthud_hint setText(&"SPRINT_HOLD_Q");
self.bfe_sprinthud_hint.alignX = "right";
self.bfe_sprinthud_hint.alignY = "top";
self.bfe_sprinthud_hint.fontScale = .9;
self.bfe_sprinthud_hint.x = 220;
self.bfe_sprinthud_hint.y = y - 11;
self.bfe_sprinthud_hint.alpha = .9;
}

This is for change the use key for sprint. But doesnt not work. Other script for this not exist, not find

.."and disable it for bots."
The fact is that, Bots not use sprint mod nothing to disable..

This literally just changes what it says on screen. Not what the mod actually looks for.

G-Stuff002
19th February 2018, 18:25
Sorry, I do not understand your answer, even google translate. I just try looking everywhere for a solution of issue. I thought maybe somehow to prohibit to use of sprint for bots, some script..but I can not think of

G-Stuff002
19th February 2018, 20:10
IzNoGoD, PLEASE help solve this problem, like a friend, i have few experience in this scripts. I dont know what i can do more.

Tally
19th February 2018, 21:26
Wow! I haven't seen this version of my sprint mod for about 10 years. I think I made this version for the "Battle for Europe" online game site in 2006 or maybe 2007. I can't remember, it was that long ago. I've made about 3 different and better versions since then.

Anyway, for this version of the mod, you have to edit maps\mp\gametypes\_sprint.gsc:


onPlayerKilled()
{
self endon("disconnect");

if( isBot( self ) )
return;

for(;;)
{
self waittill("killed_player");

self notify("kill_monitors");

thread CleanupKilled();
}
}

onPlayerSpawned()
{
self endon("disconnect");

if( isBot( self ) )
return;

for(;;)
{
self waittill("spawned_player");

self.is_Sprinting = false;
self.sprint_stamina = level.sprint_time;
self.old_position = self.origin;

self thread Monitor_Sprint();
}
}

isbot( player )
{
if( GetSubStr( player.name, 0, 3 ) == "bot" )
return( true );

return( false );
}


That's what Izno was saying - if a bot tries to enter the code, they are rejected.

IzNoGoD
19th February 2018, 21:35
Wow! I haven't seen this version of my sprint mod for about 10 years. I think I made this version for the "Battle for Europe" online game site in 2006 or maybe 2007. I can't remember, it was that long ago. I've made about 3 different and better versions since then.

Anyway, for this version of the mod, you have to edit maps\mp\gametypes\_sprint.gsc:


onPlayerKilled()
{
self endon("disconnect");

if( isBot( self ) )
return;

for(;;)
{
self waittill("killed_player");

self notify("kill_monitors");

thread CleanupKilled();
}
}

onPlayerSpawned()
{
self endon("disconnect");

if( isBot( self ) )
return;

for(;;)
{
self waittill("spawned_player");

self.is_Sprinting = false;
self.sprint_stamina = level.sprint_time;
self.old_position = self.origin;

self thread Monitor_Sprint();
}
}

isbot( player )
{
if( GetSubStr( player.name, 0, 3 ) == "bot" )
return( true );

return( false );
}


That's what Izno was saying - if a bot tries to enter the code, they are rejected.

Nice, but OP should keep in mind that times have progressed and libcod now has a built-in isbot() function. No need to manually add it on libcod-enabled servers.

kung foo man
19th February 2018, 22:03
@op

Just as a suggestion, upload the source codes to GitHub and everybody can link to specific lines. I for one cba to download both mods now and see how MeatBot marks bots and then to download the sprint mod to see which function needs to be edited, in order to ignore sprinting for bots.

This structureless fuckery with source code flying around in random .iwd's is bullshit and I don't feel like supporting this by wasting my time.

Instead, you have to step up and learn something:

1) Register at GitHub
2) Create a repo
3) Upload your current mod with a simple tool like https://www.syntevo.com/smartgit/

If you do this, I can give a 99% guarantee that your problem will be solved.

Edit: lmao, Tally is back and answered, that was unexpected and makes this answer somewhat obsolete :D ... Welcome back I guess :^)

G-Stuff002
20th February 2018, 00:43
Tally, thank you very much!!! I have just tested and this code Fully worked, i thought the whole day what the problem was and decided to write here and unexpectedly/successfully met with the author of the mod.

This mod is old but i think it the best of all. Better will not think up.

Better you version i can not be found..i have one more without hand animation and it all.

I hardly understood how to connect it to bot.. but reading the code found differences in iw_multiplayer2.csv and _callbacksetup.GSC and edit files in bots.

There was one problem left but this is related in the bot code. They sometimes stand and look at the hands only on "FY" maps (like a CS) But i make waypoints bypassing these places where the placed weapons
1396