Compare commits
55 Commits
SpawnManag
...
dev
Author | SHA1 | Date | |
---|---|---|---|
180108d6ec | |||
0c17002509 | |||
b0292d71ce | |||
a747c3eaf8 | |||
88d6bbb17b | |||
281d67d9d3 | |||
b781db3329 | |||
3a8b407ef5 | |||
9f1e220c8d | |||
f0aa54121e | |||
9486cbe1f1 | |||
d7c87d4b9b | |||
86e785b122 | |||
88e78d678d | |||
efd5c3d49f | |||
f335c3932d | |||
fc87924a4d | |||
bf06206445 | |||
9cbe05edfe | |||
eda17af2bb | |||
47e03c9218 | |||
b38412819e | |||
de44bfe00f | |||
a390cffbb8 | |||
7395ff04bf | |||
681870536b | |||
c7e9087f6e | |||
91e199a2e1 | |||
9f3153b43f | |||
e12c70bdbe | |||
90a69ef739 | |||
42cf263785 | |||
e1face5c04 | |||
35048c6fec | |||
088da70984 | |||
525ee1728e | |||
3dad5b10c7 | |||
3a42094ca2 | |||
a45ba21925 | |||
f681c7d40d | |||
0de9c0088c | |||
c06591d5a2 | |||
11c5490bd6 | |||
3fbf4e9c20 | |||
40c9546858 | |||
83286ea046 | |||
88fcd8b235 | |||
fd3c9116e4 | |||
b5355d9fb5 | |||
62c3f79c5e | |||
d466d1fc79 | |||
f0b10fb158 | |||
b0727dd677 | |||
25b3e85009 | |||
41f186ee15 |
33
.editorconfig
Normal file
33
.editorconfig
Normal file
@ -0,0 +1,33 @@
|
||||
root = true
|
||||
|
||||
# Global
|
||||
[*]
|
||||
indent_style = unset
|
||||
indent_size = 4
|
||||
tab_width = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = unset
|
||||
|
||||
# Unreal Engine 3 / Source
|
||||
[*.uc]
|
||||
indent_style = tab
|
||||
|
||||
[*.{uci,upkg}]
|
||||
|
||||
# Unreal Engine 3 / i18n
|
||||
[*.{chn,cht,cze,dan,deu,dut,esl,esn,fra,frc,hun,int,ita,jpn,kor,pol,por,ptb,rus,tur,ukr}]
|
||||
charset = utf-16le
|
||||
|
||||
# Other
|
||||
[*.md]
|
||||
indent_style = space
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.{txt,cfg,conf}]
|
||||
indent_style = tab
|
72
.github/workflows/mega-linter.yml
vendored
Normal file
72
.github/workflows/mega-linter.yml
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
---
|
||||
name: MegaLinter
|
||||
|
||||
permissions: read-all
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
env:
|
||||
APPLY_FIXES: none
|
||||
APPLY_FIXES_EVENT: pull_request
|
||||
APPLY_FIXES_MODE: commit
|
||||
DISABLE: SPELL
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: MegaLinter
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: MegaLinter
|
||||
id: ml
|
||||
uses: oxsecurity/megalinter@v6
|
||||
env:
|
||||
VALIDATE_ALL_CODEBASE: true
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Archive production artifacts
|
||||
if: ${{ success() }} || ${{ failure() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: MegaLinter reports
|
||||
path: |
|
||||
megalinter-reports
|
||||
mega-linter.log
|
||||
|
||||
- name: Create Pull Request with applied fixes
|
||||
id: cpr
|
||||
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
commit-message: "[MegaLinter] Apply linters automatic fixes"
|
||||
title: "[MegaLinter] Apply linters automatic fixes"
|
||||
labels: bot
|
||||
- name: Create PR output
|
||||
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||
run: |
|
||||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
||||
|
||||
- name: Prepare commit
|
||||
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||
run: sudo chown -Rc $UID .git/
|
||||
- name: Commit and push applied linter fixes
|
||||
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
|
||||
commit_message: "[MegaLinter] Apply linters fixes"
|
||||
commit_user_name: megalinter-bot
|
||||
commit_user_email: nicolas.vuillamy@ox.security
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*.psd
|
||||
/ignore
|
98
PublicationContent/description.txt
Normal file
98
PublicationContent/description.txt
Normal file
@ -0,0 +1,98 @@
|
||||
[img]https://img.shields.io/static/v1?logo=GitHub&labelColor=gray&color=blue&logoColor=white&label=&message=Open Source[/img] [img]https://img.shields.io/github/license/GenZmeY/KF2-ZedSpawner[/img] [img]https://img.shields.io/steam/favorites/2811290931[/img] [img]https://img.shields.io/steam/update-date/2811290931[/img] [url=https://steamcommunity.com/sharedfiles/filedetails/changelog/2811290931][img]https://img.shields.io/github/v/tag/GenZmeY/KF2-ZedSpawner[/img][/url]
|
||||
|
||||
[h1]Description[/h1]
|
||||
Spawner for zeds. Started as a modification of [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2488241348]this version[/url], but now there is almost nothing left of the previous mutator, lol xD
|
||||
|
||||
[h1]Features[/h1]
|
||||
- spawn without increasing zed counter;
|
||||
- spawn depends on the number of players;
|
||||
- cyclic spawn (useful for endless mode);
|
||||
- separate spawn for special waves and boss waves;
|
||||
- spawn after a certain percentage of killed zeds.
|
||||
|
||||
[h1]Whitelisted?[/h1]
|
||||
No. This mod is not whitelisted and will de-rank your server. Any XP gained will not be saved.
|
||||
|
||||
[h1]Usage (single player)[/h1]
|
||||
[olist]
|
||||
[*]Subscribe to this mutator;
|
||||
[*]Start KF2;
|
||||
[*]Open console (~) and input:
|
||||
[b]open KF-BioticsLab?Mutator=ZedSpawner.ZedSpawnerMut[/b]
|
||||
(replace the map and add the parameters you need)
|
||||
[*]<Enter>.
|
||||
[/olist]
|
||||
|
||||
[h1]Usage (server)[/h1]
|
||||
[b]Note:[/b] [i]If you don't understand what is written here, read the article [url=https://wiki.killingfloor2.com/index.php?title=Dedicated_Server_(Killing_Floor_2)][u]Dedicated Server (KF2 wiki)[/u][/url] before following these instructions.[/i]
|
||||
[olist]
|
||||
[*]Open your [b]PCServer-KFEngine.ini[/b] / [b]LinuxServer-KFEngine.ini[/b];
|
||||
[*]Find the [b][IpDrv.TcpNetDriver][/b] section and make sure that there is a line (add if not):
|
||||
[b]DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload[/b]
|
||||
❗️ If there are several [b]DownloadManagers=[/b] then the line above should be the first ❗️
|
||||
[*]Add the following string to the [b][OnlineSubsystemSteamworks.KFWorkshopSteamworks][/b] section (create one if it doesn't exist):
|
||||
[b]ServerSubscribedWorkshopItems=2811290931[/b]
|
||||
[*]Start the server and wait while the mutator is downloading;
|
||||
[*]Add mutator to server start parameters: [b]?Mutator=ZedSpawner.ZedSpawnerMut[/b] and restart the server.
|
||||
[/olist]
|
||||
|
||||
[h1]Important setup information[/h1]
|
||||
The config should be created on first start, but now the game contains a bug that initializes the config values randomly if they are not explicitly set. Thus, the config may have incorrect values or not be created at all.
|
||||
So if you are using this mutator for the first time, I highly recommend doing the following:
|
||||
[olist]
|
||||
[*]Create (modify) [b]KFZedSpawner.ini[/b] manually. Put the following content there:
|
||||
[b][ZedSpawner.ZedSpawner]
|
||||
Version=0[/b]
|
||||
[*]Start the game/server with ZedSpawner to generate the contents of the config.
|
||||
[*]Close the game/server.
|
||||
[/olist]
|
||||
[b]Right now this is the only way to correctly create the default config.[/b]
|
||||
Unfortunately I can't do anything about it because it's a game problem (not mutator). I hope TWI fixes this someday.
|
||||
|
||||
[h1]Setup (KFZedSpawner.ini)[/h1]
|
||||
[b]bPreloadContentServer[/b] - enable/disable server-side preload content;
|
||||
[b]bPreloadContentClient[/b] - enable/disable client-side preload content;
|
||||
|
||||
[b]Cyclic spawn[/b]
|
||||
If you don't want to write an endless spawn list for the endless mode (lol) use a cyclic spawn. Set parameter [b]bCyclicalSpawn=True[/b]
|
||||
After the last wave in the spawn list ends, spawn will start again from the beginning of the list.
|
||||
Using the [b]SpawnTotalCycleMultiplier[/b] and [b]SingleSpawnLimitCycleMultiplier[/b] modifiers will allow you to adjust the difficulty of the following cycles.
|
||||
|
||||
[b]Shadow spawn[/b]
|
||||
With [b]bShadowSpawn=True[/b], the zeds from the list will replace the original zeds that haven't spawned yet, so the counter of the remaining zeds won't grow. Spawning will stop when there are no unspawned zeds left.
|
||||
With [b]bShadowSpawn=False[/b] zeds from the spawn list will not replace the original ones. The counter of remaining zeds will increase when spawning. Spawn will continue until the end of the wave.
|
||||
|
||||
[b]Smooth spawn[/b]
|
||||
With [b]bSmoothSpawn=True[/b] a group of zeds will spawn gradually (1 zed per second);
|
||||
|
||||
[b]AliveSpawnLimit[/b]
|
||||
If you have a server crash with a large number of zeds, set [b]AliveSpawnLimit[/b]. If the number of live zeds reaches the specified limit, spawning will be stopped until there are fewer zeds. At zero there is no limit.
|
||||
|
||||
[b]Spawn lists[/b]
|
||||
Use the [b][ZedSpawner.SpawnListRegular][/b] section to set spawn on any wave.
|
||||
Use the [b][ZedSpawner.SpawnListBossWaves][/b] and [b][ZedSpawner.SpawnListSpecialWaves][/b] sections to set a separate spawn for the boss wave and special waves if needed. Use [b]bStopRegularSpawn=True[/b] if you want to stop spawning from the regular list during boss waves or special waves.
|
||||
|
||||
[b]Spawn entry parameters[/b]
|
||||
[list]
|
||||
[*][b]Wave / BossClass[/b] - what wave is the spawn for. Wave number for the regular list, wave type for the special list; boss class for the boss list.
|
||||
[*][b]ZedClass[/b] - the class of the zed you want to spawn (for example: ZedternalReborn.WMPawn_ZedScrake_Omega).
|
||||
[*][b]RelativeStart[/b] - allows you to start spawning a zed not on a timer, but after killing the specified percentage of zeds. If set to zero, spawn will start after [b]Delay[/b] seconds from the start of the wave. Note that [b]RelativeStart[/b] does not work on bosses.
|
||||
[*][b]Delay[/b] - time in seconds between spawns.
|
||||
[*][b]Probability[/b] - the chance (%) of each spawn (1-100).
|
||||
[*][b]SpawnCountBase[/b] - The base number of zeds to spawn, aka the number of zeds that will be spawned on the first cycle with one player. Can be adjusted by modifiers, number of players and cycle number.
|
||||
[*][b]SingleSpawnLimit[/b] - maximum number of zeds for one spawn. Can be adjusted by modifiers, number of players and cycle number.
|
||||
[/list]
|
||||
|
||||
[h1]Spawn logic[/h1]
|
||||
I really tried to describe in text how it works, but every time I got some kind of crap. Therefore, I decided to explain it a little differently and made a small calculator for this. It is interactive, you can change the parameters and see what happens. It has all the necessary explanations, so I think you will quickly figure out how the spawner works.
|
||||
|
||||
[url=https://redirect.genzmey.su/kf2-zedspawner-calc][img]https://img.shields.io/static/v1?message=Spawn%20Calculator&logo=Google%20Sheets&labelColor=34A853&color=gray&logoColor=white&label=Google%20Sheets%20[/img][/url]
|
||||
[i]Just please try not to interfere with each other if you see that someone is already using a calculator.[/i]
|
||||
|
||||
[h1]Notes[/h1]
|
||||
📌 Mutator does not contain custom zeds. You must have the required zeds in your subscriptions to be able to spawn them.
|
||||
📌 If you are using this mutator to add zeds, you should [b]not[/b] use mutators from zed packs (just having them in subscriptions is enough).
|
||||
📌 If the spawner's behavior differs from what you expect, check the server logs first. ZedSpawner writes in the logs everything it does (and describes why), most likely you will find an explanation of what is happening there. If not, feel free to report bugs :)
|
||||
|
||||
[h1]Sources[/h1]
|
||||
[url=https://github.com/GenZmeY/KF2-ZedSpawner]https://github.com/GenZmeY/KF2-ZedSpawner[/url] (GNU GPLv3)
|
BIN
PublicationContent/preview.gif
Normal file
BIN
PublicationContent/preview.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 879 KiB |
BIN
PublicationContent/preview.png
Normal file
BIN
PublicationContent/preview.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 418 KiB |
BIN
PublicationContent/preview.psd
Normal file
BIN
PublicationContent/preview.psd
Normal file
Binary file not shown.
BIN
PublicationContent/previewFull.gif
Normal file
BIN
PublicationContent/previewFull.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 MiB |
1
PublicationContent/tags.txt
Normal file
1
PublicationContent/tags.txt
Normal file
@ -0,0 +1 @@
|
||||
Mutators
|
1
PublicationContent/title.txt
Normal file
1
PublicationContent/title.txt
Normal file
@ -0,0 +1 @@
|
||||
Zed Spawner
|
47
README.md
47
README.md
@ -1 +1,46 @@
|
||||
# KF2-ZedSpawner
|
||||
# ZedSpawner
|
||||
|
||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931)
|
||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931)
|
||||
[](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931)
|
||||
[](https://github.com/GenZmeY/KF2-ZedSpawner/actions/workflows/mega-linter.yml)
|
||||
[](https://github.com/GenZmeY/KF2-ZedSpawner/tags)
|
||||
[](LICENSE)
|
||||
|
||||
## Description
|
||||
Spawner for zeds. Started as a modification of the [this version](https://steamcommunity.com/sharedfiles/filedetails/?id=2488241348), but now there is almost nothing left of the previous mutator, lol
|
||||
|
||||
## Features
|
||||
- spawn without increasing zed counter;
|
||||
- spawn depends on the number of players;
|
||||
- cyclic spawn (useful for endless mode);
|
||||
- separate spawn for special waves and boss waves;
|
||||
- spawn after a certain percentage of killed zeds.
|
||||
|
||||
## Usage & Setup
|
||||
[See steam workshop page](https://steamcommunity.com/sharedfiles/filedetails/?id=2811290931)
|
||||
|
||||
## Spawn calculator
|
||||
[Spawn Calculator](https://docs.google.com/spreadsheets/d/1q67WJ36jhj6Y0lPNO5tS2bU79Wphu4Xmi62me6DAwtM/edit?usp=sharing)
|
||||
|
||||
## Build
|
||||
**Note:** If you want to build/test/brew/publish a mutator without git-bash and/or scripts, follow [these instructions](https://tripwireinteractive.atlassian.net/wiki/spaces/KF2SW/pages/26247172/KF2+Code+Modding+How-to) instead of what is described here.
|
||||
1. Install [Killing Floor 2](https://store.steampowered.com/app/232090/Killing_Floor_2/), Killing Floor 2 - SDK and [git for windows](https://git-scm.com/download/win);
|
||||
2. open git-bash and go to any folder where you want to store sources:
|
||||
`cd <ANY_FOLDER_YOU_WANT>`
|
||||
3. Clone this repository and go to the source folder:
|
||||
`git clone https://github.com/GenZmeY/KF2-ZedSpawner && cd KF2-ZedSpawner`
|
||||
4. Download dependencies:
|
||||
`git submodule init && git submodule update`
|
||||
5. Compile:
|
||||
`./tools/builder -c`
|
||||
5. The compiled files will be here:
|
||||
`C:\Users\<USERNAME>\Documents\My Games\KillingFloor2\KFGame\Unpublished\BrewedPC\Script\`
|
||||
|
||||
## Bug reports
|
||||
If you find a bug, go to the [issue page](https://github.com/GenZmeY/KF2-ZedSpawner/issues) and check if there is a description of your bug. If not, create a new issue.
|
||||
Describe what the bug looks like and how reproduce it.
|
||||
Attaching your KFZedSpawner.ini and Launch.log can also be helpful.
|
||||
|
||||
## License
|
||||
[](LICENSE)
|
||||
|
@ -1,350 +0,0 @@
|
||||
class AISpawnManager extends KFAISpawnManager
|
||||
abstract;
|
||||
|
||||
const class<Config_SpawnManager> Config;
|
||||
|
||||
struct S_DifficultyWaveInfo
|
||||
{
|
||||
var Array<AIWaveInfo> Waves;
|
||||
};
|
||||
|
||||
var protected ZedSpawner ZS;
|
||||
|
||||
var protected Array<S_DifficultyWaveInfo> V_DifficultyWaveSettings;
|
||||
var protected S_DifficultyWaveInfo V_WaveSettings;
|
||||
var protected Array<AISpawnSquad> V_AvailableSquads;
|
||||
|
||||
var public E_LogLevel LogLevel;
|
||||
|
||||
private function CopySpawnSquadArray(Array<KFAISpawnSquad> From, out Array<AISpawnSquad> To)
|
||||
{
|
||||
local KFAISpawnSquad SS;
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
To.Length = 0;
|
||||
foreach From(SS)
|
||||
To.AddItem(class'AISpawnSquad'.static.CreateFrom(SS));
|
||||
}
|
||||
|
||||
private function ZedSpawner GetZedSpawner()
|
||||
{
|
||||
foreach WorldInfo.DynamicActors(class'ZedSpawner', ZS)
|
||||
return ZS;
|
||||
return None;
|
||||
}
|
||||
|
||||
public function Initialize()
|
||||
{
|
||||
ZS = GetZedSpawner();
|
||||
if (ZS != None)
|
||||
{
|
||||
LogLevel = ZS.LogLevel;
|
||||
`ZS_Trace(`Location);
|
||||
}
|
||||
else
|
||||
{
|
||||
`ZS_Log("FATAL: no ZedSpawner found! Destroy" @ Self.class);
|
||||
`ZS_Log("FATAL:" @ `Location);
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO:
|
||||
|
||||
Super.Initialize();
|
||||
}
|
||||
|
||||
public function GetWaveSettings(out DifficultyWaveInfo WaveInfo)
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
if (DifficultyWaveSettings.Length > 0)
|
||||
WaveInfo = DifficultyWaveSettings[Clamp(GameDifficulty, 0, DifficultyWaveSettings.Length - 1)];
|
||||
|
||||
V_GetWaveSettings(V_WaveSettings);
|
||||
}
|
||||
|
||||
protected function V_GetWaveSettings(out S_DifficultyWaveInfo WaveInfo)
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
if (V_DifficultyWaveSettings.Length > 0)
|
||||
WaveInfo = V_DifficultyWaveSettings[Clamp(GameDifficulty, 0, V_DifficultyWaveSettings.Length - 1)];
|
||||
}
|
||||
|
||||
public function SetupNextWave(byte NextWaveIndex, int TimeToNextWaveBuffer = 0)
|
||||
{
|
||||
local KFGameReplicationInfo KFGRI;
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
if (OutbreakEvent.ActiveEvent.bBossRushMode)
|
||||
{
|
||||
NextWaveIndex = MyKFGRI.WaveMax - 1;
|
||||
}
|
||||
|
||||
if (NextWaveIndex < V_WaveSettings.Waves.Length)
|
||||
{
|
||||
if (GameDifficulty < RecycleSpecialSquad.Length)
|
||||
{
|
||||
bRecycleSpecialSquad = RecycleSpecialSquad[GameDifficulty];
|
||||
}
|
||||
else
|
||||
{
|
||||
bRecycleSpecialSquad = RecycleSpecialSquad[RecycleSpecialSquad.Length - 1];
|
||||
}
|
||||
|
||||
LeftoverSpawnSquad.Length = 0;
|
||||
NumSpawnListCycles = 1;
|
||||
NumSpecialSquadRecycles = 0;
|
||||
|
||||
if (MyKFGRI.IsBossWave() || OutbreakEvent.ActiveEvent.bBossRushMode)
|
||||
{
|
||||
WaveTotalAI = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (V_WaveSettings.Waves[NextWaveIndex].bRecycleWave)
|
||||
{
|
||||
WaveTotalAI = V_WaveSettings.Waves[NextWaveIndex].MaxAI *
|
||||
DifficultyInfo.GetPlayerNumMaxAIModifier(GetNumHumanTeamPlayers()) *
|
||||
DifficultyInfo.GetDifficultyMaxAIModifier();
|
||||
}
|
||||
else
|
||||
{
|
||||
WaveTotalAI = V_WaveSettings.Waves[NextWaveIndex].MaxAI;
|
||||
}
|
||||
WaveTotalAI *= GetTotalWaveCountScale();
|
||||
WaveTotalAI = Max(1, WaveTotalAI);
|
||||
}
|
||||
|
||||
GetAvailableSquads(NextWaveIndex, true);
|
||||
|
||||
WaveStartTime = WorldInfo.TimeSeconds;
|
||||
TimeUntilNextSpawn = 5.f + TimeToNextWaveBuffer;
|
||||
|
||||
if (NextWaveIndex == 0)
|
||||
{
|
||||
TotalWavesActiveTime = 0;
|
||||
}
|
||||
|
||||
KFGRI = KFGameReplicationInfo(WorldInfo.GRI);
|
||||
if (KFGRI != None && (KFGRI.bDebugSpawnManager || KFGRI.bGameConductorGraphingEnabled))
|
||||
{
|
||||
KFGRI.CurrentSineMod = GetSineMod();
|
||||
KFGRI.CurrentNextSpawnTime = TimeUntilNextSpawn;
|
||||
KFGRI.CurrentSineWavFreq = GetSineWaveFreq();
|
||||
KFGRI.CurrentNextSpawnTimeMod = GetNextSpawnTimeMod();
|
||||
KFGRI.CurrentTotalWavesActiveTime = TotalWavesActiveTime;
|
||||
KFGRI.CurrentMaxMonsters = GetMaxMonsters();
|
||||
KFGRI.CurrentTimeTilNextSpawn = TimeUntilNextSpawn;
|
||||
}
|
||||
}
|
||||
|
||||
LastAISpawnVolume = None;
|
||||
}
|
||||
|
||||
public function GetAvailableSquads(byte MyWaveIndex, optional bool bNeedsSpecialSquad=false)
|
||||
{
|
||||
local int i, j, TotalZedsInSquads;
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
if (V_WaveSettings.Waves[MyWaveIndex] != None)
|
||||
{
|
||||
NumSpawnListCycles++;
|
||||
|
||||
V_WaveSettings.Waves[MyWaveIndex].GetNewSquadList(V_AvailableSquads);
|
||||
|
||||
if (bNeedsSpecialSquad)
|
||||
{
|
||||
V_WaveSettings.Waves[MyWaveIndex].GetSpecialSquad(V_AvailableSquads);
|
||||
|
||||
for (i = 0; i < V_AvailableSquads.Length; i++)
|
||||
{
|
||||
for (j = 0; j < V_AvailableSquads[i].MonsterList.Length; j++)
|
||||
{
|
||||
TotalZedsInSquads += V_AvailableSquads[i].MonsterList[j].Num;
|
||||
}
|
||||
}
|
||||
|
||||
if (WaveTotalAI < TotalZedsInSquads)
|
||||
{
|
||||
bForceRequiredSquad = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function V_GetSpawnListFromSquad(byte SquadIdx, out Array<AISpawnSquad> SquadsList, out Array<class<KFPawn_Monster> > AISpawnList)
|
||||
{
|
||||
local AISpawnSquad Squad;
|
||||
local EAIType AIType;
|
||||
local int i, j, RandNum;
|
||||
local ESquadType LargestMonsterSquadType;
|
||||
local Array<class<KFPawn_Monster> > TempSpawnList;
|
||||
local int RandBossIndex;
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
Squad = SquadsList[SquadIdx];
|
||||
|
||||
LargestMonsterSquadType = EST_Crawler;
|
||||
|
||||
for (i = 0; i < Squad.MonsterList.Length; i++)
|
||||
{
|
||||
for (j = 0; j < Squad.MonsterList[i].Num; j++)
|
||||
{
|
||||
if (Squad.MonsterList[i].CustomClass != None)
|
||||
{
|
||||
TempSpawnList.AddItem(Squad.MonsterList[i].CustomClass);
|
||||
}
|
||||
else
|
||||
{
|
||||
AIType = Squad.MonsterList[i].Type;
|
||||
if (AIType == AT_BossRandom)
|
||||
{
|
||||
if (OutbreakEvent.ActiveEvent.bBossRushMode)
|
||||
{
|
||||
RandBossIndex = Rand(BossRushEnemies.length);
|
||||
TempSpawnList.AddItem( default.AIBossClassList[BossRushEnemies[RandBossIndex]]);
|
||||
BossRushEnemies.Remove(RandBossIndex, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
TempSpawnList.AddItem(GetBossAISpawnType());
|
||||
}
|
||||
|
||||
LargestMonsterSquadType = EST_Boss;
|
||||
}
|
||||
else
|
||||
{
|
||||
TempSpawnList.AddItem(GetAISpawnType(AIType));
|
||||
}
|
||||
}
|
||||
|
||||
if (TempSpawnList[TempSpawnList.Length - 1].default.MinSpawnSquadSizeType < LargestMonsterSquadType)
|
||||
{
|
||||
LargestMonsterSquadType = TempSpawnList[TempSpawnList.Length - 1].default.MinSpawnSquadSizeType;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (TempSpawnList.Length > 0)
|
||||
{
|
||||
while (TempSpawnList.Length > 0)
|
||||
{
|
||||
RandNum = Rand( TempSpawnList.Length);
|
||||
AISpawnList.AddItem( TempSpawnList[RandNum]);
|
||||
TempSpawnList.Remove( RandNum, 1);
|
||||
}
|
||||
|
||||
DesiredSquadType = Squad.MinVolumeType;
|
||||
|
||||
if (LargestMonsterSquadType < DesiredSquadType)
|
||||
{
|
||||
DesiredSquadType = LargestMonsterSquadType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function Array<class<KFPawn_Monster> > GetNextSpawnList()
|
||||
{
|
||||
local Array<class<KFPawn_Monster> > NewSquad, RequiredSquad;
|
||||
local int RandNum, AINeeded;
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
if (LeftoverSpawnSquad.Length > 0)
|
||||
{
|
||||
NewSquad = LeftoverSpawnSquad;
|
||||
SetDesiredSquadTypeForZedList(NewSquad);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!IsAISquadAvailable())
|
||||
{
|
||||
if (!bSummoningBossMinions)
|
||||
{
|
||||
if (bRecycleSpecialSquad && NumSpawnListCycles % 2 == 1 && (MaxSpecialSquadRecycles == -1 || NumSpecialSquadRecycles < MaxSpecialSquadRecycles))
|
||||
{
|
||||
GetAvailableSquads(MyKFGRI.WaveNum - 1, true);
|
||||
++NumSpecialSquadRecycles;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetAvailableSquads(MyKFGRI.WaveNum - 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CopySpawnSquadArray(BossMinionsSpawnSquads, V_AvailableSquads);
|
||||
}
|
||||
}
|
||||
|
||||
RandNum = Rand(V_AvailableSquads.Length);
|
||||
|
||||
if (bForceRequiredSquad && RandNum == (V_AvailableSquads.Length - 1))
|
||||
{
|
||||
bForceRequiredSquad=false;
|
||||
}
|
||||
|
||||
V_GetSpawnListFromSquad(RandNum, V_AvailableSquads, NewSquad);
|
||||
|
||||
if (bForceRequiredSquad)
|
||||
{
|
||||
V_GetSpawnListFromSquad((V_AvailableSquads.Length - 1), V_AvailableSquads, RequiredSquad);
|
||||
|
||||
if ((NumAISpawnsQueued + NewSquad.Length + RequiredSquad.Length) > WaveTotalAI)
|
||||
{
|
||||
NewSquad = RequiredSquad;
|
||||
RandNum = (V_AvailableSquads.Length - 1);
|
||||
bForceRequiredSquad=false;
|
||||
}
|
||||
}
|
||||
|
||||
V_AvailableSquads.Remove(RandNum, 1);
|
||||
}
|
||||
|
||||
AINeeded = GetNumAINeeded();
|
||||
if (AINeeded < NewSquad.Length)
|
||||
{
|
||||
LeftoverSpawnSquad = NewSquad;
|
||||
LeftoverSpawnSquad.Remove(0, AINeeded);
|
||||
NewSquad.Length = AINeeded;
|
||||
}
|
||||
else
|
||||
{
|
||||
LeftoverSpawnSquad.Length = 0;
|
||||
}
|
||||
|
||||
return NewSquad;
|
||||
}
|
||||
|
||||
public function bool IsAISquadAvailable()
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
return (V_AvailableSquads.Length > 0);
|
||||
}
|
||||
|
||||
public function SummonBossMinions(Array<KFAISpawnSquad> NewMinionSquad, int NewMaxBossMinions, optional bool bUseLivingPlayerScale = true)
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
CopySpawnSquadArray(NewMinionSquad, V_AvailableSquads);
|
||||
Super.SummonBossMinions(NewMinionSquad, NewMaxBossMinions, bUseLivingPlayerScale);
|
||||
}
|
||||
|
||||
public function StopSummoningBossMinions()
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
V_AvailableSquads.Length = 0;
|
||||
Super.StopSummoningBossMinions();
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Config = class'Config_SpawnManager'
|
||||
}
|
@ -1,118 +0,0 @@
|
||||
class AISpawnManager_Endless extends AISpawnManager
|
||||
within KFGameInfo_Endless;
|
||||
|
||||
struct S_MacroDifficultyWaveInfo
|
||||
{
|
||||
var Array<S_DifficultyWaveInfo> MacroDifficultyWaveSettings;
|
||||
};
|
||||
|
||||
struct MacroDifficultyWaveInfo
|
||||
{
|
||||
var Array<DifficultyWaveInfo> MacroDifficultyWaveSettings;
|
||||
};
|
||||
|
||||
var protected Array<MacroDifficultyWaveInfo> DifficultyWaves;
|
||||
var protected Array<S_MacroDifficultyWaveInfo> V_DifficultyWaves;
|
||||
|
||||
public function SetupNextWave(byte NextWaveIndex, int TimeToNextWaveBuffer = 0)
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
Super.SetupNextWave(NextWaveIndex % WaveSettings.Waves.length, TimeToNextWaveBuffer);
|
||||
}
|
||||
|
||||
public function GetAvailableSquads(byte MyWaveIndex, optional bool bNeedsSpecialSquad = false)
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
Super.GetAvailableSquads(MyWaveIndex % WaveSettings.Waves.length, bNeedsSpecialSquad);
|
||||
}
|
||||
|
||||
public function GetWaveSettings(out DifficultyWaveInfo WaveInfo)
|
||||
{
|
||||
local int AdGD; // AdjustedGameDifficulty
|
||||
local int AvAdGD; // AvailableAdjustedGameDifficulty
|
||||
local int AvGD; // AvailableGameDifficulty
|
||||
local int DWL; // DifficultyWavesLength
|
||||
local int MDWSL; // MacroDifficultyWaveSettingsLength
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
DWL = DifficultyWaves.Length;
|
||||
if (DWL > 0)
|
||||
{
|
||||
AvGD = Clamp(GameDifficulty, 0, DWL - 1);
|
||||
MDWSL = DifficultyWaves[AvGD].MacroDifficultyWaveSettings.Length;
|
||||
if (MDWSL > 0)
|
||||
{
|
||||
AdGD = EndlessDifficulty.GetCurrentDifficultyIndex();
|
||||
AvAdGD = Clamp(AdGD, 0, MDWSL - 1);
|
||||
WaveInfo = DifficultyWaves[AvGD].MacroDifficultyWaveSettings[AvAdGD];
|
||||
}
|
||||
}
|
||||
|
||||
V_GetWaveSettings(V_WaveSettings);
|
||||
}
|
||||
|
||||
protected function V_GetWaveSettings(out S_DifficultyWaveInfo WaveInfo)
|
||||
{
|
||||
local int AdGD; // AdjustedGameDifficulty
|
||||
local int AvAdGD; // AvailableAdjustedGameDifficulty
|
||||
local int AvGD; // AvailableGameDifficulty
|
||||
local int VDWL; // V_DifficultyWavesLength
|
||||
local int MDWSL; // MacroDifficultyWaveSettingsLength
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
VDWL = V_DifficultyWaves.Length;
|
||||
if (VDWL > 0)
|
||||
{
|
||||
AvGD = Clamp(GameDifficulty, 0, VDWL - 1);
|
||||
MDWSL = V_DifficultyWaves[AvGD].MacroDifficultyWaveSettings.Length;
|
||||
if (MDWSL > 0)
|
||||
{
|
||||
AdGD = EndlessDifficulty.GetCurrentDifficultyIndex();
|
||||
AvAdGD = Clamp(AdGD, 0, MDWSL - 1);
|
||||
WaveInfo = V_DifficultyWaves[AvGD].MacroDifficultyWaveSettings[AvAdGD];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function OnDifficultyUpdated()
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
GetWaveSettings(WaveSettings);
|
||||
}
|
||||
|
||||
public function OnBossDied()
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
BossMinionsSpawnSquads.length = 0;
|
||||
AvailableSquads.length = 0;
|
||||
V_AvailableSquads.length = 0;
|
||||
}
|
||||
|
||||
public function float GetNextSpawnTimeMod()
|
||||
{
|
||||
local float SpawnTimeMod, SpawnTimeModMin;
|
||||
local int TempModIdx;
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
SpawnTimeMod = super.GetNextSpawnTimeMod();
|
||||
|
||||
if (MyKFGRI.IsSpecialWave(TempModIdx))
|
||||
{
|
||||
SpawnTimeModMin = EndlessDifficulty.GetSpecialWaveSpawnTimeModMin(SpecialWaveType);
|
||||
SpawnTimeMod = Max(SpawnTimeMod, SpawnTimeModMin);
|
||||
}
|
||||
|
||||
return SpawnTimeMod;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
Config = class'Config_SpawnManager_Endless'
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
class AISpawnManager_Long extends AISpawnManager;
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
Config = class'Config_SpawnManager_Long'
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
class AISpawnManager_Normal extends AISpawnManager;
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
Config = class'Config_SpawnManager_Normal'
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
class AISpawnManager_Short extends AISpawnManager;
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
Config = class'Config_SpawnManager_Short'
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
class AISpawnSquad extends Object
|
||||
hidecategories(Object);
|
||||
|
||||
struct S_AISquadElement
|
||||
{
|
||||
var() EAIType Type;
|
||||
var() byte Num <ClampMin=1 | ClampMax=6>;
|
||||
|
||||
var class<KFPawn_Monster> CustomClass;
|
||||
|
||||
structdefaultproperties
|
||||
{
|
||||
Num = 1
|
||||
}
|
||||
};
|
||||
|
||||
var() ESquadType MinVolumeType;
|
||||
var() array<S_AISquadElement> MonsterList;
|
||||
|
||||
public function AISpawnSquad InitFrom(KFAISpawnSquad SpawnSquad)
|
||||
{
|
||||
local AISquadElement SE;
|
||||
local S_AISquadElement SSE;
|
||||
|
||||
MinVolumeType = SpawnSquad.MinVolumeType;
|
||||
|
||||
foreach SpawnSquad.MonsterList(SE)
|
||||
{
|
||||
SSE.Type = SE.Type;
|
||||
SSE.Num = SE.Num;
|
||||
SSE.CustomClass = SE.CustomClass;
|
||||
MonsterList.AddItem(SSE);
|
||||
}
|
||||
|
||||
return Self;
|
||||
}
|
||||
|
||||
public static function AISpawnSquad CreateFrom(KFAISpawnSquad SpawnSquad)
|
||||
{
|
||||
local AISquadElement SE;
|
||||
local S_AISquadElement SSE;
|
||||
local AISpawnSquad NewSpawnSquad;
|
||||
|
||||
NewSpawnSquad = new class'AISpawnSquad';
|
||||
NewSpawnSquad.MinVolumeType = SpawnSquad.MinVolumeType;
|
||||
|
||||
foreach SpawnSquad.MonsterList(SE)
|
||||
{
|
||||
SSE.Type = SE.Type;
|
||||
SSE.Num = SE.Num;
|
||||
SSE.CustomClass = SE.CustomClass;
|
||||
NewSpawnSquad.MonsterList.AddItem(SSE);
|
||||
}
|
||||
|
||||
return NewSpawnSquad;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
MinVolumeType = EST_Medium
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
class AIWaveInfo extends Object
|
||||
dependson(AISpawnSquad)
|
||||
hidecategories(Object);
|
||||
|
||||
var() bool bRecycleWave;
|
||||
var() Array<AISpawnSquad> Squads;
|
||||
var() Array<AISpawnSquad> SpecialSquads;
|
||||
var() int MaxAI<ClampMin=1|ClampMax=200|DisplayName=TotalAIBase>;
|
||||
var() Array<AISpawnSquad> EventSquads;
|
||||
|
||||
public function GetNewSquadList(out Array<AISpawnSquad> out_SquadList)
|
||||
{
|
||||
local AISpawnSquad SS;
|
||||
|
||||
out_SquadList.Length = 0;
|
||||
foreach Squads(SS)
|
||||
if (SS != None)
|
||||
out_SquadList.AddItem(SS);
|
||||
}
|
||||
|
||||
public function GetSpecialSquad(out Array<AISpawnSquad> out_SquadList)
|
||||
{
|
||||
if (SpecialSquads.Length > 0)
|
||||
out_SquadList.AddItem(SpecialSquads[Rand(SpecialSquads.Length)]);
|
||||
}
|
||||
|
||||
public function GetEventSquadList(out Array<AISpawnSquad> out_SquadList)
|
||||
{
|
||||
local AISpawnSquad SS;
|
||||
|
||||
out_SquadList.Length = 0;
|
||||
foreach EventSquads(SS)
|
||||
if (SS != None)
|
||||
out_SquadList.AddItem(SS);
|
||||
}
|
||||
|
||||
public function InitFrom(KFAIWaveInfo WaveInfo)
|
||||
{
|
||||
local KFAISpawnSquad KFSS;
|
||||
|
||||
bRecycleWave = WaveInfo.bRecycleWave;
|
||||
MaxAI = WaveInfo.MaxAI;
|
||||
|
||||
Squads.Length = 0;
|
||||
foreach WaveInfo.Squads(KFSS)
|
||||
Squads.AddItem(class'AISpawnSquad'.static.CreateFrom(KFSS));
|
||||
|
||||
SpecialSquads.Length = 0;
|
||||
foreach WaveInfo.SpecialSquads(KFSS)
|
||||
SpecialSquads.AddItem(class'AISpawnSquad'.static.CreateFrom(KFSS));
|
||||
|
||||
EventSquads.Length = 0;
|
||||
foreach WaveInfo.EventSquads(KFSS)
|
||||
EventSquads.AddItem(class'AISpawnSquad'.static.CreateFrom(KFSS));
|
||||
}
|
||||
|
||||
public static function AIWaveInfo CreateFrom(KFAIWaveInfo WaveInfo)
|
||||
{
|
||||
local AIWaveInfo AIWI;
|
||||
|
||||
AIWI = new class'AIWaveInfo';
|
||||
AIWI.InitFrom(WaveInfo);
|
||||
|
||||
return AIWI;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
bRecycleWave = true
|
||||
MaxAI = 32
|
||||
}
|
@ -1,115 +0,0 @@
|
||||
class Config_SpawnListBossWaves extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
struct S_SpawnEntryCfg
|
||||
{
|
||||
var String BossClass;
|
||||
var String ZedClass;
|
||||
var int Delay;
|
||||
var int Probability;
|
||||
var int SpawnCountBase;
|
||||
var int SingleSpawnLimit;
|
||||
var bool bSpawnAtPlayerStart;
|
||||
};
|
||||
|
||||
var config bool bStopRegularSpawn;
|
||||
var config Array<S_SpawnEntryCfg> Spawn;
|
||||
|
||||
public static function InitConfig()
|
||||
{
|
||||
local S_SpawnEntryCfg SpawnEntry;
|
||||
|
||||
default.bStopRegularSpawn = true;
|
||||
|
||||
default.Spawn.Length = 0;
|
||||
|
||||
SpawnEntry.BossClass = "KFGameContent.KFPawn_ZedFleshpoundKing";
|
||||
SpawnEntry.ZedClass = "SomePackage.SomeClass";
|
||||
SpawnEntry.SpawnCountBase = 2;
|
||||
SpawnEntry.SingleSpawnLimit = 1;
|
||||
SpawnEntry.Delay = 60;
|
||||
SpawnEntry.Probability = 100;
|
||||
SpawnEntry.bSpawnAtPlayerStart = false;
|
||||
default.Spawn.AddItem(SpawnEntry);
|
||||
|
||||
// TODO:
|
||||
//SpawnEntry.BossClass = "KFGameContent.KFPawn_ZedFleshpoundKing";
|
||||
//default.Spawn.AddItem(SpawnEntry);
|
||||
|
||||
StaticSaveConfig();
|
||||
}
|
||||
|
||||
public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<S_SpawnEntry> SpawnList;
|
||||
local S_SpawnEntryCfg SpawnEntryCfg;
|
||||
local S_SpawnEntry SpawnEntry;
|
||||
local int Line;
|
||||
local bool Errors;
|
||||
|
||||
`ZS_Info("Load boss waves spawn list:");
|
||||
foreach default.Spawn(SpawnEntryCfg, Line)
|
||||
{
|
||||
Errors = false;
|
||||
|
||||
SpawnEntry.BossClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.BossClass, class'Class'));
|
||||
if (SpawnEntry.BossClass == None)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Can't load boss class:" @ SpawnEntryCfg.BossClass);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
|
||||
if (SpawnEntry.ZedClass == None)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.RelativeStartDefault = 0.f;
|
||||
|
||||
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
|
||||
if (SpawnEntryCfg.Delay <= 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
|
||||
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
|
||||
if (SpawnEntry.SpawnCountBase <= 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
|
||||
if (SpawnEntry.SingleSpawnLimit < 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnAtPlayerStart = SpawnEntryCfg.bSpawnAtPlayerStart;
|
||||
|
||||
if (!Errors)
|
||||
{
|
||||
SpawnList.AddItem(SpawnEntry);
|
||||
`ZS_Info("[" $ Line + 1 $ "]" @ "Loaded successfully:" @ SpawnEntryCfg.BossClass @ SpawnEntryCfg.ZedClass);
|
||||
}
|
||||
}
|
||||
|
||||
return SpawnList;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -1,125 +0,0 @@
|
||||
class Config_SpawnListRegular extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
struct S_SpawnEntryCfg
|
||||
{
|
||||
var int Wave;
|
||||
var String ZedClass;
|
||||
var int RelativeStart;
|
||||
var int Delay;
|
||||
var int Probability;
|
||||
var int SpawnCountBase;
|
||||
var int SingleSpawnLimit;
|
||||
var bool bSpawnAtPlayerStart;
|
||||
};
|
||||
|
||||
var config Array<S_SpawnEntryCfg> Spawn;
|
||||
|
||||
public static function InitConfig()
|
||||
{
|
||||
local S_SpawnEntryCfg SpawnEntry;
|
||||
|
||||
default.Spawn.Length = 0;
|
||||
|
||||
SpawnEntry.Wave = 1;
|
||||
SpawnEntry.ZedClass = "SomePackage.SomeZedClass1";
|
||||
SpawnEntry.SpawnCountBase = 2;
|
||||
SpawnEntry.SingleSpawnLimit = 1;
|
||||
SpawnEntry.RelativeStart = 0;
|
||||
SpawnEntry.Delay = 60;
|
||||
SpawnEntry.Probability = 100;
|
||||
SpawnEntry.bSpawnAtPlayerStart = false;
|
||||
default.Spawn.AddItem(SpawnEntry);
|
||||
|
||||
SpawnEntry.Wave = 2;
|
||||
SpawnEntry.ZedClass = "SomePackage.SomeZedClass2";
|
||||
SpawnEntry.SpawnCountBase = 2;
|
||||
SpawnEntry.SingleSpawnLimit = 1;
|
||||
SpawnEntry.RelativeStart = 25;
|
||||
SpawnEntry.Delay = 30;
|
||||
SpawnEntry.Probability = 50;
|
||||
SpawnEntry.bSpawnAtPlayerStart = false;
|
||||
default.Spawn.AddItem(SpawnEntry);
|
||||
|
||||
StaticSaveConfig();
|
||||
}
|
||||
|
||||
public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<S_SpawnEntry> SpawnList;
|
||||
local S_SpawnEntryCfg SpawnEntryCfg;
|
||||
local S_SpawnEntry SpawnEntry;
|
||||
local int Line;
|
||||
local bool Errors;
|
||||
|
||||
`ZS_Info("Load spawn list:");
|
||||
foreach default.Spawn(SpawnEntryCfg, Line)
|
||||
{
|
||||
Errors = false;
|
||||
|
||||
SpawnEntry.Wave = SpawnEntryCfg.Wave;
|
||||
if (SpawnEntryCfg.Wave <= 0 || SpawnEntryCfg.Wave > 255)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Wave" @ "(" $ SpawnEntryCfg.ZedClass $ ")" @ "must be greater than 0 and less than 256");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
|
||||
if (SpawnEntry.ZedClass == None)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.RelativeStartDefault = SpawnEntryCfg.RelativeStart / 100.f;
|
||||
if (SpawnEntryCfg.RelativeStart < 0 || SpawnEntryCfg.RelativeStart > 100)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "RelativeStart" @ "(" $ SpawnEntryCfg.RelativeStart $ ")" @ "must be greater than or equal 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
|
||||
if (SpawnEntryCfg.Delay <= 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
|
||||
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
|
||||
if (SpawnEntry.SpawnCountBase <= 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
|
||||
if (SpawnEntry.SingleSpawnLimit < 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnAtPlayerStart = SpawnEntryCfg.bSpawnAtPlayerStart;
|
||||
|
||||
if (!Errors)
|
||||
{
|
||||
SpawnList.AddItem(SpawnEntry);
|
||||
`ZS_Info("[" $ Line + 1 $ "]" @ "Loaded successfully:" @ SpawnEntryCfg.Wave @ SpawnEntryCfg.ZedClass);
|
||||
}
|
||||
}
|
||||
|
||||
return SpawnList;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
class Config_SpawnManager extends Object
|
||||
config(ZedSpawner);
|
||||
|
||||
var const class<KFAISpawnManager> DefSpawnManager;
|
||||
|
||||
public static function InitConfig()
|
||||
{
|
||||
local DifficultyWaveInfo DWI;
|
||||
local KFAIWaveInfo KFAIWI;
|
||||
local AIWaveInfo AIWI;
|
||||
local int Diff, Wave;
|
||||
|
||||
`ZS_Log("InitConfig:" @ default.DefSpawnManager);
|
||||
foreach default.DefSpawnManager.default.DifficultyWaveSettings(DWI, Diff)
|
||||
{
|
||||
`ZS_Log(" Diff:" @ Diff);
|
||||
foreach DWI.Waves(KFAIWI, Wave)
|
||||
{
|
||||
`ZS_Log(" Wave:" @ Wave);
|
||||
AIWI = class'AIWaveInfo'.static.CreateFrom(KFAIWI);
|
||||
}
|
||||
}
|
||||
|
||||
//StaticSaveConfig();
|
||||
}
|
||||
|
||||
public static function bool Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local bool Errors;
|
||||
Errors = false;
|
||||
return !Errors;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DefSpawnManager = class'KFAISpawnManager'
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
class Config_SpawnManager_Endless extends Config_SpawnManager
|
||||
config(ZedSpawner);
|
||||
|
||||
public static function bool Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local bool Errors;
|
||||
Errors = false;
|
||||
return !Errors;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DefSpawnManager = class'KFAISpawnManager_Endless'
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
class Config_SpawnManager_Long extends Config_SpawnManager
|
||||
config(ZedSpawner);
|
||||
|
||||
public static function bool Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local bool Errors;
|
||||
Errors = false;
|
||||
return !Errors;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DefSpawnManager = class'KFAISpawnManager_Long'
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
class Config_SpawnManager_Normal extends Config_SpawnManager
|
||||
config(ZedSpawner);
|
||||
|
||||
public static function bool Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local bool Errors;
|
||||
Errors = false;
|
||||
return !Errors;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DefSpawnManager = class'KFAISpawnManager_Normal'
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
class Config_SpawnManager_Short extends Config_SpawnManager
|
||||
config(ZedSpawner);
|
||||
|
||||
public static function bool Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local bool Errors;
|
||||
Errors = false;
|
||||
return !Errors;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DefSpawnManager = class'KFAISpawnManager_Short'
|
||||
}
|
@ -1,184 +0,0 @@
|
||||
class Config_SpawnManager_WaveInfo extends Object
|
||||
abstract
|
||||
config(ZedSpawnManager);
|
||||
|
||||
var const class<KFAISpawnManager> DefSpawnManager;
|
||||
var const byte Difficulty;
|
||||
var const byte Wave;
|
||||
|
||||
struct Unit
|
||||
{
|
||||
var int Num;
|
||||
var String ZedClass;
|
||||
};
|
||||
|
||||
struct Squad
|
||||
{
|
||||
var ESquadType MinVolumeType;
|
||||
var Array<Unit> Units;
|
||||
};
|
||||
|
||||
var config bool bRecycleWave;
|
||||
var config int MaxAI;
|
||||
var config Array<Squad> Squads;
|
||||
var config Array<Squad> SquadsSpecial;
|
||||
var config Array<Squad> SquadsEvent;
|
||||
|
||||
public static function InitConfig(KFGI_Access KFGIA)
|
||||
{
|
||||
local KFAIWaveInfo KFAIWI;
|
||||
local KFAISpawnSquad KFAISS;
|
||||
local AISquadElement AISE;
|
||||
local Squad S;
|
||||
local Unit U;
|
||||
|
||||
KFAIWI = default.DefSpawnManager.default.DifficultyWaveSettings[default.Difficulty].Waves[default.Wave];
|
||||
|
||||
default.bRecycleWave = KFAIWI.bRecycleWave;
|
||||
default.MaxAI = KFAIWI.MaxAI;
|
||||
|
||||
default.Squads.Length = 0;
|
||||
foreach KFAIWI.Squads(KFAISS)
|
||||
{
|
||||
S.MinVolumeType = KFAISS.MinVolumeType;
|
||||
foreach KFAISS.MonsterList(AISE)
|
||||
{
|
||||
U.ZedClass = GetPawnClassString(KFGIA, AISE);
|
||||
U.Num = AISE.Num;
|
||||
S.Units.AddItem(U);
|
||||
}
|
||||
default.Squads.AddItem(S);
|
||||
}
|
||||
|
||||
default.SquadsSpecial.Length = 0;
|
||||
foreach KFAIWI.SpecialSquads(KFAISS)
|
||||
{
|
||||
S.MinVolumeType = KFAISS.MinVolumeType;
|
||||
foreach KFAISS.MonsterList(AISE)
|
||||
{
|
||||
U.ZedClass = GetPawnClassString(KFGIA, AISE);
|
||||
U.Num = AISE.Num;
|
||||
S.Units.AddItem(U);
|
||||
}
|
||||
default.SquadsSpecial.AddItem(S);
|
||||
}
|
||||
|
||||
default.SquadsEvent.Length = 0;
|
||||
foreach KFAIWI.EventSquads(KFAISS)
|
||||
{
|
||||
S.MinVolumeType = KFAISS.MinVolumeType;
|
||||
foreach KFAISS.MonsterList(AISE)
|
||||
{
|
||||
U.ZedClass = GetPawnClassString(KFGIA, AISE);
|
||||
U.Num = AISE.Num;
|
||||
S.Units.AddItem(U);
|
||||
}
|
||||
default.SquadsEvent.AddItem(S);
|
||||
}
|
||||
|
||||
StaticSaveConfig();
|
||||
}
|
||||
|
||||
private static function String GetPawnClassString(KFGI_Access KFGIA, AISquadElement AISE)
|
||||
{
|
||||
local class<KFPawn_Monster> KFPMC;
|
||||
|
||||
KFPMC = KFGIA.AITypePawn(AISE.Type);
|
||||
if (KFPMC == None)
|
||||
KFPMC = AISE.CustomClass;
|
||||
|
||||
return "KFGameContent." $ String(KFPMC);
|
||||
}
|
||||
|
||||
public static function AIWaveInfo Load(E_LogLevel LogLevel, KFGI_Access KFGIA)
|
||||
{
|
||||
local class<KFPawn_Monster> KFPMC;
|
||||
local AIWaveInfo AIWI;
|
||||
local AISpawnSquad AISS;
|
||||
local S_AISquadElement AISE;
|
||||
local Squad S;
|
||||
local Unit U;
|
||||
|
||||
AIWI = new class'AIWaveInfo';
|
||||
|
||||
AIWI.bRecycleWave = default.bRecycleWave;
|
||||
AIWI.MaxAI = default.MaxAI;
|
||||
|
||||
foreach default.Squads(S)
|
||||
{
|
||||
AISS = new class'AISpawnSquad';
|
||||
AISS.MinVolumeType = S.MinVolumeType;
|
||||
foreach S.Units(U)
|
||||
{
|
||||
KFPMC = class<KFPawn_Monster>(DynamicLoadObject(U.ZedClass, class'Class'));
|
||||
if (KFPMC == None)
|
||||
{
|
||||
`ZS_Warn("Can't load zed class:" @ U.ZedClass);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!KFGIA.IsOriginalAI(KFPMC, AISE.Type))
|
||||
AISE.CustomClass = KFPMC;
|
||||
|
||||
AISE.Num = AISE.Num;
|
||||
|
||||
AISS.MonsterList.AddItem(AISE);
|
||||
}
|
||||
AIWI.Squads.AddItem(AISS);
|
||||
}
|
||||
|
||||
foreach default.SquadsSpecial(S)
|
||||
{
|
||||
AISS = new class'AISpawnSquad';
|
||||
AISS.MinVolumeType = S.MinVolumeType;
|
||||
foreach S.Units(U)
|
||||
{
|
||||
KFPMC = class<KFPawn_Monster>(DynamicLoadObject(U.ZedClass, class'Class'));
|
||||
if (KFPMC == None)
|
||||
{
|
||||
`ZS_Warn("Can't load zed class:" @ U.ZedClass);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!KFGIA.IsOriginalAI(KFPMC, AISE.Type))
|
||||
AISE.CustomClass = KFPMC;
|
||||
|
||||
AISE.Num = AISE.Num;
|
||||
|
||||
AISS.MonsterList.AddItem(AISE);
|
||||
}
|
||||
AIWI.SpecialSquads.AddItem(AISS);
|
||||
}
|
||||
|
||||
foreach default.SquadsEvent(S)
|
||||
{
|
||||
AISS = new class'AISpawnSquad';
|
||||
AISS.MinVolumeType = S.MinVolumeType;
|
||||
foreach S.Units(U)
|
||||
{
|
||||
KFPMC = class<KFPawn_Monster>(DynamicLoadObject(U.ZedClass, class'Class'));
|
||||
if (KFPMC == None)
|
||||
{
|
||||
`ZS_Warn("Can't load zed class:" @ U.ZedClass);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!KFGIA.IsOriginalAI(KFPMC, AISE.Type))
|
||||
AISE.CustomClass = KFPMC;
|
||||
|
||||
AISE.Num = AISE.Num;
|
||||
|
||||
AISS.MonsterList.AddItem(AISE);
|
||||
}
|
||||
AIWI.EventSquads.AddItem(AISS);
|
||||
}
|
||||
|
||||
return AIWI;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
DefSpawnManager = class'KFAISpawnManager'
|
||||
Difficulty = 255
|
||||
Wave = 255
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
class Config_Spawner extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
var config bool bCyclicalSpawn;
|
||||
var config bool bShadowSpawn;
|
||||
|
||||
var config float ZedTotalMultiplier;
|
||||
var config float SpawnTotalPlayerMultiplier;
|
||||
var config float SpawnTotalCycleMultiplier;
|
||||
|
||||
var config float SingleSpawnLimitMultiplier;
|
||||
var config float SingleSpawnLimitPlayerMultiplier;
|
||||
var config float SingleSpawnLimitCycleMultiplier;
|
||||
|
||||
var config int AliveSpawnLimit;
|
||||
|
||||
public static function InitConfig()
|
||||
{
|
||||
default.bCyclicalSpawn = true;
|
||||
default.bShadowSpawn = true;
|
||||
default.ZedTotalMultiplier = 1.0;
|
||||
default.SpawnTotalPlayerMultiplier = 0.75;
|
||||
default.SpawnTotalCycleMultiplier = 0.75;
|
||||
default.SingleSpawnLimitPlayerMultiplier = 0.75;
|
||||
default.SingleSpawnLimitCycleMultiplier = 0.75;
|
||||
default.AliveSpawnLimit = 0;
|
||||
|
||||
StaticSaveConfig();
|
||||
}
|
||||
|
||||
public static function bool Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local bool Errors;
|
||||
|
||||
if (default.ZedTotalMultiplier <= 0.f)
|
||||
{
|
||||
`ZS_Error("ZedTotalMultiplier" @ "(" $ default.ZedTotalMultiplier $ ")" @ "must be greater than 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SpawnTotalPlayerMultiplier < 0.f)
|
||||
{
|
||||
`ZS_Error("SpawnTotalPlayerMultiplier" @ "(" $ default.SpawnTotalPlayerMultiplier $ ")" @ "must be greater than or equal 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SpawnTotalCycleMultiplier < 0.f)
|
||||
{
|
||||
`ZS_Error("SpawnTotalCycleMultiplier" @ "(" $ default.SpawnTotalCycleMultiplier $ ")" @ "must be greater than or equal 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SingleSpawnLimitPlayerMultiplier < 0.f)
|
||||
{
|
||||
`ZS_Error("SingleSpawnLimitPlayerMultiplier" @ "(" $ default.SingleSpawnLimitPlayerMultiplier $ ")" @ "must be greater than or equal 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SingleSpawnLimitCycleMultiplier < 0.f)
|
||||
{
|
||||
`ZS_Error("SingleSpawnLimitCycleMultiplier" @ "(" $ default.SingleSpawnLimitCycleMultiplier $ ")" @ "must be greater than or equal 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.AliveSpawnLimit < 0)
|
||||
{
|
||||
`ZS_Error("AliveSpawnLimit" @ "(" $ default.AliveSpawnLimit $ ")" @ "must be greater than or equal 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
return !Errors;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -1,7 +1,46 @@
|
||||
class KFGI_Access extends Object
|
||||
within KFGameInfo;
|
||||
|
||||
public function bool IsCustomZed(class<KFPawn_Monster> KFPM)
|
||||
public function Array<class<KFPawn_Monster> > GetAIClassList(E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<class<KFPawn_Monster> > RV;
|
||||
local class<KFPawn_Monster> KFPMC;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
foreach AIClassList(KFPMC)
|
||||
RV.AddItem(KFPMC);
|
||||
|
||||
return RV;
|
||||
}
|
||||
|
||||
public function Array<class<KFPawn_Monster> > GetNonSpawnAIClassList(E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<class<KFPawn_Monster> > RV;
|
||||
local class<KFPawn_Monster> KFPMC;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
foreach NonSpawnAIClassList(KFPMC)
|
||||
RV.AddItem(KFPMC);
|
||||
|
||||
return RV;
|
||||
}
|
||||
|
||||
public function Array<class<KFPawn_Monster> > GetAIBossClassList(E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<class<KFPawn_Monster> > RV;
|
||||
local class<KFPawn_Monster> KFPMC;
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
foreach AIBossClassList(KFPMC)
|
||||
RV.AddItem(KFPMC);
|
||||
|
||||
return RV;
|
||||
}
|
||||
|
||||
public function bool IsCustomZed(class<KFPawn_Monster> KFPM, E_LogLevel LogLevel)
|
||||
{
|
||||
if (AIClassList.Find(KFPM) != INDEX_NONE) return false;
|
||||
if (NonSpawnAIClassList.Find(KFPM) != INDEX_NONE) return false;
|
||||
@ -9,45 +48,52 @@ public function bool IsCustomZed(class<KFPawn_Monster> KFPM)
|
||||
return true;
|
||||
}
|
||||
|
||||
// WARN: <optional out> - can it work? need check
|
||||
public function bool IsOriginalAI(class<KFPawn_Monster> KFPM, optional out EAIType AIType)
|
||||
public function bool IsOriginalAI(class<KFPawn_Monster> KFPM, optional out EAIType AIType, optional E_LogLevel LogLevel = LL_None)
|
||||
{
|
||||
local int Type;
|
||||
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
Type = AIClassList.Find(KFPM);
|
||||
if (Type != INDEX_NONE)
|
||||
{
|
||||
AIType = EAIType(Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function bool IsOriginalAIBoss(class<KFPawn_Monster> KFPM, optional out EBossAIType AIType)
|
||||
public function bool IsOriginalAIBoss(class<KFPawn_Monster> KFPM, optional out EBossAIType AIType, optional E_LogLevel LogLevel = LL_None)
|
||||
{
|
||||
local int Type;
|
||||
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
Type = AIBossClassList.Find(KFPM);
|
||||
if (Type != INDEX_NONE)
|
||||
{
|
||||
AIType = EBossAIType(Type);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function class<KFPawn_Monster> AITypePawn(EAIType AIType)
|
||||
public function class<KFPawn_Monster> AITypePawn(EAIType AIType, E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (AIType < AIClassList.Length)
|
||||
return AIClassList[AIType];
|
||||
else
|
||||
return None;
|
||||
}
|
||||
|
||||
public function class<KFPawn_Monster> BossAITypePawn(EBossAIType AIType)
|
||||
public function class<KFPawn_Monster> BossAITypePawn(EBossAIType AIType, E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_Trace();
|
||||
|
||||
if (AIType < AIBossClassList.Length)
|
||||
return AIBossClassList[AIType];
|
||||
else
|
||||
@ -56,5 +102,5 @@ public function class<KFPawn_Monster> BossAITypePawn(EBossAIType AIType)
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
107
ZedSpawner/Classes/Spawn.uc
Normal file
107
ZedSpawner/Classes/Spawn.uc
Normal file
@ -0,0 +1,107 @@
|
||||
class Spawn extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
var public config bool bCyclicalSpawn;
|
||||
var public config bool bShadowSpawn;
|
||||
var public config float ZedTotalMultiplier;
|
||||
var public config float SpawnTotalPlayerMultiplier;
|
||||
var public config float SpawnTotalCycleMultiplier;
|
||||
var public config float SingleSpawnLimitMultiplier;
|
||||
var public config float SingleSpawnLimitPlayerMultiplier;
|
||||
var public config float SingleSpawnLimitCycleMultiplier;
|
||||
var public config int AliveSpawnLimit;
|
||||
var public config bool bSmoothSpawn;
|
||||
|
||||
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_TraceStatic();
|
||||
|
||||
switch (Version)
|
||||
{
|
||||
case `NO_CONFIG:
|
||||
ApplyDefault(LogLevel);
|
||||
|
||||
case 3:
|
||||
default.bSmoothSpawn = false;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (LatestVersion != Version)
|
||||
{
|
||||
StaticSaveConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private static function ApplyDefault(E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_TraceStatic();
|
||||
|
||||
default.bCyclicalSpawn = true;
|
||||
default.bShadowSpawn = true;
|
||||
default.bSmoothSpawn = true;
|
||||
default.ZedTotalMultiplier = 1.0;
|
||||
default.SpawnTotalPlayerMultiplier = 0.75;
|
||||
default.SpawnTotalCycleMultiplier = 0.75;
|
||||
default.SingleSpawnLimitMultiplier = 1.0;
|
||||
default.SingleSpawnLimitPlayerMultiplier = 0.75;
|
||||
default.SingleSpawnLimitCycleMultiplier = 0.75;
|
||||
default.AliveSpawnLimit = 0;
|
||||
}
|
||||
|
||||
public static function bool Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local bool Errors;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
if (default.ZedTotalMultiplier <= 0.f)
|
||||
{
|
||||
`Log_Error("ZedTotalMultiplier" @ "(" $ default.ZedTotalMultiplier $ ")" @ "must be greater than 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SpawnTotalPlayerMultiplier < 0.f)
|
||||
{
|
||||
`Log_Error("SpawnTotalPlayerMultiplier" @ "(" $ default.SpawnTotalPlayerMultiplier $ ")" @ "must be greater than or equal 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SpawnTotalCycleMultiplier < 0.f)
|
||||
{
|
||||
`Log_Error("SpawnTotalCycleMultiplier" @ "(" $ default.SpawnTotalCycleMultiplier $ ")" @ "must be greater than or equal 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SingleSpawnLimitMultiplier <= 0.f)
|
||||
{
|
||||
`Log_Error("SingleSpawnLimitMultiplier" @ "(" $ default.SingleSpawnLimitMultiplier $ ")" @ "must be greater than 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SingleSpawnLimitPlayerMultiplier < 0.f)
|
||||
{
|
||||
`Log_Error("SingleSpawnLimitPlayerMultiplier" @ "(" $ default.SingleSpawnLimitPlayerMultiplier $ ")" @ "must be greater than or equal 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.SingleSpawnLimitCycleMultiplier < 0.f)
|
||||
{
|
||||
`Log_Error("SingleSpawnLimitCycleMultiplier" @ "(" $ default.SingleSpawnLimitCycleMultiplier $ ")" @ "must be greater than or equal 0.0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (default.AliveSpawnLimit < 0)
|
||||
{
|
||||
`Log_Error("AliveSpawnLimit" @ "(" $ default.AliveSpawnLimit $ ")" @ "must be greater than or equal 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
return !Errors;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
80
ZedSpawner/Classes/SpawnAtPlayerStart.uc
Normal file
80
ZedSpawner/Classes/SpawnAtPlayerStart.uc
Normal file
@ -0,0 +1,80 @@
|
||||
class SpawnAtPlayerStart extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
var private config Array<String> ZedClass;
|
||||
var public config Array<String> Map;
|
||||
|
||||
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_TraceStatic();
|
||||
|
||||
switch (Version)
|
||||
{
|
||||
case `NO_CONFIG:
|
||||
case 2:
|
||||
ApplyDefault(LogLevel);
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (LatestVersion != Version)
|
||||
{
|
||||
StaticSaveConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private static function ApplyDefault(E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_TraceStatic();
|
||||
|
||||
default.ZedClass.Length = 0;
|
||||
default.ZedClass.AddItem("HL2Monsters.Combine_Strider");
|
||||
default.ZedClass.AddItem("HL2Monsters.Combine_Gunship");
|
||||
default.ZedClass.AddItem("HL2Monsters.Hunter_Chopper");
|
||||
default.ZedClass.AddItem("SomePackage.SomeZedClassYouWantToSpawnAtPlayerStart");
|
||||
|
||||
default.Map.Length = 0;
|
||||
default.Map.AddItem("KF-SomeMapNameWhereYouWantSpawnZedsAtPlayerStart");
|
||||
}
|
||||
|
||||
public static function Array<class<KFPawn_Monster> > Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<class<KFPawn_Monster> > ZedList;
|
||||
local class<KFPawn_Monster> KFPMC;
|
||||
local String ZedClassTmp;
|
||||
local int Line;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
`Log_Info("Load zeds to spawn at player start:");
|
||||
foreach default.ZedClass(ZedClassTmp, Line)
|
||||
{
|
||||
KFPMC = class<KFPawn_Monster>(DynamicLoadObject(ZedClassTmp, class'Class'));
|
||||
if (KFPMC == None)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ ZedClassTmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
ZedList.AddItem(KFPMC);
|
||||
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully:" @ ZedClassTmp);
|
||||
}
|
||||
}
|
||||
|
||||
if (ZedList.Length == default.ZedClass.Length)
|
||||
{
|
||||
`Log_Info("Spawn at player start list (Zeds) loaded successfully (" $ default.ZedClass.Length @ "entries)");
|
||||
}
|
||||
else
|
||||
{
|
||||
`Log_Info("Spawn at player start list (Zeds): loaded" @ ZedList.Length @ "of" @ default.ZedClass.Length @ "entries");
|
||||
}
|
||||
|
||||
return ZedList;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
142
ZedSpawner/Classes/SpawnListBossWaves.uc
Normal file
142
ZedSpawner/Classes/SpawnListBossWaves.uc
Normal file
@ -0,0 +1,142 @@
|
||||
class SpawnListBossWaves extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
struct S_SpawnEntryCfg
|
||||
{
|
||||
var String BossClass;
|
||||
var String ZedClass;
|
||||
var int Delay;
|
||||
var int Probability;
|
||||
var int SpawnCountBase;
|
||||
var int SingleSpawnLimit;
|
||||
};
|
||||
|
||||
var public config bool bStopRegularSpawn;
|
||||
var private config Array<S_SpawnEntryCfg> Spawn;
|
||||
|
||||
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA, E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_TraceStatic();
|
||||
|
||||
switch (Version)
|
||||
{
|
||||
case `NO_CONFIG:
|
||||
ApplyDefault(KFGIA, LogLevel);
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (LatestVersion != Version)
|
||||
{
|
||||
StaticSaveConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private static function ApplyDefault(KFGI_Access KFGIA, E_LogLevel LogLevel)
|
||||
{
|
||||
local S_SpawnEntryCfg SpawnEntry;
|
||||
local Array<class<KFPawn_Monster> > KFPM_Bosses;
|
||||
local class<KFPawn_Monster> KFPMC;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
default.Spawn.Length = 0;
|
||||
|
||||
default.bStopRegularSpawn = true;
|
||||
default.Spawn.Length = 0;
|
||||
SpawnEntry.ZedClass = "SomePackage.SomeClass";
|
||||
SpawnEntry.SpawnCountBase = 2;
|
||||
SpawnEntry.SingleSpawnLimit = 1;
|
||||
SpawnEntry.Delay = 30;
|
||||
SpawnEntry.Probability = 100;
|
||||
KFPM_Bosses = KFGIA.GetAIBossClassList(LogLevel);
|
||||
foreach KFPM_Bosses(KFPMC)
|
||||
{
|
||||
SpawnEntry.BossClass = "KFGameContent." $ String(KFPMC);
|
||||
default.Spawn.AddItem(SpawnEntry);
|
||||
}
|
||||
}
|
||||
|
||||
public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<S_SpawnEntry> SpawnList;
|
||||
local S_SpawnEntryCfg SpawnEntryCfg;
|
||||
local S_SpawnEntry SpawnEntry;
|
||||
local int Line;
|
||||
local bool Errors;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
`Log_Info("Load boss waves spawn list:");
|
||||
foreach default.Spawn(SpawnEntryCfg, Line)
|
||||
{
|
||||
Errors = false;
|
||||
|
||||
SpawnEntry.BossClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.BossClass, class'Class'));
|
||||
if (SpawnEntry.BossClass == None)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load boss class:" @ SpawnEntryCfg.BossClass);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
|
||||
if (SpawnEntry.ZedClass == None)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.RelativeStartDefault = 0.f;
|
||||
|
||||
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
|
||||
if (SpawnEntryCfg.Delay <= 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
|
||||
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
|
||||
if (SpawnEntry.SpawnCountBase <= 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
|
||||
if (SpawnEntry.SingleSpawnLimit < 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (!Errors)
|
||||
{
|
||||
SpawnList.AddItem(SpawnEntry);
|
||||
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (" $ SpawnEntryCfg.BossClass $ ")" @ SpawnEntryCfg.ZedClass);
|
||||
}
|
||||
}
|
||||
|
||||
if (SpawnList.Length == default.Spawn.Length)
|
||||
{
|
||||
`Log_Info("Boss spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
|
||||
}
|
||||
else
|
||||
{
|
||||
`Log_Info("Boss spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
|
||||
}
|
||||
|
||||
return SpawnList;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
155
ZedSpawner/Classes/SpawnListRegular.uc
Normal file
155
ZedSpawner/Classes/SpawnListRegular.uc
Normal file
@ -0,0 +1,155 @@
|
||||
class SpawnListRegular extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
struct S_SpawnEntryCfg
|
||||
{
|
||||
var int Wave;
|
||||
var String ZedClass;
|
||||
var int RelativeStart;
|
||||
var int Delay;
|
||||
var int Probability;
|
||||
var int SpawnCountBase;
|
||||
var int SingleSpawnLimit;
|
||||
};
|
||||
|
||||
var public config Array<S_SpawnEntryCfg> Spawn;
|
||||
|
||||
delegate int SpawnListSort(S_SpawnEntryCfg A, S_SpawnEntryCfg B)
|
||||
{
|
||||
return A.Wave > B.Wave ? -1 : 0;
|
||||
}
|
||||
|
||||
public static function InitConfig(int Version, int LatestVersion, KFGI_Access KFGIA, E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_TraceStatic();
|
||||
|
||||
switch (Version)
|
||||
{
|
||||
case `NO_CONFIG:
|
||||
ApplyDefault(KFGIA, LogLevel);
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (LatestVersion != Version)
|
||||
{
|
||||
StaticSaveConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private static function ApplyDefault(KFGI_Access KFGIA, E_LogLevel LogLevel)
|
||||
{
|
||||
local S_SpawnEntryCfg SpawnEntry;
|
||||
local Array<class<KFPawn_Monster> > KFPM_Zeds;
|
||||
local class<KFPawn_Monster> KFPMC;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
default.Spawn.Length = 0;
|
||||
|
||||
SpawnEntry.Wave = 0;
|
||||
SpawnEntry.SpawnCountBase = 2;
|
||||
SpawnEntry.SingleSpawnLimit = 1;
|
||||
SpawnEntry.RelativeStart = 25;
|
||||
SpawnEntry.Delay = 60;
|
||||
SpawnEntry.Probability = 100;
|
||||
|
||||
KFPM_Zeds = KFGIA.GetAIClassList(LogLevel);
|
||||
foreach KFPM_Zeds(KFPMC)
|
||||
{
|
||||
++SpawnEntry.Wave;
|
||||
SpawnEntry.ZedClass = "KFGameContent." $ String(KFPMC);
|
||||
default.Spawn.AddItem(SpawnEntry);
|
||||
}
|
||||
}
|
||||
|
||||
public static function Array<S_SpawnEntry> Load(E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<S_SpawnEntry> SpawnList;
|
||||
local S_SpawnEntryCfg SpawnEntryCfg;
|
||||
local S_SpawnEntry SpawnEntry;
|
||||
local int Line;
|
||||
local bool Errors;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
`Log_Info("Load spawn list:");
|
||||
foreach default.Spawn(SpawnEntryCfg, Line)
|
||||
{
|
||||
Errors = false;
|
||||
|
||||
SpawnEntry.Wave = SpawnEntryCfg.Wave;
|
||||
if (SpawnEntryCfg.Wave <= 0 || SpawnEntryCfg.Wave > 255)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Wave" @ "(" $ SpawnEntryCfg.ZedClass $ ")" @ "must be greater than 0 and less than 256");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
|
||||
if (SpawnEntry.ZedClass == None)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.RelativeStartDefault = SpawnEntryCfg.RelativeStart / 100.f;
|
||||
if (SpawnEntryCfg.RelativeStart < 0 || SpawnEntryCfg.RelativeStart > 100)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "RelativeStart" @ "(" $ SpawnEntryCfg.RelativeStart $ ")" @ "must be greater than or equal 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
|
||||
if (SpawnEntryCfg.Delay <= 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
|
||||
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
|
||||
if (SpawnEntry.SpawnCountBase <= 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
|
||||
if (SpawnEntry.SingleSpawnLimit < 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (!Errors)
|
||||
{
|
||||
SpawnList.AddItem(SpawnEntry);
|
||||
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (w" $ SpawnEntryCfg.Wave $ ")" @ SpawnEntryCfg.ZedClass);
|
||||
}
|
||||
}
|
||||
|
||||
default.Spawn.Sort(SpawnListSort);
|
||||
|
||||
if (SpawnList.Length == default.Spawn.Length)
|
||||
{
|
||||
`Log_Info("Regular spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
|
||||
}
|
||||
else
|
||||
{
|
||||
`Log_Info("Regular spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
|
||||
}
|
||||
|
||||
return SpawnList;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -1,124 +1,151 @@
|
||||
class Config_SpawnListSpecialWaves extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
struct S_SpawnEntryCfg
|
||||
{
|
||||
var EAIType Wave;
|
||||
var String ZedClass;
|
||||
var int RelativeStart;
|
||||
var int Delay;
|
||||
var int Probability;
|
||||
var int SpawnCountBase;
|
||||
var int SingleSpawnLimit;
|
||||
var bool bSpawnAtPlayerStart;
|
||||
};
|
||||
|
||||
var config bool bStopRegularSpawn;
|
||||
var config Array<S_SpawnEntryCfg> Spawn;
|
||||
|
||||
public static function InitConfig()
|
||||
{
|
||||
local S_SpawnEntryCfg SpawnEntry;
|
||||
|
||||
default.bStopRegularSpawn = true;
|
||||
|
||||
default.Spawn.Length = 0;
|
||||
|
||||
SpawnEntry.Wave = AT_Husk;
|
||||
SpawnEntry.ZedClass = "SomePackage.SomeClass";
|
||||
SpawnEntry.SpawnCountBase = 2;
|
||||
SpawnEntry.SingleSpawnLimit = 1;
|
||||
SpawnEntry.RelativeStart = 0;
|
||||
SpawnEntry.Delay = 60;
|
||||
SpawnEntry.Probability = 100;
|
||||
SpawnEntry.bSpawnAtPlayerStart = false;
|
||||
default.Spawn.AddItem(SpawnEntry);
|
||||
|
||||
StaticSaveConfig();
|
||||
}
|
||||
|
||||
public static function Array<S_SpawnEntry> Load(KFGameInfo_Endless KFGIE, E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<S_SpawnEntry> SpawnList;
|
||||
local S_SpawnEntryCfg SpawnEntryCfg;
|
||||
local S_SpawnEntry SpawnEntry;
|
||||
local int Line;
|
||||
local bool Errors;
|
||||
|
||||
if (KFGIE == None)
|
||||
{
|
||||
`ZS_Info("Not Endless mode, skip loading special waves");
|
||||
return SpawnList;
|
||||
}
|
||||
|
||||
`ZS_Info("Load special waves spawn list:");
|
||||
foreach default.Spawn(SpawnEntryCfg, Line)
|
||||
{
|
||||
Errors = false;
|
||||
|
||||
SpawnEntry.Wave = SpawnEntryCfg.Wave;
|
||||
if (KFGIE.SpecialWaveTypes.Find(EAIType(SpawnEntryCfg.Wave)) == INDEX_NONE)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Unknown special wave:" @ SpawnEntryCfg.Wave);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
|
||||
if (SpawnEntry.ZedClass == None)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.RelativeStartDefault = SpawnEntryCfg.RelativeStart / 100.f;
|
||||
if (SpawnEntryCfg.RelativeStart < 0 || SpawnEntryCfg.RelativeStart > 100)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "RelativeStart" @ "(" $ SpawnEntryCfg.RelativeStart $ ")" @ "must be greater than or equal 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
|
||||
if (SpawnEntryCfg.Delay <= 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
|
||||
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
|
||||
if (SpawnEntry.SpawnCountBase <= 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
|
||||
if (SpawnEntry.SingleSpawnLimit < 0)
|
||||
{
|
||||
`ZS_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnAtPlayerStart = SpawnEntryCfg.bSpawnAtPlayerStart;
|
||||
|
||||
if (!Errors)
|
||||
{
|
||||
SpawnList.AddItem(SpawnEntry);
|
||||
`ZS_Info("[" $ Line + 1 $ "]" @ "Loaded successfully:" @ SpawnEntryCfg.Wave @ SpawnEntryCfg.ZedClass);
|
||||
}
|
||||
}
|
||||
|
||||
return SpawnList;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
||||
class SpawnListSpecialWaves extends Object
|
||||
dependson(ZedSpawner)
|
||||
config(ZedSpawner);
|
||||
|
||||
struct S_SpawnEntryCfg
|
||||
{
|
||||
var EAIType Wave;
|
||||
var String ZedClass;
|
||||
var int RelativeStart;
|
||||
var int Delay;
|
||||
var int Probability;
|
||||
var int SpawnCountBase;
|
||||
var int SingleSpawnLimit;
|
||||
};
|
||||
|
||||
var public config bool bStopRegularSpawn;
|
||||
var private config Array<S_SpawnEntryCfg> Spawn;
|
||||
|
||||
public static function InitConfig(int Version, int LatestVersion, E_LogLevel LogLevel)
|
||||
{
|
||||
`Log_TraceStatic();
|
||||
|
||||
switch (Version)
|
||||
{
|
||||
case `NO_CONFIG:
|
||||
ApplyDefault(LogLevel);
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (LatestVersion != Version)
|
||||
{
|
||||
StaticSaveConfig();
|
||||
}
|
||||
}
|
||||
|
||||
private static function ApplyDefault(E_LogLevel LogLevel)
|
||||
{
|
||||
local S_SpawnEntryCfg SpawnEntry;
|
||||
local EAIType AIType;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
default.bStopRegularSpawn = true;
|
||||
default.Spawn.Length = 0;
|
||||
SpawnEntry.ZedClass = "SomePackage.SomeClass";
|
||||
SpawnEntry.SpawnCountBase = 2;
|
||||
SpawnEntry.SingleSpawnLimit = 1;
|
||||
SpawnEntry.RelativeStart = 0;
|
||||
SpawnEntry.Delay = 60;
|
||||
SpawnEntry.Probability = 100;
|
||||
foreach class'KFGameInfo_Endless'.default.SpecialWaveTypes(AIType)
|
||||
{
|
||||
SpawnEntry.Wave = AIType;
|
||||
default.Spawn.AddItem(SpawnEntry);
|
||||
}
|
||||
}
|
||||
|
||||
public static function Array<S_SpawnEntry> Load(KFGameInfo_Endless KFGIE, E_LogLevel LogLevel)
|
||||
{
|
||||
local Array<S_SpawnEntry> SpawnList;
|
||||
local S_SpawnEntryCfg SpawnEntryCfg;
|
||||
local S_SpawnEntry SpawnEntry;
|
||||
local int Line;
|
||||
local bool Errors;
|
||||
|
||||
`Log_TraceStatic();
|
||||
|
||||
if (KFGIE == None)
|
||||
{
|
||||
`Log_Info("Not Endless mode, skip loading special waves");
|
||||
return SpawnList;
|
||||
}
|
||||
|
||||
`Log_Info("Load special waves spawn list:");
|
||||
foreach default.Spawn(SpawnEntryCfg, Line)
|
||||
{
|
||||
Errors = false;
|
||||
|
||||
SpawnEntry.Wave = SpawnEntryCfg.Wave;
|
||||
if (KFGIE.SpecialWaveTypes.Find(EAIType(SpawnEntryCfg.Wave)) == INDEX_NONE)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Unknown special wave:" @ SpawnEntryCfg.Wave);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.ZedClass = class<KFPawn_Monster>(DynamicLoadObject(SpawnEntryCfg.ZedClass, class'Class'));
|
||||
if (SpawnEntry.ZedClass == None)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Can't load zed class:" @ SpawnEntryCfg.ZedClass);
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.RelativeStartDefault = SpawnEntryCfg.RelativeStart / 100.f;
|
||||
if (SpawnEntryCfg.RelativeStart < 0 || SpawnEntryCfg.RelativeStart > 100)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "RelativeStart" @ "(" $ SpawnEntryCfg.RelativeStart $ ")" @ "must be greater than or equal 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.DelayDefault = SpawnEntryCfg.Delay;
|
||||
if (SpawnEntryCfg.Delay <= 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Delay" @ "(" $ SpawnEntryCfg.Delay $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.Probability = SpawnEntryCfg.Probability / 100.f;
|
||||
if (SpawnEntryCfg.Probability <= 0 || SpawnEntryCfg.Probability > 100)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "Probability" @ "(" $ SpawnEntryCfg.Probability $ ")" @ "must be greater than 0 and less than or equal 100");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SpawnCountBase = SpawnEntryCfg.SpawnCountBase;
|
||||
if (SpawnEntry.SpawnCountBase <= 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "SpawnCountBase" @ "(" $ SpawnEntryCfg.SpawnCountBase $ ")" @ "must be greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
SpawnEntry.SingleSpawnLimitDefault = SpawnEntryCfg.SingleSpawnLimit;
|
||||
if (SpawnEntry.SingleSpawnLimit < 0)
|
||||
{
|
||||
`Log_Warn("[" $ Line + 1 $ "]" @ "SingleSpawnLimit" @ "(" $ SpawnEntryCfg.SingleSpawnLimit $ ")" @ "must be equal or greater than 0");
|
||||
Errors = true;
|
||||
}
|
||||
|
||||
if (!Errors)
|
||||
{
|
||||
SpawnList.AddItem(SpawnEntry);
|
||||
`Log_Debug("[" $ Line + 1 $ "]" @ "Loaded successfully: (" $ SpawnEntryCfg.Wave $ ")" @ SpawnEntryCfg.ZedClass);
|
||||
}
|
||||
}
|
||||
|
||||
if (SpawnList.Length == default.Spawn.Length)
|
||||
{
|
||||
`Log_Info("Special spawn list loaded successfully (" $ default.Spawn.Length @ "entries)");
|
||||
}
|
||||
else
|
||||
{
|
||||
`Log_Info("Special spawn list: loaded" @ SpawnList.Length @ "of" @ default.Spawn.Length @ "entries");
|
||||
}
|
||||
|
||||
return SpawnList;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
[Flags]
|
||||
AllowDownload=True
|
||||
ClientOptional=False
|
||||
ServerSideOnly=False
|
||||
[Flags]
|
||||
AllowDownload=True
|
||||
ClientOptional=False
|
||||
ServerSideOnly=False
|
||||
|
@ -1,58 +1,61 @@
|
||||
class ZedSpawnerMut extends KFMutator
|
||||
dependson(ZedSpawner);
|
||||
|
||||
var private ZedSpawner ZS;
|
||||
|
||||
event PreBeginPlay()
|
||||
{
|
||||
Super.PreBeginPlay();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Client) return;
|
||||
|
||||
foreach WorldInfo.DynamicActors(class'ZedSpawner', ZS)
|
||||
{
|
||||
`ZS_Log("Found 'ZedSpawner'");
|
||||
break;
|
||||
}
|
||||
|
||||
if (ZS == None)
|
||||
{
|
||||
`ZS_Log("Spawn 'ZedSpawner'");
|
||||
ZS = WorldInfo.Spawn(class'ZedSpawner');
|
||||
}
|
||||
|
||||
if (ZS == None)
|
||||
{
|
||||
`ZS_Log("Can't Spawn 'ZedSpawner', Destroy...");
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function AddMutator(Mutator Mut)
|
||||
{
|
||||
if (Mut == Self) return;
|
||||
|
||||
if (Mut.Class == Class)
|
||||
Mut.Destroy();
|
||||
else
|
||||
Super.AddMutator(Mut);
|
||||
}
|
||||
|
||||
function NotifyLogin(Controller C)
|
||||
{
|
||||
Super.NotifyLogin(C);
|
||||
|
||||
ZS.NotifyLogin(C);
|
||||
}
|
||||
|
||||
function NotifyLogout(Controller C)
|
||||
{
|
||||
Super.NotifyLogout(C);
|
||||
|
||||
ZS.NotifyLogout(C);
|
||||
}
|
||||
|
||||
DefaultProperties
|
||||
{
|
||||
|
||||
class ZedSpawnerMut extends KFMutator
|
||||
dependson(ZedSpawner);
|
||||
|
||||
var private ZedSpawner ZS;
|
||||
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public event PreBeginPlay()
|
||||
{
|
||||
Super.PreBeginPlay();
|
||||
|
||||
if (WorldInfo.NetMode == NM_Client) return;
|
||||
|
||||
foreach WorldInfo.DynamicActors(class'ZedSpawner', ZS)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (ZS == None)
|
||||
{
|
||||
ZS = WorldInfo.Spawn(class'ZedSpawner');
|
||||
}
|
||||
|
||||
if (ZS == None)
|
||||
{
|
||||
`Log_Base("FATAL: Can't Spawn 'ZedSpawner'");
|
||||
SafeDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
public function AddMutator(Mutator Mut)
|
||||
{
|
||||
if (Mut == Self) return;
|
||||
|
||||
if (Mut.Class == Class)
|
||||
ZedSpawnerMut(Mut).SafeDestroy();
|
||||
else
|
||||
Super.AddMutator(Mut);
|
||||
}
|
||||
|
||||
public function NotifyLogin(Controller C)
|
||||
{
|
||||
ZS.NotifyLogin(C);
|
||||
|
||||
Super.NotifyLogin(C);
|
||||
}
|
||||
|
||||
public function NotifyLogout(Controller C)
|
||||
{
|
||||
ZS.NotifyLogout(C);
|
||||
|
||||
Super.NotifyLogout(C);
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
class ZedSpawnerRepLink extends ReplicationInfo;
|
||||
class ZedSpawnerRepInfo extends ReplicationInfo;
|
||||
|
||||
var public E_LogLevel LogLevel;
|
||||
var public Array<class<KFPawn_Monster> > CustomZeds;
|
||||
var public ZedSpawner ZS;
|
||||
var public E_LogLevel LogLevel;
|
||||
var public Array<class<KFPawn_Monster> > CustomZeds;
|
||||
var private int Recieved;
|
||||
|
||||
replication
|
||||
@ -10,13 +11,16 @@ replication
|
||||
LogLevel;
|
||||
}
|
||||
|
||||
public simulated function bool SafeDestroy() { if (!bPendingDelete) return Destroy(); else return true; }
|
||||
public simulated function bool SafeDestroy()
|
||||
{
|
||||
return (bPendingDelete || bDeleteMe || Destroy());
|
||||
}
|
||||
|
||||
public reliable client function ClientSync(class<KFPawn_Monster> CustomZed)
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
`ZS_Debug("Received:" @ CustomZed);
|
||||
`Log_Trace();
|
||||
|
||||
`Log_Debug("Received:" @ CustomZed);
|
||||
CustomZeds.AddItem(CustomZed);
|
||||
ServerSync();
|
||||
}
|
||||
@ -24,31 +28,36 @@ public reliable client function ClientSync(class<KFPawn_Monster> CustomZed)
|
||||
public reliable client function SyncFinished()
|
||||
{
|
||||
local class<KFPawn_Monster> CustomZed;
|
||||
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
foreach CustomZeds(CustomZed)
|
||||
{
|
||||
`ZS_Debug("Preload Content for" @ CustomZed);
|
||||
`Log_Debug("Preload Content for" @ CustomZed);
|
||||
CustomZed.static.PreloadContent();
|
||||
}
|
||||
|
||||
|
||||
SafeDestroy();
|
||||
}
|
||||
|
||||
public reliable server function ServerSync()
|
||||
{
|
||||
`ZS_Trace(`Location);
|
||||
|
||||
`Log_Trace();
|
||||
|
||||
if (bPendingDelete || bDeleteMe) return;
|
||||
|
||||
if (CustomZeds.Length == Recieved || WorldInfo.NetMode == NM_StandAlone)
|
||||
{
|
||||
`ZS_Debug("Sync finished");
|
||||
`Log_Debug("Sync finished");
|
||||
SyncFinished();
|
||||
SafeDestroy();
|
||||
if (!ZS.DestroyRepInfo(Controller(Owner)))
|
||||
{
|
||||
SafeDestroy();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
`ZS_Debug("Sync:" @ CustomZeds[Recieved]);
|
||||
`Log_Debug("Sync:" @ CustomZeds[Recieved]);
|
||||
ClientSync(CustomZeds[Recieved++]);
|
||||
}
|
||||
}
|
||||
@ -58,6 +67,6 @@ defaultproperties
|
||||
bAlwaysRelevant = false;
|
||||
bOnlyRelevantToOwner = true;
|
||||
bSkipActorPropertyReplication = false;
|
||||
|
||||
|
||||
Recieved = 0
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
class _CommonTypes extends Object;
|
||||
class _Logger extends Object
|
||||
abstract;
|
||||
|
||||
enum E_LogLevel
|
||||
{
|
||||
LL_WrongLevel,
|
||||
LL_None,
|
||||
LL_Fatal,
|
||||
LL_Error,
|
||||
LL_Warning,
|
||||
@ -14,5 +16,5 @@ enum E_LogLevel
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
|
||||
|
||||
}
|
2
ZedSpawner/Constants.uci
Normal file
2
ZedSpawner/Constants.uci
Normal file
@ -0,0 +1,2 @@
|
||||
// Constants
|
||||
`define NO_CONFIG 0
|
@ -1,10 +1,3 @@
|
||||
`define ZS_Tag 'ZedSpawner'
|
||||
|
||||
`define ZS_Log(msg, cond) `log(`msg `if(`cond), `cond`{endif}, `ZS_Tag)
|
||||
|
||||
`define ZS_Fatal(msg) `log("FATAL:" @ `msg, (LogLevel >= LL_Fatal), `ZS_Tag)
|
||||
`define ZS_Error(msg) `log("ERROR:" @ `msg, (LogLevel >= LL_Error), `ZS_Tag)
|
||||
`define ZS_Warn(msg) `log("WARN:" @ `msg, (LogLevel >= LL_Warning), `ZS_Tag)
|
||||
`define ZS_Info(msg) `log("INFO:" @ `msg, (LogLevel >= LL_Info), `ZS_Tag)
|
||||
`define ZS_Debug(msg) `log("DEBUG:" @ `msg, (LogLevel >= LL_Debug), `ZS_Tag)
|
||||
`define ZS_Trace(msg) `log("TRACE:" @ `msg, (LogLevel >= LL_Trace), `ZS_Tag)
|
||||
// Imports
|
||||
`include(Logger.uci)
|
||||
`include(Constants.uci)
|
||||
|
15
ZedSpawner/Logger.uci
Normal file
15
ZedSpawner/Logger.uci
Normal file
@ -0,0 +1,15 @@
|
||||
// Logger
|
||||
`define Log_Tag 'ZedSpawner'
|
||||
|
||||
`define LocationStatic "`{ClassName}::" $ GetFuncName()
|
||||
|
||||
`define Log_Base(msg, cond) `log(`msg `if(`cond), `cond`{endif}, `Log_Tag)
|
||||
|
||||
`define Log_Fatal(msg) `log("FATAL:" @ `msg, (LogLevel >= LL_Fatal), `Log_Tag)
|
||||
`define Log_Error(msg) `log("ERROR:" @ `msg, (LogLevel >= LL_Error), `Log_Tag)
|
||||
`define Log_Warn(msg) `log("WARN:" @ `msg, (LogLevel >= LL_Warning), `Log_Tag)
|
||||
`define Log_Info(msg) `log("INFO:" @ `msg, (LogLevel >= LL_Info), `Log_Tag)
|
||||
`define Log_Debug(msg) `log("DEBUG:" @ `msg, (LogLevel >= LL_Debug), `Log_Tag)
|
||||
|
||||
`define Log_Trace(msg) `log("TRACE:" @ `Location `if(`msg) @ `msg`{endif}, (LogLevel >= LL_Trace), `Log_Tag)
|
||||
`define Log_TraceStatic(msg) `log("TRACE:" @ `LocationStatic `if(`msg) @ `msg`{endif}, (LogLevel >= LL_Trace), `Log_Tag)
|
13
builder.cfg
13
builder.cfg
@ -7,15 +7,24 @@ StripSource="True"
|
||||
|
||||
# Mutators to be compiled
|
||||
# Specify them with a space as a separator,
|
||||
# Mutators will be compiled in the specified order
|
||||
# Mutators will be compiled in the specified order
|
||||
PackageBuildOrder="ZedSpawner"
|
||||
|
||||
|
||||
### Brew parameters ###
|
||||
|
||||
# Packages you want to brew using @peelz's patched KFEditor.
|
||||
# Useful for cases where regular brew doesn't put *.upk inside the package.
|
||||
# Specify them with a space as a separator,
|
||||
# The order doesn't matter
|
||||
PackagePeelzBrew=""
|
||||
|
||||
|
||||
### Steam Workshop upload parameters ###
|
||||
|
||||
# Mutators that will be uploaded to the workshop
|
||||
# Specify them with a space as a separator,
|
||||
# The order doesn't matter
|
||||
# The order doesn't matter
|
||||
PackageUpload="ZedSpawner"
|
||||
|
||||
|
||||
|
2
tools
2
tools
Submodule tools updated: 49fcaf67a2...fb458ac61f
Reference in New Issue
Block a user