Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 65 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty: Black Ops
Category: CoDBO Scripting
Scripting and coding with Call of Duty: Black Ops.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Black Ops Functions
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDBO Scripting
Posted: Friday, Nov. 12, 2010 08:40 pm
Trawled through the mp and gametypes folders and documented (basic) new/interesting changes to functions, as well as some other stuff.

Code:

New Functions (in MP):

SetClientFlag( flag )
ClearClientFlag( flag )
glassRadiusDamage( pos, radius, max, min, mod )
ActionSlotOneButtonPressed()
IsRemoteControlling()
SetInvisibleToPlayer( entity )
SetVisibleToPlayer( entity )
registerClientSys( ? )
setClientSysState( ? )
isDemoEnabled()
StopDemoRecording()
StartDemoRecording()
ClientNotify( string )
VisionSetLerpRatio( ratio )
setAdvertisedStatus( bool )
WeaponLockFree()
WeaponLockTargetTooClose( bool )
WeaponLockNoClearance( bool )
getLockOnSpeed()
WeaponLockFinalize( target )
target_isincircle( target, self, 65, radius )
getLockOnRadius()
Target_SetTurretAquire( heli, false ) // SAM Turret
MakeVehicleUnusable()
SetHoverParams( x, y, z )
UseAnimTree( #animtree, true )

ThrowButtonPressed()
MagicBullet( "hind_rockets_firstperson_mp", start_origin, end_origin, self )
SetVehWeapon( weapon )
SetTargetEntity( target )
pcServerUpdatePlaylist()
setEnemyModel( model )
usevehicle( entity, flag? )
RotatePoint( ent, yaw )
SetSpawnClientFlag( string )
flag_init( string )
SetTurretOwner( ent )
SetTurretType( type )
setturretteam( team )
setupTurretHealth( turret )
stopCarryTurret( turret, turret.origin, turret.angles )
setTurretCarried( bool )
maketurretunusable()
SetMode( string )
canPlayerPlaceTurret()
SetForceNoCull()
SetPerkForTrigger( perk )
SetIgnoreEntForTrigger( bool )
LinkGuidedMissileCamera()
Target_Set( entity )
Target_Remove( entity )
UnlinkCameraFromRocket()
isMissileInsideHeightLock()
SetSprintDuration( float )
SetSprintCooldown( float )
GetHostPlayer()
GetPregameClass()
is_bot()
array_std_deviation( array, avg )
array_average( array )
SetPlayerRenderOptions( ? )
calcPlayerOptions( lInt, hInt )
calcWeaponOptions ( <camo> <lens> <reticle> <tag> <emblem> )
GiveWeapon( weapon, 0, weaponOptions )
ClearScriptGoal()
SetScriptGoal( goal, dist )
PressUseButton( time )
ClearScriptEnemy()
GetDefaultClassSlot( class, tag )
tableLookupColumnForRow( table, row, searchValue )
bbPrint( ? )
getplayerspawnid( player )
getCustomClassLoadoutItem( num, string )
getCustomClassModifier( num, string )
getDstat( ?, ? )
sendranks()
IsWeaponSpecificUse( weapon )
setDStat( baseName, dataName, value, oldStatName, challengeName, currentMilestone )
SetPreGameTeam( team )
SetPregameClass( class )

//interesting pieces
target.locking_on &= ~( 1 << clientNum );
#using_animtree ( "mp_vehicles" );

// new waittills
waittill( 	"stationary" // Ballistic knife
			"grenade_bounce"
			"missile_fire", missile, weap, target
			"missile_lock"
			"hijacked crate"
			"team crate hijacked", crateType
			"proPerkMelee"
			"sprint_begin"
			"sprint_end"
			"grenade_throwback"
			"lethalGrenadeKill"
			"rcbomb_done"
			"face", face_notify, ent
			"entering_last_stand"
			"damage_caused_by", weapon
			"turret_stun_ended"
			"turret_deactivated"
			"hacked"
			"turret_carried"
			"scrambler_spawn"
			"scrambler_death"
			"projectile_impact", weapon 
			"guided_missile_exploded"
			"bad_path"
			"goal"
			"weapon_change", weapon
			"play_final_killcam"
			"begin_killcam"
			"end_killcam"
			"changed_class"
			
			
		
// Dvars
SetDvar( "sv_botMinDeathTime",		"250" );
SetDvar( "sv_botMaxDeathTime",		"500" );
SetDvar( "sv_botMinFireTime",		"100" );
SetDvar( "sv_botMaxFireTime",		"300" );
SetDvar( "sv_botYawSpeed",			"14" );
SetDvar( "sv_botYawSpeedAds",		"14" );
SetDvar( "sv_botPitchUp",			"-5" );
SetDvar( "sv_botPitchDown",			"10" );
SetDvar( "sv_botFov",				"160" );
SetDvar( "sv_botMinAdsTime",		"3000" );
SetDvar( "sv_botMaxAdsTime",		"5000" );
SetDvar( "sv_botMinCrouchTime",		"100" );
SetDvar( "sv_botMaxCrouchTime",		"400" );
SetDvar( "sv_botTargetLeadBias",	"2" );
SetDvar( "sv_botMinReactionTime",	"30" );
SetDvar( "sv_botMaxReactionTime",	"100" );
SetDvar( "sv_botStrafeChance",		"1" );
SetDvar( "sv_botMinStrafeTime",		"3000" );
SetDvar( "sv_botMaxStrafeTime",		"6000" );
SetDvar( "scr_help_dist",			"512" );
SetDvar( "devgui_bot", "" );
SetDvar( "scr_bot_follow", "0" );
SetDvar( "sv_botsAllowMovement", "0" );
SetDvar( "sv_botsIgnoreHumans", "1" );
SetDvar( "sv_botsForceStand", "1" );
SetDvar( "scr_bots_managed_spawn", 0 );
SetDvar( "scr_bots_managed_all", 0 );
SetDvar( "scr_bots_managed_axis", 0 );
SetDvar( "scr_bots_managed_allied", 0 );
SetDvar( "scr_bot_difficulty", "normal" );
SetDvar( "scr_botsHasPlayerWeapon", "0" );
SetDvar( "scr_botsGrenadesOnly", "0" );
SetDvar( "scr_botsSpecialGrenadesOnly", "0" );
SetDvar( "sv_botsPressAttackBtn", "1" );
SetDvar( "sv_botsPressMeleeBtn", "1" );
setDvar( "party_minplayers", 4 );

// init cac data table column definitions
level.cac_numbering = 0;	// unique unsigned int - general numbering of all items
level.cac_cstat = 1;		// unique unsigned int - stat number assigned
level.cac_cgroup = 2;		// string - item group name, "primary" "secondary" "inventory" "specialty" "grenades" "special grenades" "stow back" "stow side" "attachment"
level.cac_cname = 3;		// string - name of the item, "Extreme Conditioning"
level.cac_creference = 4;	// string - reference string of the item, "m203" "svt40" "bulletdamage" "c4"
level.cac_ccount = 5;		// signed int - item count, if exists, -1 = has no count
level.cac_cimage = 6;		// string - item's image file name
level.cac_cdesc = 7;		// long string - item's description
level.cac_cstring = 8;		// long string - item's other string data, reserved
level.cac_cint = 9;			// signed int - item's other number data, used for attachment number representations
level.cac_cunlock = 10;		// unsigned int - represents if item is unlocked by default
level.cac_cint2 = 11;		// signed int - item's other number data, used for primary weapon camo skin number representations
level.cac_cost = 12; // signed int - cost of the item
level.cac_slot = 13; // string - slot for the given item
level.cac_classified = 15;	// signed int - number of items of the class purchased need to unlock this weapon
	
// Client flags
// Scriptmovers
level.const_flag_rocket_fx = 1;
level.const_flag_tactical_insertion = 2;
level.const_flag_flag_away = 3;
level.const_flag_stunned = 9;
level.const_flag_camera_spike = 10;
level.const_flag_counteruav = 11;
level.const_flag_destructible_car = 12;
level.const_flag_copterrotor = 13;
level.const_flag_copterdamaged = 14;

// Missiles
level.const_flag_scrambler = 3;
level.const_flag_stunned = 9;
	
// Helicopters
level.const_flag_warn_targeted = 3;
level.const_flag_warn_locked = 4;
level.const_flag_warn_fired = 5;
level.const_flag_outofbounds = 6;
level.const_flag_choppergunner = 7;
level.const_flag_opendoor = 8;
level.const_flag_crashing = 9;

// Vehicles
level.const_flag_countdown = 1;
level.const_flag_timeout = 2;
level.const_flag_stunned = 9;
	
// Players
level.const_flag_ctfcarrier = 0;

// Planes
level.const_flag_bombing = 1;
level.const_flag_airstrike = 2;
level.const_flag_napalm = 3;
Share |
liltc64
General Member
Since: Feb 12, 2007
Posts: 906
Last: Oct 22, 2012
[view latest posts]
Level 7
Im a fan of MODSonair
Category: CoDBO Scripting
Posted: Friday, Nov. 12, 2010 08:50 pm
has mod tools been released for black ops yet?
Share |
Xylozi
General Member
Since: Jul 12, 2008
Posts: 218
Last: Mar 1, 2012
[view latest posts]
Level 4
Im a fan of MODSonair
Category: CoDBO Scripting
Posted: Friday, Nov. 12, 2010 08:54 pm
No, but somebody did a GSC rip of Black Ops about a day after release. Which is where I got the information.
Share |
BraX
General Member
Since: Apr 29, 2008
Posts: 413
Last: May 26, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoDBO Scripting
Posted: Saturday, Nov. 13, 2010 09:31 am
Here are links to CoD:Black Ops assets. Posting them here by me isn't illegal because TreyArch annouced Mod Tools.

Black Ops - Weapon Files

Black Ops : Scripts


Second package includes: .gsc scripts, anim trees, definitions, worldspawn settings, vision files, anim scripts, rumbles, damage defs.

The big news in Black Ops is that we will be able to write video scripts like this:
Code:
// You can specify particular movies to play for particular maps
// by using a line like this per map:
// getmapname <name_of_map> strcmp ! if <name_of_movie_to_play> play then
//
// every expression is in postfix notation

							// frontend special cases
							//
getmapname frontend strcmp !	// push whether this is frontend
if							
	ui_skipMainLockout getdvar 1 == 
	if
		so_narrative1_frontend_load play
	then 
	com_introPlayed getdvar 0 == 
	if 
		treyarch play			
	then
		spinner play
then						// Default case
	getmapname _load strcat	play



Renderer is now much more powerfull, just check that randomly picked vision file:
Code:
r_filmMidTint                       "1.0104 1.0104 0.9639" 
r_filmLightTint                     "1.1151 1.0941 1.0941" 
r_filmBleach                        "0.0000 0.0000 0.0000" 
r_filmContrast                      "1.0625 1.0625 1.0000" 

r_sCurveShoulderStrength            "0.100000" 
r_sCurveLinearStrength              "0.500000" 
r_sCurveLinearAngle                 "0.125000" 
r_sCurveToeStrength                 "0.144731" 
r_sCurveToeNumerator                "0.010000" 
r_sCurveToeDenominator              "0.574988" 

r_bloomTintWeights                  "0.2500 0.5000 0.2500 0.0000" 
r_bloomColorScale                   "0.3510 0.3790 0.3790 0.0000" 
r_bloomTintScale                    "0.0000 0.0000 0.0000 1.0000" 
r_bloomCurveBreakpoint              "0.4000 0.4000 0.4000 1.0000" 
r_bloomCurveLoGamma                 "0.6551 0.4817 0.3769 1.0000" 
r_bloomCurveHiGamma                 "1.0022 1.0022 1.0022 1.0000" 
r_bloomExpansionControl             "0.7853 0.2958 0.5989 0.5232" 
r_bloomExpansionWeights             "0.1000 0.1000 0.1000 0.1000" 
r_bloomExpansionSource              "1.000000" 
r_bloomBlurRadius                   "1.750000" 
r_bloomPersistence                  "1.000000" 

r_primaryLightUseTweaks             "1.000000" 
r_primaryLightTweakDiffuseStrength  "2.000000" 
r_primaryLightTweakSpecularStrength "1.683750" 


r_bloomCurveLoBlack                 "0.1000 0.1000 0.1000 0.1000" 
r_bloomCurveLoWhite                 "1.0000 1.0000 1.0000 1.0000" 
r_bloomCurveLoRemapBlack            "0.1000 0.1000 0.1000 0.1000" 
r_bloomCurveLoRemapWhite            "1.0000 1.0000 1.0000 1.0000" 
r_bloomCurveHiBlack                 "0.1000 0.1000 0.1000 0.1000" 
r_bloomCurveHiWhite                 "1.0000 1.0000 1.0000 1.0000" 
r_bloomCurveHiRemapBlack            "0.1000 0.1000 0.1000 0.1000" 
r_bloomCurveHiRemapWhite            "1.0000 1.0000 1.0000 1.0000" 
r_filmHue                           "0.0000 0.0000 0.0000" 

r_bloomStreakXLevels0               "0.2500 0.5000 0.2500 1.0000" 
r_bloomStreakXLevels1               "0.0000 1.0000 0.0000 1.0000" 
r_bloomStreakXInnerTint             "1.0000 1.0000 1.0000" 
r_bloomStreakXOuterTint             "1.0000 1.0000 1.0000" 
r_bloomStreakXTintControl           "0.2500 0.5000 0.2500 1.0000" 
r_bloomStreakXTint                  "0.0000 0.0000 0.0000" 

r_bloomStreakYLevels0               "0.0000 0.1263 0.1263 1.0000" 
r_bloomStreakYLevels1               "0.0000 1.0000 0.0000 1.0000" 
r_bloomStreakYInnerTint             "1.0000 1.0000 1.0000" 
r_bloomStreakYOuterTint             "1.0000 1.0000 1.0000" 
r_bloomStreakYTintControl           "0.2500 0.5000 0.2500 1.0000" 
r_bloomStreakYTint                  "0.0000 0.0842 0.0702"



New file type has ben added with Z3 extension, i've found one file called zork1.z3 which is compiled. In next folder we can find 'emails' used in game.

When ill get more free time i will write tutorial/article explaining all newest features in Black Ops.
Share |
JerryAtricks
General Member
Since: Jun 1, 2008
Posts: 108
Last: Nov 20, 2010
[view latest posts]
Level 4
Category: CoDBO Scripting
Posted: Saturday, Nov. 13, 2010 11:41 am
Hmmm... Looks like the FX files are using full paths now. Should be fun having to re-learn everything for this.
Share |
Samuel033
General Member
Since: Dec 10, 2009
Posts: 484
Last: Dec 25, 2015
[view latest posts]
Level 5
Category: CoDBO Scripting
Posted: Saturday, Nov. 13, 2010 07:34 pm
Just cross your fingers that you will actually be able to use what you learn. [thumbs_up]
Share |
SparkyMcSparks
General Member
Since: Feb 28, 2004
Posts: 1713
Last: Dec 29, 2016
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoDBO Scripting
Posted: Saturday, Nov. 13, 2010 08:18 pm
BraX writes...
Quote:

The big news in Black Ops is that we will be able to write video scripts like this:
Code:
// You can specify particular movies to play for particular maps
// by using a line like this per map:
// getmapname <name_of_map> strcmp ! if <name_of_movie_to_play> play then
//
// every expression is in postfix notation

							// frontend special cases
							//
getmapname frontend strcmp !	// push whether this is frontend
if							
	ui_skipMainLockout getdvar 1 == 
	if
		so_narrative1_frontend_load play
	then 
	com_introPlayed getdvar 0 == 
	if 
		treyarch play			
	then
		spinner play
then						// Default case
	getmapname _load strcat	play

You could do that since CoD4.
Share |
BraX
General Member
Since: Apr 29, 2008
Posts: 413
Last: May 26, 2012
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoDBO Scripting
Posted: Saturday, Nov. 13, 2010 09:30 pm
SparkyMcSparks writes...
Quote:
BraX writes...
Quote:

The big news in Black Ops is that we will be able to write video scripts like this:
Code:
// You can specify particular movies to play for particular maps
// by using a line like this per map:
// getmapname <name_of_map> strcmp ! if <name_of_movie_to_play> play then
//
// every expression is in postfix notation

							// frontend special cases
							//
getmapname frontend strcmp !	// push whether this is frontend
if							
	ui_skipMainLockout getdvar 1 == 
	if
		so_narrative1_frontend_load play
	then 
	com_introPlayed getdvar 0 == 
	if 
		treyarch play			
	then
		spinner play
then						// Default case
	getmapname _load strcat	play

You could do that since CoD4.


So far i haven't seen that in CoD4.
Share |
tyler811
General Member
Since: Oct 30, 2006
Posts: 54
Last: Dec 26, 2010
[view latest posts]
Level 3
Category: CoDBO Scripting
Posted: Sunday, Dec. 26, 2010 10:34 pm
BraX writes...
Quote:
Here are links to CoD:Black Ops assets. Posting them here by me isn't illegal because TreyArch annouced Mod Tools.

Black Ops - Weapon Files

Black Ops : Scripts


Second package includes: .gsc scripts, anim trees, definitions, worldspawn settings, vision files, anim scripts, rumbles, damage defs.

The big news in Black Ops is that we will be able to write video scripts like this:
Code:
// You can specify particular movies to play for particular maps
// by using a line like this per map:
// getmapname <name_of_map> strcmp ! if <name_of_movie_to_play> play then
//
// every expression is in postfix notation

							// frontend special cases
							//
getmapname frontend strcmp !	// push whether this is frontend
if							
	ui_skipMainLockout getdvar 1 == 
	if
		so_narrative1_frontend_load play
	then 
	com_introPlayed getdvar 0 == 
	if 
		treyarch play			
	then
		spinner play
then						// Default case
	getmapname _load strcat	play



Renderer is now much more powerfull, just check that randomly picked vision file:
Code:
r_filmMidTint                       "1.0104 1.0104 0.9639" 
r_filmLightTint                     "1.1151 1.0941 1.0941" 
r_filmBleach                        "0.0000 0.0000 0.0000" 
r_filmContrast                      "1.0625 1.0625 1.0000" 

r_sCurveShoulderStrength            "0.100000" 
r_sCurveLinearStrength              "0.500000" 
r_sCurveLinearAngle                 "0.125000" 
r_sCurveToeStrength                 "0.144731" 
r_sCurveToeNumerator                "0.010000" 
r_sCurveToeDenominator              "0.574988" 

r_bloomTintWeights                  "0.2500 0.5000 0.2500 0.0000" 
r_bloomColorScale                   "0.3510 0.3790 0.3790 0.0000" 
r_bloomTintScale                    "0.0000 0.0000 0.0000 1.0000" 
r_bloomCurveBreakpoint              "0.4000 0.4000 0.4000 1.0000" 
r_bloomCurveLoGamma                 "0.6551 0.4817 0.3769 1.0000" 
r_bloomCurveHiGamma                 "1.0022 1.0022 1.0022 1.0000" 
r_bloomExpansionControl             "0.7853 0.2958 0.5989 0.5232" 
r_bloomExpansionWeights             "0.1000 0.1000 0.1000 0.1000" 
r_bloomExpansionSource              "1.000000" 
r_bloomBlurRadius                   "1.750000" 
r_bloomPersistence                  "1.000000" 

r_primaryLightUseTweaks             "1.000000" 
r_primaryLightTweakDiffuseStrength  "2.000000" 
r_primaryLightTweakSpecularStrength "1.683750" 


r_bloomCurveLoBlack                 "0.1000 0.1000 0.1000 0.1000" 
r_bloomCurveLoWhite                 "1.0000 1.0000 1.0000 1.0000" 
r_bloomCurveLoRemapBlack            "0.1000 0.1000 0.1000 0.1000" 
r_bloomCurveLoRemapWhite            "1.0000 1.0000 1.0000 1.0000" 
r_bloomCurveHiBlack                 "0.1000 0.1000 0.1000 0.1000" 
r_bloomCurveHiWhite                 "1.0000 1.0000 1.0000 1.0000" 
r_bloomCurveHiRemapBlack            "0.1000 0.1000 0.1000 0.1000" 
r_bloomCurveHiRemapWhite            "1.0000 1.0000 1.0000 1.0000" 
r_filmHue                           "0.0000 0.0000 0.0000" 

r_bloomStreakXLevels0               "0.2500 0.5000 0.2500 1.0000" 
r_bloomStreakXLevels1               "0.0000 1.0000 0.0000 1.0000" 
r_bloomStreakXInnerTint             "1.0000 1.0000 1.0000" 
r_bloomStreakXOuterTint             "1.0000 1.0000 1.0000" 
r_bloomStreakXTintControl           "0.2500 0.5000 0.2500 1.0000" 
r_bloomStreakXTint                  "0.0000 0.0000 0.0000" 

r_bloomStreakYLevels0               "0.0000 0.1263 0.1263 1.0000" 
r_bloomStreakYLevels1               "0.0000 1.0000 0.0000 1.0000" 
r_bloomStreakYInnerTint             "1.0000 1.0000 1.0000" 
r_bloomStreakYOuterTint             "1.0000 1.0000 1.0000" 
r_bloomStreakYTintControl           "0.2500 0.5000 0.2500 1.0000" 
r_bloomStreakYTint                  "0.0000 0.0842 0.0702"



New file type has ben added with Z3 extension, i've found one file called zork1.z3 which is compiled. In next folder we can find 'emails' used in game.

When ill get more free time i will write tutorial/article explaining all newest features in Black Ops.



I had the weapons script in a matter of minutes. Trying to mod the weapons in zombies but no luck so far. I found the settings they look like the same as CoDWAW Nazi Zombies. When I did my weaopns mod for it, it was easy but no luck so far on this one
Share |
yabdullah
General Member
Since: Apr 11, 2015
Posts: 1
Last: Apr 12, 2015
[view latest posts]
Level 0
Category: CoDBO Scripting
Posted: Sunday, Apr. 12, 2015 05:30 pm
I believe there is a "takeAllWeapons" and a "giveWeapon" function which will allow you to make the player always spawn with a sniper. You could also edit the choose class menu so they can only select snipers.





___________________________
iman
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Call of Duty: Black Ops : CoDBO Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»