Skip to content

Commit

Permalink
update gamedata etc
Browse files Browse the repository at this point in the history
  • Loading branch information
rafradek committed May 18, 2022
1 parent 92a3c7e commit b855408
Show file tree
Hide file tree
Showing 7 changed files with 303 additions and 6 deletions.
1 change: 1 addition & 0 deletions PackageScript
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ CopyFiles('src/lua', 'custom/sigsegv/scripts',
builder.AddCopy('cfg/sigsegv_convars.cfg', folder_map['cfg'])
builder.AddCopy('sigsegv.autoload', folder_map['addons/sourcemod/extensions'])
builder.AddCopy('scripts/mvm_bigrock_sigdemo.pop', folder_map['custom/sigsegv/scripts/population'])
builder.AddCopy('scripts/mvm_bigrock_luademo.pop', folder_map['custom/sigsegv/scripts/population'])

# Copy binaries.
for cxx_task in Extension.extensions:
Expand Down
2 changes: 1 addition & 1 deletion gamedata/sigsegv/globals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"g_DeleteList" "_ZL12g_DeleteList"
"g_bDisableEhandleAccess" "g_bDisableEhandleAccess"
"s_RemoveImmediateSemaphore" "_ZL26s_RemoveImmediateSemaphore"

"g_WorldEntity" "_ZL13g_WorldEntity"
}

"addrs_group"
Expand Down
46 changes: 46 additions & 0 deletions gamedata/sigsegv/misc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5765,6 +5765,52 @@
type "sym"
sym "_ZNK6CTFBot21GetNextSpawnClassnameEv"
}
"CTFGameRules::RoundCleanupShouldIgnore"
{
type "sym"
sym "_ZN12CTFGameRules24RoundCleanupShouldIgnoreEP11CBaseEntity"
}
"CTFGameRules::ShouldCreateEntity"
{
type "sym"
sym "_ZN12CTFGameRules18ShouldCreateEntityEPKc"
}
"CServerGameClients::ClientPutInServer"
{
type "sym"
sym "_ZN18CServerGameClients17ClientPutInServerEP7edict_tPKc"
}
"DispatchSpawn"
{
type "sym"
sym "_Z13DispatchSpawnP11CBaseEntity"
}
"SendProxy_StringT_To_String"
{
type "sym"
sym "_Z27SendProxy_StringT_To_StringPK8SendPropPKvS3_P8DVariantii"
}
"CBasePlayer::PlayerRunCommand"
{
type "sym"
sym "_ZN11CBasePlayer16PlayerRunCommandEP8CUserCmdP11IMoveHelper"
}
"CBaseEntity::FireNamedOutput"
{
type "sym"
sym "_ZN11CBaseEntity15FireNamedOutputEPKc9variant_tPS_S3_f"
}
"CBaseEntity::Event_Killed"
{
type "sym"
sym "_ZN11CBaseEntity12Event_KilledERK15CTakeDamageInfo"
}
"CBaseCombatCharacter::Event_Killed"
{
type "sym"
sym "_ZN20CBaseCombatCharacter12Event_KilledERK15CTakeDamageInfo"
}


}
"addrs_group"
Expand Down
5 changes: 5 additions & 0 deletions gamedata/sigsegv/tfbot_behavior.txt
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,11 @@
type "sym"
sym "_ZNK15CTFBotMedicHeal16IsVisibleToEnemyEP6CTFBotRK6Vector"
}
"CTFBotAttack::Update"
{
type "sym"
sym "_ZN12CTFBotAttack6UpdateEP6CTFBotf"
}

}
}
Expand Down
234 changes: 234 additions & 0 deletions scripts/mvm_bigrock_luademo.pop
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
#base robot_giant.pop
#base robot_standard.pop

WaveSchedule
{

StartingCurrency 1500
RespawnWaveTime 2
CanBotsAttackWhileInSpawnRoom no

LuaScript "
function OnWaveReset(wave)
print('wave reset', wave)
end

function OnWaveInit(wave)
print('wave init', wave)
end

function OnWaveSuccess(wave)
print('wave success', wave)
end

function OnWaveFail(wave)
print('wave fail', wave)
end

function OnWaveSpawnBot(bot, wave, tags)
print('wave spawn bot' .. tostring(bot:IsValid()) .. wave .. #tags)
PrintTable(tags)
end

function OnWaveSpawnTank(tank, wave)
print('wave spawn tank', tank, wave)
end

function OnWaveStart(wave)
print('wave start', wave)
end

function OnPlayerConnected(player)
print('player join', tostring(player))
player:AddCallback(ON_REMOVE, function(ent) print('Player remove '..tostring(ent)) end)

player:AddCallback(ON_SPAWN, function(ent)
print('Player spawn '..tostring(ent))
ent.m_iRevengeCrits = 5
ent.m_iAmmo[1] = 4 --Do note that arrays in Lua are indexed starting from 1
end)

player:AddCallback(ON_ACTIVATE, function(ent) print('Player activate '..tostring(ent)) end)
player:AddCallback(ON_DAMAGE_RECEIVED_PRE, function(ent, damage) print('Player damaged pre '..tostring(ent)); PrintTable(damage); damage.Damage=0; return true; end)
player:AddCallback(ON_DAMAGE_RECEIVED_POST, function(ent, damage) print('Player damaged post '..tostring(ent)); PrintTable(damage) end)
player:AddCallback(ON_INPUT, function(ent, name, activator, caller, value)
print('Player input '..tostring(ent)..' '..name..' '..tostring(activator)..' '..tostring(caller)..' '..tostring(value))
end)
player:AddCallback(ON_OUTPUT, function(ent, name, activator, value) print('Player output '..tostring(ent)..' '..name..' '..tostring(activator)..' '..tostring(value)); end)
player:AddCallback(ON_KEY_PRESSED, function(ent, key) print('Player key press '..tostring(ent)..' '..key)
end)
player:AddCallback(ON_KEY_RELEASED, function(ent, key) print('Player key release '..tostring(ent)..' '..key);
end)
player:AddCallback(ON_DEATH, function(ent, damage) print('Player death '..tostring(ent));
end)
end

function OnPlayerDisconnected(player)
print('player disconnect', player)
end

function OnGameTick()
print('time '..CurTime())
end

ents.AddCreateCallback('obj_sentry*', function(ent) print('CREATED2: '..tostring(ent)) end);
ents.AddCreateCallback('player', function(ent) print('CREATED: '..tostring(ent)) end);
timer.Create(0.5, function() ents.FindByName('intel').a = {4,3} end, 0)

" [$SIGSEGV]

WaveStartCountdown 1 [$SIGSEGV]
//WAVE 1 //Currency 1300 ///////////////////////////////////////////////////////////////////////////////////////////////////////
Wave
{
StartWaveOutput
{
Target wave_start_relay
Action Trigger
}
DoneOutput
{
Target wave_finished_relay
Action trigger
}
WaitWhenDone 65
Checkpoint Yes

// Spy mission - 4 active
// Sniper mission - 2 active

WaveSpawn //WAVE 01a: 36 total, 18 active, Scout (bonk) + crit soldier
{
Name "wave01a"
Where spawnbot
TotalCount 36
MaxActive 18
SpawnCount 6
WaitBeforeStarting 4
WaitBetweenSpawns 5
TotalCurrency 300

Squad
{
TFBot
{
Class Scout
Skill Easy
}
TFBot
{
Class Scout
Skill Easy
}
TFBot
{
Template T_TFBot_Scout_Bonk
}
TFBot
{

Tag lol
Template T_TFBot_Scout_Bonk
}
TFBot
{

Tag lol
Template T_TFBot_Scout_Bonk
}
TFBot
{

Tag lol
Class Soldier
Skill Expert
Attributes AlwaysCrit
ItemAttributes
{
ItemName "TF_WEAPON_ROCKETLAUNCHER"
"faster reload rate" -0.8
"fire rate bonus" 0.6
}
}
}
}
WaveSpawn //WAVE 01b: [GIANT] 4 total, 3 active, Soldier (rapid fire)
{
Name "wave01b"
Where spawnbot
TotalCount 4
MaxActive 4
SpawnCount 1
WaitBeforeStarting 45
WaitBetweenSpawns 60
TotalCurrency 300

TFBot
{
Template T_TFBot_Giant_Soldier_Spammer
Tag lol
}
}
WaveSpawn //WAVE 01c: 40 total, 20 active, Heavy (crit) + uber medic + 3 Pyros (WAITFORALLDEAD "WAVE01A")
{
Name "wave01c"
Where spawnbot
TotalCount 40
MaxActive 20
SpawnCount 5
WaitForAllDead "wave01a"
WaitBeforeStarting 30
WaitBetweenSpawns 15
TotalCurrency 350

Squad
{
TFBot
{
Class Heavyweapons
Skill Easy
Attributes AlwaysCrit
}
TFBot
{
Template T_TFBot_Medic_QuickUber
}
TFBot
{
Class Pyro
Skill Easy
}
TFBot
{
Class Pyro
Skill Easy
}
TFBot
{
Class Pyro
Skill Easy
}
}
}
WaveSpawn //WAVE 01d: 40 total, 22 active, Scout (crit bats) (WAITTFORALLSPAWNED "WAVE01C")
{
Name "wave01d"
Where spawnbot
TotalCount 40
MaxActive 22
SpawnCount 8
WaitForAllSpawned "wave01c"
WaitBeforeStarting 0
WaitBetweenSpawns 0
TotalCurrency 350

TFBot
{
Class Scout
Skill Easy
WeaponRestrictions MeleeOnly
Attributes AlwaysCrit
}
}
}
}
16 changes: 15 additions & 1 deletion scripts/mvm_bigrock_sigdemo.pop
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ WaveSchedule
DisableSound "Announcer.MVM_Wave_End" [$SIGSEGV]
DisableSound "Announcer.MVM_Bonus" [$SIGSEGV]
PrecacheParticle "AntlionGib" [$SIGSEGV]
RobotLimit 18 [$SIGSEGV] //Sets a robot limit. You can increase or decrease it, but increasing it will reduce max spectator and player count (you need to set MaxSpectators below 4) (default: 22)
// AllowBotExtraSlots 1 [$SIGSEGV] // Allows you to set RobotLimit up to 57 bots instead of 26. Experimental. Must be placed before RobotLimit. Bots will prefer normal slots by default unless the TFBot has the PreferExtraSlots 1 key. Map reload recommended after change (default: 0)
// ExtraBotSlotsNoDeathcam 0 [$SIGSEGV] // If bots in extra slots kill a player, the bot name in deathcam with display as ERRORNAME. If you don't like that you can turn deathcam off (default: 0)
RobotLimit 18 [$SIGSEGV] //Sets a robot limit. You can increase or decrease it, but increasing it will reduce max spectator and player count (you need to set MaxSpectators below 5). 26 is maximum value to keep 6 players active (default: 22)
EnableDominations 1 [$SIGSEGV] //Should enable player to bot dominations
SetCreditTeam 3 [$SIGSEGV] //Sets which team can pickup money. Set to 3 to allow blu team to collect money instead. Setting this also allows bots to collect money
BluHumanFlagCapture 1 [$SIGSEGV] //Can blu humans capture the flag
Expand Down Expand Up @@ -130,6 +132,8 @@ WaveSchedule
FastWholeMapTriggers 1 [$SIGSEGV] // Optimize big triggers (larger than 5000 units in all directions) spawned by point templates, by automatically assuming all entities hit the trigger. Might cause issues, but in that case you should use an alternative method anyway (default: 1)
BluHumanSpawnNoShoot 1 [$SIGSEGV] // BLU players cannot shoot while in spawn (default: 1)
BluHumanSpawnProtection 1 [$SIGSEGV] // BLU players are invincible in spawn (default: 1)
AutoWeaponStrip 1 [$SIGSEGV] // Automatically strip stock weapons without attributes in slots that are not used (default: 0)
RemoveUnusedOffhandViewmodel 1 [$SIGSEGV] // Remove unused offhand viewmodel on other class than Spy (default: 1)

HHHNoControlPointLogic 1 [$SIGSEGV] // Disable HHH going to the contested point (default: 0)
HHHHealthPerPlayer 200 [$SIGSEGV] // (default: 200)
Expand Down Expand Up @@ -1234,6 +1238,8 @@ WaveSchedule
//Idle - Sit in spawn and wait
//Passive - Sit at spawn position, until an active threat is in vision
Item "The Short Circuit"
DesiredAttackRange 100 [$SIGSEGV] // How close to the target the bot should want to move when trying to attack. For melee weapons, default is 100. For other weapons except sniper rifles - 500
MoveBehindEnemy 1 [$SIGSEGV] // Should the bot try to get behind the target, similar to how the Spy bot behaves. Instead of 1 you can also specify custom distance at which the bot will start strafing around the target (default: 0)
ExtAttr AlwaysFireWeaponAlt [$SIGSEGV]
WeaponRestrictions SecondaryOnly
CustomWeaponModel [$SIGSEGV] //Sets custom weapon model
Expand Down Expand Up @@ -1761,6 +1767,13 @@ WaveSchedule
"ubercharge" 1
"powerup charges" 3
}
Sequence [$SIGSEGV] // Display a sequence animation with a name. Not every animation is supported
{
Name "Run_MELEE" // Name of the sequence
Delay 6 // Delay before playing animation
Repeats 1 // How often repeat the animation
IfHealthBelow 17000 // Health below which activate animation
}
}
}
WaveSpawn //WAVE 01a: 27 total, 9 active, Scout (melee only)
Expand Down Expand Up @@ -2161,6 +2174,7 @@ WaveSchedule
Attributes HoldFireUntilFullReload
Attributes MiniBoss
ExtAttr JumpStomp [$SIGSEGV] //Try to jump over and stomp obstracles
//ExtAttr DisableSpawnProtectionFix [$SIGSEGV] // Disable a fix where if a medic activates ubercharge inside spawn, the medic will not be invulnerable exiting spawn
ItemAttributes
{
ItemName "TF_WEAPON_ROCKETLAUNCHER"
Expand Down
Loading

0 comments on commit b855408

Please sign in to comment.