diff --git a/scripts/bundle.bat b/scripts/bundle.bat index 41585c65..6dee26e6 100644 --- a/scripts/bundle.bat +++ b/scripts/bundle.bat @@ -1,4 +1,4 @@ -:: bundles the files from /modRandomEncountersReworked for the DLC +:: Bundles the files from /modRandomEncountersReworked for the DLC. @echo off diff --git a/scripts/create-gh-release/get-changelog.bat b/scripts/create-gh-release/get-changelog.bat index 08dc2501..6c629eb2 100644 --- a/scripts/create-gh-release/get-changelog.bat +++ b/scripts/create-gh-release/get-changelog.bat @@ -1,8 +1,8 @@ -:: get the list of all commits since the last release +:: Get the list of all commits since the last release. @echo off -:: get the last release name +:: Get the last release name. for /f %%i in ('git describe --tags --abbrev^=0') do set lastrelease=%%i -:: get the commits +:: Get the commits. git log %lastrelease%..HEAD --oneline diff --git a/scripts/create-gh-release/index.js b/scripts/create-gh-release/index.js index 41edb649..fb17bef1 100644 --- a/scripts/create-gh-release/index.js +++ b/scripts/create-gh-release/index.js @@ -58,7 +58,7 @@ async function main() { const zip_file_path = `tw3-random-encounters-reworked.zip`; const zip = new AdmZip(); - // transfer the three folders mods/bin/dlc from the release folder to the zip + // Transfer the three folders mods/bin/dlc from the release folder to the zip // archive. const folders_to_transfer = ['mods', 'bin', 'dlc']; for (const folder of folders_to_transfer) { @@ -87,13 +87,13 @@ async function main() { if (is_prerelease) { body += ` -## CHANGELOG (since last release) +## CHANGELOG (Since last release.) ${changelog} `; } else { body += ` -## CHANGELOG (since last full release) +## CHANGELOG (Since last full release.) ${changelog} `; } @@ -107,7 +107,7 @@ ${changelog} prerelease: is_prerelease, }); - // start by pushing the zip asset for the release + // Start by pushing the zip asset for the release. octokit.repos.uploadReleaseAsset({ owner: 'Aelto', repo: 'tw3-random-encounters-reworked', @@ -117,7 +117,7 @@ ${changelog} data: fs.readFileSync(zip_file_path) }); - // then push the install script for this release + // Then push the install script for this release. const install_script_name = 'install-mod.ps1'; const install_script_path = `${__dirname}/../${install_script_name}`; octokit.repos.uploadReleaseAsset({ diff --git a/scripts/create-gh-release/package-lock.json b/scripts/create-gh-release/package-lock.json index ff5c6bfc..bd653691 100644 --- a/scripts/create-gh-release/package-lock.json +++ b/scripts/create-gh-release/package-lock.json @@ -537,4 +537,4 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } -} +} \ No newline at end of file diff --git a/scripts/create-gh-release/package.json b/scripts/create-gh-release/package.json index 56a08771..511f08f6 100644 --- a/scripts/create-gh-release/package.json +++ b/scripts/create-gh-release/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: No test specified\" && exit 1" }, "keywords": [], "author": "", diff --git a/scripts/encode-csv-strings.bat b/scripts/encode-csv-strings.bat index 839a01d5..2c29e3b2 100644 --- a/scripts/encode-csv-strings.bat +++ b/scripts/encode-csv-strings.bat @@ -1,5 +1,5 @@ -:: encode the strings from the csv file in /strings and creates all the -:: w3strings files +:: Encode the strings from the csv file in /strings and creates all the +:: w3strings files. call variables.cmd diff --git a/scripts/install-mod.oldgen.ps1 b/scripts/install-mod.oldgen.ps1 index f8d04564..e9724b36 100644 --- a/scripts/install-mod.oldgen.ps1 +++ b/scripts/install-mod.oldgen.ps1 @@ -3,17 +3,17 @@ cls echo "" -echo "Installer for the mod Random Encounters Reworked" -echo "This will install Random Encounters and its dependencies based on the mods you have" +echo "Installer for the mod Random Encounters Reworked." +echo "This will install Random Encounters and its dependencies based on the mods you have." echo "" pause cls -# before doing anything we check if the script file is placed in the right +# Before doing anything we check if the script file is placed in the right # directory. It expects to be placed right in the witcher 3 root. if (!(test-path dlc)) { - write-host -ForegroundColor red "Please make sure the script is placed inside your The Witcher 3 install directly" + write-host -ForegroundColor red "Please make sure the script is placed inside your The Witcher 3 install directly!" echo "Place it in your The Witcher 3 root directory and run the script again." echo "" @@ -21,7 +21,7 @@ if (!(test-path dlc)) { exit } -# first we create the mods folder if it doesn't exist, because in clean installs +# First we create the mods folder if it doesn't exist, because in clean installs # this folder may be missing. if (!(test-path mods)) { mkdir mods | out-null @@ -38,7 +38,7 @@ $assetBootstrap = $dependenciesReleaseResponse.assets | ? {$_.name.StartsWith("b $assetEePatches = $dependenciesReleaseResponse.assets | ? {$_.name.StartsWith("ee-patches")} |Select -First 1 $assetFhudPatches = $dependenciesReleaseResponse.assets | ? {$_.name.StartsWith("fhud-patches")} |Select -First 1 -# do not install community-patch-base if the user already has it or if has EE +# Do not install community-patch-base if the user already has it or EE. if (!(test-path mods/modW3EE) -and !(test-path mods/modW3EEMain)) { echo "" echo "downloading community-patch-base" @@ -48,7 +48,7 @@ if (!(test-path mods/modW3EE) -and !(test-path mods/modW3EEMain)) { remove-item $assetCommunityPatchBase.name -recurse -force } -# do not install bootstrap if the user already has it +# Do not install bootstrap if the user already has it. if (!(test-path mods/modBootstrap-registry)) { echo "" echo "downloading bootstrap" @@ -59,7 +59,7 @@ if (!(test-path mods/modBootstrap-registry)) { remove-item $assetBootstrap.name -recurse -force } -# do not install sharedimport if the user already has it or if he has EE +# Do not install sharedimport if the user already has it or EE. if (!(test-path mods/modSharedImports) -and !(test-path mods/modW3EE) -and !(test-path mods/modW3EEMain)) { echo "" echo "downloading shared import" @@ -77,8 +77,8 @@ echo "fetching latest v2 release" $allReleases = "https://api.github.com/repos/Aelto/tw3-random-encounters-reworked/releases" $allReleasesResponse = Invoke-RestMethod -Uri $allReleases -# get the first release that starts with `v2.`, all OldGen releases will be in -# the "2." rang while NextGen ones are "3." +# Get the first release that starts with `v2.`, all OldGen releases will be in +# the "2." rang while NextGen ones are "3.". $latestRelease = $allReleasesResponse | ? {($_.name.StartsWith("v2."))} | Select -First 1 $latestAsset = $latestRelease.assets[0] @@ -88,8 +88,8 @@ Invoke-WebRequest -Uri $latestAsset.browser_download_url -OutFile $latestAsset.n Expand-Archive -Force -LiteralPath $latestAsset.name -DestinationPath ./$extractingFolder remove-item $latestAsset.name -recurse -force -# if the user has EE, install the patches for the improved compatibility -# this is done after the RER download because it will overwrite files +# If the user has EE, install the patches for the improved compatibility +# this is done after the RER download because it will overwrite files. if (test-path mods/modW3EE) { echo "" echo "downloading W3EE compatibility patches" @@ -99,7 +99,7 @@ if (test-path mods/modW3EE) { remove-item $assetEePatches.name -recurse -force } -# if the user has FHUD, there is a patch for it to display custom 3D map markers +# If the user has FHUD, there is a patch for it to display custom 3D map markers. if (!(test-path mods/modW3EE) -and (test-path mods/modFriendlyHUD)) { echo "" echo "downloading FHUD compatibility patches" @@ -109,7 +109,7 @@ if (!(test-path mods/modW3EE) -and (test-path mods/modFriendlyHUD)) { remove-item $assetFhudPatches.name -recurse -force } -# print message notifying which mod will be installed +# Print message notifying which mod will be installed. $children = Get-ChildItem ./$extractingFolder cls echo "" @@ -131,7 +131,7 @@ if (test-path $extractingFolderPatches) { echo "" pause -# finally start installing the mods +# Finally start installing the mods. foreach ($child in $children) { $fullpath = "{0}/{1}/*" -f $extractingFolder, $child copy-item $fullpath . -force -recurse @@ -158,14 +158,14 @@ if (test-path $extractingFolderPatches) { } -# and run the update registry script +# Run the update registry script. echo "" echo "Updating bootstrap registry for Random Encounters Reworked" cd ./mods/modRandomEncountersReworked/ ./update-registry.bat cd ../../ -# final message +# Final message. cls if ((test-path ./mods/modImmersiveCam) -or (test-path ./mods/modW3EE)) { diff --git a/scripts/install-mod.ps1 b/scripts/install-mod.ps1 index 6f83cb23..a2cfc6d6 100644 --- a/scripts/install-mod.ps1 +++ b/scripts/install-mod.ps1 @@ -4,19 +4,19 @@ cls echo "" -echo "Installer for the mod Random Encounters Reworked" +echo "Installer for the mod Random Encounters Reworked." echo "" echo "This will work in major steps:" -echo " - First it will download the mods and its dependencies from GitHub" -echo " - It will remove dependencies you may not need based on your current mods" -echo " - It will list everything it plans to add to your game" -echo " - It will install the listed files" -echo " - It will open a link in your browser to guide you through the merging process and the first steps while in game" +echo " - First it will download the mods and its dependencies from GitHub." +echo " - It will remove dependencies you may not need based on your current mods." +echo " - It will list everything it plans to add to your game." +echo " - It will install the listed files." +echo " - It will open a link in your browser to guide you through the merging process and the first steps while in game." pause cls -# before doing anything we check if the script file is placed in the right +# Before doing anything we check if the script file is placed in the right # directory. It expects to be placed right in the witcher 3 root. if (!(test-path dlc)) { write-host -ForegroundColor red "Please make sure the script is placed inside your The Witcher 3 install directly" @@ -27,7 +27,7 @@ if (!(test-path dlc)) { exit } -# first we create the mods folder if it doesn't exist, because in clean installs +# First we create the mods folder if it doesn't exist, because in clean installs # this folder may be missing. if (!(test-path mods)) { mkdir mods | out-null @@ -51,8 +51,8 @@ Expand-Archive -Force -LiteralPath $latestAssetName -DestinationPath ./$extracti remove-item $latestAssetName -recurse -force # TODO: -# if the user has EE, install the patches for the improved compatibility -# this is done after the RER download because it will overwrite files +# If the user has EE, install the patches for the improved compatibility +# this is done after the RER download because it will overwrite files. # if (test-path mods/modW3EE) { # echo "" # echo "downloading W3EE compatibility patches" @@ -63,7 +63,7 @@ remove-item $latestAssetName -recurse -force # } # TODO: -# if the user has FHUD, there is a patch for it to display custom 3D map markers +# If the user has FHUD, there is a patch for it to display custom 3D map markers. # if (!(test-path mods/modW3EE) -and (test-path mods/modFriendlyHUD)) { # echo "" # echo "downloading FHUD compatibility patches" @@ -73,7 +73,7 @@ remove-item $latestAssetName -recurse -force # remove-item $assetFhudPatches.name -recurse -force # } -# print message notifying which mod will be installed +# Print message notifying which mod will be installed. cls echo "" echo "installing the following mods:" @@ -110,7 +110,7 @@ foreach ($child in $children) { echo "" pause -# finally start installing the mods +# Finally start installing the mods. $children = Get-ChildItem ./$extractingFolder foreach ($child in $children) { $fullpath = "{0}/{1}" -f $extractingFolder, $child diff --git a/scripts/install.bat b/scripts/install.bat index caa89535..6d32a163 100644 --- a/scripts/install.bat +++ b/scripts/install.bat @@ -1,5 +1,5 @@ -:: copies the files from the repository into the game -:: it's an easy way to install it +:: Copies the files from the repository into the game. +:: It's an easy way to install it. @echo off diff --git a/scripts/release.bat b/scripts/release.bat index 30ccaeb4..898db4ca 100644 --- a/scripts/release.bat +++ b/scripts/release.bat @@ -1,4 +1,4 @@ -:: update the /release directory with: +:: Update the /release directory with: :: - the mod menu in /release/bin :: - the mod DLC in /release/dlc :: - the mod content in /release/mod @@ -39,7 +39,7 @@ XCOPY "%modpath%\shared-utils\mod_sharedutils_glossary\" "%modpath%\release\mods REM Dependencies XCOPY "%modpath%\dependencies\" "%modpath%\release\" /e /s /y -@REM it's an optional patch, so it is not included +@REM it's an optional patch, so it is not included. @REM XCOPY "%modpath%\shared-utils\mod0000_sharedutilsmappinsfhudpatch\" "%modpath%\release\mods\mod0000_sharedutilsmappinsfhudpatch\" /e /s /y if "%1"=="-github" ( diff --git a/scripts/update-mod.ps1 b/scripts/update-mod.ps1 index 0aae00e5..f9cc93cf 100644 --- a/scripts/update-mod.ps1 +++ b/scripts/update-mod.ps1 @@ -1,16 +1,16 @@ -# showing a link to RER +# Showing a link to RER. echo "" -write-host -ForegroundColor yellow "If you enjoy the mod, the script and everything that goes with RER. Please consider endorsing my mod" +write-host -ForegroundColor yellow "If you enjoy the mod, the script and everything that goes with RER. Please consider endorsing my mod!" echo "" write-host -ForegroundColor yellow " https://www.nexusmods.com/witcher3/mods/5018" echo "" -# fetching the release assets from the github api +# Fetching the release assets from the github api. echo "Fetching latest release from github" $response = Invoke-RestMethod -Uri "https://api.github.com/repos/Aelto/W3_RandomEncounters_Tweaks/releases" -# showing info about the new release +# Showing info about the new release. $latestversion = $response[0].name write-host -nonewline "latest release: " write-host $latestversion -ForegroundColor green @@ -28,15 +28,15 @@ echo "You can still cancel by closing the window or..." pause echo "" -# downloading file +# Downloading file. echo "Downloading latest release from github" Invoke-WebRequest -Uri $response[0].assets[0].browser_download_url -OutFile $response[0].assets[0].name -#extracting the archive +# Extracting the archive. echo "Extracting zip archive" Expand-Archive -Force -LiteralPath $response[0].assets[0].name -DestinationPath ./RER_NEW_RELEASE -# installing release +# Installing release. $releaseFolder = "./RER_NEW_RELEASE" $releaseFolderChild = (Get-ChildItem -Path $releaseFolder -Force -Recurse | Select-Object -First 1).Name $fullpath = "{0}/{1}/*" -f $releaseFolder, $releaseFolderChild @@ -46,7 +46,7 @@ $installMessage = "Installing release {0}" -f $response[0].name echo $installMessage copy-item $fullpath "../../" -force -recurse -# cleanup +# Cleanup. remove-item $releaseFolder -recurse -force remove-item $response[0].assets[0].name -recurse -force @@ -56,4 +56,4 @@ echo "" write-host $installedMessage -ForegroundColor green -BackgroundColor black echo "" -pause \ No newline at end of file +pause diff --git a/scripts/variables.cmd b/scripts/variables.cmd index 42d3358d..4cc63993 100644 --- a/scripts/variables.cmd +++ b/scripts/variables.cmd @@ -1,9 +1,9 @@ @echo off -REM update this path to point to your witcher 3 directory +REM Update this path to point to your witcher 3 directory. set gamePath=D:\programs\Steam\steamapps\common\The Witcher 3 -REM do not update anything below this line +REM Do not update anything below this line. set modPath=%cd%\.. set modName=modRandomEncountersReworked set modKitPath=D:\programs\witcher_3_mod_tools\bin\x64 \ No newline at end of file diff --git a/src/addons/addon_base.wss b/src/addons/addon_base.wss index 779d82ef..d349a02d 100644 --- a/src/addons/addon_base.wss +++ b/src/addons/addon_base.wss @@ -9,9 +9,9 @@ abstract class RER_BaseAddon { /** - * Every loot that is added to the loot manager so that it can be used in all - * the rewards of the mod, this function is called on every addon registered - * and if any of the addons return false, then the item will not be added. + * Every loot item is added to the loot manager so that it can be used in all + * the rewards of the mod. This function is called on every addon registered. + * If any of the addons return false, then the item will not be added. * * The fourth parameter is the origin, a name you can used to identify the * items your addon added. diff --git a/src/addons/addons_manager.wss b/src/addons/addons_manager.wss index 00255d81..6142fec2 100644 --- a/src/addons/addons_manager.wss +++ b/src/addons/addons_manager.wss @@ -3,20 +3,20 @@ statemachine class RER_AddonManager { var master: CRandomEncounters; /** - * the queue of states to process, once a state is processed it + * The queue of states to process, once a state is processed it * is removed from the queue. It goes from last item in the queue * to the first. */ var states_to_process: array; /** - * the queue of states that were already processed. The first states + * The queue of states that were already processed. The first states * to be processed are first in the queue. */ var processed_states: array; /** - * custom data officially supported by RER, it contains data we know may + * Custom data officially supported by RER, it contains data we know may * potentially be injected into the mod and so we support it directly. */ var addons_data: RER_AddonsData; diff --git a/src/bestiary/bestiary.wss b/src/bestiary/bestiary.wss index 9b5ea6de..7d297a79 100644 --- a/src/bestiary/bestiary.wss +++ b/src/bestiary/bestiary.wss @@ -84,8 +84,8 @@ class RER_Bestiary { } #ifdef ENABLE_BESTIARY_FEATURE { - // when the option "Only known bestiary creatures" is ON - // we remove every unknown creatures from the spawning pool + // When the option "Only known bestiary creatures" is ON + // we remove every unknown creatures from the spawning pool. if (master.settings.only_known_bestiary_creatures && !RER_flagEnabled(flags, RER_BREF_IGNORE_BESTIARY)) { manager = theGame.GetJournalManager(); @@ -277,9 +277,9 @@ class RER_Bestiary { } - //#region 3rd party code - // everything in here is code to handle third party encounters/creatures in - // the bestiary + // #region 3rd party code + // Everything in here is code to handle third party encounters/creatures in + // the bestiary. private var third_party_creature_counter: int; default third_party_creature_counter = 0; diff --git a/src/bestiary/bestiary_entry.wss b/src/bestiary/bestiary_entry.wss index 14d0ea7a..f6c48b62 100644 --- a/src/bestiary/bestiary_entry.wss +++ b/src/bestiary/bestiary_entry.wss @@ -5,30 +5,30 @@ abstract class RER_BestiaryEntry { var template_list: EnemyTemplateList; - // stores a hash of the templates the bestiary entry has for a faster lookup. - // Used by the function `isCreatureHashedNameFromEntry()` + // Stores a hash of the templates the bestiary entry has for a faster lookup. + // Used by the function `isCreatureHashedNameFromEntry()`. var template_hashes: array; - // names for this entity trophies - // uses the enum TrophyVariant as index + // Names for this entity trophies. + // Uses the enum TrophyVariant as index. var trophy_names: array; - // the name used in the mod menus + // The name used in the mod menus. var menu_name: name; var localized_name: name; var ecosystem_impact: EcosystemCreatureImpact; - // controls how myuch 1 of this type killed affects the delays, the value is + // Controls how myuch 1 of this type killed affects the delays, the value is // expressed in %. var ecosystem_delay_multiplier: float; - // both use the enum EncounterType as index + // Both use the enum EncounterType as index. var chances_day: array; var chances_night: array; - // the custom multiplier the user set for this specific creature type. By default + // The custom multiplier the user set for this specific creature type. By default // it's set at 1. var creature_type_multiplier: float; default creature_type_multiplier = 1; @@ -73,9 +73,9 @@ abstract class RER_BestiaryEntry { this.chances_day[EncounterType_HUNT] = StringToInt(inGameConfigWrapper.GetVarValue('RERencountersHuntDay', this.menu_name)); this.chances_night[EncounterType_HUNT] = StringToInt(inGameConfigWrapper.GetVarValue('RERencountersHuntNight', this.menu_name)); - // special case for the contracts, they used to have a menu but don't anymore. + // Special case for the contracts, they used to have a menu but don't anymore. // The contracts are now well balanced even for small creatures so the user - // does not need to assign different ratios for each creatures + // does not need to assign different ratios for each creature. this.chances_day[EncounterType_CONTRACT] = 1; this.chances_night[EncounterType_CONTRACT] = 1; @@ -133,7 +133,7 @@ abstract class RER_BestiaryEntry { var i: int; var j: int; - // random scale applied to the creatures + // Random scale applied to the creatures. var scale: float; NLOG("BestiaryEntry, spawn() count = " + count + " " + this.type); @@ -154,8 +154,8 @@ abstract class RER_BestiaryEntry { density = 0.01; } - //set the flag automatically if the settings disable trophies for that - // encounter type + // Set the flag automatically if the settings disable trophies for that + // encounter type. flags = RER_setFlag( flags, RER_BESF_NO_TROPHY, @@ -207,10 +207,10 @@ abstract class RER_BestiaryEntry { tags_array ); - // the scale is calculated based on the level of the creature. In the - // formula we add +50 to both end so a level 4 creature when level + // The scale is calculated based on the level of the creature. In the + // formula we add +50 to both ends so a level 4 creature when level 1 // doesn't end up 400% bigger. It will also make the difference in height - // more noticeable at lower levels. + // less noticeable at lower levels. if (master.settings.dynamic_creatures_size) { scale = (getRandomLevelBasedOnSettings(master.settings) + 50.0) / (RER_getPlayerLevel() + 50.0); @@ -235,7 +235,7 @@ abstract class RER_BestiaryEntry { ); } - // add a bounty notice to the entity + // Add a bounty notice to the entity. if (RandRange(100) < 3) { (created_entity as CActor) .GetInventory() @@ -245,7 +245,7 @@ abstract class RER_BestiaryEntry { ); } - // add crowns to the entity, based on the settings + // Add crowns to the entity, based on the settings. (created_entity as CActor) .GetInventory() .AddMoney( @@ -275,7 +275,7 @@ abstract class RER_BestiaryEntry { npc.sharedutils_damage_modifiers.PushBack(damage_modifier); - // past 30% damage reduction monsters get debuffs immunity + // Past 30% damage reduction monsters get debuff immunity. if (damage_modifier.damage_received_modifier < 0.7) { (npc as CActor).AddBuffImmunity(EET_Knockdown, 'RandomEncountersReworked', false); (npc as CActor).AddBuffImmunity(EET_HeavyKnockdown, 'RandomEncountersReworked', false); @@ -284,7 +284,7 @@ abstract class RER_BestiaryEntry { } } - // notify the ecosystem manager some creatures were added. Every time we spawn + // Notify the ecosystem manager some creatures were added. Every time we spawn // something it should slightly increase their power. #ifdef ENABLE_ECOSYSTEM { if (!RER_flagEnabled(flags, RER_BESF_NO_ECOSYSTEM_EFFECT)) { @@ -292,7 +292,7 @@ abstract class RER_BestiaryEntry { .ecosystem_manager .updatePowerForCreatureInCurrentEcosystemAreas( this.type, - // currently leaving this as is. But it may be a good idea to divide this + // Currently leaving this as is. But it may be a good idea to divide this // power gain by the power the surrounding areas currently have to avoid // an infinitely growing community. created_entities.Size() * 0.20, @@ -338,8 +338,8 @@ abstract class RER_BestiaryEntry { return created_entities; } - // checks if the hashed creature name is from this bestiary entry. To get a hashed - // creature name, use CEntity::GetReadableName() and then use rer_hash_string() + // Checks if the hashed creature name is from this bestiary entry. To get a hashed + // creature name, use CEntity::GetReadableName() and then use rer_hash_string(). public function isCreatureHashedNameFromEntry(hashed_name: string): bool { var i: int; @@ -368,16 +368,16 @@ abstract class RER_BestiaryEntry { } #ifdef ENABLE_BESTIARY_FEATURE { - // when the option "Only known bestiary creatures" is ON - // we remove every unknown creatures from the spawning pool + // When the option "Only known bestiary creatures" is ON + // we remove every unknown creatures from the spawning pool. if (master.settings.only_known_bestiary_creatures) { manager = theGame.GetJournalManager(); } }; for (i = 0; i < this.possible_compositions.Size(); i += 1) { - // if a maximum strength is supplied, we make sure to include only creatures - // whose strength is within the boundary + // If a maximum strength is supplied, we make sure to include only creatures + // whose strength is within the boundary. if (maximum_strength > 0 && master.bestiary.entries[this.possible_compositions[i]].ecosystem_delay_multiplier >= maximum_strength) { continue; } @@ -433,8 +433,8 @@ abstract class RER_BestiaryEntry { } #ifdef ENABLE_BESTIARY_FEATURE { - // when the option "Only known bestiary creatures" is ON - // we remove every unknown creatures from the spawning pool + // When the option "Only known bestiary creatures" is ON + // we remove every unknown creatures from the spawning pool. if (master.settings.only_known_bestiary_creatures && !RER_flagEnabled(flags, RER_BREF_IGNORE_BESTIARY)) { manager = theGame.GetJournalManager(); @@ -493,7 +493,7 @@ abstract class RER_BestiaryEntry { var max: int; var i: int; - // composition groups are recursive, a spawned group causes a composition to + // Composition groups are recursive, a spawned group causes a composition to // appear. But that composition can have its own composition. // We add a failsafe to avoid a recursive crash/stack-overflow. if (creature == CreatureNONE || composition_count > 0) { @@ -502,15 +502,15 @@ abstract class RER_BestiaryEntry { bestiary_entry = master.bestiary.entries[creature]; - // 75% to not spawn any composition + // 75% to not spawn any composition. if (RandRange(100) < 75) { return entities; } - // at the moment `count` is the amount of creatures from the initial group + // At the moment `count` is the amount of creatures from the initial group. max = (this.ecosystem_delay_multiplier * count / bestiary_entry.ecosystem_delay_multiplier) as int; count = Clamp( - // once we're sure compositions can spawn, we get a random value between + // Once we're sure compositions can spawn, we get a random value between // the maximum number of allies and 80% of that number. The maximum number // of allies is calculated from the original group' strength and the // strength of the new allies. @@ -518,10 +518,10 @@ abstract class RER_BestiaryEntry { max, (max * 0.8) as int ), - // a maximum of 5 times more allies than in the original group + // A maximum of 5 times more allies than in the original group // this will not affect small creatures who often come in large groupes // but will limit the amount of allies for creatures with a high strength. - // Like 15 harpies from 1 wyvern + // Like 15 harpies from 1 wyvern. count * 5, 0 ); @@ -568,7 +568,7 @@ enum RER_BestiaryEntrySpawnFlag { RER_BESF_NO_PERSIST = 2, RER_BESF_NO_ECOSYSTEM_EFFECT = 4, - // if set, it will ignore the bestiary feature that removes unknown + // If set, it will ignore the bestiary feature that removes unknown // creatures from the spawn. It's used for the bounties where settings are // ignored. RER_BESF_NO_BESTIARY_FEATURE = 8 diff --git a/src/bestiary/entries/alghoul.wss b/src/bestiary/entries/alghoul.wss index 2815ad49..c658dba7 100644 --- a/src/bestiary/entries/alghoul.wss +++ b/src/bestiary/entries/alghoul.wss @@ -53,6 +53,8 @@ class RER_BestiaryAlghoul extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 3; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -80,7 +82,7 @@ class RER_BestiaryAlghoul extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/arachas.wss b/src/bestiary/entries/arachas.wss index 5115017e..a2d984a3 100644 --- a/src/bestiary/entries/arachas.wss +++ b/src/bestiary/entries/arachas.wss @@ -42,6 +42,8 @@ class RER_BestiaryArachas extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 10; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.self_influence) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -69,7 +71,7 @@ class RER_BestiaryArachas extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/barghest.wss b/src/bestiary/entries/barghest.wss index bbddd89d..92807568 100644 --- a/src/bestiary/entries/barghest.wss +++ b/src/bestiary/entries/barghest.wss @@ -33,6 +33,8 @@ class RER_BestiaryBarghest extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.low_bad_influence) //CreatureARACHAS .influence(influences.low_bad_influence) //CreatureENDREGA @@ -60,7 +62,7 @@ class RER_BestiaryBarghest extends RER_BestiaryEntry { .influence(influences.low_bad_influence) //CreatureBERSERKER .influence(influences.low_bad_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.low_indirect_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/basilisk.wss b/src/bestiary/entries/basilisk.wss index 582a9052..eacef54b 100644 --- a/src/bestiary/entries/basilisk.wss +++ b/src/bestiary/entries/basilisk.wss @@ -38,6 +38,8 @@ class RER_BestiaryBasilisk extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 14; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -65,7 +67,7 @@ class RER_BestiaryBasilisk extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.low_bad_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/bear.wss b/src/bestiary/entries/bear.wss index 56516afd..d9a0d4a5 100644 --- a/src/bestiary/entries/bear.wss +++ b/src/bestiary/entries/bear.wss @@ -43,6 +43,8 @@ class RER_BestiaryBear extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 3.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.high_indirect_influence) //CreatureHUMAN .influence(influences.low_indirect_influence) //CreatureARACHAS .influence(influences.low_indirect_influence) //CreatureENDREGA @@ -70,7 +72,7 @@ class RER_BestiaryBear extends RER_BestiaryEntry { .influence(influences.friend_with) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/berserker.wss b/src/bestiary/entries/berserker.wss index c6e6f22b..511e74f7 100644 --- a/src/bestiary/entries/berserker.wss +++ b/src/bestiary/entries/berserker.wss @@ -29,6 +29,8 @@ class RER_BestiaryBerserker extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 4; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.high_indirect_influence) //CreatureHUMAN .influence(influences.low_indirect_influence) //CreatureARACHAS .influence(influences.low_indirect_influence) //CreatureENDREGA @@ -56,7 +58,7 @@ class RER_BestiaryBerserker extends RER_BestiaryEntry { .influence(influences.self_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/boar.wss b/src/bestiary/entries/boar.wss index 675aa808..62c0d4f3 100644 --- a/src/bestiary/entries/boar.wss +++ b/src/bestiary/entries/boar.wss @@ -33,6 +33,8 @@ class RER_BestiaryBoar extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.high_indirect_influence) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -60,7 +62,7 @@ class RER_BestiaryBoar extends RER_BestiaryEntry { .influence(influences.low_indirect_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.high_indirect_influence) //CreatureDRACOLIZARD .influence(influences.high_indirect_influence) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/bruxa.wss b/src/bestiary/entries/bruxa.wss index 2e3575b9..c869a71a 100644 --- a/src/bestiary/entries/bruxa.wss +++ b/src/bestiary/entries/bruxa.wss @@ -39,6 +39,8 @@ class RER_BestiaryBruxa extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 11; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiaryBruxa extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/bruxacity.wss b/src/bestiary/entries/bruxacity.wss index 5c809297..47281066 100644 --- a/src/bestiary/entries/bruxacity.wss +++ b/src/bestiary/entries/bruxacity.wss @@ -38,6 +38,8 @@ class RER_BestiaryBruxacity extends RER_BestiaryEntry { this.trophy_names.PushBack('modrer_vampire_trophy_high'); this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -65,7 +67,7 @@ class RER_BestiaryBruxacity extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/centipede.wss b/src/bestiary/entries/centipede.wss index 73cae2e6..16c06ebc 100644 --- a/src/bestiary/entries/centipede.wss +++ b/src/bestiary/entries/centipede.wss @@ -39,6 +39,8 @@ class RER_BestiaryCentipede extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 4.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.low_indirect_influence) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiaryCentipede extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.high_indirect_influence) //CreatureDRACOLIZARD .influence(influences.high_indirect_influence) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/chort.wss b/src/bestiary/entries/chort.wss index bb94a7f6..b6a72eb0 100644 --- a/src/bestiary/entries/chort.wss +++ b/src/bestiary/entries/chort.wss @@ -29,6 +29,8 @@ class RER_BestiaryChort extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 10; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -56,7 +58,7 @@ class RER_BestiaryChort extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.low_bad_influence) //CreatureDRACOLIZARD .influence(influences.low_bad_influence) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/cockatrice.wss b/src/bestiary/entries/cockatrice.wss index 1039da29..ffa8bd0c 100644 --- a/src/bestiary/entries/cockatrice.wss +++ b/src/bestiary/entries/cockatrice.wss @@ -36,6 +36,8 @@ class RER_BestiaryCockatrice extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 13.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -63,7 +65,7 @@ class RER_BestiaryCockatrice extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.low_bad_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.low_bad_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/cyclop.wss b/src/bestiary/entries/cyclop.wss index f38df1c6..f142d213 100644 --- a/src/bestiary/entries/cyclop.wss +++ b/src/bestiary/entries/cyclop.wss @@ -36,6 +36,8 @@ class RER_BestiaryCyclop extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 7.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -63,7 +65,7 @@ class RER_BestiaryCyclop extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.kills_them) //CreatureDRACOLIZARD .influence(influences.kills_them) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/detlaff.wss b/src/bestiary/entries/detlaff.wss index 7bc10b14..7b2d9a42 100644 --- a/src/bestiary/entries/detlaff.wss +++ b/src/bestiary/entries/detlaff.wss @@ -33,6 +33,8 @@ class RER_BestiaryDetlaff extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 25; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -60,7 +62,7 @@ class RER_BestiaryDetlaff extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/dracolizard.wss b/src/bestiary/entries/dracolizard.wss index 848156ec..2f9a3a14 100644 --- a/src/bestiary/entries/dracolizard.wss +++ b/src/bestiary/entries/dracolizard.wss @@ -36,6 +36,8 @@ class RER_BestiaryDracolizard extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 18; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -63,7 +65,7 @@ class RER_BestiaryDracolizard extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.self_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/drowner.wss b/src/bestiary/entries/drowner.wss index 4db4ce53..3015eed1 100644 --- a/src/bestiary/entries/drowner.wss +++ b/src/bestiary/entries/drowner.wss @@ -51,6 +51,8 @@ class RER_BestiaryDrowner extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -78,7 +80,7 @@ class RER_BestiaryDrowner extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/echinops.wss b/src/bestiary/entries/echinops.wss index aace311f..30285181 100644 --- a/src/bestiary/entries/echinops.wss +++ b/src/bestiary/entries/echinops.wss @@ -51,6 +51,8 @@ class RER_BestiaryEchinops extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 8; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -78,7 +80,7 @@ class RER_BestiaryEchinops extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.high_indirect_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/ekimmara.wss b/src/bestiary/entries/ekimmara.wss index a29f07cf..5ee7e4ee 100644 --- a/src/bestiary/entries/ekimmara.wss +++ b/src/bestiary/entries/ekimmara.wss @@ -33,6 +33,8 @@ class RER_BestiaryEkimmara extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 10; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -60,7 +62,7 @@ class RER_BestiaryEkimmara extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/elemental.wss b/src/bestiary/entries/elemental.wss index 37c8c3db..8c9cacad 100644 --- a/src/bestiary/entries/elemental.wss +++ b/src/bestiary/entries/elemental.wss @@ -52,6 +52,8 @@ class RER_BestiaryElemental extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 12.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.friend_with) //CreatureHUMAN .influence(influences.high_indirect_influence) //CreatureARACHAS .influence(influences.high_indirect_influence) //CreatureENDREGA @@ -79,7 +81,7 @@ class RER_BestiaryElemental extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/endrega.wss b/src/bestiary/entries/endrega.wss index a650380e..5219628e 100644 --- a/src/bestiary/entries/endrega.wss +++ b/src/bestiary/entries/endrega.wss @@ -46,6 +46,8 @@ class RER_BestiaryEndrega extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 3.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.self_influence) //CreatureENDREGA @@ -73,7 +75,7 @@ class RER_BestiaryEndrega extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.high_indirect_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/fiend.wss b/src/bestiary/entries/fiend.wss index 420dc9c3..f715a996 100644 --- a/src/bestiary/entries/fiend.wss +++ b/src/bestiary/entries/fiend.wss @@ -34,6 +34,8 @@ class RER_BestiaryFiend extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 12; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -61,7 +63,7 @@ class RER_BestiaryFiend extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.low_bad_influence) //CreatureDRACOLIZARD .influence(influences.low_bad_influence) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/fleder.wss b/src/bestiary/entries/fleder.wss index 38f39f62..c2e26d5f 100644 --- a/src/bestiary/entries/fleder.wss +++ b/src/bestiary/entries/fleder.wss @@ -38,6 +38,8 @@ class RER_BestiaryFleder extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 7; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -65,7 +67,7 @@ class RER_BestiaryFleder extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/fogling.wss b/src/bestiary/entries/fogling.wss index 79afa3f8..f9f02fd4 100644 --- a/src/bestiary/entries/fogling.wss +++ b/src/bestiary/entries/fogling.wss @@ -52,6 +52,8 @@ class RER_BestiaryFogling extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 3.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -79,7 +81,7 @@ class RER_BestiaryFogling extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/forktail.wss b/src/bestiary/entries/forktail.wss index b3028c3c..d1f4b5fc 100644 --- a/src/bestiary/entries/forktail.wss +++ b/src/bestiary/entries/forktail.wss @@ -42,6 +42,8 @@ class RER_BestiaryForktail extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 7.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -69,7 +71,7 @@ class RER_BestiaryForktail extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.high_bad_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/gargoyle.wss b/src/bestiary/entries/gargoyle.wss index 03044bd4..392cbaba 100644 --- a/src/bestiary/entries/gargoyle.wss +++ b/src/bestiary/entries/gargoyle.wss @@ -33,6 +33,8 @@ class RER_BestiaryGargoyle extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 9; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.friend_with) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -60,7 +62,7 @@ class RER_BestiaryGargoyle extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.self_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/garkain.wss b/src/bestiary/entries/garkain.wss index 9a2933f1..9908fd70 100644 --- a/src/bestiary/entries/garkain.wss +++ b/src/bestiary/entries/garkain.wss @@ -39,6 +39,8 @@ class RER_BestiaryGarkain extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 9; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiaryGarkain extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/ghoul.wss b/src/bestiary/entries/ghoul.wss index 6624065d..a1b016bc 100644 --- a/src/bestiary/entries/ghoul.wss +++ b/src/bestiary/entries/ghoul.wss @@ -47,6 +47,8 @@ class RER_BestiaryGhoul extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -74,7 +76,7 @@ class RER_BestiaryGhoul extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/giant.wss b/src/bestiary/entries/giant.wss index 036317af..98e50243 100644 --- a/src/bestiary/entries/giant.wss +++ b/src/bestiary/entries/giant.wss @@ -46,6 +46,8 @@ class RER_BestiaryGiant extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 10; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -73,7 +75,7 @@ class RER_BestiaryGiant extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.kills_them) //CreatureDRACOLIZARD .influence(influences.kills_them) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/golem.wss b/src/bestiary/entries/golem.wss index 8dd12e2e..6b1377b7 100644 --- a/src/bestiary/entries/golem.wss +++ b/src/bestiary/entries/golem.wss @@ -45,6 +45,8 @@ class RER_BestiaryGolem extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 10; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.friend_with) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -72,7 +74,7 @@ class RER_BestiaryGolem extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/gravier.wss b/src/bestiary/entries/gravier.wss index 4c452ec2..111f60ab 100644 --- a/src/bestiary/entries/gravier.wss +++ b/src/bestiary/entries/gravier.wss @@ -33,6 +33,8 @@ class RER_BestiaryGravier extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.75; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -60,7 +62,7 @@ class RER_BestiaryGravier extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/gryphon.wss b/src/bestiary/entries/gryphon.wss index 0894d5bf..94c72804 100644 --- a/src/bestiary/entries/gryphon.wss +++ b/src/bestiary/entries/gryphon.wss @@ -52,6 +52,8 @@ class RER_BestiaryGryphon extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 13.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -79,7 +81,7 @@ class RER_BestiaryGryphon extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.high_indirect_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.high_indirect_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/hag.wss b/src/bestiary/entries/hag.wss index b6854672..520382ed 100644 --- a/src/bestiary/entries/hag.wss +++ b/src/bestiary/entries/hag.wss @@ -52,6 +52,8 @@ class RER_BestiaryHag extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 4; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -79,7 +81,7 @@ class RER_BestiaryHag extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/harpy.wss b/src/bestiary/entries/harpy.wss index f444798d..b3ac4a3e 100644 --- a/src/bestiary/entries/harpy.wss +++ b/src/bestiary/entries/harpy.wss @@ -51,6 +51,8 @@ class RER_BestiaryHarpy extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.25; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.no_influence) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -78,7 +80,7 @@ class RER_BestiaryHarpy extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.low_indirect_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/human.wss b/src/bestiary/entries/human.wss index a67f6c3f..9d03d71a 100644 --- a/src/bestiary/entries/human.wss +++ b/src/bestiary/entries/human.wss @@ -29,6 +29,8 @@ class RER_BestiaryHuman extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.25; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.no_influence) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -56,7 +58,7 @@ class RER_BestiaryHuman extends RER_BestiaryEntry { .influence(influences.low_indirect_influence) //CreatureBERSERKER .influence(influences.low_indirect_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.kills_them) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.kills_them) //CreatureLESHEN diff --git a/src/bestiary/entries/katakan.wss b/src/bestiary/entries/katakan.wss index 08ef73bf..1473d1aa 100644 --- a/src/bestiary/entries/katakan.wss +++ b/src/bestiary/entries/katakan.wss @@ -45,6 +45,8 @@ class RER_BestiaryKatakan extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 11; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -72,7 +74,7 @@ class RER_BestiaryKatakan extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/kikimore.wss b/src/bestiary/entries/kikimore.wss index dc7087e6..bd70a171 100644 --- a/src/bestiary/entries/kikimore.wss +++ b/src/bestiary/entries/kikimore.wss @@ -39,6 +39,8 @@ class RER_BestiaryKikimore extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 6; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.low_indirect_influence) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiaryKikimore extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/leshen.wss b/src/bestiary/entries/leshen.wss index 9235a199..cb9b501f 100644 --- a/src/bestiary/entries/leshen.wss +++ b/src/bestiary/entries/leshen.wss @@ -41,6 +41,8 @@ class RER_BestiaryLeshen extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 15; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -68,7 +70,7 @@ class RER_BestiaryLeshen extends RER_BestiaryEntry { .influence(influences.friend_with) //CreatureBERSERKER .influence(influences.kills_them) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.kills_them) //CreatureDRACOLIZARD .influence(influences.kills_them) //CreatureGARGOYLE .influence(influences.self_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/nekker.wss b/src/bestiary/entries/nekker.wss index 7b4ef8a1..ede747bf 100644 --- a/src/bestiary/entries/nekker.wss +++ b/src/bestiary/entries/nekker.wss @@ -64,6 +64,8 @@ class RER_BestiaryNekker extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.25; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -91,7 +93,7 @@ class RER_BestiaryNekker extends RER_BestiaryEntry { .influence(influences.kills_them) //CreatureBERSERKER .influence(influences.kills_them) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/nightwraith.wss b/src/bestiary/entries/nightwraith.wss index 2d7cbd7a..142795c7 100644 --- a/src/bestiary/entries/nightwraith.wss +++ b/src/bestiary/entries/nightwraith.wss @@ -54,6 +54,8 @@ class RER_BestiaryNightwraith extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 9; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -81,7 +83,7 @@ class RER_BestiaryNightwraith extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/noonwraith.wss b/src/bestiary/entries/noonwraith.wss index e53d05aa..e0023266 100644 --- a/src/bestiary/entries/noonwraith.wss +++ b/src/bestiary/entries/noonwraith.wss @@ -51,6 +51,8 @@ class RER_BestiaryNoonwraith extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 6; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -78,7 +80,7 @@ class RER_BestiaryNoonwraith extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/panther.wss b/src/bestiary/entries/panther.wss index 3ce6c510..586a9c2d 100644 --- a/src/bestiary/entries/panther.wss +++ b/src/bestiary/entries/panther.wss @@ -45,6 +45,8 @@ class RER_BestiaryPanther extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.high_indirect_influence) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -72,7 +74,7 @@ class RER_BestiaryPanther extends RER_BestiaryEntry { .influence(influences.low_indirect_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.high_indirect_influence) //CreatureDRACOLIZARD .influence(influences.high_indirect_influence) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/rotfiend.wss b/src/bestiary/entries/rotfiend.wss index 8cb60d62..e5fc4f30 100644 --- a/src/bestiary/entries/rotfiend.wss +++ b/src/bestiary/entries/rotfiend.wss @@ -39,6 +39,8 @@ class RER_BestiaryRotfiend extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.75; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiaryRotfiend extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/sharley.wss b/src/bestiary/entries/sharley.wss index d380f38d..79cf3ce3 100644 --- a/src/bestiary/entries/sharley.wss +++ b/src/bestiary/entries/sharley.wss @@ -51,6 +51,8 @@ class RER_BestiarySharley extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 25; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.no_influence) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -78,7 +80,7 @@ class RER_BestiarySharley extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.low_indirect_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/siren.wss b/src/bestiary/entries/siren.wss index 187676a5..80b09766 100644 --- a/src/bestiary/entries/siren.wss +++ b/src/bestiary/entries/siren.wss @@ -45,6 +45,8 @@ class RER_BestiarySiren extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.75; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.no_influence) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -72,7 +74,7 @@ class RER_BestiarySiren extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.self_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.low_indirect_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/skelbear.wss b/src/bestiary/entries/skelbear.wss index b0585d98..127415d6 100644 --- a/src/bestiary/entries/skelbear.wss +++ b/src/bestiary/entries/skelbear.wss @@ -29,6 +29,8 @@ class RER_BestiarySkelbear extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 3.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.high_indirect_influence) //CreatureHUMAN .influence(influences.low_indirect_influence) //CreatureARACHAS .influence(influences.low_indirect_influence) //CreatureENDREGA @@ -56,7 +58,7 @@ class RER_BestiarySkelbear extends RER_BestiaryEntry { .influence(influences.friend_with) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/skeleton.wss b/src/bestiary/entries/skeleton.wss index 8202bdb6..1a3b8769 100644 --- a/src/bestiary/entries/skeleton.wss +++ b/src/bestiary/entries/skeleton.wss @@ -39,6 +39,8 @@ class RER_BestiarySkeleton extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.no_influence) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiarySkeleton extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/skeltroll.wss b/src/bestiary/entries/skeltroll.wss index 9ec0712e..08be8caa 100644 --- a/src/bestiary/entries/skeltroll.wss +++ b/src/bestiary/entries/skeltroll.wss @@ -45,6 +45,8 @@ class RER_BestiarySkeltroll extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.friend_with) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -72,7 +74,7 @@ class RER_BestiarySkeltroll extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/skelwolf.wss b/src/bestiary/entries/skelwolf.wss index c8670ec3..d0096e3b 100644 --- a/src/bestiary/entries/skelwolf.wss +++ b/src/bestiary/entries/skelwolf.wss @@ -39,6 +39,8 @@ class RER_BestiarySkelwolf extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.25; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.high_indirect_influence) //CreatureHUMAN .influence(influences.low_indirect_influence) //CreatureARACHAS .influence(influences.low_indirect_influence) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiarySkelwolf extends RER_BestiaryEntry { .influence(influences.friend_with) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/spider.wss b/src/bestiary/entries/spider.wss index 728a661a..26ab7e62 100644 --- a/src/bestiary/entries/spider.wss +++ b/src/bestiary/entries/spider.wss @@ -83,6 +83,8 @@ class RER_BestiarySpider extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 4; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.low_indirect_influence) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -110,7 +112,7 @@ class RER_BestiarySpider extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.high_indirect_influence) //CreatureDRACOLIZARD .influence(influences.high_indirect_influence) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/troll.wss b/src/bestiary/entries/troll.wss index 17c84f91..94174681 100644 --- a/src/bestiary/entries/troll.wss +++ b/src/bestiary/entries/troll.wss @@ -33,6 +33,8 @@ class RER_BestiaryTroll extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.friend_with) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -60,7 +62,7 @@ class RER_BestiaryTroll extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/werewolf.wss b/src/bestiary/entries/werewolf.wss index bd660784..e20f647a 100644 --- a/src/bestiary/entries/werewolf.wss +++ b/src/bestiary/entries/werewolf.wss @@ -71,6 +71,8 @@ class RER_BestiaryWerewolf extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 10; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.friend_with) //CreatureHUMAN .influence(influences.friend_with) //CreatureARACHAS .influence(influences.friend_with) //CreatureENDREGA @@ -98,7 +100,7 @@ class RER_BestiaryWerewolf extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/wight.wss b/src/bestiary/entries/wight.wss index 72bf66dc..06760509 100644 --- a/src/bestiary/entries/wight.wss +++ b/src/bestiary/entries/wight.wss @@ -39,6 +39,8 @@ class RER_BestiaryWight extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.low_bad_influence) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiaryWight extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/wildhunt.wss b/src/bestiary/entries/wildhunt.wss index a12fe30a..055680f7 100644 --- a/src/bestiary/entries/wildhunt.wss +++ b/src/bestiary/entries/wildhunt.wss @@ -65,6 +65,8 @@ class RER_BestiaryWildhunt extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 6; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -92,7 +94,7 @@ class RER_BestiaryWildhunt extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/wolf.wss b/src/bestiary/entries/wolf.wss index 2bebf7d3..ca4cf49c 100644 --- a/src/bestiary/entries/wolf.wss +++ b/src/bestiary/entries/wolf.wss @@ -39,6 +39,8 @@ class RER_BestiaryWolf extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.25; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.high_indirect_influence) //CreatureHUMAN .influence(influences.low_indirect_influence) //CreatureARACHAS .influence(influences.low_indirect_influence) //CreatureENDREGA @@ -66,7 +68,7 @@ class RER_BestiaryWolf extends RER_BestiaryEntry { .influence(influences.friend_with) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.friend_with) //CreatureLESHEN diff --git a/src/bestiary/entries/wraith.wss b/src/bestiary/entries/wraith.wss index 69616de5..c61ff036 100644 --- a/src/bestiary/entries/wraith.wss +++ b/src/bestiary/entries/wraith.wss @@ -57,6 +57,8 @@ class RER_BestiaryWraith extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 2.75; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -84,7 +86,7 @@ class RER_BestiaryWraith extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.no_influence) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.no_influence) //CreatureDRACOLIZARD .influence(influences.no_influence) //CreatureGARGOYLE .influence(influences.no_influence) //CreatureLESHEN diff --git a/src/bestiary/entries/wyvern.wss b/src/bestiary/entries/wyvern.wss index c7dbb50e..5f78562d 100644 --- a/src/bestiary/entries/wyvern.wss +++ b/src/bestiary/entries/wyvern.wss @@ -35,6 +35,8 @@ class RER_BestiaryWyvern extends RER_BestiaryEntry { this.ecosystem_delay_multiplier = 7.5; this.ecosystem_impact = (new EcosystemCreatureImpactBuilder in thePlayer) + + // Small creatures below. .influence(influences.kills_them) //CreatureHUMAN .influence(influences.no_influence) //CreatureARACHAS .influence(influences.no_influence) //CreatureENDREGA @@ -62,7 +64,7 @@ class RER_BestiaryWyvern extends RER_BestiaryEntry { .influence(influences.no_influence) //CreatureBERSERKER .influence(influences.friend_with) //CreatureSIREN - // large creatures below + // Large creatures below. .influence(influences.high_indirect_influence) //CreatureDRACOLIZARD .influence(influences.friend_with) //CreatureGARGOYLE .influence(influences.high_indirect_influence) //CreatureLESHEN diff --git a/src/bounty/bounty_manager.wss b/src/bounty/bounty_manager.wss index 1ea3e1c5..bb85aefa 100644 --- a/src/bounty/bounty_manager.wss +++ b/src/bounty/bounty_manager.wss @@ -10,19 +10,19 @@ statemachine class RER_BountyManager extends CEntity { this.GotoState('Initialising'); } - //#region bounty settings & constants + // #region bounty settings & constants - // returns the steps at which the seed gains difficulty points + // Returns the steps at which the seed gains difficulty points. public function getSeedDifficultyStep(): int { return 1000; } public function getDifficultyForSeed(seed: int): int { - // when using the 0 seed, which means the bounty is completely random. The + // When using the 0 seed, which means the bounty is completely random. The // difficulty no longer scales on the seed as there is no seed but instead // on the player's level. if (seed == 0) { - // there is still a level of randomness here, it uses the settings values + // There is still a level of randomness here, it uses the settings values // to get the difficulty relative to the player's level. return getRandomLevelBasedOnSettings(this.master.settings); } @@ -30,7 +30,7 @@ statemachine class RER_BountyManager extends CEntity { return (seed / this.getSeedDifficultyStep()) as int; } - // returns how much the seed cap is increased by bounty level + // Returns how much the seed cap is increased by bounty level. public function getSeedBountyLevelStep(): int { return 500; } @@ -39,11 +39,11 @@ statemachine class RER_BountyManager extends CEntity { return this.getTotalBountyLevel() * this.getSeedBountyLevelStep(); } - //#endregion bounty settings & constants + // #endregion bounty settings & constants - //#region bounty creation + // #region bounty creation - // create a new bounty struct with all the data we need to know about the new + // Create a new bounty struct with all the data we need to know about the new // bounty. private latent function getNewBounty(seed: int): RER_Bounty { var bounty: RER_Bounty; @@ -70,8 +70,8 @@ statemachine class RER_BountyManager extends CEntity { RER_BREF_IGNORE_BIOMES | RER_BREF_IGNORE_SETTLEMENT | RER_BREF_IGNORE_BESTIARY, (new RER_SpawnRollerFilter in this) .init() - // we multiply everyone by 100, so that 0.01 * 100 = 1 - // since the resulting creature chances are integers, 50 * 0.01 results + // We multiply everyone by 100, so that 0.01 * 100 = 1. + // Since the resulting creature chances are integers, 50 * 0.01 results // in 0 and would cause a crash. This will instead multiply everyone // by 100 and leave the creatures we don't want to their initial tiny // values. @@ -79,8 +79,8 @@ statemachine class RER_BountyManager extends CEntity { .setOffsets( constants.large_creature_begin, constants.large_creature_max, - // creature outside the offset have 1% chance to appear - // 1% and not 0% to avoid crashes if all creatures to be disabled + // Creature outside the offset have 1% chance to appear. + // 1% and not 0% to avoid crashes if all creatures are disabled // in the settings. 0.01 ) @@ -112,8 +112,8 @@ statemachine class RER_BountyManager extends CEntity { constants = RER_ConstantCreatureTypes(); - // the seed 0 means the bounty will be completely random and won't use the - // seed in the RNG + // The seed 0 means the bounty will be completely random and won't use the + // seed in the RNG. rng = (new RandomNumberGenerator in this).setSeed(seed) .useSeed(seed != 0); @@ -125,17 +125,17 @@ statemachine class RER_BountyManager extends CEntity { NLOG("generateRandomDataForBounty(), number of groups = " + number_of_groups); // 0. - // prepare the data we'll need while generating stuff + // Prepare the data we'll need while generating stuff. - // get a sorted list of the different POIs in the game + // Get a sorted list of the different POIs in the game. point_of_interests_positions = this.master.contract_manager.getClosestDestinationPoints(thePlayer.GetWorldPosition()); - // bounties are composed of 1 main target and multiple side targets. + // Bounties are composed of 1 main target and multiple side targets. // The main target is a large monster, something supposedly hard to kill, // while the side targets are small creatures. // 1. - // we start by adding the main group + // We start by adding the main group. current_group_data = RER_BountyRandomMonsterGroupData(); current_group_data.type = main_bestiary_entry.type; @@ -158,7 +158,7 @@ statemachine class RER_BountyManager extends CEntity { data.main_group = current_group_data; // 2. - // we generate the side groups + // We generate the side groups. for (i = 0; i < number_of_groups; i += 1) { current_group_data = RER_BountyRandomMonsterGroupData(); @@ -172,7 +172,7 @@ statemachine class RER_BountyManager extends CEntity { .setOffsets( constants.small_creature_begin_no_humans, constants.small_creature_max, - // creature outside the offset have 1% chance to appear + // Creature outside the offset have 1% chance to appear. // 1% and not 0% to avoid crashes if all creatures to be disabled // in the settings. 0.01 @@ -221,10 +221,10 @@ statemachine class RER_BountyManager extends CEntity { return data; } - //#endregion bounty creation + // #endregion bounty creation - //#region bounty workflow + // #region bounty workflow public latent function startBounty(seed: int) { this.master.storages.bounty.current_bounty = this.getNewBounty(seed); @@ -255,7 +255,7 @@ statemachine class RER_BountyManager extends CEntity { bonus = this.getNumberOfSideGroupsKilled(); new_level = this.increaseBountyLevel(); - // bonus groups grant additional rewards based on the new bounty level. + // Bonus groups grant additional rewards based on the new bounty level. if (bonus > 0) { RER_giveItemForLevelUnknown( this.master, @@ -457,7 +457,7 @@ statemachine class RER_BountyManager extends CEntity { message = GetLocStringByKey("rer_bounty_start_popup"); // 1. - // first the main target + // First the main target. message = StrReplace( message, "{{main_creature_listing}}", @@ -468,7 +468,7 @@ statemachine class RER_BountyManager extends CEntity { ); // 2 - // then the side targets + // Then the side targets. for (i = 0; i < this.master.storages.bounty.current_bounty.random_data.side_groups.Size(); i += 1) { group = this.master.storages.bounty.current_bounty.random_data.side_groups[i]; @@ -484,22 +484,22 @@ statemachine class RER_BountyManager extends CEntity { return message; } - //#endregion bounty workflow + // #endregion bounty workflow - // return the maximum progress the bounty will have for this seed. Each progress + // Return the maximum progress the bounty will have for this seed. Each progress // level is a group of creatures. public function getNumberOfGroupsForSeed(rng: RandomNumberGenerator, seed: int): int { var min: int; var max: int; min = 1; - // for every 10 levels bounties have a chance to get 1 more group + // For every 10 levels bounties have a chance to get 1 more group. max = 2 + (this.getDifficultyForSeed(seed) * 0.1 as int) + min; NLOG("getNumberOfGroupsForSeed(" + seed + ") - " + RandNoiseF(seed, max, min) + " " + max); - // a difficulty 0 seed has maximum 5 monster groups in it - // the difficulty seed step divided by 100 means that a difficulty 100 seed + // A difficulty 0 seed has maximum 5 monster groups in it. + // The difficulty seed step divided by 100 means that a difficulty 100 seed // will double the amount of creatures. return rng.nextRange(max, min) as int; } @@ -617,14 +617,16 @@ state Processing in RER_BountyManager { } entry function Processing_main() { + this.verifyBountyRegion(); - // we also call it instantly to handle cases where the player teleported near - // a group that was picked but not spawned yet + // We also call it instantly to handle cases where the player teleported near + // a group that was picked but not spawned yet. + parent.displayMarkersForCurrentBounty(); while (true) { - // no active bounty, do nothing + // No active bounty, do nothing. if (!parent.isBountyActive()) { Sleep(20); @@ -672,7 +674,7 @@ state Processing in RER_BountyManager { player_position = thePlayer.GetWorldPosition(); // 1. - // we start by checking for the main group + // We start by checking for the main group. this.trySpawnBountyGroup( parent.master.storages.bounty.current_bounty.random_data.main_group, 100, @@ -690,7 +692,7 @@ state Processing in RER_BountyManager { NLOG("spawnNearbyBountyGroups(), side group " + i); - // here, we know the group we currently have was not killed + // Here, we know the group we currently have was not killed. this.trySpawnBountyGroup( groups[i], 50, @@ -750,7 +752,7 @@ state Processing in RER_BountyManager { bestiary_entry = parent.master.bestiary.entries[group_data.type]; - // to get it closer to the real ground position. It works because bounty + // To get it closer to the real ground position. It works because bounty // groups are spawned only when the player gets close. position = group_data.position; @@ -773,15 +775,15 @@ state Processing in RER_BountyManager { parent.master, position, group_data.count, - , // density + , // Density EncounterType_CONTRACT, RER_BESF_NO_BESTIARY_FEATURE | RER_BESF_NO_PERSIST, 'RandomEncountersReworked_BountyCreature',, damage_modifier ); - // group index -1 is a way to identify the main group - // in that case we add 1 of each side group killed into the main group + // Group index -1 is a way to identify the main group. + // In that case we add 1 of each side group killed into the main group. if (group_index < 0) { for (i = 0; i < parent.master.storages.bounty.current_bounty.random_data.side_groups.Size(); i += 1) { current_group = parent.master.storages.bounty.current_bounty.random_data.side_groups[i]; @@ -797,8 +799,8 @@ state Processing in RER_BountyManager { side_entities = side_bestiary_entry.spawn( parent.master, position, - 1, // only 1 creature - , // density + 1, // Only 1 creature. + , // Density EncounterType_CONTRACT, RER_BESF_NO_BESTIARY_FEATURE | RER_BESF_NO_PERSIST, 'RandomEncountersReworked_BountyCreature',, diff --git a/src/bounty/bounty_master/bounty_master_manager.wss b/src/bounty/bounty_master/bounty_master_manager.wss index 03d4b329..77c0f302 100644 --- a/src/bounty/bounty_master/bounty_master_manager.wss +++ b/src/bounty/bounty_master/bounty_master_manager.wss @@ -52,7 +52,7 @@ statemachine class RER_BountyMasterManager { } //Ferroxius - New Bounty Masters END - // every hour of playtime it changes the index in the valid positions + // Every hour of playtime it changes the index in the valid positions. valid_positions = this.getBountyMasterValidPositions(); position_index = (RandNoiseF( GameTimeHours(theGame.CalculateTimePlayed()), @@ -67,11 +67,11 @@ statemachine class RER_BountyMasterManager { position_index = 0; } - // the bounty master already exist + // The bounty master already exist. if (this.bounty_master_entity) { NLOG("bounty master exists, template = " + StrAfterFirst(this.bounty_master_entity.ToString(), "::")); - // not the same template as the one asked, we kill the current bounty master + // Not the same template as the one asked, we kill the current bounty master. if (StrAfterFirst(this.bounty_master_entity.ToString(), "::") != template_path) { NLOG("bounty master wrong template"); @@ -80,7 +80,7 @@ statemachine class RER_BountyMasterManager { delete this.bounty_master_entity; } else { - // teleport the bounty master at the current position based on the current playtime + // Teleport the bounty master at the current position based on the current playtime. bounty_master_entity .TeleportWithRotation( valid_positions[position_index] + Vector(0, 0, 0.2), diff --git a/src/bounty/bounty_types.wss b/src/bounty/bounty_types.wss index 3f4ab188..9e87894d 100644 --- a/src/bounty/bounty_types.wss +++ b/src/bounty/bounty_types.wss @@ -2,7 +2,7 @@ struct RER_Bounty { var seed: int; - // contains information about the different groups of creature the bounty is + // Contains information about the different groups of creature the bounty is // composed of. var random_data: RER_BountyRandomData; @@ -18,10 +18,10 @@ struct RER_BountyRandomData { struct RER_BountyRandomMonsterGroupData { - // the creature type that composes this group + // The creature type that composes this group. var type: CreatureType; - // the enemy count + // The enemy count. var count: int; var position: Vector; diff --git a/src/camera/camera_manager.wss b/src/camera/camera_manager.wss index 03e37540..0a40c2ef 100644 --- a/src/camera/camera_manager.wss +++ b/src/camera/camera_manager.wss @@ -7,11 +7,11 @@ class RER_CameraDataInterface { } class RER_CameraDataMoveToPositionLookAtPosition extends RER_CameraDataInterface { - // edit these two variables + // Edit these two variables. public var camera_position_goal: Vector; public var camera_target: Vector; - // or extend the class and override these method if your target is a moving target + // Or extend the class and override these method if your target is a moving target. function getCameraTarget(): Vector { return this.camera_target; } @@ -77,7 +77,7 @@ class RER_CameraDataMoveToPositionLookAtPosition extends RER_CameraDataInterface // Here the camera looks in the direction it's going. class RER_CameraDataMoveToPoint extends RER_CameraDataInterface { - // edit the variable + // Edit the variable. public var camera_position_goal: Vector; private var camera_position: Vector; @@ -85,7 +85,7 @@ class RER_CameraDataMoveToPoint extends RER_CameraDataInterface { private var camera_rotation_goal: EulerAngles; private var camera_target: Vector; - // or extend the class and override this method if your target is a moving target + // Or extend the class and override this method if your target is a moving target. function getCameraTarget(): Vector { return this.camera_target; } @@ -104,7 +104,7 @@ class RER_CameraDataMoveToPoint extends RER_CameraDataInterface { this.camera_rotation = theCamera.GetCameraRotation(); while (this.can_loop && this.canRunLoop()) { - // we get the mean value between both entities + // We get the mean value between both entities. this.camera_target = this.getCameraTarget(); this.camera_position += (this.camera_position_goal - this.camera_position) * 0.01; @@ -122,7 +122,7 @@ class RER_CameraDataMoveToPoint extends RER_CameraDataInterface { } class RER_CameraDataFloatAndLookAtTalkingActors extends RER_CameraDataMoveToPositionLookAtPosition { - // edit this variable + // Edit this variable. public var actors: array; default camera_rotation_blending = 0.01; @@ -165,9 +165,9 @@ class RER_CameraDataFloatAndLookAtTalkingActors extends RER_CameraDataMoveToPosi protected var last_talking_actor_index: int; default last_talking_actor_index = -1; - // for this class the camera will by default look between the actors - // but if an actor is talking the camera is look more in his direction while - // still trying to target the other non-talking actors + // For this class the camera will by default face in between the actors + // but if an actor is talking the camera will face more in his direction while + // still trying to target the other non-talking actors. function getCameraTarget(): Vector { var number_of_actors: int; var position: Vector; diff --git a/src/compositions/hunt.wss b/src/compositions/hunt.wss index 8862b056..e3121666 100644 --- a/src/compositions/hunt.wss +++ b/src/compositions/hunt.wss @@ -17,7 +17,7 @@ latent function createRandomCreatureHunt(master: CRandomEncounters, optional cre } // https://github.com/Aelto/W3_RandomEncounters_Tweaks/issues/5: - // added the NONE check because the SpawnRoller can return + // Added the NONE check because the SpawnRoller can return // the NONE value if the user set all values to 0. if (bestiary_entry.isNull()) { NLOG("creature_type is NONE, cancelling spawn"); @@ -92,7 +92,7 @@ class CreatureHuntGryphonComposition extends CompositionSpawner { ); if (this.allow_trophy) { - // if the user allows trophy pickup scene, tell the entity + // If the user allows trophy pickup scene, tell the entity // to send RER a request on its death. current_rer_entity.pickup_animation_on_death = this.allow_trophy_pickup_scene; } diff --git a/src/constants.wss b/src/constants.wss index 097340b1..babe7297 100644 --- a/src/constants.wss +++ b/src/constants.wss @@ -1,31 +1,30 @@ -/////////////////////////////// -// a set of constants structs // -// that you can instantiate // -/////////////////////////////// +////////////////////////////////////////////////////////// +// A set of constants structs that you can instantiate. // +////////////////////////////////////////////////////////// // #define const DEBUG; -// flags to quickly disable the major systems of the mod, -// comment out the constant definitions to disable a system. +// Flags to quickly disable the major systems of the mod. +// Comment out the constant definitions to disable a system. // // IF DISABLED: -// completely remove the static encounters from the mod, the manager functions +// Completely remove the static encounters from the mod, the manager functions // for no SE are registered and the startSpawning function is short-circuited. // #define const NOT_ENABLE_STATIC_ENCOUNTERS; -// remove the bestiary filtering when fetching a random creature, the journal -// entries are still in the bestiary entries but they're not used anywhere +// Remove the bestiary filtering when fetching a random creature, the journal +// entries are still in the bestiary entries but they're not used anywhere. #define const ENABLE_BESTIARY_FEATURE; -// remove the trails from the mod +// Remove the trails from the mod. #define const ENABLE_TRAIL_MAKER; -// remove the storage system from the mod, bounties, contracts and the ecosystem +// Remove the storage system from the mod, bounties, contracts and the ecosystem // won't have persisting changes between reloads. #define const ENABLE_STORAGE_SYSTEM; -// remove the ecosystem system from the mod, short-circuit most ecosystem +// Remove the ecosystem system from the mod, short-circuit most ecosystem // functions and remove most calls to the ecosystem manager as well. #define const ENABLE_ECOSYSTEM; @@ -37,48 +36,36 @@ struct RER_Constants { /** * If you update that number, remember to maybe add an update function in - * the Initialising state. And also the default value in the menu + * the Initialising state. And also the default value in the menu. */ var version: float; default version = 3.01; } -// used to define influences the -// currenth creature has over -// other creatures. Part of the -// Ecosystem feature. +// Used to define influences the currenth creature has over +// other creatures. Part of the ecosystem feature. struct RER_ConstantInfluences { - // when the current creature - // kills the other creature. + // When the current creature kills the other creature. var kills_them: float; default kills_them = -1.5; - // when the current creature - // is friend with the other - // creature. + // When the current creature is friend with the other creature. var friend_with: float; default friend_with = 2.5; - // when the current creature - // has no influence over the - // other creature. + // When the current creature has no influence over the other creature. var no_influence: float; default no_influence = 0; - // when the current creature - // indirectly increases the - // other creature spawn rate + // When the current creature indirectly increases the other creature spawn rate. var low_indirect_influence: float; default low_indirect_influence = 1; var high_indirect_influence: float; default high_indirect_influence = 2; - // when the current creature - // doesn't directly kill the - // other creature but when - // it stills decreases the - // spawn rate by a bit + // When the current creature doesn't directly kill the other creature + // but when it stills decreases the spawn rate by a bit. var low_bad_influence: float; default low_bad_influence = -0.5; diff --git a/src/container_refill.wss b/src/container_refill.wss index 9a2c68c1..a7846ece 100644 --- a/src/container_refill.wss +++ b/src/container_refill.wss @@ -7,7 +7,7 @@ /** * This function does a random roll, if it succeeds it calls the function to - * fill a random container + * fill a random container. */ latent function RER_tryRefillRandomContainer(master: CRandomEncounters) { NLOG("container refill called"); @@ -50,11 +50,11 @@ latent function RER_tryRefillRandomContainer(master: CRandomEncounters) { FindGameplayEntitiesInRange( containers, thePlayer, - radius, // radius + radius, // Radius 50 + number_of_containers * 10, // max number of entities - , // tag + , // Tag , - , // target + , // Target 'W3Container' ); diff --git a/src/contract/contract_manager.wss b/src/contract/contract_manager.wss index 8c8a5275..265d8598 100644 --- a/src/contract/contract_manager.wss +++ b/src/contract/contract_manager.wss @@ -1,17 +1,17 @@ /** * Summary of the whole Contract system: - * - An errand injector adds a notice to every noticeboard in the game + * - An errand injector adds a notice to every noticeboard in the game. * - When the errand is picked, it notifies the ContractManager which * displays a list of contracts the user can start. - * - There is a limited amount of contracts per hour (by default) + * - There is a limited amount of contracts per hour (by default). * - For contracts to be restricted per noticeboard, the noticeboards as * well as the contract have a unique identifier. * - These identifiers are used to determine if the same contract was * already completed from the same noticeboard. * - When a contract is started, it selects a random location in the * world, as well a random reward and a random species. - * - Every thing random in contracts are generated from a seeded RNG + * - Every thing random in contracts are generated from a seeded RNG. * - The seed is obtained from the noticeboard and the current * generation time. * - Contracts do not persist in the save, but are regenerated every @@ -47,7 +47,7 @@ statemachine class RER_ContractManager { .GetVarValue('RERcontracts', 'RERhoursBeforeNewContracts') ); - // special scenario, 0 means it will generate new contracts every time the + // Special scenario, 0 means it will generate new contracts every time the // board is opened. if (required_time_elapsed <= 0) { return RER_GenerationTime(RoundF(RandF() * 1000 - 500)); @@ -141,7 +141,7 @@ statemachine class RER_ContractManager { NLOG("generateContract, reward_type = " + contract.reward_type); - // TODO: once the PR that allows us to get the creature type right here is + // TODO: Once the PR that allows us to get the creature type right here is // merged, replace the difficulty check with a creature strength check. if (data.difficulty_level.value < 9) { if (rng.nextRange(10, 0) < 5) { @@ -167,7 +167,7 @@ statemachine class RER_ContractManager { closest_points = this.getClosestDestinationPoints(starting_point); - // since it can return less than what we asked for + // Since it can return less than what we asked for. size = closest_points.Size(); quarter = RoundF(size * 0.25); if (size <= 0) { @@ -175,8 +175,8 @@ statemachine class RER_ContractManager { } if (SUH_getCurrentRegion() == "prolog_village") { - // white orchard doesn't have enough POIs to pick only a portion of them, - // instead we pick all of them: + // White orchard doesn't have enough POIs to pick only a portion of them. + // Instead we pick all of them. index = rng.nextRange(size, 0) as int; } else { @@ -218,7 +218,7 @@ statemachine class RER_ContractManager { } }; - // We use a list of point of interests across the map + // We use a list of point of interests across the map. mappins = this.getPointOfInterests(); for (i = 0; i < mappins.Size(); i += 1) { current_position = mappins[i].entityPosition; @@ -229,14 +229,14 @@ statemachine class RER_ContractManager { // We also fetch entities with a custom tag to support // custom point of interests. This can prove useful in - // new maps from mod who may want to add support for RER - // contracts + // new maps from mods who may want to add support for RER + // contracts. FindGameplayEntitiesInRange( entities, thePlayer, - 10000, // range - 500, // maxresults - 'RER_contractPointOfInterest', // tag + 10000, // Range + 500, // Max results + 'RER_contractPointOfInterest', // Tag ); for (i = 0; i < entities.Size(); i += 1) { @@ -246,7 +246,7 @@ statemachine class RER_ContractManager { sorter_data.PushBack((new RER_ContractLocation in this).init(current_position, current_distance)); } - // we re-use the same variable here + // We re-use the same variable here. sorter_data = SU_sortArray(sorter_data); for (i = 0; i < sorter_data.Size(); i += 1) { @@ -349,7 +349,7 @@ statemachine class RER_ContractManager { if (IsNameValid(token_name)) { // 50% chance to get either 1 token, or the rewards_amount - 1, which is - // boosted by the reputation and difficulty + // boosted by the reputation and difficulty. if (rng.next() > 0.5) { current_amount = 1; } @@ -360,13 +360,13 @@ statemachine class RER_ContractManager { thePlayer.GetInventory().AddAnItem(token_name, current_amount); thePlayer.DisplayItemRewardNotification(token_name, current_amount); - // then we give what's left as jewels: + // Then we give what's left as jewels. rewards_amount -= current_amount; this.master.loot_manager.rollAndGiveItemsTo( thePlayer.GetInventory(), rewards_amount * 0.1, - , // rng + , // RNG LootCategory_Valuables ); @@ -375,7 +375,7 @@ statemachine class RER_ContractManager { } else { NDEBUG( - "RER ERROR: the name of the token is not valid [" + token_name + "]." + + "RER ERROR: The name of the token is not valid [" + token_name + "]." + "You can report this issue to the author, preferably with a copy/screenshot of this message." + "
Additional information:" + "
- seed: " + storage.active_contract.rng_seed + @@ -425,11 +425,11 @@ statemachine class RER_ContractManager { // difficulty at 80 = 116.740753 // difficulty at 99 = 158.036987 // - // tweak the last number to control how low it can go in the negatives. + // Tweak the last number to control how low it can go in the negatives. // Lower the number the higher it starts. // // Cap the level to 50 in the exponential function to avoid crazy numbers - // at higher levels + // at higher levels. return ExpF(Min(difficulty.value, 50) * 0.055) * LogF(difficulty.value + 1) // add a linear function for levels above 50 @@ -445,15 +445,15 @@ statemachine class RER_ContractManager { FindGameplayEntitiesInRange( entities, thePlayer, - 20, // range, - 1, // max results - , // tag: optional value + 20, // Range, + 1, // Max results + , // Tag: optional value FLAG_ExcludePlayer, - , // optional value + , // Optional value 'W3NoticeBoard' ); - // bold move here, if there are no noticeboard nearby the game will crash. + // Bold move here, if there are no noticeboard nearby the game will crash. board = entities[0] as W3NoticeBoard; return board; @@ -463,4 +463,4 @@ statemachine class RER_ContractManager { return theGame.GetInGameConfigWrapper() .GetVarValue('RERcontracts', 'RERallowSelectDifficulty'); } -} \ No newline at end of file +} diff --git a/src/contract/injectors.wss b/src/contract/injectors.wss index 3304a262..0d11b954 100644 --- a/src/contract/injectors.wss +++ b/src/contract/injectors.wss @@ -7,11 +7,11 @@ function RER_addNoticeboardInjectors() { FindGameplayEntitiesInRange( entities, thePlayer, - 5000, // range, - 100, // max results - , // tag: optional value + 5000, // Range, + 100, // Max results + , // Tag: optional value FLAG_ExcludePlayer, - , // optional value + , // Optional value 'W3NoticeBoard' ); @@ -52,7 +52,7 @@ class RER_ContractErrandInjector extends SU_ErrandInjector { identifier = master.contract_manager.getUniqueIdFromNoticeboard(board); - // if the reputation system is enabled but the player + // If the reputation system is enabled but the player // does not meet the requirement to see the vanilla // contracts yet, we remove all of the quest contracts // before injecting our errand. diff --git a/src/contract/rewards.wss b/src/contract/rewards.wss index 58f9a845..43aa2faa 100644 --- a/src/contract/rewards.wss +++ b/src/contract/rewards.wss @@ -36,7 +36,7 @@ latent function RER_applyLootFromContractTokenName(master: CRandomEncounters, in inventory.RemoveItemByName(item, count); if (item == 'rer_token_experience') { - // re-use the index variable here + // Re-use the index variable here. index = RER_getPlayerLevel() * 10; GetWitcherPlayer() @@ -81,7 +81,7 @@ latent function RER_applyLootFromContractTokenName(master: CRandomEncounters, in master.loot_manager.rollAndGiveItemsTo( inventory, 1.0, - , // rng + , // RNG category ); } @@ -180,7 +180,7 @@ function RER_getAllowedContractRewardsMaskFromRegion(): RER_ContractRewardType { if (region == "no_mans_land") { position = thePlayer.GetWorldPosition(); - // novigrad, higher than oxenfurt on the map + // Novigrad, higher than oxenfurt on the map. if (position.X < 1150) { return ContractRewardType_GOLD | ContractRewardType_GEAR; @@ -190,7 +190,7 @@ function RER_getAllowedContractRewardsMaskFromRegion(): RER_ContractRewardType { | ContractRewardType_MATERIALS; } } - // should never enter this one, but left just in case it happens + // Should never enter this one, but left just in case it happens. else if (region == "novigrad") { return ContractRewardType_GOLD | ContractRewardType_GEAR; @@ -203,14 +203,14 @@ function RER_getAllowedContractRewardsMaskFromRegion(): RER_ContractRewardType { return ContractRewardType_CONSUMABLES | ContractRewardType_GOLD; } - // kaer_morhen, spiral, isle of mysts, etc... - // places where contracts cannot happen without mods + // Kaer_morhen, spiral, isle of mysts, etc... + // Places where contracts cannot happen without mods. return ContractRewardType_ALL; } /** - * contracts rewards are subject to region based restrictions + * Contract rewards are subject to region based restrictions * but some noticeboards break the rules, this adds some nice * variation. */ diff --git a/src/contract/species.wss b/src/contract/species.wss index 3e6a3172..5a2bfc71 100644 --- a/src/contract/species.wss +++ b/src/contract/species.wss @@ -31,7 +31,7 @@ function RER_getSeededRandomSpeciesType(rng: RandomNumberGenerator): RER_Species function RER_getSeededRandomEasySpeciesType(rng: RandomNumberGenerator): RER_SpeciesTypes { var max: float; - // exclude specters for EE users + // Exclude specters for EE users. if (RER_playerUsesEnhancedEditionRedux()) { max = ((SpeciesTypes_SPECTERS as int) as float); } diff --git a/src/contract/states/dialog_choice.wss b/src/contract/states/dialog_choice.wss index d49c0511..636f5c36 100644 --- a/src/contract/states/dialog_choice.wss +++ b/src/contract/states/dialog_choice.wss @@ -1,7 +1,7 @@ /** * In this state we display a list of dialogue options to the player so that - * he can pick the contract he likes. + * they can pick the contract they like. */ state DialogChoice in RER_ContractManager { var camera: SU_StaticCamera; @@ -178,7 +178,7 @@ state DialogChoice in RER_ContractManager { var response: SSceneChoice; var i: int; - // while on gamepad, the interact input is directly sent in the dialog choice + // While on gamepad, the interact input is directly sent in the dialog choice // it is safer to wait a bit before capturing the input. Sleep(0.25); @@ -223,8 +223,8 @@ state DialogChoice in RER_ContractManager { } for (i = 0; i < 3; i += 1) { - // get the choices starting at 4th from last until 2nd to last, as the last - // is the exit choice + // Get the choices starting at 4th from last until 2nd to last, as the last + // is the exit choice. // EDIT: it works because the number of contracts is hardcoded at 3 at // the moment. // EDIT 2: this code is overly complex, why use .Size() and minus 4 diff --git a/src/contract/states/difficulty_selection.wss b/src/contract/states/difficulty_selection.wss index 28862810..f33fb86a 100644 --- a/src/contract/states/difficulty_selection.wss +++ b/src/contract/states/difficulty_selection.wss @@ -24,7 +24,7 @@ state DifficultySelection in RER_ContractManager { noticeboard_identifier = parent.getUniqueIdFromNoticeboard(parent.getNearbyNoticeboard()); if (!parent.canSelectContractDifficulty()) { - // the player cannot select the difficulty, go straight to the next state. + // The player cannot select the difficulty, go straight to the next state. parent.contractHaggleDifficultySelected( RER_ContractDifficultyLevel( parent.getMaximumDifficultyForReputation( diff --git a/src/contract/states/processing.wss b/src/contract/states/processing.wss index 6908001d..f590ce63 100644 --- a/src/contract/states/processing.wss +++ b/src/contract/states/processing.wss @@ -81,8 +81,8 @@ state Processing in RER_ContractManager { active_contract = parent.master.storages.contract.active_contract; - // this part is pretty much useless since the storage is unique per region - // meaning you get only the contract for the current region. + // This part is pretty much useless since the storage is unique per region. + // This means you get only contracts for the current region. if (!SUH_isPlayerInRegion(active_contract.region_name)) { parent.GotoState('Waiting'); } @@ -148,7 +148,7 @@ state Processing in RER_ContractManager { position = active_contract.destination_point + VecRingRandStatic(rng.previous_number as int, 5, active_contract.destination_radius * 0.5 + 5); - // try to see if the position is valid. If it returns true then it means + // Try to see if the position is valid. If it returns true then it means // it found a valid position. if (getGroundPosition(position, 1, 10)) { i = -1; @@ -157,10 +157,10 @@ state Processing in RER_ContractManager { } } - // since i is set to -1 when a position is found, this means no position was - // found. + // Since i is set to -1 when a position is found, this means no position was + // found. if (i >= 0) { - // spawn the monster on the player directly as a last resort. + // Spawn the monster on the player directly as a last resort. position = thePlayer.GetWorldPosition(); getGroundPosition(position, 1, 20); } @@ -171,7 +171,7 @@ state Processing in RER_ContractManager { impact_points - 2 ); - // enemy_count temporarily holds the amount of bonus enemies + // enemy_count temporarily holds the amount of bonus enemies. enemy_count = 0; NLOG("impact points = " + impact_points); @@ -179,11 +179,11 @@ state Processing in RER_ContractManager { if (theGame.GetInGameConfigWrapper().GetVarValue('RERcontracts', 'RERallowIncreasedEnemyCount')) { NLOG("RERallowIncreasedEnemyCount = true"); - // caps at 25, which is enough for a shaelmaar + // Caps at 25, which is enough for a Shaelmaar. enemy_count += MinF(impact_points * 0.25, 25) as int; impact_points *= 0.75; - // then we take again 5% of the impact points for the enemy count but this + // Then we take again 5% of the impact points for the enemy count but this // time with no cap at all. enemy_count += (impact_points * 0.05) as int; impact_points *= 0.95; @@ -200,18 +200,18 @@ state Processing in RER_ContractManager { + Min( enemy_count, bestiary_entry.template_list.difficulty_factor.maximum_count_medium - ), //count - , // density + ), // Count + , // Density EncounterType_CONTRACT, RER_BESF_NO_BESTIARY_FEATURE | RER_BESF_NO_PERSIST, 'RandomEncountersReworked_ContractCreature', - // a high number to make sure there is no composition as we'll spawn them + // A high number to make sure there is no composition as we'll spawn them // manually. 10000 ); enemy_count = entities.Size(); - // here we make sure to use the medium count rather than the `enemy_count` + // Here we make sure to use the medium count rather than the `enemy_count` // since it would include the bonus entities from the impact points and // the cost of these entities were already substracted from the impact_points // variable earlier. @@ -234,7 +234,7 @@ state Processing in RER_ContractManager { damage_modifier.damage_dealt_modifier = 1; while (impact_points != 0) { - // the higher the amount of enemies, the higher the chances of them + // The higher the amount of enemies, the higher the chances of them // getting a damage boost. Smaller enemies often deal less damages, // so it is perfectly safe to give them more damage boosts than large // monsters who already inflict big hits. @@ -242,7 +242,7 @@ state Processing in RER_ContractManager { damage_modifier.damage_dealt_modifier *= PowF(buff_multiplier, 1); } else { - // so here we add 7.5% more damage received + // So here we add 7.5% more damage received. damage_modifier.damage_received_modifier *= PowF(2 - buff_multiplier, 7.5); } @@ -251,14 +251,14 @@ state Processing in RER_ContractManager { impact_points = RoundF(impact_points + sign); } - // set a minimum of 5% damage received modifier, for higher level contracts + // Set a minimum of 5% damage received modifier, for higher level contracts // it can easily reach 0% due to float precision. damage_modifier.damage_received_modifier = MaxF(0.05, damage_modifier.damage_received_modifier); - // don't tweak the buffs for small creatures because they're already pretty + // Don't tweak the buffs for small creatures because they're already pretty // weak by default. if (parent.master.bestiary.isCreatureLarge(active_contract.creature_type)) { - // to better balance the damage modifiers on large group of enemies, the + // To better balance the damage modifiers on large groups of enemies, the // more enemies there is the lower the buffs are. It's like we spread // the buffs over the enemies basically. damage_modifier.damage_received_modifier = PowF( @@ -346,14 +346,14 @@ state Processing in RER_ContractManager { path = "dlc\modtemplates\randomencounterreworkeddlc\data\rer_monster_nest.w2ent"; if (!RER_isCreatureTypeAllowedForNest(active_contract.creature_type)) { - // the monster doesn't fit a nest, in that case we spawn a boss fight + // The monster doesn't fit a nest, in that case we spawn a boss fight // instead. this.createHuntingGroundAndWaitForEnd(active_contract); return; } - // amount of nests: + // Amount of nests: i = RoundF(rng.nextRange(1 + active_contract.difficulty_level.value / 20, 1)); while (i > 0) { @@ -366,7 +366,7 @@ state Processing in RER_ContractManager { FixZAxis(position); - // try to see if the position is valid. If it returns true then it means + // Try to see if the position is valid. If it returns true then it means // it found a valid position. if (getGroundPosition(position, 2, 10)) { k = -1; @@ -375,10 +375,10 @@ state Processing in RER_ContractManager { } } - // since i is set to -1 when a position is found, this means no position was - // found. + // Since i is set to -1 when a position is found, this means no position was + // found. // if (k >= 0) { - // // spawn the monster on the player directly as a last resort. + // // Spawn the monster on the player directly as a last resort. // position = thePlayer.GetWorldPosition(); // getGroundPosition(position, 1, 20); // } @@ -441,8 +441,8 @@ state Processing in RER_ContractManager { enemy_count = bestiary_entry.template_list.difficulty_factor.maximum_count_medium; if (enemy_count < 3) { - // the amount of enemies would be too low for it to be a good horde, in - // that case we spawn a bossfight instead + // The amount of enemies would be too low for it to be a good horde, in + // that case we spawn a bossfight instead. this.createHuntingGroundAndWaitForEnd(active_contract); return; @@ -460,7 +460,7 @@ state Processing in RER_ContractManager { parent.master.horde_manager.sendRequest(request); - // the statemachine may not enter the processing state right away, + // The statemachine may not enter the processing state right away, // in this case we wait for it to leave the waiting state. while (parent.master.horde_manager.GetCurrentStateName() == 'Waiting') { Sleep(1); @@ -486,7 +486,7 @@ state Processing in RER_ContractManager { config.GetVarValue('RERcontracts', 'RERcontractsDeathReputationLossBuffer') ); - // the reputation loss is capped at 2 deaths + // The reputation loss is capped at 2 deaths. if (current_value < 2) { config.SetVarValue( 'RERcontracts', diff --git a/src/contract/types.wss b/src/contract/types.wss index d7f90441..88679aeb 100644 --- a/src/contract/types.wss +++ b/src/contract/types.wss @@ -1,13 +1,13 @@ /** - * Unique identifier used to differentiate one noticeboard from another + * Unique identifier used to differentiate one noticeboard from another. */ struct RER_NoticeboardIdentifier { var identifier: string; } /** - * Unique identifier used to differentiate one contract from another + * Unique identifier used to differentiate one contract from another. */ struct RER_ContractIdentifier { var identifier: string; @@ -24,14 +24,14 @@ function RER_identifierToInt(identifier: string): int { if (StrFindFirst(segment, "-") >= 0) { sub = StrBeforeFirst(segment, "-"); } - // if it's the last element + // If it's the last element. else { sub = segment; } output += StringToInt(sub); - // the +1 is there to exclude the "-" + // The +1 is there to exclude the "-". segment = StrMid(segment, StrLen(sub) + 1); } @@ -39,7 +39,7 @@ function RER_identifierToInt(identifier: string): int { } /** - * Represents the time when the contracts were generated + * Represents the time when the contracts were generated. */ struct RER_GenerationTime { var time: float; @@ -75,7 +75,7 @@ struct RER_ContractDifficultyLevel { */ struct RER_ContractGenerationData { /** - * the position of the noticeboard when the contract was accepted + * The position of the noticeboard when the contract was accepted. */ var starting_point: Vector; @@ -92,7 +92,7 @@ struct RER_ContractGenerationData { var region_name: string; /** - * the seed of the random number generator before doing any rand call for + * The seed of the random number generator before doing any rand call for * generating the contract. */ var rng_seed: int; @@ -122,14 +122,14 @@ enum RER_ContractRewardType { */ struct RER_ContractRepresentation { /** - * where the player needs to go to trigger the contract + * Where the player needs to go to trigger the contract. */ var destination_point: Vector; var destination_radius: float; /** - * what should happen once the player has reached the destination + * What should happen once the player has reached the destination. */ var event_type: RER_ContractEventType; @@ -142,8 +142,8 @@ struct RER_ContractRepresentation { var noticeboard_identifier: RER_NoticeboardIdentifier; /** - * the possible rewards the player can get from completing the contract. - * This value is a flag and can contain multiple reward types + * The possible rewards the player can get from completing the contract. + * This value is a flag and can contain multiple reward types. * * IMPORTANT: should be RER_ContractRewardType, but since it acts as a flag * the game doesn't know what to do when reloading data and so it sets 0. @@ -158,7 +158,7 @@ struct RER_ContractRepresentation { } /** - * It's a class because structs are copied in this language + * It's a class because structs are copied in this language. */ class RER_ContractLocation extends SU_ArraySorterData { var position: Vector; @@ -166,7 +166,7 @@ class RER_ContractLocation extends SU_ArraySorterData { public function init(position: Vector, distance: float): RER_ContractLocation { this.position = position; - // we use the distance as the value used during the sorting + // We use the distance as the value used during the sorting. this.value = distance; return this; @@ -174,7 +174,7 @@ class RER_ContractLocation extends SU_ArraySorterData { } /** - * Represents the reputation level for a given noticeboard + * Represents the reputation level for a given noticeboard. */ struct RER_NoticeboardReputation { var noticeboard_identifier: RER_NoticeboardIdentifier; diff --git a/src/creature_preferences.wss b/src/creature_preferences.wss index 3fef4aab..05df35db 100644 --- a/src/creature_preferences.wss +++ b/src/creature_preferences.wss @@ -43,7 +43,7 @@ class RER_CreaturePreferences { } // If the creature has its chance reduce by the external factor - // when in the biomes + // when in the biomes. public var disliked_biomes: array; public function addDislikedBiome(biome: RER_Biome): RER_CreaturePreferences { this.disliked_biomes.PushBack(biome); @@ -52,7 +52,7 @@ class RER_CreaturePreferences { } // If the creature has its chance increased by the external factor - // when in the biomes + // when in the biomes. public var liked_biomes: array; public function addLikedBiome(biome: RER_Biome): RER_CreaturePreferences { this.liked_biomes.PushBack(biome); @@ -69,8 +69,7 @@ class RER_CreaturePreferences { return this; } - //#region persistent values - // value is not reset + // #region persistent values value is not reset public var is_night: bool; public function setIsNight(value: bool): RER_CreaturePreferences { this.is_night = value; @@ -93,7 +92,7 @@ class RER_CreaturePreferences { return this; } - // value is not reset + // Value is not reset. public var external_factors_coefficient: float; public function setExternalFactorsCoefficient(value: float): RER_CreaturePreferences { this.external_factors_coefficient = value; @@ -101,7 +100,7 @@ class RER_CreaturePreferences { return this; } - // value is not reset + // Value is not reset. public var is_near_water: bool; public function setIsNearWater(value: bool): RER_CreaturePreferences { this.is_near_water = value; @@ -109,7 +108,7 @@ class RER_CreaturePreferences { return this; } - // value is not reset + // Value is not reset. public var is_in_forest: bool; public function setIsInForest(value: bool): RER_CreaturePreferences { this.is_in_forest = value; @@ -117,7 +116,7 @@ class RER_CreaturePreferences { return this; } - // value is not reset + // Value is not reset. public var is_in_swamp: bool; public function setIsInSwamp(value: bool): RER_CreaturePreferences { this.is_in_swamp = value; @@ -138,7 +137,7 @@ class RER_CreaturePreferences { return this; } - //#endregion persistent values + // #endregion persistent values public function getChances(): int { var i: int; @@ -179,7 +178,7 @@ class RER_CreaturePreferences { } } - // no allowed biome, return 0 directly. + // No allowed biome, return 0 directly. if (this.only_biomes.Size() > 0 && !can_spawn) { NLOG("creature removed from only biome, for " + this.creature_type); @@ -194,7 +193,7 @@ class RER_CreaturePreferences { } - // being in a disliked biome reduces the spawn chances + // Being in a disliked biome reduces the spawn chances. is_in_disliked_biome = false; for (i = 0; i < this.disliked_biomes.Size(); i += 1) { if (this.disliked_biomes[i] == BiomeSwamp && this.is_in_swamp) { @@ -214,7 +213,7 @@ class RER_CreaturePreferences { spawn_chances = this.applyCoefficientToCreatureDivide(spawn_chances); } - // being in a liked biome increases the spawn chances + // Being in a liked biome increases the spawn chances. is_in_liked_biome = false; for (i = 0; i < this.liked_biomes.Size(); i += 1) { if (this.liked_biomes[i] == BiomeSwamp && this.is_in_swamp) { diff --git a/src/ecosystem/ecosystem_analyser.wss b/src/ecosystem/ecosystem_analyser.wss index 58ef6a7d..e3e587c0 100644 --- a/src/ecosystem/ecosystem_analyser.wss +++ b/src/ecosystem/ecosystem_analyser.wss @@ -1,6 +1,6 @@ -// an empty statemachine only to use latent functions when the player presses the -// input to analyze the surrounding areas +// An empty statemachine only to use latent functions when the player presses the +// input to analyze the surrounding areas. statemachine class RER_EcosystemAnalyzer extends CEntity { var ecosystem_manager: RER_EcosystemManager; @@ -20,7 +20,7 @@ statemachine class RER_EcosystemAnalyzer extends CEntity { state Waiting in RER_EcosystemAnalyzer {} -// this state creates a pop-up that displays more information about the surrounding +// This state creates a pop-up that displays more information about the surrounding // ecosystems. It also shows the closests two bounties and gives information about // them too, such as the distance and the creature from the bounty. state Analysing in RER_EcosystemAnalyzer { @@ -86,13 +86,13 @@ state Analysing in RER_EcosystemAnalyzer { parent.ecosystem_manager.getCurrentEcosystemAreas() ); - // first we get the total + // First we get the total. for (i = 0; i < CreatureMAX; i += 1) { if (modifiers[i] > 0) { positive_total += modifiers[i]; } else { - // we want the total to also be positive + // We want the total to also be positive. negative_total += modifiers[i]; } @@ -101,7 +101,7 @@ state Analysing in RER_EcosystemAnalyzer { negative_total = AbsF(negative_total); - // then for all creature with modifiers + // Then for all creatures with modifiers. for (i = 0; i < CreatureMAX; i += 1) { if (modifiers[i] != 0) { if (modifiers[i] > 0) { @@ -113,9 +113,8 @@ state Analysing in RER_EcosystemAnalyzer { NLOG("getSurroundingCreaturesPercentages - percent for " + (i as CreatureType) + " - " + percent); - // only creatures whose percentage is above 5 - // if (percent > 0.05 || percent < -0.05) { - output.PushBack(newSurroundingCreaturePercentage(i,percent)); + // Only creatures whose percentage is above 5. + // if (percent > 0.05 || percent < -0.05) {output.PushBack(newSurroundingCreaturePercentage(i,percent)); // } } } @@ -194,7 +193,7 @@ state Analysing in RER_EcosystemAnalyzer { message += "

" + this.getEcosystemAdvice(picked_creature.type); } - // first the positive percentages + // First the positive percentages. // for (i = 0; i < creatures.Size(); i += 1) { // if (i > 0) { // message += ", "; @@ -227,12 +226,12 @@ state Analysing in RER_EcosystemAnalyzer { var sorted_size: int; var i, j: int; - // first we fill the array with the percentages + // First we fill the array with the percentages. for (i = 0; i < percentages.Size(); i += 1) { sorted_percentages.PushBack(percentages[i].percentage); } - // then we sort them + // Then we sort them. ArraySortFloats(sorted_percentages); for (i = 0; i < percentages.Size(); i += 1) { @@ -268,20 +267,20 @@ state Analysing in RER_EcosystemAnalyzer { main_creature_type ) + " lives here due to the abundance of "; - // first we list the creatures who helped the community form in the area + // First we list the creatures who helped the community form in the area. creatures = parent.ecosystem_manager.getCommunityReasonsToExist(main_creature_type); for (i = 0; i < creatures.Size(); i += 1) { - // we stop after three creatures + // We stop after three creatures. if (i == 3) { advice += "."; break; } - // if it's the last creature in the list we add "and" + // If it's the last creature in the list we add "and". if (i == creatures.Size() - 1 || i == 2) { advice += ", and "; } - // we add a quote for the second and third creature + // We add a quote for the second and third creature. else if (i > 0) { advice += ", "; } @@ -292,20 +291,20 @@ state Analysing in RER_EcosystemAnalyzer { ); } - // now we explain what we can find because of the wolves + // Now we explain what we can find because of the wolves. advice += " As a result, other creatures such as "; creatures = parent.ecosystem_manager.getCommunityGoodInfluences(main_creature_type); for (i = 0; i < creatures.Size(); i += 1) { - // we stop after three creatures + // We stop after three creatures. if (i == 3) { break; } - // if it's the last creature in the list we add "and" + // If it's the last creature in the list we add "and". if (i == creatures.Size() - 1 || i == 2) { advice += ", and "; } - // we add a quote for the second and third creature + // We add a quote for the second and third creature. else if (i > 0) { advice += ", "; } @@ -318,7 +317,7 @@ state Analysing in RER_EcosystemAnalyzer { advice += " may roam the area."; - // now we explain what would happen if the player killed wolves + // Now we explain what would happen if the player killed wolves. creatures = parent.ecosystem_manager.getCommunityBadInfluences(main_creature_type); if (creatures.Size() > 0) { @@ -332,12 +331,12 @@ state Analysing in RER_EcosystemAnalyzer { creatures = parent.ecosystem_manager.getCommunityBadInfluences(main_creature_type); for (i = 0; i < creatures.Size(); i += 1) { - // we stop after three creatures + // We stop after three creatures. if (i == 3) { break; } - // if it's the last creature in the list we add "and" + // If it's the last creature in the list we add "and". if (i == creatures.Size() - 1 || i == 2) { if (creatures.Size() > 2) { advice += ","; @@ -345,7 +344,7 @@ state Analysing in RER_EcosystemAnalyzer { advice += " and "; } - // we add a quote for the second and third creature + // We add a quote for the second and third creature. else if (i > 0) { advice += ", "; } diff --git a/src/ecosystem/ecosystem_manager.wss b/src/ecosystem/ecosystem_manager.wss index 65ebc550..8938148d 100644 --- a/src/ecosystem/ecosystem_manager.wss +++ b/src/ecosystem/ecosystem_manager.wss @@ -1,5 +1,5 @@ -// this manager class doesn't do much actually, it's more of a namespace for functions +// This manager class doesn't do much actually, it's more of a namespace for functions // about the ecosystem feature. class RER_EcosystemManager { var master: CRandomEncounters; @@ -16,11 +16,11 @@ class RER_EcosystemManager { this.ecosystem_modifier.init(this); } - // returns the EcosystemAreas the player is currently in. - // EcosystemAreas can overlap and so it returns an array + // Returns the EcosystemAreas the player is currently in. + // EcosystemAreas can overlap and so it returns an array. // - // NOTE: it returns the indices of the EcosystemAreas because they're structs - // and returning a struct makes a copy of it and not a reference. Which means + // NOTE: It returns the indices of the EcosystemAreas because they're structs. + // Returning a struct makes a copy of it and not a reference. Which means // if you edit the returned struct the original isn't and you'd need to find it // with its index so it's better to just return an index. public function getCurrentEcosystemAreas(): array { @@ -39,7 +39,7 @@ class RER_EcosystemManager { for (i = 0; i < this.master.storages.ecosystem.ecosystem_areas.Size(); i += 1) { current_area = this.master.storages.ecosystem.ecosystem_areas[i]; - // check if the player in is the radius + // Check if the player in is the radius. if (VecDistanceSquared(player_position, current_area.position) < current_area.radius * current_area.radius) { output.PushBack(i); } @@ -58,12 +58,12 @@ class RER_EcosystemManager { var current_impact: EcosystemCreatureImpact; var i, j, k: int; - // first we fill the array with 0 for each creature type + // First we fill the array with 0 for each creature type. for (i = 0; i < CreatureMAX; i += 1) { output.PushBack(0); } - // now for each area + // Now for each area. for (i = 0; i < areas.Size(); i += 1) { current_index = areas[i]; current_area = this.master.storages.ecosystem.ecosystem_areas[current_index]; @@ -71,26 +71,26 @@ class RER_EcosystemManager { for (j = 0; j < CreatureMAX; j += 1) { current_power = current_area.impacts_power_by_creature_type[j]; - // when power is at 0 we can skip it as it won't change anything + // When power is at 0 we can skip it as it won't change anything. if (current_power == 0) { continue; } NLOG("current area, creature power = " + (j as CreatureType) + " - " + current_power); - // note that here, J is also an int that can be used as a CreatureType + // Note that here, J is also an int that can be used as a CreatureType. current_impact = this.master.bestiary.entries[j].ecosystem_impact; - // now we loop through each influence and add them to the output - // the influence is multiplied by the power of the current CreatureType + // Now we loop through each influence and add them to the output. + // The influence is multiplied by the power of the current CreatureType. for (k = 0; k < current_impact.influences.Size(); k += 1) { output[k] += current_power * current_impact.influences[k]; } } } - // here we now have a list of the influenced spawn rates for each CreatureType. - // the influenced spawn rate is a float value that tells by how much the creature's + // Here we now have a list of the influenced spawn rates for each CreatureType. + // The influenced spawn rate is a float value that tells by how much the creature's // spawn rate should be multiplied. It can be positive or negative. return output; } @@ -112,7 +112,7 @@ class RER_EcosystemManager { NLOG("udpateCountersWithCreatureModifiers, before = " + counters[i]); NLOG("udpateCountersWithCreatureModifiers, creature = " + (i as CreatureType) + " modifier = " + modifiers[i]); - // here, it's an added value `+=` and not a `=` so if the modifiers is at + // Here, it's an added value `+=` and not a `=` so if the modifiers is at // 0 it won't change the value rather than setting it at 0. // See modifiers as an % increase/decrease. counters[i] += ((counters[i] as float) * modifiers[i] * this.master.settings.ecosystem_community_power_effect) as int; @@ -121,7 +121,7 @@ class RER_EcosystemManager { } } - // this function fetches the current ecosystem areas the player is in, then + // This function fetches the current ecosystem areas the player is in, then // updates the power for the supplied creature by additioning the supplied // `power_change` value to the current `power` value of the creature in the // current areas. @@ -135,7 +135,7 @@ class RER_EcosystemManager { // No matter the count of EcosystemAreas around the player it updates the power // value by calculating the % distance from the center of the area to its extremity. // - // NOTE: the function saves the ecosystem storage after the operation. + // NOTE: The function saves the ecosystem storage after the operation. public function updatePowerForCreatureInCurrentEcosystemAreas(creature: CreatureType, power_change: float, position: Vector) { var ecosystem_areas: array; var current_ecosystem_area: EcosystemArea; @@ -154,7 +154,7 @@ class RER_EcosystemManager { NLOG("no ecosystem area found, creating one"); current_ecosystem_area = getNewEcosystemArea( position, - // this is the default radius, it uses the distance settings + // This is the default radius, it uses the distance settings. this.master.settings.minimum_spawn_distance + this.master.settings.spawn_diameter ); @@ -171,16 +171,16 @@ class RER_EcosystemManager { current_index = ecosystem_areas[i]; current_ecosystem_area = this.master.storages.ecosystem.ecosystem_areas[current_index]; - // at the moment it's just the raw squared distance + // At the moment it's just the raw squared distance. distance_from_center = VecDistanceSquared( current_ecosystem_area.position, position ); - // now it's a percentage value going from 0 to 1 + // Now it's a percentage value going from 0 to 1. distance_from_center = distance_from_center / (current_ecosystem_area.radius * current_ecosystem_area.radius); - // minimum power change is 20%, + // Minimum power change is 20%. distance_from_center = MinF(distance_from_center, 0.2); NLOG("ecosystem power change for " + creature + " distance from center = " + distance_from_center); @@ -193,16 +193,16 @@ class RER_EcosystemManager { .impacts_power_by_creature_type[creature] += power_change * (1 - distance_from_center) - // this is to make changes more impactful on minorities and large communities + // This is to make changes more impactful on minorities and large communities // the power change is multiplied by the power of the community. * (1 + AbsF(this.master .storages .ecosystem .ecosystem_areas[current_index] - // 2.5% for every power - // Let's imagine a case where 5 drowners spawn. 5 drowners mean +5 power - // the next time drowners spawn instead of adding +5 it will be +6.5 or something + // 2.5% for every power. + // Let's imagine a case where 5 drowners spawn. 5 drowners mean +5 power. + // The next time drowners spawn instead of adding +5 it will be +6.5 or something. .impacts_power_by_creature_type[creature] * 0.025) ); } @@ -210,14 +210,14 @@ class RER_EcosystemManager { this.ecosystem_modifier .executePowerSpreadAndNaturalDeath(ecosystem_areas); - // we now save the storage to store the power change. + // We now save the storage to store the power change. this.master .storages .ecosystem .save(); } - // returns a new empty ecosystem area with all default values initiliased + // Returns a new empty ecosystem area with all default values initiliased. public function getNewEcosystemArea(position: Vector, radius: float): EcosystemArea { var area: EcosystemArea; var i: int; @@ -232,7 +232,7 @@ class RER_EcosystemManager { return area; } - // returns which other creatures influenced the surrounding ecosystem and helped + // Returns which other creatures influenced the surrounding ecosystem and helped // the community with the supplied type form. // public function getCommunityReasonsToExist(creature_type: CreatureType): array { @@ -243,9 +243,9 @@ class RER_EcosystemManager { influences = RER_ConstantInfluences(); - // we search for all creature who are either friend_with, low_indirect_influence + // We search for all creature who are either friend_with, low_indirect_influence // or high_indirect_influence towards wolves. - // we do it in three steps to create a sorted array + // We do it in three steps to create a sorted array. for (i = 0; i < CreatureMAX; i += 1) { current_bestiary_entry = this.master.bestiary.entries[i]; @@ -273,7 +273,7 @@ class RER_EcosystemManager { return output; } - // returns which other creatures influenced the surrounding ecosystem and stopped + // Returns which other creatures influenced the surrounding ecosystem and stopped // the community with the supplied type from forming. // public function getCommunityReasonsToNotExist(creature_type: CreatureType): array { @@ -284,9 +284,9 @@ class RER_EcosystemManager { influences = RER_ConstantInfluences(); - // we search for all creature who are either kills_them, low_bad_influence + // We search for all creature who are either kills_them, low_bad_influence // or high_bad_influence towards wolves. - // we do it in three steps to create a sorted array + // We do it in three steps to create a sorted array. for (i = 0; i < CreatureMAX; i += 1) { current_bestiary_entry = this.master.bestiary.entries[i]; @@ -314,7 +314,7 @@ class RER_EcosystemManager { return output; } - // returns communities who are influenced in a good way by the supplied creature type + // Returns communities who are influenced in a good way by the supplied creature type. public function getCommunityGoodInfluences(creature_type: CreatureType): array { var influences: RER_ConstantInfluences; var output: array; @@ -323,9 +323,9 @@ class RER_EcosystemManager { influences = RER_ConstantInfluences(); - // we search for all creatures whose wolves are either + // We search for all creatures whose wolves are either // friend_with, low_indirect_influence or high_indirect_influence towards them. - // we do it in three steps to create a sorted array + // We do it in three steps to create a sorted array. for (current_type = 0; current_type < CreatureMAX; current_type += 1) { current_influence = this.master.bestiary.entries[creature_type] .ecosystem_impact @@ -359,7 +359,7 @@ class RER_EcosystemManager { return output; } - // returns communities who are influenced in a bad way by the supplied creature type + // Returns communities who are influenced in a bad way by the supplied creature type. public function getCommunityBadInfluences(creature_type: CreatureType): array { var influences: RER_ConstantInfluences; var output: array; @@ -368,9 +368,9 @@ class RER_EcosystemManager { influences = RER_ConstantInfluences(); - // we search for all creatures whose wolves are either + // We search for all creatures whose wolves are either // kills_them, low_bad_influence or high_bad_influence towards them. - // we do it in three steps to create a sorted array + // We do it in three steps to create a sorted array. for (current_type = 0; current_type < CreatureMAX; current_type += 1) { current_influence = this.master.bestiary.entries[creature_type] .ecosystem_impact @@ -404,7 +404,7 @@ class RER_EcosystemManager { return output; } - // returns the frequency multiplier based on the state of the supplied ecosystems. + // Returns the frequency multiplier based on the state of the supplied ecosystems. // A negative power increases the multiplier while a negative power decreases it. // That means killing monsters will increase the speed at which new monsters are // spawned while letting them leave will decrease the speed. @@ -427,7 +427,7 @@ class RER_EcosystemManager { return 1; } - // for each area + // For each area. for (i = 0; i < number_of_areas; i += 1) { current_index = areas[i]; current_area = this.master.storages.ecosystem.ecosystem_areas[current_index]; @@ -435,14 +435,14 @@ class RER_EcosystemManager { for (j = 0; j < CreatureMAX; j += 1) { current_power = current_area.impacts_power_by_creature_type[j]; - // when power is at 0 we can skip it as it won't change anything + // When power is at 0 we can skip it as it won't change anything. if (current_power == 0) { continue; } NLOG("current_power [" + (j as CreatureType) + "] =" + current_power); - // note that here, J is also an int that can be used as a CreatureType + // Note that here, J is also an int that can be used as a CreatureType. multiplier += current_power * this.master .bestiary .entries[j] @@ -450,7 +450,7 @@ class RER_EcosystemManager { } } - // and finally we divide the multiplier by the amount of ecosystem areas + // And finally we divide the multiplier by the amount of ecosystem areas // to create a mean value. // // At this point the multiplier is the raw power value, that means it's @@ -458,7 +458,7 @@ class RER_EcosystemManager { // divider value. // +100 means it's a 100% increase in speed (a 50% decrease in time so) // -100 means it's the opposite of a 100% increase, which is x2 and so here - // it is a division by 2 or 50% in speed (or a 100% increase in time) + // It is a division by 2 or 50% in speed (or a 100% increase in time). multiplier /= number_of_areas; multiplier *= StringToFloat( theGame.GetInGameConfigWrapper() @@ -471,24 +471,24 @@ class RER_EcosystemManager { return 1; } else if (multiplier < 0) { - // -50 gives a 1.5 multiplier in speed - // -100 gives a 2 multiplier - // -200 gives a 3 multiplier + // -50 gives a 1.5 multiplier in speed. + // -100 gives a 2 multiplier. + // -200 gives a 3 multiplier. return multiplier - * -0.01 // bring back to the range of a multiplier, so 100% is now 1 - + 1; // because it's a multiplier we want it to be higher than 1 - // otherwise it would decrease the delay instead of increasing it. + * -0.01 // Bring back to the range of a multiplier, so 100% is now 1. + + 1; // Because it's a multiplier we want it to be higher than 1. + // Otherwise it would decrease the delay instead of increasing it. } else { - // +50 gives a 0.66 multiplier in speed - // +100 gives a 0.5 multiplier - // +200 gives a 0.33 + // +50 gives a 0.66 multiplier in speed. + // +100 gives a 0.5 multiplier. + // +200 gives a 0.33. return 1 / ( (multiplier) - * 0.01 // same reason as above - + 1 // because at -100 we want it to be the same as - // a division by 2, at -50 it should be a division by 1.5 + * 0.01 // Same reason as above. + + 1 // Because at -100 we want it to be the same as + // a division by 2, at -50 it should be a division by 1.5. ); } @@ -501,7 +501,7 @@ class RER_EcosystemManager { this.master.storages.ecosystem.ecosystem_areas.Clear(); - // we now save the storage to store the power change. + // We now save the storage to store the power change. this.master .storages .ecosystem diff --git a/src/ecosystem/ecosystem_modifier.wss b/src/ecosystem/ecosystem_modifier.wss index d3b1e624..a70dea3f 100644 --- a/src/ecosystem/ecosystem_modifier.wss +++ b/src/ecosystem/ecosystem_modifier.wss @@ -28,9 +28,8 @@ state Waiting in RER_EcosystemModifier { } // This state decreases the power of all communities by a small amount. -// this process is essential to the ecosystem or huge communities will form. -// by default it will remove something like 0.5% of the community's current power -// which means that +// This process is essential to the ecosystem or huge communities will form. +// By default it will remove something like 0.5% of the community's current power. state PowerSpreadAndNaturalDeath in RER_EcosystemModifier { event OnEnterState(previous_state_name: name) { super.OnEnterState(previous_state_name); @@ -46,7 +45,7 @@ state PowerSpreadAndNaturalDeath in RER_EcosystemModifier { parent.GotoState('Waiting'); } - // a power change should change the community radius by a bit. + // Which means that a power change should change the community radius by a bit. latent function powerSpread() { var spread_settings: float; var default_radius: float; @@ -80,7 +79,7 @@ state PowerSpreadAndNaturalDeath in RER_EcosystemModifier { .ecosystem_areas[current_index] .radius = default_radius + current_power * spread_settings; } - // when the power is negative it still affects the spread but by half the + // When the power is negative it still affects the spread but by half the // default amount. else { parent.ecosystem_manager diff --git a/src/ecosystem/ecosystem_types.wss b/src/ecosystem/ecosystem_types.wss index 9ddabdff..1b361766 100644 --- a/src/ecosystem/ecosystem_types.wss +++ b/src/ecosystem/ecosystem_types.wss @@ -1,26 +1,26 @@ -// this struct is there to store the impact the specified creature has on other +// This struct is there to store the impact the specified creature has on other // creatures, be it positively or negatively. struct EcosystemCreatureImpact { - // this array stores how much the CreatureType's (the index) spawn rate should + // This array stores how much the CreatureType's (the index) spawn rate should // be influenced. The `float` value can be positive or even negative and will // affect the spawn rate positively or negatively. var influences: array; } -// defines the ecosystem is the specified area and the different impacts living +// Defines the ecosystems specified area and the different impacts living // creatures have over other creatures. struct EcosystemArea { - // the radius is stored as a property because the ecosystem could grow/disappear + // The radius is stored as a property because the ecosystem could grow/disappear // over time. var radius: float; var position: Vector; - // it's an array where for each CreatureType (that is the index) we specify + // It's an array where for each CreatureType (that is the index) we specify // the power of CreatureImpact. - // by default it will be 0, and whenever a creature is killed it will be decreased - // by 1 and each time a new one appear it will be increased by 1. + // By default it will be 0, and whenever a creature is killed it will be decreased. + // By 1 and each time a new one appear it will be increased by 1. var impacts_power_by_creature_type: array; } diff --git a/src/entities/gryphon/gryphon_hunt.wss b/src/entities/gryphon/gryphon_hunt.wss index 00f19ee6..831ec438 100644 --- a/src/entities/gryphon/gryphon_hunt.wss +++ b/src/entities/gryphon/gryphon_hunt.wss @@ -2,8 +2,8 @@ statemachine class RandomEncountersReworkedGryphonHuntEntity extends CEntity { public var bait_position: Vector; - // ticks variable used in some states. - // often used to run a timer for set period. + // Ticks variable used in some states. + // Often used to run a timer for set period. public var ticks: int; public var this_entity: CEntity; @@ -64,7 +64,7 @@ statemachine class RandomEncountersReworkedGryphonHuntEntity extends CEntity { newnpc.AddTag('RandomEncountersReworked_Entity'); } - // ENTRY-POINT for the gryphon fight + // ENTRY-POINT for the gryphon fight. public function startEncounter(blood_resources: array) { NLOG("RandomEncountersReworkedGryphonHuntEntity encounter started"); diff --git a/src/entities/gryphon/states/fighting-player.wss b/src/entities/gryphon/states/fighting-player.wss index 819215ea..c333f908 100644 --- a/src/entities/gryphon/states/fighting-player.wss +++ b/src/entities/gryphon/states/fighting-player.wss @@ -1,8 +1,8 @@ // When the gryphon is fighting with the player. // The gryphon is fighting with you until a health threshold. Where he -// will start fleeing -// MULTIPLE state. Can be used multiple times in the encounter +// will start fleeing. +// MULTIPLE state. Can be used multiple times in the encounter. state GryphonFightingPlayer in RandomEncountersReworkedGryphonHuntEntity { var can_flee_fight: bool; var starting_health: float; diff --git a/src/entities/gryphon/states/fleeing-player.wss b/src/entities/gryphon/states/fleeing-player.wss index b8e29f55..edfbf693 100644 --- a/src/entities/gryphon/states/fleeing-player.wss +++ b/src/entities/gryphon/states/fleeing-player.wss @@ -3,7 +3,7 @@ // The gryphon is hurt, he's bleeding and start flying far from the // player at low speed. So the player can catch him with or without // Roach. It ends when the gryphon is exhausted and goes on the ground -// SINGLE state. Used once in the encounter (more would be annoying) +// SINGLE state. Used once in the encounter (more would be annoying). state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { var is_bleeding: bool; var bait: CEntity; @@ -13,8 +13,8 @@ state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { var distance_threshold: float; var starting_position: Vector; - // if found_landing_position is set to true, - // The gryphon will go to the landing position + // If the found_landing_position is set to true, + // the gryphon will go to the landing position. var found_landing_position: bool; var landing_position: Vector; @@ -23,7 +23,7 @@ state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { event OnEnterState(previous_state_name: name) { super.OnEnterState(previous_state_name); - // the gryphon bleeds only if a fight happened before. + // The gryphon bleeds only if a fight has happened before. if (previous_state_name == 'GryphonFightingPlayer') { this.is_bleeding = true; } @@ -79,10 +79,10 @@ state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { parent.AddTimer('GryphonFleeingPlayer_startFlying', 2, false); parent.AddTimer('GryphonFleeingPlayer_forgetPlayer', 0.05, true); - // in case something unexpected happened. - // the timer is removed if the gryphon is waiting for the player - // the gryphon will enter into the FlyingAbovePlayer state. - // meaning il will come back to the player. + // In case something unexpected happened. + // The timer is removed if the gryphon is waiting for the player. + // The gryphon will enter into the FlyingAbovePlayer state. + // Meaning it will come back to the player. parent.AddTimer('GryphonFleeingPlayer_GiveUp', 60, true); } @@ -137,17 +137,17 @@ state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { parent.this_actor.SetHealthPerc(parent.this_actor.GetHealthPercents() + 0.01); - // attempt at forcing the gryphon to fly + // Attempt at forcing the gryphon to fly. parent.this_entity.Teleport(parent.this_entity.GetWorldPosition() + Vector(0, 0, 0.1)); - // distance_threshold is already squared + // Distance_threshold is already squared. if (VecDistanceSquared(this.starting_position, parent.this_actor.GetWorldPosition()) > distance_threshold) { NLOG("Gryphon looking for ground position"); parent.RemoveTimer('GryphonFleeingPlayer_intervalDefaultFunction'); parent.AddTimer('GryphonFightingPlayer_intervalLookingForGroundPositionFunction', 1, true); - // the gryphon is coming down, set back his collisions. + // The gryphon is coming down, set back his collisions. (parent.this_actor).SetImmortalityMode(AIM_Invulnerable, AIC_Default); (parent.this_actor).EnableCharacterCollisions(true); (parent.this_actor).EnableDynamicCollisions(true); @@ -162,8 +162,8 @@ state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { bait_position = VecRingRand(1, 20) + parent.this_entity.GetWorldPosition(); bait_position.Z -= 20; - // the bait is close enough for the ground. - // we look for a safe landing position + // The bait is close enough for the ground. + // We look for a safe landing position. if (!this.found_landing_position && (bait as CActor).GetDistanceFromGround(500) <= 20) { this.landing_position = bait_position; @@ -174,7 +174,7 @@ state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { NLOG("found landing position"); this.found_landing_position = true; - // so the bait is not completely into the ground + // So the bait is not completely into the ground. this.landing_position.Z += 0.5; bait_position = this.landing_position; @@ -190,7 +190,7 @@ state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { parent.this_newnpc.ForgetActor(thePlayer); parent.this_newnpc.NoticeActor(this.bait as CActor); - // attempt at making the gryphon land gracefully + // Attempt at making the gryphon land gracefully. if (parent.this_actor.GetDistanceFromGround(500) > 5) { parent.this_entity.Teleport(parent.this_entity.GetWorldPosition() - Vector(0, 0, 0.05)); } @@ -211,7 +211,7 @@ state GryphonFleeingPlayer in RandomEncountersReworkedGryphonHuntEntity { NLOG("Gryphon landed"); parent.RemoveTimer('GryphonFightingPlayer_intervalLookingForGroundPositionFunction'); - // the gryphon found a landing spot, giving up now would not make sense. + // The gryphon found a landing spot, giving up now would not make sense. parent.RemoveTimer('GryphonFleeingPlayer_GiveUp'); this.cancelAIBehavior(); diff --git a/src/entities/gryphon/states/flying-above-player.wss b/src/entities/gryphon/states/flying-above-player.wss index 0f2b9a51..469c1e69 100644 --- a/src/entities/gryphon/states/flying-above-player.wss +++ b/src/entities/gryphon/states/flying-above-player.wss @@ -1,7 +1,7 @@ -// When the gryphon flies over the player, then comes back to attack it -// Imagine it flying at high-speed above you, he sees you and screems -// then he does a complete turn and starts attacking you +// When the gryphon flies over the player, then comes back to attack it. +// Imagine it flying at high-speed above you, it sees you and screams. +// It does a complete turn and starts attacking you. // ENTRY-POINT state. state FlyingAbovePlayer in RandomEncountersReworkedGryphonHuntEntity { var bait: CEntity; @@ -64,7 +64,7 @@ state FlyingAbovePlayer in RandomEncountersReworkedGryphonHuntEntity { thePlayer.GetWorldPosition() ) + 100; - // The two seconds here is important, the gryphon doesn't fly without it + // The two seconds here is important, the gryphon doesn't fly without it. parent.AddTimer('FlyingAbovePlayer_intervalDefaultFunction', 2, true); } @@ -89,7 +89,7 @@ state FlyingAbovePlayer in RandomEncountersReworkedGryphonHuntEntity { parent.this_newnpc.NoticeActor(this.bait as CActor); - // distance_threshold is already squared + // Distance_threshold is already squared. if (VecDistanceSquared(thePlayer.GetWorldPosition(), parent.this_actor.GetWorldPosition()) > distance_threshold) { parent.RemoveTimer('FlyingAbovePlayer_intervalDefaultFunction'); parent.AddTimer('FlyingAbovePlayer_intervalComingToPlayer', 0.5, true); diff --git a/src/entities/gryphon/states/waiting-for-player.wss b/src/entities/gryphon/states/waiting-for-player.wss index 7a16acc2..39973bfd 100644 --- a/src/entities/gryphon/states/waiting-for-player.wss +++ b/src/entities/gryphon/states/waiting-for-player.wss @@ -1,5 +1,5 @@ -// When the gryphon is on the ground waiting for the player to attack it +// When the gryphon is on the ground waiting for the player to attack it. // The gryphon is feeding on a dead beast on the ground. You have to find // it with tracks and blood spills on the ground. // ENTRY-POINT state. @@ -65,8 +65,8 @@ state WaitingForPlayer in RandomEncountersReworkedGryphonHuntEntity { parent.this_newnpc.ForgetAllActors(); if (parent.this_actor.IsInCombat() && parent.this_actor.GetTarget() == thePlayer - // the distance here is squared for performances reasons, so 400 = 20*20 - // the squareroot is a costly operation. So it's better to multiply the other + // The distance here is squared for performances reasons, so 400 = 20*20. + // The squareroot is a costly operation. So it's better to multiply the other // side and compare it to the squared value (distance). || VecDistanceSquared(thePlayer.GetWorldPosition(), parent.this_actor.GetWorldPosition()) < 400 || parent.this_actor.GetDistanceFromGround(1000) > 3 @@ -118,7 +118,7 @@ state WaitingForPlayer in RandomEncountersReworkedGryphonHuntEntity { parent.RemoveTimer('WaitingForPlayer_intervalDefaultFunction'); parent.RemoveTimer('WaitingForPlayer_drawLineOfBloodToGryphon'); - // copied from regular RE, not sure about it. + // Copied from regular RE, not sure about it. for(i=0; i<100; i+=1) { parent.this_actor.CancelAIBehavior(i); } diff --git a/src/entities/gryphon/tasks/task-fly-to.wss b/src/entities/gryphon/tasks/task-fly-to.wss index 90effa2f..c985abd3 100644 --- a/src/entities/gryphon/tasks/task-fly-to.wss +++ b/src/entities/gryphon/tasks/task-fly-to.wss @@ -1,7 +1,7 @@ // It works but it's completely bugged. I don't understand how to use the functions // to controls the gryphon animations. Nothing fully works :( -// Not used anywhere +// Not used anywhere. latent function flyTo(npc: CNewNPC, destination_point: Vector, destination_radius: float, optional height_from_ground: float) : EBTNodeStatus { var traceStartPos, traceEndPos, traceEffect, normal, groundLevel : Vector; var should_land: bool; @@ -19,7 +19,7 @@ latent function flyTo(npc: CNewNPC, destination_point: Vector, destination_radiu npcPos = npc.GetWorldPosition(); - // Z of destination_point can be under terrain so it must be checked + // Z of destination_point can be under terrain so it must be checked. traceStartPos = destination_point; traceEndPos = destination_point; traceStartPos.Z += 200; @@ -101,7 +101,7 @@ function CalculateBehaviorVariables( npc: CNewNPC, dest : Vector, full_distance: turnSpeedScale = 2.75; - // Calculate Pitch + // Calculate Pitch. flyPitch = Rad2Deg( AcosF( VecDot( VecNormalize( npcToDestVector ), VecNormalize( npcToDestVector2 ) ) ) ); if ( npcPos.X == dest.X && npcPos.Y == dest.Y ) { @@ -125,7 +125,7 @@ function CalculateBehaviorVariables( npc: CNewNPC, dest : Vector, full_distance: flyPitch *= -1; } - // Calculate Yaw + // Calculate Yaw. flyYaw = AngleDistance( VecHeading( npcToDestVector ), VecHeading( npcHeadingVec ) ) ; flyYaw = flyYaw / 180; flyYaw = flyYaw * PowF( turnSpeedScale , AbsF( flyYaw ) ); @@ -139,22 +139,22 @@ function CalculateBehaviorVariables( npc: CNewNPC, dest : Vector, full_distance: flyYaw = -1.f; } - // If there is an obstacle in the direction we're trying to turn, go the other way around - // If going forward + // If there is an obstacle in the direction we're trying to turn, go the other way around. + // If going forward. if( flyYaw > -0.5 && flyYaw < 0.5 && theGame.GetWorld().StaticTrace( npcPos, npcPos + npc.GetWorldForward(), collision, normal ) ) { //npc.GetVisualDebug().AddText( 'VolumetricObstacleText', "Volumetric obstacle Forward", collision + Vector(0,0,0.4), true, 0, Color( 255, 255, 0 ), true, 1 ); //npc.GetVisualDebug().AddArrow('ToVolumetricObstacle', npc.GetWorldPosition(), collision, 0.8, 0.5, 0.6, true, Color( 255, 255, 0 ), true, 1 ); flyYaw = -1; } - // If turning right + // If turning right. if( flyYaw < -0.5 && theGame.GetWorld().StaticTrace( npcPos, npcPos + npc.GetWorldRight(), collision, normal ) ) { flyYaw = 1; //npc.GetVisualDebug().AddText( 'VolumetricObstacleText', "Volumetric obstacle Right", collision + Vector(0,0,0.4), true, 0, Color( 255, 255, 0 ), true, 1 ); //npc.GetVisualDebug().AddArrow('ToVolumetricObstacle', npc.GetWorldPosition(), collision, 0.8, 0.5, 0.6, true, Color( 255, 255, 0 ), true, 1 ); } - // If turning left + // If turning left. else if ( flyYaw > 0.5 && theGame.GetWorld().StaticTrace( npcPos, npcPos + ( npc.GetWorldRight() * -1 ) , collision, normal ) ) { flyYaw = -1; diff --git a/src/entities/hunt/hunt_entity.wss b/src/entities/hunt/hunt_entity.wss index 5e94d9cf..314620a4 100644 --- a/src/entities/hunt/hunt_entity.wss +++ b/src/entities/hunt/hunt_entity.wss @@ -49,9 +49,9 @@ statemachine class RandomEncountersReworkedHuntEntity extends CEntity { this.Destroy(); } - /////////////////////////////////////////////////// - // below are helper functions used in the states // - /////////////////////////////////////////////////// + //////////////////////////////////////////////////// + // Below are helper functions used in the states. // + //////////////////////////////////////////////////// public function killEntity(entity: CEntity): bool { (entity as CActor).Kill('RandomEncountersReworked_Entity', true); diff --git a/src/entities/hunt/states/combat.wss b/src/entities/hunt/states/combat.wss index 2fd1f03a..e2d5ac93 100644 --- a/src/entities/hunt/states/combat.wss +++ b/src/entities/hunt/states/combat.wss @@ -9,9 +9,9 @@ state Combat in RandomEncountersReworkedHuntEntity { } entry function Combat_Main() { - // to know if it's an ambush - // if true, will play a oneliner and a camera scene - // the camera scene plays only if player is not busy and doesn't have camera scenes disabled from menu + // To know if it's an ambush. + // If true, will play a oneliner and a camera scene. + // The camera scene plays only if player is not busy and doesn't have camera scenes disabled from menu. if (parent.bait_moves_towards_player) { RER_tutorialTryShowAmbushed(); this.startAmbushCutscene(); @@ -50,11 +50,11 @@ state Combat in RandomEncountersReworkedHuntEntity { var camera: RER_StaticCamera; var look_at_position: Vector; - // where the camera is placed + // Where the camera is placed. scene.position_type = RER_CameraPositionType_ABSOLUTE; scene.position = theCamera.GetCameraPosition() + Vector(0, 0, 1); - // where the camera is looking + // Where the camera is looking. scene.look_at_target_type = RER_CameraTargetType_STATIC; look_at_position = parent.getRandomEntity().GetWorldPosition(); scene.look_at_target_static = look_at_position + Vector(0, 0, 0); @@ -97,8 +97,8 @@ state Combat in RandomEncountersReworkedHuntEntity { } latent function waitUntilPlayerFinishesCombat() { - // sleep a bit before entering the loop, to avoid a really fast loop if the - // player runs away from the monster + // Sleep a bit before entering the loop, to avoid a really fast loop if the + // player runs away from the monster. Sleep(3); while (SUH_waitUntilPlayerFinishesCombatStep(parent.entities)) { diff --git a/src/entities/hunt/states/loading.wss b/src/entities/hunt/states/loading.wss index 8c9b9b6a..c3994976 100644 --- a/src/entities/hunt/states/loading.wss +++ b/src/entities/hunt/states/loading.wss @@ -37,7 +37,7 @@ state Loading in RandomEncountersReworkedHuntEntity { tracks_templates ); - // to calculate the initial position we go from the + // To calculate the initial position we go from the // monsters position and use the inverse tracks_heading to // cross ThePlayer's path. parent.trail_maker diff --git a/src/entities/hunt/states/wandering.wss b/src/entities/hunt/states/wandering.wss index b9e6e5b2..0a88d5bb 100644 --- a/src/entities/hunt/states/wandering.wss +++ b/src/entities/hunt/states/wandering.wss @@ -51,7 +51,7 @@ state Wandering in RandomEncountersReworkedHuntEntity { if (distance_from_player < 15 || distance_from_player < 20 && (current_entity as CActor).HasAttitudeTowards(thePlayer)) { - // leave the function, it will automatically enter in the Combat state + // Leave the function, it will automatically enter in the Combat state // and the creatures will attack the player. return; } @@ -96,7 +96,7 @@ state Wandering in RandomEncountersReworkedHuntEntity { }; } - // to keep the bait near the player at all time + // To keep the bait near the player at all time. if (parent.bait_moves_towards_player) { if (RER_moveCreaturesAwayIfPlayerIsInCutscene(parent.entities, 30)) { teleportBaitEntityOnMonsters(); @@ -132,8 +132,8 @@ state Wandering in RandomEncountersReworkedHuntEntity { ); } - // This function always teleports the bait on the monsters - // often used to pause the hunt during cutscenes or when the player is busy. + // This function always teleports the bait on the monsters. + // Often used to pause the hunt during cutscenes or when the player is busy. latent function teleportBaitEntityOnMonsters() { var new_bait_position: Vector; var new_bait_rotation: EulerAngles; diff --git a/src/entities/hunting_ground/hunting_ground_entity.wss b/src/entities/hunting_ground/hunting_ground_entity.wss index 488bb586..f4d691c1 100644 --- a/src/entities/hunting_ground/hunting_ground_entity.wss +++ b/src/entities/hunting_ground/hunting_ground_entity.wss @@ -37,7 +37,7 @@ statemachine class RandomEncountersReworkedHuntingGroundEntity extends CEntity { public var is_bounty: bool; public var bounty_group_index: int; - // Once activated as a bounty mode it will place a marker on the group and will + // Once activated as a bounty mode it will place a marker on the group. public function activateBountyMode(bounty_manager: RER_BountyManager, group_index: int) { this.bounty_manager = bounty_manager; this.is_bounty = true; @@ -58,9 +58,9 @@ statemachine class RandomEncountersReworkedHuntingGroundEntity extends CEntity { this.Destroy(); } - /////////////////////////////////////////////////// - // below are helper functions used in the states // - /////////////////////////////////////////////////// + //////////////////////////////////////////////////// + // Below are helper functions used in the states. // + //////////////////////////////////////////////////// public function killEntity(entity: CEntity): bool { (entity as CActor).Kill('RandomEncountersReworked_Entity', true); diff --git a/src/entities/hunting_ground/states/ending.wss b/src/entities/hunting_ground/states/ending.wss index 0f7af36f..be740ca6 100644 --- a/src/entities/hunting_ground/states/ending.wss +++ b/src/entities/hunting_ground/states/ending.wss @@ -16,7 +16,7 @@ state Ending in RandomEncountersReworkedHuntingGroundEntity { parent.GetWorldPosition() ); - // the distance check could cause issues if the player lures monsters outside + // The distance check could cause issues if the player lures monsters outside // the radius and kill them there. if (parent.is_bounty && distance_from_player < 150 * 150) { if (parent.bounty_group_index < 0) { diff --git a/src/entities/hunting_ground/states/wandering.wss b/src/entities/hunting_ground/states/wandering.wss index 64be6a07..e83076ea 100644 --- a/src/entities/hunting_ground/states/wandering.wss +++ b/src/entities/hunting_ground/states/wandering.wss @@ -31,7 +31,7 @@ state Wandering in RandomEncountersReworkedHuntingGroundEntity { break; } - // in case it moves + // In case it moves. parent.bait_entity.Teleport(parent.GetWorldPosition()); SUH_keepCreaturesOnPoint( @@ -48,7 +48,7 @@ state Wandering in RandomEncountersReworkedHuntingGroundEntity { thePlayer.GetWorldPosition() ); - // when in bounty mode, creatures are not subject to the kill threshold distance + // When in bounty mode, creatures are not subject to the kill threshold distance. if (!parent.is_bounty && distance_from_player > parent.entity_settings.kill_threshold_distance) { NLOG("killing entity - threshold distance reached: " + parent.entity_settings.kill_threshold_distance); @@ -59,7 +59,7 @@ state Wandering in RandomEncountersReworkedHuntingGroundEntity { if (distance_from_player < 15 || distance_from_player < 20 && (current_entity as CActor).HasAttitudeTowards(thePlayer)) { - // leave the function, it will automatically enter in the Combat state + // Leave the function, it will automatically enter in the Combat state // and the creatures will attack the player. return; } @@ -87,7 +87,7 @@ state Wandering in RandomEncountersReworkedHuntingGroundEntity { } // Checks if one of the creatures is outside the given point and its radius - // and teleports it back into the circle ifthe creature is indeed outside. + // and teleports it back into the circle if the creature is indeed outside. // The function is supposed to be called in a fast while loop to keep the // creatures on point in an efficient way. function keepCreaturesOnPoint(position: Vector, radius: float) { diff --git a/src/entities/nest/nest_entity.wss b/src/entities/nest/nest_entity.wss index 96dd38e5..5e754493 100644 --- a/src/entities/nest/nest_entity.wss +++ b/src/entities/nest/nest_entity.wss @@ -22,12 +22,12 @@ statemachine class RER_MonsterNest extends CMonsterNestEntity { default forced_species = SpeciesTypes_NONE; /** - * counts how many monsters were spawned by this nest + * Counts how many monsters were spawned by this nest. */ var monsters_spawned_count: int; /** - * defines when newly spawned monsters should no longer drop loot. + * Defines when newly spawned monsters should no longer drop loot. * The number set corresponds to the number of monsters that were spawned * before. */ @@ -35,7 +35,7 @@ statemachine class RER_MonsterNest extends CMonsterNestEntity { default disable_monsters_loot_threshold = 10; /** - * controls how many monsters the nest can spawn in total. + * Controls how many monsters the nest can spawn in total. */ var monsters_spawned_limit: int; default monsters_spawned_limit = 15; @@ -91,13 +91,13 @@ statemachine class RER_MonsterNest extends CMonsterNestEntity { this.l_enginetime = theGame.GetEngineTimeAsSeconds(); - // the player did not talk in the last 60 seconds + // The player did not talk in the last 60 seconds. if (l_enginetime > this.voicesetTime + 60.0) { this.voicesetTime = this.l_enginetime; this.voicesetPlayed = true; this.GotoState('Talking'); } - // he did, so we directly go to the spawning state + // The player did, directly go to the spawning state. else if (GetCurrentStateName() != 'Spawning') { this.GotoState('Spawning'); } diff --git a/src/enums.wss b/src/enums.wss index 23422466..b6d10620 100644 --- a/src/enums.wss +++ b/src/enums.wss @@ -17,6 +17,8 @@ enum EHumanType } enum CreatureType { + + // Small creatures below. CreatureHUMAN = 0, CreatureENDREGA = 1, CreatureGHOUL = 2, @@ -44,7 +46,7 @@ enum CreatureType { CreatureSIREN = 24, CreatureHAG = 25, - // large creatures below + // Large creatures below. // the dracolizard is used in a few places as the first large creature of the // enum. If you change it, you'll have to update it in the other places. CreatureARACHAS = 26, @@ -80,14 +82,14 @@ enum CreatureType { // It is important to keep the numbers continuous. // The `SpawnRoller` classes uses these numbers to // to fill its arrays. - // (so that i dont have to write 40 lines by hand) + // (So that I dont have to write 40 lines by hand.) CreatureMAX = 55, CreatureNONE = 56, } enum EncounterType { - // default means an ambush. + // Default means an ambush. EncounterType_DEFAULT = 0, EncounterType_HUNT = 1, diff --git a/src/exec.wss b/src/exec.wss index d85cd7ce..2b74260f 100644 --- a/src/exec.wss +++ b/src/exec.wss @@ -57,7 +57,7 @@ exec function rerloot(optional category: RER_LootCategory) { rer_entity.loot_manager.rollAndGiveItemsTo( thePlayer.GetInventory(), 1.0, - , // rng + , // RNG category ); } @@ -66,7 +66,7 @@ exec function reruninstall() { var entities: array; var i: int; - // remove all RER entities + // Remove all RER entities. theGame.GetEntitiesByTag('RandomEncountersReworked_Entity', entities); for (i = 0; i < entities.Size(); i += 1) { @@ -253,7 +253,7 @@ exec function rerabandonbounty() { NDEBUG("The bounty was removed."); } -// gpc for GetPlayerCoordinates +// GPC for GetPlayerCoordinates. exec function rergpc() { var entities: array; var rotation: EulerAngles; @@ -263,11 +263,11 @@ exec function rergpc() { FindGameplayEntitiesInRange( entities, thePlayer, - 25, // radius - 10, // max number of entities - , // tag + 25, // Radius + 10, // Max number of entities + , // Tag FLAG_Attitude_Hostile + FLAG_ExcludePlayer + FLAG_OnlyAliveActors, - thePlayer, // target + thePlayer, // Target 'CNewNPC' ); @@ -570,11 +570,11 @@ state TestCameraScenePlayer in RER_ExecRunner { var scene: RER_CameraScene; var camera: RER_StaticCamera; - // where the camera is placed + // Where the camera is placed. scene.position_type = RER_CameraPositionType_ABSOLUTE; scene.position = theCamera.GetCameraPosition() + Vector(0.3, 0, 1); - // where the camera is looking + // Where the camera is looking. scene.look_at_target_type = RER_CameraTargetType_NODE; scene.look_at_target_node = thePlayer; @@ -596,12 +596,12 @@ state TestCameraScenePlayer in RER_ExecRunner { var scene: RER_CameraScene; var camera: RER_StaticCamera; - // where the camera is placed + // Where the camera is placed. scene.position_type = RER_CameraPositionType_ABSOLUTE; // scene.position = parent.investigation_center_position + Vector(0, 0, 5); scene.position = thePlayer.GetWorldPosition() + Vector(5, 0, 5); - // where the camera is looking + // Where the camera is looking. scene.look_at_target_type = RER_CameraTargetType_STATIC; scene.look_at_target_static = thePlayer.GetWorldPosition(); diff --git a/src/group_compositions.wss b/src/group_compositions.wss index 5ad60b23..7ac26d83 100644 --- a/src/group_compositions.wss +++ b/src/group_compositions.wss @@ -1,7 +1,7 @@ // Sometimes solo creatures can be accompanied by smaller creatures, -// this is what i call a group composition. Imagine a leshen and a few wolves -// or a giant fighting humans. +// this is what I call a group composition. Imagine a leshen and a few wolves. +// Or a giant fighting humans. latent function makeGroupComposition(encounter_type: EncounterType, random_encounters_class: CRandomEncounters) { if (encounter_type == EncounterType_HUNT) { @@ -24,7 +24,7 @@ latent function makeGroupComposition(encounter_type: EncounterType, random_encou NLOG("spawning - HUNTINGGROUND"); createRandomCreatureHuntingGround(random_encounters_class, new RER_BestiaryEntryNull in random_encounters_class); - // no voiceline for this encounter type as it's supposed to be a passive + // No voiceline for this encounter type as it's supposed to be a passive // encounter you don't notice. } else { @@ -34,7 +34,7 @@ latent function makeGroupComposition(encounter_type: EncounterType, random_encou abstract class CompositionSpawner { - // When you need to force a creature type + // When you need to force a creature type. var _bestiary_entry: RER_BestiaryEntry; var _bestiary_entry_null: bool; default _bestiary_entry_null = true; @@ -46,7 +46,7 @@ abstract class CompositionSpawner { return this; } - // When you need to force a number of creatures + // When you need to force a number of creatures. var _number_of_creatures: int; default _number_of_creatures = 0; @@ -56,7 +56,7 @@ abstract class CompositionSpawner { return this; } - // When you need to force the spawn position + // When you need to force the spawn position. var spawn_position: Vector; var spawn_position_force: bool; default spawn_position_force = false; @@ -68,8 +68,7 @@ abstract class CompositionSpawner { return this; } - // When using a random position - // this will be the max radius used + // When using a random position this will be the max radius used. var _random_position_max_radius: float; default _random_position_max_radius = 200; @@ -79,8 +78,7 @@ abstract class CompositionSpawner { return this; } - // When using a random position - // this will be the min radius used + // When using a random position this will be the min radius used. var _random_positition_min_radius: float; default _random_positition_min_radius = 150; @@ -90,7 +88,7 @@ abstract class CompositionSpawner { return this; } - // when spawning multiple creature + // When spawning multiple creature. var _group_positions_density: float; default _group_positions_density = 0.01; @@ -100,7 +98,7 @@ abstract class CompositionSpawner { return this; } - // the distance at which an RER creature is killed + // The distance at which an RER creature is killed. var automatic_kill_threshold_distance: float; default automatic_kill_threshold_distance = 200; @@ -110,7 +108,7 @@ abstract class CompositionSpawner { return this; } - // should the creature drop a trophy on death + // Should the creature drop a trophy on death. var allow_trophy: bool; default allow_trophy = true; @@ -120,7 +118,7 @@ abstract class CompositionSpawner { return this; } - // should the creature trigger a loot pickup cutscene on death + // Should the creature trigger a loot pickup cutscene on death. var allow_trophy_pickup_scene: bool; default allow_trophy_pickup_scene = false; @@ -130,8 +128,8 @@ abstract class CompositionSpawner { return this; } - // tell which type of encounter the composition is from - // especially used when retrieving a random monster from the bestiary + // Tell which type of encounter the composition is from. + // Especially used when retrieving a random monster from the bestiary. var encounter_type: EncounterType; default encounter_type = EncounterType_DEFAULT; public function setEncounterType(encounter_type: EncounterType): CompositionSpawner { @@ -199,12 +197,12 @@ abstract class CompositionSpawner { return true; } - // A method to override if needed, - // such as creating a custom class and attaching it. + // A method to override if needed. + // Such as creating a custom class and attaching it. protected latent function forEachEntity(entity: CEntity) {} - // A method to override if needed, - // such as creating a custom class for handling the fight. + // A method to override if needed. + // Such as creating a custom class for handling the fight. // If it returns false the spawn is cancelled. protected latent function afterSpawningEntities(): bool { return true; diff --git a/src/helpers/fill_enemy_template_list.wss b/src/helpers/fill_enemy_template_list.wss index 45825f04..3cd606bf 100644 --- a/src/helpers/fill_enemy_template_list.wss +++ b/src/helpers/fill_enemy_template_list.wss @@ -1,6 +1,6 @@ /** - * NOTE: it makes a copy of the list + * NOTE: It makes a copy of the list. **/ latent function fillEnemyTemplateList(enemy_template_list: EnemyTemplateList, total_number_of_enemies: int, optional use_bestiary: bool): EnemyTemplateList { var template_list: EnemyTemplateList; @@ -29,8 +29,8 @@ latent function fillEnemyTemplateList(enemy_template_list: EnemyTemplateList, to if (use_bestiary) { manager = theGame.GetJournalManager(); - // we multiply the max tries number by two - // because it can be hard to find a lonely entry in a list + // We multiply the max number of tries by two + // because it can be hard to find a lonely entry in a list. max_tries *= 2; } @@ -47,8 +47,8 @@ latent function fillEnemyTemplateList(enemy_template_list: EnemyTemplateList, to continue; } - // when use_bestiary is true, we only take known bestiary entries - // ignore all unknown entries. + // When use_bestiary is true, we only take known bestiary entries. + // Ignore all unknown entries. if (use_bestiary) { can_spawn_creature = bestiaryCanSpawnEnemyTemplate(template_list.templates[selected_template_to_increment], manager); diff --git a/src/helpers/flag.wss b/src/helpers/flag.wss index ce422237..aad76531 100644 --- a/src/helpers/flag.wss +++ b/src/helpers/flag.wss @@ -1,6 +1,6 @@ /** - * Return whether or not the given value can be found in the given flag + * Return whether or not the given value can be found in the given flag. */ function RER_flagEnabled(flag: int, value: int): bool { return (flag & value) != 0; diff --git a/src/helpers/get_ground_position.wss b/src/helpers/get_ground_position.wss index 49684066..8b9969ab 100644 --- a/src/helpers/get_ground_position.wss +++ b/src/helpers/get_ground_position.wss @@ -19,7 +19,7 @@ function getGroundPosition(out input_position: Vector, optional personal_space: do { attempts -= 1; - // first search for ground based on navigation data. + // First search for ground based on navigation data. theGame .GetWorld() .NavigationComputeZ( @@ -35,7 +35,7 @@ function getGroundPosition(out input_position: Vector, optional personal_space: continue; } - // then do a static trace to find the position on ground + // Then do a static trace to find the position on ground. // ... okay i'm not sure anymore, is the static trace needed? // theGame // .GetWorld() @@ -46,7 +46,7 @@ function getGroundPosition(out input_position: Vector, optional personal_space: // collision_normal // ); - // finally, return if the position is above water level + // Finally, return if the position is above water level. if (output_position.Z < theGame.GetWorld().GetWaterLevel(output_position, true)) { continue; } diff --git a/src/helpers/get_group_positions.wss b/src/helpers/get_group_positions.wss index 293b5597..ee22aa13 100644 --- a/src/helpers/get_group_positions.wss +++ b/src/helpers/get_group_positions.wss @@ -7,7 +7,7 @@ function getGroupPositions(initial_position: Vector, count: int, density: float) var i: int; var sign: int; - //const values used in the loop + // Const values used in the loop. pos_fin.Z = initial_position.Z; s = count / density; // maintain a constant density of `density` unit per m2 r = SqrtF(s/Pi()); @@ -34,9 +34,9 @@ function getGroupPositions(initial_position: Vector, count: int, density: float) pos_fin.Y = initial_position.Y + sign * y; //final Y pos - // return false means it could not find ground position - // in this case, take the default position - // if return true, then pos_fin is updated with the correct position + // Return false means it could not find ground position. + // In this case, take the default position. + // If return true, then pos_fin is updated with the correct position. if (!getGroundPosition(pos_fin)) { pos_fin = initial_position; } diff --git a/src/helpers/get_tracks_template.wss b/src/helpers/get_tracks_template.wss index 79c56c23..bdc7c747 100644 --- a/src/helpers/get_tracks_template.wss +++ b/src/helpers/get_tracks_template.wss @@ -20,8 +20,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ track.monster_clue_type = 'RER_MonsterClueNightwraith'; - // only 1 out of 10 clouds of mist are created. - // track.trail_ratio_multiplier = 5; + // Only 1 out of 10 clouds of mist are created. + // Track.trail_ratio_multiplier = 5; return track; break; @@ -32,8 +32,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueHuman'; break; @@ -43,8 +43,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueDrowner'; break; @@ -54,8 +54,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueDrowner'; break; @@ -65,8 +65,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueRotfiend'; break; @@ -76,8 +76,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueNekker'; break; @@ -87,8 +87,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueGhoul'; break; @@ -98,8 +98,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueAlghoul'; break; @@ -109,8 +109,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueFiend'; break; @@ -120,8 +120,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueChort'; break; @@ -131,8 +131,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueWerewolf'; break; @@ -142,8 +142,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueLeshen'; break; @@ -153,8 +153,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueKatakan'; break; @@ -164,8 +164,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueEkimmara'; break; @@ -175,8 +175,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueElemental'; break; @@ -186,8 +186,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueGolem'; break; @@ -197,8 +197,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueGiant'; break; @@ -208,8 +208,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueCyclop'; break; @@ -219,8 +219,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueGryphon'; break; @@ -230,8 +230,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueWyvern'; break; @@ -241,8 +241,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueCockatrice'; break; @@ -252,8 +252,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueBasilisk'; break; @@ -263,8 +263,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueForktail'; break; @@ -274,8 +274,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueWight'; break; @@ -285,8 +285,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueSharley'; break; @@ -296,8 +296,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueHag'; break; @@ -307,8 +307,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueFoglet'; break; @@ -318,8 +318,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueTroll'; break; @@ -329,8 +329,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueBruxa'; break; @@ -340,8 +340,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueDetlaff'; break; @@ -351,8 +351,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueGarkain'; break; @@ -362,8 +362,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueFleder'; break; @@ -373,8 +373,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueGargoyle'; break; @@ -384,8 +384,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueKikimore'; break; @@ -395,8 +395,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueCentipede'; break; @@ -406,8 +406,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueBerserker'; break; @@ -417,8 +417,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueWolf'; break; @@ -428,8 +428,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueBear'; break; @@ -439,8 +439,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueBoar'; break; @@ -450,8 +450,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueBoar'; break; @@ -461,8 +461,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueBoar'; break; @@ -472,8 +472,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueWildhunt'; break; @@ -483,8 +483,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueArachas'; break; @@ -494,8 +494,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueHarpy'; break; @@ -505,8 +505,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueSiren'; break; @@ -516,8 +516,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueEndrega'; break; @@ -527,8 +527,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueEchinops'; break; @@ -538,8 +538,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClueDracolizard'; break; @@ -549,8 +549,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ true ) as CEntityTemplate; - // dynamically assigning the monster_clue_type to our own. Easier than to create - // 32 w2ent files + // Dynamically assigning the monster_clue_type to our own. Easier than to create + // 48 w2ent files. track.monster_clue_type = 'RER_MonsterClue'; break; @@ -560,8 +560,8 @@ latent function getTracksTemplateByCreatureType(create_type: CreatureType): RER_ // true // ); - // // dynamically assigning the monster_clue_type to our own. Easier than to create - // // 32 w2ent files + // // Dynamically assigning the monster_clue_type to our own. Easier than to create + // // 48 w2ent files. // track.monster_clue_type = 'RER_MonsterClueFleder'; // break; } diff --git a/src/helpers/is_player_busy.wss b/src/helpers/is_player_busy.wss index 8039f9b4..1b47a35b 100644 --- a/src/helpers/is_player_busy.wss +++ b/src/helpers/is_player_busy.wss @@ -1,5 +1,5 @@ -// return true in cases where the player is busy in a cutscene or in the boat. +// Return true in cases where the player is busy in a cutscene or in the boat. // When a spawn should be cancelled. function isPlayerBusy(): bool { return thePlayer.IsInInterior() diff --git a/src/helpers/loot_trophies_in_radius.wss b/src/helpers/loot_trophies_in_radius.wss index dc671e43..f84d87b0 100644 --- a/src/helpers/loot_trophies_in_radius.wss +++ b/src/helpers/loot_trophies_in_radius.wss @@ -16,7 +16,7 @@ function lootTrophiesInRadius(): bool { NLOG("lootbag - giving all RER_Trophy to player"); items_guids = (entities[i] as W3Container).GetInventory().GetItemsByTag('RER_Trophy'); - // set `looted_a_trophy` if a trophy was found + // Set `looted_a_trophy` if a trophy was found. looted_a_trophy = looted_a_trophy || items_guids.Size() > 0; if (items_guids.Size() > 0) { diff --git a/src/helpers/mod_power.wss b/src/helpers/mod_power.wss index e4cdb2a2..23780195 100644 --- a/src/helpers/mod_power.wss +++ b/src/helpers/mod_power.wss @@ -1,14 +1,12 @@ - /** - * return if there is enough mod power for the encounter system to be - * enabled. + * Return if there is enough mod power for the encounter system to be enabled. */ function RER_modPowerIsEncounterSystemEnabled(mod_power: float): bool { return mod_power >= 0.1; } function RER_modPowerIsStaticEncounterSystemEnabled(mod_power: float): bool { - // same as the regular encounters + // Same as the regular encounters. return RER_modPowerIsEncounterSystemEnabled(mod_power); } diff --git a/src/helpers/move_creatures_if_player_in_scene.wss b/src/helpers/move_creatures_if_player_in_scene.wss index f618bcb6..231dac2d 100644 --- a/src/helpers/move_creatures_if_player_in_scene.wss +++ b/src/helpers/move_creatures_if_player_in_scene.wss @@ -1,9 +1,9 @@ /** - * move the supplied creatures away if the player is in a cutscene. Does nothing - * if it's not the case. - * The function will look for a ground position before teleporting them away, - * and will teleport every creature from the array if one or more creatures + * Move the supplied creatures away if the player is in a cutscene. Does nothing + * if this is not the case. + * The function will look for a ground position before teleporting them away. + * Will teleport every creature from the array if one or more creatures * goes under the threshold value. */ function RER_moveCreaturesAwayIfPlayerIsInCutscene(entities: array, radius: float): bool { @@ -17,17 +17,17 @@ function RER_moveCreaturesAwayIfPlayerIsInCutscene(entities: array, rad return false; } - // square the radius + // Square the radius. squared_radius *= radius; player_position = thePlayer.GetWorldPosition(); for (i = 0; i < entities.Size(); i += 1) { squared_distance = VecDistanceSquared2D(player_position, entities[i].GetWorldPosition()); - // the entity is under the threshold value + // The entity is under the threshold value. if (squared_distance < squared_radius) { - // it could not find a suitable position. We do nothing and return, maybe - // the next time this function is called will be the good one. + // It could not find a suitable position. We do nothing and return. + // maybe the next time this function is called will be the good one. if (!getRandomPositionBehindCamera(position, radius)) { SUH_keepCreaturesOutsidePoint( thePlayer.GetWorldPosition(), @@ -38,13 +38,13 @@ function RER_moveCreaturesAwayIfPlayerIsInCutscene(entities: array, rad return true; } - // we re-use i here because it doesn't matter as we'll leave the function + // We re-use i here because it doesn't matter as we'll leave the function // after that. for (i = 0; i < entities.Size(); i += 1) { entities[i].Teleport(position); } - // and leave now + // And leave now. return true; } } diff --git a/src/helpers/position_behind_camera.wss b/src/helpers/position_behind_camera.wss index 63417a03..4888e673 100644 --- a/src/helpers/position_behind_camera.wss +++ b/src/helpers/position_behind_camera.wss @@ -8,7 +8,7 @@ function getRandomPositionBehindCamera(out initial_pos: Vector, optional distanc minimum_distance = 20.0; } - // value of `0.0` means the parameter was not supplied + // Value of `0.0` means the parameter was not supplied. if (distance == 0.0) { distance = 40; } @@ -48,7 +48,7 @@ function getRandomPositionAroundPlayer(out initial_pos: Vector, optional distanc minimum_distance = 20.0; } - // value of `0.0` means the parameter was not supplied + // Value of `0.0` means the parameter was not supplied. if (distance == 0.0) { distance = 40; } diff --git a/src/helpers/random_dialog_builder.wss b/src/helpers/random_dialog_builder.wss index 5fb0c932..3d063a4f 100644 --- a/src/helpers/random_dialog_builder.wss +++ b/src/helpers/random_dialog_builder.wss @@ -1,17 +1,17 @@ -// represents all the data we need to play a oneliner +// Represents all the data we need to play a oneliner. class RER_DialogData { var dialog_id: int; var dialog_duration: float; var wait_until_end: bool; } -// and then replace the oneliner functions i have with structs like these that -// extend the RER_DialogData and set default values like +// Then replace the oneliner functions I have with structs like these that +// extend the RER_DialogData and set default values. class RER_DialogDataExample extends RER_DialogData { default dialog_id = 380546; default dialog_duration = 1.5; } -// and then we use the build like so +// Then we use the build like so. // (new RER_RandomDialogBuilder in thePlayer) // .start() // .dialog(new RER_DialogDataExample in thePlayer, true) @@ -20,8 +20,8 @@ class RER_DialogDataExample extends RER_DialogData { // .either(new RER_DialogDataExample in thePlayer, false, 0.5) // .play() // -// and it plays a voiceline, then pick randomly between one or the other -// and the boolean we pass mean if we should wait_until_the_end or not. +// And it plays a voiceline, then pick randomly between one or the other. +// The boolean we pass checks if we should wait_until_the_end or not. class RER_RandomDialogBuilder { var sections: array; var current_section: RandomDialogSection; @@ -96,7 +96,7 @@ class RER_RandomDialogBuilder { camera.FocusOn(this.talking_actor as CNode); // 1. - // pick a position in front of the talking actor, preferably behind the actor + // Pick a position in front of the talking actor, preferably behind the actor // that is listening. talking_actor_position = this.talking_actor.GetBoneWorldPosition('head'); if (interlocutor) { @@ -206,8 +206,8 @@ class RER_RandomDialogBuilder { total -= this.sections[index].chances[k]; } - // from here we know the picked section is at index K so we play it - // but only if the player is not in a scene + // From here we know the picked section is at index K so we play it. + // But only if the player is not in a scene. if (!isPlayerInScene()) { this.talking_actor.PlayLine(this.sections[index].dialogs[k].dialog_id, true); diff --git a/src/helpers/random_levels.wss b/src/helpers/random_levels.wss index dda05d32..053337bd 100644 --- a/src/helpers/random_levels.wss +++ b/src/helpers/random_levels.wss @@ -1,7 +1,6 @@ -// File containing helper functions used for creatures levels. +// File containing helper functions used for creature levels. // It uses values from the settings to calculate their levels. -// function getRandomLevelBasedOnSettings(settings: RE_Settings): int { var player_level: int; @@ -11,7 +10,7 @@ function getRandomLevelBasedOnSettings(settings: RE_Settings): int { player_level = RER_getPlayerLevel(); - // if for some reason the user set the max lower than the min value + // If for some reason the user set the max lower than the min value. if (settings.max_level_allowed >= settings.min_level_allowed) { max_level_allowed = settings.max_level_allowed; min_level_allowed = settings.min_level_allowed; @@ -30,7 +29,7 @@ function getRandomLevelBasedOnSettings(settings: RE_Settings): int { function RER_getPlayerLevel(): int { if (RER_playerUsesEnhancedEditionRedux()) { - // every 4 hours of gameplay is equal to 1 level in vanilla + // Every 4 hours of gameplay is equal to 1 level in vanilla. return GameTimeHours(theGame.CalculateTimePlayed()) / 4; } diff --git a/src/horde/horde_types.wss b/src/horde/horde_types.wss index a705a109..7482b9bb 100644 --- a/src/horde/horde_types.wss +++ b/src/horde/horde_types.wss @@ -6,11 +6,11 @@ // You are supposed to extend the class if you want to add a custom action on // completion. class RER_HordeRequest { - // the enum CreatureType is used as the index, while the value is the amount + // The enum CreatureType is used as the index, while the value is the amount // of creatures of the given type to spawn. var counters_per_creature_types: array; - // the entities spawned for that request + // The entities spawned for that request. var entities: array; var spawning_flags: RER_BestiaryEntrySpawnFlag; @@ -28,7 +28,7 @@ class RER_HordeRequest { this.counters_per_creature_types[creature] = count; } - // override the method to run your code + // Override the method to run your code. public latent function onComplete(master: CRandomEncounters) { NLOG("RER_HordeRequest - onComplete"); } diff --git a/src/horde/states/processing.wss b/src/horde/states/processing.wss index cba7375e..3791e7fd 100644 --- a/src/horde/states/processing.wss +++ b/src/horde/states/processing.wss @@ -24,7 +24,7 @@ state Processing in RER_HordeManager { number_of_requests = parent.requests.Size(); - // a request was removed or a new one was added + // A request was removed or a new one was added. if (old_number_of_requests != number_of_requests) { total_of_creatures_to_spawn = this.getCreaturesCountToSpawnFromRequests(parent.requests); } @@ -40,7 +40,7 @@ state Processing in RER_HordeManager { return; } - // the horde monsters are spawned only if regular monsters can be spawned + // The horde monsters are spawned only if regular monsters can be spawned. if (isPlayerInScene()) { SU_hideCustomBossBar(); @@ -50,7 +50,7 @@ state Processing in RER_HordeManager { for (i = 0; i < number_of_requests; i += 1) { creature_to_spawn = this.getFirstCreatureWithPositiveCounter(parent.requests[i]); - // we display the title only for the first request in the queue + // We display the title only for the first request in the queue. if (i == 0 && creature_to_spawn != CreatureNONE) { SU_showCustomBossBar(StrReplace( GetLocStringByKey("rer_horde_invasion_strength_title"), @@ -61,7 +61,7 @@ state Processing in RER_HordeManager { ) ), true); - // we also check for a random dialogue here because we know it's ran + // We also check for a random dialogue here because we know it's ran // once. if (RandRange(100) > 95) { (new RER_RandomDialogBuilder in thePlayer) @@ -88,7 +88,7 @@ state Processing in RER_HordeManager { this.spawnMonsterFromRequest(parent.requests[i], creature_to_spawn); - // too many attempts failed, give up on the horde. + // Too many attempts failed, give up on the horde. if (this.failed_attempts > 5) { SU_hideCustomBossBar(); diff --git a/src/killing_spree_loot.wss b/src/killing_spree_loot.wss index fbe9462e..00a9d0ad 100644 --- a/src/killing_spree_loot.wss +++ b/src/killing_spree_loot.wss @@ -3,7 +3,7 @@ function RER_addKillingSpreeCustomLootToEntities(loot_manager: RER_LootManager, entities: array, ecosystem_strength: float) { NLOG("RER_addKillingSpreeCustomLootToEntities: ecosystem strength = " + ecosystem_strength * 100); - // when it's a value in the ]0;1[ range, we bring it back to the [1;inf] range + // When it's a value in the ]0;1[ range, we bring it back to the [1;inf] range. // For example if it is a 0.5, so a 50% ecosystem strength it should be considered // the same as a 200% ecosystem strength, so 2. And 1 / 0.5 = 2. if (ecosystem_strength < 1 && ecosystem_strength != 0) { @@ -20,10 +20,9 @@ function RER_addKillingSpreeCustomLootToEntities(loot_manager: RER_LootManager, ); for entity: CEntity in entities { - // the -100 to the ecosystem strength is because want to boost loot tables - // only if the strength is above 100. As an ecosystem_strength of 50 means - // it is as 50% of its original strength, meaning half and not an increase - // in 50%. + // The -100 to the ecosystem strength is because want to boost loot tables. + // Only if the strength is above 100. As an ecosystem_strength of 50 means + // it is at 50% of its original strength, meaning half and not an increase of 50%. loot_manager.rollAndGiveItemsTo((entity as CGameplayEntity).GetInventory(), ecosystem_strength * increase_per_point); (entity as CGameplayEntity).GetInventory().UpdateLoot(); } diff --git a/src/loot/loot_manager.wss b/src/loot/loot_manager.wss index 369d8999..f633ab44 100644 --- a/src/loot/loot_manager.wss +++ b/src/loot/loot_manager.wss @@ -40,7 +40,7 @@ statemachine class RER_LootManager { } /** - * Remove the supplied item from the given category and rarity + * Remove the supplied item from the given category and rarity. */ public function removeLoot(category: RER_LootCategory, rarity: RER_LootRarity, item_name: name) { this.loot_by_category[category][rarity].Remove(item_name); @@ -51,7 +51,7 @@ statemachine class RER_LootManager { NLOG("roll(chance_multiplier: " + chance_multiplier + ", rng, category:" + category); - // if no RNG instance was provided, create a fresh one just for the roll + // If no RNG instance was provided, create a fresh one just for the roll // but set it to be completely random. if (!rng) { rng = (new RandomNumberGenerator in this).useSeed(false); diff --git a/src/main.wss b/src/main.wss index 6f30ba1c..dc6fdf23 100644 --- a/src/main.wss +++ b/src/main.wss @@ -163,10 +163,10 @@ statemachine class CRandomEncounters extends SU_BaseBootstrappedMod { return this.storages.general.playthrough_seed; } - //#region OutOfCombat action + // #region OutOfCombat action private var out_of_combat_requests: array; - // add the requested action for when the player will leave combat + // Add the requested action for when the player will leave combat. public function requestOutOfCombatAction(request: OutOfCombatRequest): bool { var i: int; var already_added: bool; @@ -188,7 +188,7 @@ statemachine class CRandomEncounters extends SU_BaseBootstrappedMod { // this.AddTimer('waitOutOfCombatTimer', 0.1, true); // } - // to return if something was added + // To return if something was added. return !already_added; } @@ -227,7 +227,7 @@ statemachine class CRandomEncounters extends SU_BaseBootstrappedMod { var scene: CStoryScene; var will_play_cutscene: bool; - // is set to true only if trophies were picked up + // Is set to true only if trophies were picked up. will_play_cutscene = lootTrophiesInRadius(); RER_tutorialTryShowTrophy(); @@ -244,7 +244,7 @@ statemachine class CRandomEncounters extends SU_BaseBootstrappedMod { .GetStorySceneSystem() .PlayScene(scene, "Input"); - // Play some oneliners about the trophies + // Play some oneliners about the trophies. if (RandRange(10) < 2) { REROL_hang_your_head_from_sadle_sync(); } @@ -256,7 +256,7 @@ statemachine class CRandomEncounters extends SU_BaseBootstrappedMod { } } } - //#endregion OutOfCombat action + // #endregion OutOfCombat action diff --git a/src/notifications.wss b/src/notifications.wss index d6a67876..2747f27f 100644 --- a/src/notifications.wss +++ b/src/notifications.wss @@ -38,7 +38,7 @@ function NTUTO(title: string, body: string, optional do_not_pause: bool) { tut.messageTitle = title; tut.messageText = body; - // You can even add images if you want, i didn't test it however + // You can even add images if you want, I didn't test it however. // tut.imagePath = tutorialEntry.GetImagePath(); tut.enableGlossoryLink = false; diff --git a/src/oneliners.wss b/src/oneliners.wss index 3da7da45..9f6693d7 100644 --- a/src/oneliners.wss +++ b/src/oneliners.wss @@ -1,7 +1,7 @@ -// Geralt: Died recently, wonder what killed it -// from "Mysterious Tracks" monster hunt. -// when interacting with a dead fiend. +// Geralt: Died recently, wonder what killed it. +// From "Mysterious Tracks" monster hunt. +// When interacting with a dead fiend. latent function REROL_died_recently() { var scene: CStoryScene; @@ -33,7 +33,7 @@ latent function REROL_no_dragon() { Sleep(5.270992); // Approved duration } -// Geralt: Corpses… that's what drew the ghouls. +// Geralt: Corpses… That's what drew the ghouls. latent function REROL_what_drew_the_ghouls() { var scene: CStoryScene; @@ -83,7 +83,7 @@ latent function REROL_wonder_clues_will_lead_me(optional do_not_wait: bool) { } } -// Geralt: What a shitty way to die +// Geralt: What a shitty way to die. latent function REROL_shitty_way_to_die() { var scene: CStoryScene; @@ -119,7 +119,7 @@ latent function REROL_there_you_are(optional do_not_wait: bool) { // Geralt: That was tough... latent function REROL_that_was_tough() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(321440, true); @@ -128,7 +128,7 @@ latent function REROL_that_was_tough() { // Geralt: Damn… Can't smell a thing. Must've lost the trail. latent function REROL_cant_smell_a_thing() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(5399670, true); @@ -155,7 +155,7 @@ latent function REROL_necrophages_great(optional do_not_wait: bool) { // Geralt: The Wild Hunt. latent function REROL_the_wild_hunt(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(539883, true); @@ -166,17 +166,16 @@ latent function REROL_the_wild_hunt(optional do_not_wait: bool) { // Geralt: Go away or i'll kill you. latent function REROL_go_or_ill_kill_you() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(476195, true); Sleep(2.684654); // Approved duration } -// Geralt: Air's strange… Like dropping into a deep -// cellar on a hot day… And the mist… +// Geralt: Air's strange… Like dropping into a deep cellar on a hot day… And the mist… latent function REROL_air_strange_and_the_mist(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1061986, true); @@ -187,7 +186,7 @@ latent function REROL_air_strange_and_the_mist(optional do_not_wait: bool) { // Geralt: Clawed and gnawed. Necrophages fed here… but all the wounds they inflicted are post-mortem. latent function REROL_clawed_gnawed_not_necrophages() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(470573, true); @@ -196,7 +195,7 @@ latent function REROL_clawed_gnawed_not_necrophages() { // Geralt: Wild Hunt killed them. latent function REROL_wild_hunt_killed_them() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1047779, true); @@ -205,7 +204,7 @@ latent function REROL_wild_hunt_killed_them() { // Geralt: Should look around. latent function REROL_should_look_around(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(397220, true); @@ -221,7 +220,7 @@ class REROL_data_should_look_around extends RER_DialogData { // Geralt: Hm… Definitely came through here. latent function REROL_came_through_here(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(382001, true); @@ -232,7 +231,7 @@ latent function REROL_came_through_here(optional do_not_wait: bool) { // Geralt: Another victim. latent function REROL_another_victim() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1002812, true); @@ -241,23 +240,23 @@ latent function REROL_another_victim() { // Geralt: Miles and miles and miles… latent function REROL_miles_and_miles_and_miles() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1077634, true); Sleep(2.68); // Approved duration } -// Geralt: I'm gonna hand your head from my sadle +// Geralt: I'm gonna hand your head from my sadle. latent function REROL_hang_your_head_from_sadle() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. REROL_hang_your_head_from_sadle_sync(); Sleep(4); // Approved duration } function REROL_hang_your_head_from_sadle_sync() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1192331, true); } @@ -269,7 +268,7 @@ latent function REROL_someone_pay_for_trophy() { Sleep(3); // Approved duration } function REROL_someone_pay_for_trophy_sync() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(426514, true); } @@ -281,14 +280,14 @@ latent function REROL_good_size_wonder_if_someone_pay() { Sleep(3.648103); // Approved duration } function REROL_good_size_wonder_if_someone_pay_sync() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(376063, true); } // Geralt: Ground's splattered with blood for a few feet around. A lot of it. latent function REROL_ground_splattered_with_blood() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(433486, true); @@ -301,7 +300,7 @@ class REROL_data_ground_splattered_with_blood extends RER_DialogData { // Geralt: Another trail. latent function REROL_another_trail() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(382013, true); @@ -310,7 +309,7 @@ latent function REROL_another_trail() { // Geralt: Monsters… Can feel 'em… Coming closer… They're everywhere. latent function REROL_monsters_everywhere_feel_them_coming() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(506666, true); @@ -319,7 +318,7 @@ latent function REROL_monsters_everywhere_feel_them_coming() { // Geralt: Should scour the local notice boards. Someone might've posted a contract for whatever lives here. latent function REROL_should_scour_noticeboards(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1206920, true); @@ -330,7 +329,7 @@ latent function REROL_should_scour_noticeboards(optional do_not_wait: bool) { // Geralt choice: I'll take the contract. latent function REROL_ill_take_the_contract() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1181938, true); @@ -339,7 +338,7 @@ latent function REROL_ill_take_the_contract() { // Geralt: Pretty unusual contract… latent function REROL_unusual_contract() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1154439, true); @@ -348,25 +347,25 @@ latent function REROL_unusual_contract() { // Geralt: All right, time I got to work. Where'll I find this monster? latent function REROL_where_will_i_find_this_monster() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(551205, true); Sleep(3.900127); // Approved duration } -// Geralt: I'll tend to the monster +// Geralt: I'll tend to the monster. latent function REROL_ill_tend_to_the_monster() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1014194, true); Sleep(1.773995); // Approved duration } -// Geralt: I accept the challenge +// Geralt: I accept the challenge. latent function REROL_i_accept_the_challenge() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1005381, true); @@ -375,7 +374,7 @@ latent function REROL_i_accept_the_challenge() { // Geralt: Mhm… latent function REROL_mhm(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1185176, true); @@ -389,7 +388,7 @@ class REROL_mhm_data extends RER_DialogData { // Geralt: It's over. latent function REROL_its_over() { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(485943, true); @@ -398,7 +397,7 @@ latent function REROL_its_over() { // Geralt: Mff… Smell of a rotting corpse. Blood spattered all around. latent function REROL_smell_of_a_rotting_corpse(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(471806, true); @@ -409,7 +408,7 @@ latent function REROL_smell_of_a_rotting_corpse(optional do_not_wait: bool) { // Geralt: Tracks - a nekker… A big one. latent function REROL_tracks_a_nekker(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1042065, true); @@ -420,7 +419,7 @@ latent function REROL_tracks_a_nekker(optional do_not_wait: bool) { // Geralt: Ooh. More drowners. latent function REROL_more_drowners(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1002915, true); @@ -431,7 +430,7 @@ latent function REROL_more_drowners(optional do_not_wait: bool) { // Geralt: Ghouls… And where there's ghouls… there's usually corpses… latent function REROL_ghouls_there_is_corpses(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(552454, true); @@ -442,7 +441,7 @@ latent function REROL_ghouls_there_is_corpses(optional do_not_wait: bool) { // Geralt: A fiend. latent function REROL_a_fiend(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1039017, true); @@ -453,7 +452,7 @@ latent function REROL_a_fiend(optional do_not_wait: bool) { // Geralt: A werewolf… latent function REROL_a_werewolf(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(577129, true); @@ -464,7 +463,7 @@ latent function REROL_a_werewolf(optional do_not_wait: bool) { // Geralt: Everything says leshen, a young one. Must've arrived here recently. Need to find its totem. latent function REROL_a_leshen_a_young_one(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(566287, true); @@ -475,7 +474,7 @@ latent function REROL_a_leshen_a_young_one(optional do_not_wait: bool) { // Geralt: Where's that damned katakan? latent function REROL_where_is_katakan(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(569579, true); @@ -486,7 +485,7 @@ latent function REROL_where_is_katakan(optional do_not_wait: bool) { // Geralt: Gotta be an ekimmara. latent function REROL_gotta_be_an_ekimmara(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1038390, true); @@ -497,7 +496,7 @@ latent function REROL_gotta_be_an_ekimmara(optional do_not_wait: bool) { // Geralt: An earth elemental. Pretty powerful, too. latent function REROL_an_earth_elemental(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(573116, true); @@ -508,7 +507,7 @@ latent function REROL_an_earth_elemental(optional do_not_wait: bool) { // Geralt choice: How'd a giant wind up here? latent function REROL_giant_wind_up_here(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1167973, true); @@ -519,7 +518,7 @@ latent function REROL_giant_wind_up_here(optional do_not_wait: bool) { // Geralt: So… a griffin this close to the village? Strange. latent function REROL_griffin_this_close_village(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1048275, true); @@ -530,7 +529,7 @@ latent function REROL_griffin_this_close_village(optional do_not_wait: bool) { // Geralt: Wyvern. Wonderful. latent function REROL_wyvern_wonderful(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1065583, true); @@ -541,7 +540,7 @@ latent function REROL_wyvern_wonderful(optional do_not_wait: bool) { // Geralt: A cockatrice… latent function REROL_a_cockatrice(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(553797, true); @@ -552,7 +551,7 @@ latent function REROL_a_cockatrice(optional do_not_wait: bool) { // Geralt: Draconid, gotta be. Maybe a basilisk? Except… these prints don't belong to any variety I know. Just a liiiitle different. latent function REROL_basilisk_a_little_different(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1170780, true); @@ -563,7 +562,7 @@ latent function REROL_basilisk_a_little_different(optional do_not_wait: bool) { // Geralt: A flyer, swooped down… Judging by the claw marks, gotta be a wyvern or a forktail. latent function REROL_a_flyer_forktail(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1034842, true); @@ -574,7 +573,7 @@ latent function REROL_a_flyer_forktail(optional do_not_wait: bool) { // Geralt: Impossible. My brethren hunted down every last spotted wight before I was born. latent function REROL_impossible_wight(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1179588, true); @@ -585,7 +584,7 @@ latent function REROL_impossible_wight(optional do_not_wait: bool) { // Geralt: Whoa-ho. Shaelmaar's close… latent function REROL_a_shaelmaar_is_close(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1169885, true); @@ -596,7 +595,7 @@ latent function REROL_a_shaelmaar_is_close(optional do_not_wait: bool) { // Geralt: Gotta be a grave hag. latent function REROL_gotta_be_a_grave_hag(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1022247, true); @@ -607,7 +606,7 @@ latent function REROL_gotta_be_a_grave_hag(optional do_not_wait: bool) { // Geralt: Guess I'm dealing with an old foglet… hiding behind an illusion. latent function REROL_dealing_with_foglet(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(550020, true); @@ -618,7 +617,7 @@ latent function REROL_dealing_with_foglet(optional do_not_wait: bool) { // Geralt: A rock troll, looks like… latent function REROL_a_rock_troll(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(579959, true); @@ -629,7 +628,7 @@ latent function REROL_a_rock_troll(optional do_not_wait: bool) { // Geralt: Bruxa. Gotta be. latent function REROL_bruxa_gotta_be(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1194000, true); @@ -640,7 +639,7 @@ latent function REROL_bruxa_gotta_be(optional do_not_wait: bool) { // Geralt: Venom glands, long claws, a bloodsucker… must be a garkain. A pack leader, an alpha. latent function REROL_a_garkain(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1176030, true); @@ -651,7 +650,7 @@ latent function REROL_a_garkain(optional do_not_wait: bool) { // Geralt: A nightwraith… latent function REROL_a_nightwraith(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1019137, true); @@ -662,7 +661,7 @@ latent function REROL_a_nightwraith(optional do_not_wait: bool) { // Geralt: Kikimores. Dammit. latent function REROL_kikimores_dammit(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1164863, true); @@ -673,7 +672,7 @@ latent function REROL_kikimores_dammit(optional do_not_wait: bool) { // Geralt: Wonder what lured the giant centipedes. latent function REROL_what_lured_centipedes(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1200276, true); @@ -684,7 +683,7 @@ latent function REROL_what_lured_centipedes(optional do_not_wait: bool) { // Geralt: Where'd the wolf prints come from? latent function REROL_where_did_wolf_prints_come_from(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(470770, true); @@ -695,7 +694,7 @@ latent function REROL_where_did_wolf_prints_come_from(optional do_not_wait: bool // Geralt: Half-man, half-bear. Something like a lycanthrope. latent function REROL_half_man_half_bear(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(587721, true); @@ -706,7 +705,7 @@ latent function REROL_half_man_half_bear(optional do_not_wait: bool) { // Geralt: Animal hair. latent function REROL_animal_hair(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1104764, true); @@ -717,7 +716,7 @@ latent function REROL_animal_hair(optional do_not_wait: bool) { // Geralt: An arachas. latent function REROL_an_arachas(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(521492, true); @@ -728,7 +727,7 @@ latent function REROL_an_arachas(optional do_not_wait: bool) { // Geralt: Harpy feather, a rectrix. latent function REROL_harpy_feather(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1000722, true); @@ -739,7 +738,7 @@ latent function REROL_harpy_feather(optional do_not_wait: bool) { // Geralt: Siren tracks. A very big siren. latent function REROL_siren_tracks(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1025599, true); @@ -750,7 +749,7 @@ latent function REROL_siren_tracks(optional do_not_wait: bool) { // Geralt: Interesting. latent function REROL_interesting(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(376165, true); @@ -765,7 +764,7 @@ class REROL_data_interesting extends RER_DialogData { // Geralt: Insect excretions… latent function REROL_insectoid_excretion(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(376165, true); @@ -776,7 +775,7 @@ latent function REROL_insectoid_excretion(optional do_not_wait: bool) { // Geralt: Aha. So it's a slyzard… latent function REROL_so_its_a_slyzard(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1204696, true); @@ -787,7 +786,7 @@ latent function REROL_so_its_a_slyzard(optional do_not_wait: bool) { // Geralt choice: Pretty well armed, those bandits… latent function REROL_well_armed_bandits(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1178439, true); @@ -798,7 +797,7 @@ latent function REROL_well_armed_bandits(optional do_not_wait: bool) { // Geralt: Trail ends here. latent function REROL_trail_ends_here(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1091477, true); @@ -809,7 +808,7 @@ latent function REROL_trail_ends_here(optional do_not_wait: bool) { // Geralt: Damn, trail breaks off. Could find something else, though. latent function REROL_trail_breaks_off(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(525769, true); @@ -821,7 +820,7 @@ latent function REROL_trail_breaks_off(optional do_not_wait: bool) { // Geralt: Hmm, trail goes on. Good thing it doesn't end here. latent function REROL_trail_goes_on(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(393988, true); @@ -836,7 +835,7 @@ class REROL_data_trail_goes_on extends RER_DialogData { // Geralt choice: Wonder why they split up. latent function REROL_wonder_they_split(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(568165, true); @@ -847,7 +846,7 @@ latent function REROL_wonder_they_split(optional do_not_wait: bool) { // Geralt: Nothing. latent function REROL_nothing(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1153912, true); @@ -858,7 +857,7 @@ latent function REROL_nothing(optional do_not_wait: bool) { // Geralt: Nothing here. latent function REROL_nothing_here(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1093719, true); @@ -869,7 +868,7 @@ latent function REROL_nothing_here(optional do_not_wait: bool) { // Geralt: Hmm... Nothing interesting. latent function REROL_nothing_interesting(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1130083, true); @@ -880,7 +879,7 @@ latent function REROL_nothing_interesting(optional do_not_wait: bool) { // Geralt: Must know the area well… latent function REROL_must_know_area_well(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(487162, true); @@ -895,7 +894,7 @@ class REROL_must_know_area_well_data extends RER_DialogData { // Geralt: I'll check the area. latent function REROL_ill_check_area(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(588352, true); @@ -910,7 +909,7 @@ class REROL_ill_check_area_data extends RER_DialogData { // Geralt: Not likely to learn anything more here. latent function REROL_not_likely_learn_anything_from_here(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1202374, true); @@ -925,7 +924,7 @@ class REROL_not_likely_learn_anything_from_here_data extends RER_DialogData { // Geralt: See if I can learn what's out there. latent function REROL_see_if_i_can_learn_what_out_there(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1041656, true); @@ -940,7 +939,7 @@ class REROL_see_if_i_can_learn_what_out_there_data extends RER_DialogData { // Geralt: That's about all I've learned. latent function REROL_about_all_ive_learned(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(389189, true); @@ -955,7 +954,7 @@ class REROL_about_all_ive_learned_data extends RER_DialogData { // Geralt: Not likely to learn anymore here. latent function REROL_not_likely_learn_anymore(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(1071533, true); @@ -970,7 +969,7 @@ class REROL_not_likely_learn_anymore_data extends RER_DialogData { // Geralt: Watch and learn. latent function REROL_watch_and_learn(optional do_not_wait: bool) { - // this integer corresponds to the hexa found in the `witcher_dialogs.csv` file + // This integer corresponds to the hexa found in the `witcher_dialogs.csv` file // converted to integer. thePlayer.PlayLine(380546, true); @@ -1125,7 +1124,7 @@ class REROL_less_moaning extends RER_DialogData { default dialog_id = 1030584; } -// Geralt: greetings +// Geralt: Greetings. class REROL_greetings extends RER_DialogData { default dialog_id = 1189573; } @@ -1291,7 +1290,7 @@ class REROL_damien_why_do_you_wait_save_them extends RER_DialogData { default dialog_id = 1207814; } -// Damien: Onward, witcher +// Damien: Onward, witcher. class REROL_damien_onward_witcher extends RER_DialogData { default dialog_id = 1207812; } @@ -1496,7 +1495,7 @@ class REROL_view_from_there_spectacular extends RER_DialogData { default dialog_id = 533975; } -// Troll_1: Offsod Or yous throw in soup +// Troll_1: Offsod Or yous throw in soup. class REROL_offsod_or_throw_in_soup extends RER_DialogData { default dialog_id = 1073877; } @@ -1521,7 +1520,7 @@ class REROL_exactly_why_you_wham_them extends RER_DialogData { default dialog_id = 380703; } -// Troll_1: Man? Wham-a-wham go man So wham go troll, too" +// Troll_1: Man? Wham-a-wham go man So wham go troll, too. class REROL_man_go_an_wham_go_troll extends RER_DialogData { default dialog_id = 380697; } @@ -1567,7 +1566,7 @@ class REROL_vongratz_hey_help_help extends RER_DialogData { default dialog_id = 1039958; } -// Von Gratz: Geralt +// Von Gratz: Geralt. class REROL_vongratz_geralt extends RER_DialogData { default dialog_id = 1039962; } diff --git a/src/scene_player.wss b/src/scene_player.wss index f7f6bc9c..e3c5d65c 100644 --- a/src/scene_player.wss +++ b/src/scene_player.wss @@ -1,26 +1,26 @@ enum RER_CameraTargetType { - // when you want the camera to target a node, the node can move + // When you want the camera to target a node, the node can move. RER_CameraTargetType_NODE = 0, - // when you want the camera to target a static position + // When you want the camera to target a static position. RER_CameraTargetType_STATIC = 1, - // when you want the camera to target a bone component, it can move + // When you want the camera to target a bone component, it can move. RER_CameraTargetType_BONE = 3 } enum RER_CameraPositionType { - // the position will be absolute positions + // The position will be absolute positions. RER_CameraPositionType_ABSOLUTE = 0, - // the position will be relative to the camera's current position. + // The position will be relative to the camera's current position. RER_CameraPositionType_RELATIVE = 1, } enum RER_CameraVelocityType { - // relative to the rotation of the camera + // Relative to the rotation of the camera. RER_CameraVelocityType_RELATIVE = 0, RER_CameraVelocityType_ABSOLUTE = 1, @@ -29,11 +29,11 @@ enum RER_CameraVelocityType { } struct RER_CameraScene { - // where the camera is placed + // Where the camera is placed. var position_type: RER_CameraPositionType; var position: Vector; - // where the camera is looking + // Where the camera is looking. var look_at_target_type: RER_CameraTargetType; var look_at_target_node: CNode; var look_at_target_static: Vector; @@ -44,8 +44,7 @@ struct RER_CameraScene { var velocity_type: RER_CameraVelocityType; var velocity: Vector; - // 1 means no blending at all, while 0 means so much blending it won't move at - // all + // 1 Means no blending at all, while 0 means so much blending it won't move at all. var position_blending_ratio: float; var rotation_blending_ratio: float; @@ -98,7 +97,7 @@ class RER_StaticCamera extends CStaticCamera { break; } - // because the Pitch (Y axis) is inverted by default + // Because the Pitch (Y axis) is inverted by default. current_rotation.Pitch *= -1; return current_rotation; @@ -108,14 +107,14 @@ class RER_StaticCamera extends CStaticCamera { var current_rotation: EulerAngles; var current_position: Vector; - // immersive camera crashes if there is camera blending when on horse + // Immersive camera crashes if there is camera blending when on horse // or in combat. if (theGame.GetInGameConfigWrapper().GetVarValue('RERoptionalFeatures', 'RERcameraScenesDisabledOnHorse') && thePlayer.IsUsingHorse() || thePlayer.IsInCombat()) { return; } - // this option was added because immersive camera doesn't like the blending + // This option was added because immersive camera doesn't like the blending // options, and the game would crash. if (!theGame.GetInGameConfigWrapper().GetVarValue('RERoptionalFeatures', 'RERcameraBlendingDisabled')) { this.deactivationDuration = 1.5; @@ -134,24 +133,24 @@ class RER_StaticCamera extends CStaticCamera { this.Run(); Sleep(this.activationDuration); - // 1. we always start from the camera's position and its rotation - // only if not relative, because relative position starts from (0, 0, 0) + // 1. We always start from the camera's position and its rotation + // only if not relative, because relative position starts from (0, 0, 0). // if (scene.position_type != RER_CameraPositionType_RELATIVE) { current_position = theCamera.GetCameraPosition(); // } current_rotation = theCamera.GetCameraRotation(); - // 2. then we move the camera there and start running + // 2. Then we move the camera there and start running. this.TeleportWithRotation(current_position, current_rotation); - // 3. we start looping to animate the camera toward the scene goals + // 3. We start looping to animate the camera toward the scene goals. this.blendToScene(scene, current_position, current_rotation); this.Stop(); // if (destroy_after) { - // removed because it cancels the blending + // Removed because it cancels the blending. // this.Destroy(); // } } @@ -167,8 +166,8 @@ class RER_StaticCamera extends CStaticCamera { while (theGame.GetEngineTimeAsSeconds() < ending_time) { time_progress = MinF((theGame.GetEngineTimeAsSeconds() - starting_time) / scene.duration, 0.5); - // 1 we do the position & rotation blendings - // 1.1 we do the position blending + // 1 We do the position & rotation blendings. + // 1.1 We do the position blending. if (scene.position_type == RER_CameraPositionType_RELATIVE) { current_position += (thePlayer.GetWorldPosition() + scene.position - current_position) * scene.position_blending_ratio * time_progress; } @@ -176,13 +175,13 @@ class RER_StaticCamera extends CStaticCamera { current_position += (scene.position - current_position) * scene.position_blending_ratio * time_progress; } - // 1.2 we do the rotation blending + // 1.2 We do the rotation blending. goal_rotation = this.getRotation(scene, current_position); current_rotation.Roll += AngleNormalize180(goal_rotation.Roll - current_rotation.Roll) * scene.rotation_blending_ratio * time_progress; current_rotation.Yaw += AngleNormalize180(goal_rotation.Yaw - current_rotation.Yaw) * scene.rotation_blending_ratio * time_progress; current_rotation.Pitch += AngleNormalize180(goal_rotation.Pitch - current_rotation.Pitch) * scene.rotation_blending_ratio * time_progress; - // 2 we update the goal position using the velocity + // 2 We update the goal position using the velocity. if (scene.velocity_type == RER_CameraVelocityType_ABSOLUTE) { scene.position += scene.velocity; // todo: use delta } else if (scene.velocity_type == RER_CameraVelocityType_FORWARD) { @@ -192,7 +191,7 @@ class RER_StaticCamera extends CStaticCamera { scene.position += VecFromHeading(theCamera.GetCameraHeading()) * scene.velocity; } - // 3 we finally teleport the camera + // 3 We finally teleport the camera. this.TeleportWithRotation(current_position, current_rotation); SleepOneFrame(); diff --git a/src/settings.wss b/src/settings.wss index 09c5afcd..347a7978 100644 --- a/src/settings.wss +++ b/src/settings.wss @@ -19,17 +19,17 @@ class RE_Settings { public var allow_big_city_spawns: bool; - // controls whether or not geralt will comment - // when an encounter appears + // Controls whether or not geralt will comment + // when an encounter appears. public var geralt_comments_enabled: bool; - // controls whether or not RER shows notifications + // Controls whether or not RER shows notifications. public var hide_next_notifications: bool; - // controls whether or not RER encounters will drop loot + // Controls whether or not RER encounters will drop loot. public var enable_encounters_loot: bool; - // tells how much impact an external factor has on a creature + // Tells how much impact an external factor has on a creature // spawning chances. public var external_factors_coefficient: float; @@ -39,7 +39,7 @@ class RE_Settings { public var trophies_enabled_by_encounter: array; - // uses the enum EncounterType as the index + // Uses the enum EncounterType as the index. public var crowns_amounts_by_encounter: array; public var trophy_pickup_scene: bool; @@ -60,7 +60,7 @@ class RE_Settings { public var disable_camera_scenes : bool; - // scenes that play when ambushed, or when a contract start nearby, etc... + // Scenes that play when ambushed, or when a contract start nearby, etc... public var enable_action_camera_scenes : bool; public var ecosystem_community_power_effect: float; diff --git a/src/spawn_roller.wss b/src/spawn_roller.wss index d590f602..fd267d8b 100644 --- a/src/spawn_roller.wss +++ b/src/spawn_roller.wss @@ -9,9 +9,9 @@ // well, the old solution of adding types to an array and picking into the array // was great until we had to push more than 200 times into the array. // so much memory write/delete for so little... -// and instead we use much more CPU power, i don't know which is better. +// and instead we use much more CPU power, I don't know which is better. // -// NOTE: the class currently uses arrays, i could not find a hashmap type/class. +// NOTE: The class currently uses arrays, I could not find a hashmap type/class. // It would greatly improve performances though... class SpawnRoller { @@ -64,7 +64,7 @@ class SpawnRoller { var can_apply_filter: bool; var i: int; - // first we check if any creature IN the filter has a spawn rate of 1 or more + // First we check if any creature IN the filter has a spawn rate of 1 or more // otherwise when we'll roll the SpawnRoller it will default to humans. for (i = 0; i < CreatureMAX; i += 1) { if ((this.creatures_counters[i] * filter.multipliers[i] as int) > 0) { @@ -99,11 +99,11 @@ class SpawnRoller { total += this.third_party_creatures_counters[i]; } - // ecosystem feature: - // here, we gather the data about the surrounding ecoysystems and + // Ecosystem feature: + // Here, we gather the data about the surrounding ecoysystems and // we update the counters based on this data. // - // TODO: ecosystem, make it toggable by the user in case the user doesn't + // TODO: ecosystem, make it toggleable by the user in case the user doesn't // want the ecosystem feature in his game. #ifdef ENABLE_ECOSYSTEM { if (true) { @@ -117,7 +117,7 @@ class SpawnRoller { }; // https://github.com/Aelto/W3_RandomEncounters_Tweaks/issues/5: - // added so the user can disable all CreatureType and it would + // Added so the user can disable all CreatureType and it would // cancel the spawn. Useful when the user wants no spawn during the day. if (total <= 0) { spawn_roll.type = SpawnRoller_RollTypeCREATURE; @@ -132,7 +132,7 @@ class SpawnRoller { for (i = 0; i < CreatureMAX; i += 1) { // https://github.com/Aelto/W3_RandomEncounters_Tweaks/issues/5: - // `this.creatures_counters[i] > 0` is add so the user can + // `this.creatures_counters[i] > 0` Is "add" so the user can // disable a CreatureType completely. if (this.creatures_counters[i] > 0 && roll <= current_position + this.creatures_counters[i]) { spawn_roll.type = SpawnRoller_RollTypeCREATURE; @@ -153,7 +153,7 @@ class SpawnRoller { } } - // not supposed to get here but hey, who knows. + // Not supposed to get here but hey, who knows. spawn_roll.type = SpawnRoller_RollTypeCREATURE; spawn_roll.roll = CreatureNONE; @@ -171,7 +171,7 @@ class SpawnRoller { } // https://github.com/Aelto/W3_RandomEncounters_Tweaks/issues/5: - // if for any reason no human variant is available return HT_NONE + // If for any reason no human variant is available return HT_NONE if (total <= 0) { return HT_NONE; } @@ -182,7 +182,7 @@ class SpawnRoller { for (i = 0; i < HT_MAX; i += 1) { // https://github.com/Aelto/W3_RandomEncounters_Tweaks/issues/5: - // ignore the variants at 0 + // Ignore the variants at 0. if (this.humans_variants_counters[i] > 0 && roll <= current_position + this.humans_variants_counters[i]) { return i; } @@ -190,7 +190,7 @@ class SpawnRoller { current_position += this.humans_variants_counters[i]; } - // not supposed to get here but hey, who knows. + // Not supposed to get here but hey, who knows. return HT_NONE; } @@ -211,9 +211,9 @@ struct SpawnRoller_Roll { * from the creatures you configured. * * It offers a few methods to define different kinds of filters, such as: - * - left offset - * - right offset - * - remove a specific creature from the pool + * - left offset. + * - right offset. + * - remove a specific creature from the pool. */ class RER_SpawnRollerFilter { /** @@ -270,7 +270,7 @@ class RER_SpawnRollerFilter { } /** - * remove the creatures that are outside the range set by the offsets. + * Remove the creatures that are outside the range set by the offsets. * The creatures passed for the offsets are NOT reset, it's everything OUTSIDE * the range that is reset. */ diff --git a/src/states/initialising/initialising.wss b/src/states/initialising/initialising.wss index 30bb9db8..113c0757 100644 --- a/src/states/initialising/initialising.wss +++ b/src/states/initialising/initialising.wss @@ -10,14 +10,16 @@ state Initialising in CRandomEncounters { entry function startInitialising() { NLOG("Delaying RER loading start:"); - // delay init until loading screen has stopped playing + // Delay init until loading screen has stopped playing. while (theGame.IsLoadingScreenVideoPlaying()) { Sleep(1); } - NLOG(" - Loading screen video ended"); - // then wait until scenes are over etc... + + NLOG(" - Loading screen video ended"); + + // Then wait until scenes are over etc... while (isPlayerBusy()) { Sleep(0.5); } @@ -97,7 +99,7 @@ state Initialising in CRandomEncounters { if (current_version < 2.08) { NDEBUG("[RER] The mod was updated to v2.8: the Contract System settings were reset to support the new reputation system"); - // reset the contract tutorial value so it displays again + // Reset the contract tutorial value so it displays again. // config.SetVarValue('RERtutorials', 'RERtutorialMonsterContract', 1); config.ApplyGroupPreset('RERcontracts', 0); @@ -107,11 +109,11 @@ state Initialising in CRandomEncounters { if (current_version < 2.09) { NDEBUG("[RER] The mod was updated to v2.9: the Contract System settings were reset to support updated distance settings"); - // reset the contract tutorial value so it displays again + // Reset the contract tutorial value so it displays again. // config.SetVarValue('RERtutorials', 'RERtutorialMonsterContract', 1); config.ApplyGroupPreset('RERcontracts', 0); - // disable any active bounty from before v2.9 since it won't be compatible + // Disable any active bounty from before v2.9 since it won't be compatible // anymore. parent.storages.bounty.current_bounty.is_active = false; @@ -128,20 +130,20 @@ state Initialising in CRandomEncounters { var message: string; message += "You just updated the Random Encounters Reworked mod to the v2.12, the loot update.

"; - message += "All of your reward settings were reset following the update. "; - message += "To simplify and streamline the loot coming from the mod, all of the old rewards were removed and replaced "; + message += "All of your reward settings were reset following the update."; + message += "To simplify and streamline the loot coming from the mod, all of the old rewards were removed and replaced."; message += "with a central and generic system. This system called the Loot Manager offers four loot categories:"; message += "
- Gear"; message += "
- Materials"; message += "
- Consumables"; message += "
- Valuables"; - message += "
And for each category it offers four loot rarities: "; + message += "
And for each category it offers four loot rarities:"; message += "
- Common"; message += "
- Uncommon"; message += "
- Rare"; message += "
- Exotic"; - message += "

Now every time RER wants to add loot to something, it sends a call to the loot manager which will "; - message += "give it a list of items based on the settings you set in the menu, and this for every feature in the mod."; + message += "

Now every time RER wants to generate loot for something, it sends a call to the loot manager which will "; + message += "give it a list of items based on the settings you set in the menu, and it does this for every feature in the mod."; NTUTO("RER v2.12 - The loot update", message); diff --git a/src/states/initialising/presets/enhanced_edition.wss b/src/states/initialising/presets/enhanced_edition.wss index 31fb8421..17961689 100644 --- a/src/states/initialising/presets/enhanced_edition.wss +++ b/src/states/initialising/presets/enhanced_edition.wss @@ -13,10 +13,10 @@ state EnhancedEdition in RER_PresetManager { wrapper = theGame.GetInGameConfigWrapper(); - // first we apply the default presets + // First we apply the default presets. parent.master.settings.resetRERSettings(wrapper); - // then we change a few things here and there + // Then we change a few things here and there. this.wrapperMultiplyFloatValue(wrapper, 'RERencountersAmbushDay', 'Katakans', 0.5); this.wrapperMultiplyFloatValue(wrapper, 'RERencountersAmbushDay', 'Ekimmaras', 0.5); this.wrapperMultiplyFloatValue(wrapper, 'RERencountersAmbushDay', 'Bruxae', 0.1); diff --git a/src/states/loading.wss b/src/states/loading.wss index bf3dc742..dbc7e636 100644 --- a/src/states/loading.wss +++ b/src/states/loading.wss @@ -17,10 +17,10 @@ state Loading in CRandomEncounters { parent.refreshEcosystemFrequencyMultiplier(); - // give time for other mods to register their static encounters + // Give time for other mods to register their static encounters. Sleep(10); - // it's super important the mod takes control of the creatures BEFORE spawning + // It's super important the mod takes control of the creatures BEFORE spawning // the static encounters, or else RER will consider creatures from static encounters // like HuntingGround encounters and because of the death threshold distance // it will kill them instantly. We don't want them to be killed. @@ -35,7 +35,7 @@ state Loading in CRandomEncounters { parent.GotoState('Waiting'); } - // the mod loses control of the previously spawned entities when the player + // The mod loses control of the previously spawned entities when the player // reloads. So when the mod is initialized it loops through all the RER entities // (thanks to a tag) and then finds groups of creatures and links them to a // HuntEntity manager that will control them again. @@ -92,7 +92,7 @@ state Loading in CRandomEncounters { entity_group.Clear(); - // the goal here is to create a list of entities in the surrounding areas + // The goal here is to create a list of entities in the surrounding areas // that RER will take control of. for (k = 0; k < surrounding_entities.Size(); k += 1) { // RER has already taken control of this creature so we ignore it. diff --git a/src/states/spawning.wss b/src/states/spawning.wss index e9582487..52fc0219 100644 --- a/src/states/spawning.wss +++ b/src/states/spawning.wss @@ -5,7 +5,7 @@ state Spawning in CRandomEncounters { event OnEnterState(previous_state_name: name) { super.OnEnterState(previous_state_name); - // Set is_spawn_forced if the previous state was SpawningForced + // Set is_spawn_forced if the previous state was SpawningForced. this.is_spawn_forced = previous_state_name == 'SpawningForced'; @@ -21,15 +21,16 @@ state Spawning in CRandomEncounters { picked_encounter_type = this.getRandomEncounterType(); - // we start by checking if the creature spawn should be cancelled. + // We start by checking if the creature spawn should be cancelled. if ( - // first if RER is disabled, any spawn should be cancelled + // First if RER is disabled, any spawn should be cancelled. !parent.settings.is_enabled - // or if there is not enough mod power to enable the system + // Or if there is not enough mod power to enable the system. || !RER_modPowerIsEncounterSystemEnabled(parent.getModPower()) - // then, if the spawn is not forced we check if the player + + // Then, if the spawn is not forced we check if the player // is in a place where a spawn in accepted. || !this.is_spawn_forced && shouldAbortCreatureSpawn(parent.settings, parent.rExtra, parent.bestiary)) { diff --git a/src/states/waiting.wss b/src/states/waiting.wss index 9542e155..77126520 100644 --- a/src/states/waiting.wss +++ b/src/states/waiting.wss @@ -32,13 +32,14 @@ state Waiting in CRandomEncounters { while (parent.ticks_before_spawn >= 0) { ticks = 5 * parent.ecosystem_frequency_multiplier - // the speed at which encounters are spawned scales with the mod power + + // The speed at which encounters are spawned scales with the mod power. * parent.getModPower(); parent.ticks_before_spawn -= ticks; time_before_updating_frequency_multiplier -= ticks; - // we refresh the ecosystem effects on frequencies every 30 seconds or so + // We refresh the ecosystem effects on frequencies every 30 seconds or so. if (time_before_updating_frequency_multiplier <= 0) { parent.refreshEcosystemFrequencyMultiplier(); NLOG("ecosystem_frequency_multiplier = " + parent.ecosystem_frequency_multiplier); diff --git a/src/static_encounters/placeholder_static_encounter.wss b/src/static_encounters/placeholder_static_encounter.wss index 24f73910..17767e91 100644 --- a/src/static_encounters/placeholder_static_encounter.wss +++ b/src/static_encounters/placeholder_static_encounter.wss @@ -42,7 +42,7 @@ class RER_PlaceholderStaticEncounter extends RER_StaticEncounter { } /** - * override the function to return true whenever it finds a monster instead of + * Override the function to return true whenever it finds a monster instead of * a specific bestiary entry. */ private function areThereEntitiesWithSameTemplate(entities: array): bool { @@ -68,10 +68,10 @@ class RER_PlaceholderStaticEncounter extends RER_StaticEncounter { } /** - * override the function to return a random entry based on the surrounding + * Override the function to return a random entry based on the surrounding * ecosystem. * - * warning: side effect, depending on the RER_PlaceholderStaticEncounterType + * Warning: side effect, depending on the RER_PlaceholderStaticEncounterType * it may run some additional functions. */ public latent function getBestiaryEntry(master: CRandomEncounters): RER_BestiaryEntry { @@ -88,7 +88,7 @@ class RER_PlaceholderStaticEncounter extends RER_StaticEncounter { .setOffsets( constants.large_creature_begin, constants.large_creature_max, - 0 // creature outside the offset have 0% chance to appear + 0 // Creature outside the offset have 0% chance to appear. ); } else { @@ -96,7 +96,7 @@ class RER_PlaceholderStaticEncounter extends RER_StaticEncounter { .setOffsets( constants.large_creature_begin, constants.large_creature_max, - 0 // creature outside the offset have 0% chance to appear + 0 // Creature outside the offset have 0% chance to appear. ); } @@ -111,13 +111,13 @@ class RER_PlaceholderStaticEncounter extends RER_StaticEncounter { return output; } else if (this.placeholder_type == RER_PSET_CopyNearbyCreature) { - // this placeholder static encounter has not yet found an entity to copy + // This placeholder static encounter has not yet found an entity to copy. if (this.picked_creature_type == CreatureNONE) { this.picked_creature_type = this.findRandomNearbyHostileCreatureType(master); } - // if it's still none then we default back to - // the LearnFromEcosystem behavior + // If it's still none then we default back to + // the LearnFromEcosystem behavior. if (this.picked_creature_type == CreatureNONE) { output = master.bestiary.getRandomEntryFromBestiary( master, @@ -151,7 +151,7 @@ class RER_PlaceholderStaticEncounter extends RER_StaticEncounter { this.position, this.radius + 20, // the +20 is to still catch monster on small radius in case they move 1 * (this.radius as int), - , // tags + , // Tags FLAG_ExcludePlayer | FLAG_OnlyAliveActors | FLAG_Attitude_Hostile, // queryflags thePlayer, // target 'CNewNPC' @@ -171,13 +171,13 @@ class RER_PlaceholderStaticEncounter extends RER_StaticEncounter { } } - // note: we re-use i here instead of making a new variable for the array size + // Note: We re-use i here instead of making a new variable for the array size. i = possible_types.Size(); if (i <= 0) { return CreatureNONE; } - // note: we re-use i here for the random index now + // Note: We re-use i here for the random index now. i = RandRange(i, 0); return possible_types[i]; diff --git a/src/static_encounters/states/spawning.wss b/src/static_encounters/states/spawning.wss index 86b46f06..70f765e1 100644 --- a/src/static_encounters/states/spawning.wss +++ b/src/static_encounters/states/spawning.wss @@ -25,7 +25,7 @@ state Spawning in RER_StaticEncounterManager { return; } - // WARNING: if you remove this sleep call the game crashes, at the moment of + // WARNING: If you remove this sleep call the game crashes, at the moment of // writing this comment i have literally no idea of why it would crash. Sleep(10); @@ -38,7 +38,7 @@ state Spawning in RER_StaticEncounterManager { large_chance = StringToFloat(theGame.GetInGameConfigWrapper().GetVarValue('RERencountersGeneral', 'RERstaticEncounterLargeSpawnChance')); }; - // cancel if both options are set to 0 + // Cancel if both options are set to 0. if (small_chance + large_chance <= 0) { return; } @@ -59,9 +59,9 @@ state Spawning in RER_StaticEncounterManager { SleepOneFrame(); } - // every time the spawning triggers, we loop over the nearby POIs and we spawn + // Every time the spawning triggers, we loop over the nearby POIs and we spawn // any new placeholder static encounter. They are then added to the persistent - // storage and finally they are manually triggered + // storage and finally they are manually triggered. // this.spawnPlaceholderStaticEncounters( // master, // player_position, @@ -132,8 +132,8 @@ state Spawning in RER_StaticEncounterManager { ); } - // we now save the storage where placeholders are stored since they may - // have copied a creature from their surrounding + // We now save the storage where placeholders are stored since they may + // have copied a creature from their surrounding. parent.master.storages.general.save(); } @@ -147,13 +147,13 @@ state Spawning in RER_StaticEncounterManager { // We also fetch entities with a custom tag to support // custom point of interests. This can prove useful in - // new maps from mods that may want to add support for RER + // new maps from mods that may want to add support for RER. // placeholders FindGameplayEntitiesInRange( entities, thePlayer, - max_distance, // range - 500, // maxresults + max_distance, // Range + 500, // Maxresults 'RER_contractPointOfInterest', // tag ); diff --git a/src/static_encounters/static_encounter.wss b/src/static_encounters/static_encounter.wss index 3bb86f1a..55388254 100644 --- a/src/static_encounters/static_encounter.wss +++ b/src/static_encounters/static_encounter.wss @@ -7,7 +7,7 @@ class RER_StaticEncounter { var region_constraint: RER_RegionConstraint; - // used to fetch the spawning chance from the menu. + // Used to fetch the spawning chance from the menu. var type: RER_StaticEncounterType; default type = StaticEncounterType_SMALL; @@ -46,13 +46,13 @@ class RER_StaticEncounter { return false; } - // first if the player is too far + // First if the player is too far. radius = this.radius * this.radius; if (VecDistanceSquared2D(player_position, this.position) > max_distance * max_distance) { return false; } - // then check if the player is nearby, cancel spawn. + // Then check if the player is nearby, cancel spawn. radius = MinF( this.radius * this.radius * 2, max_distance * 0.5 @@ -62,7 +62,7 @@ class RER_StaticEncounter { return false; } - // check if an enemy from the `bestiary_entry` is nearby, cancel spawn. + // Check if an enemy from the `bestiary_entry` is nearby, cancel spawn. FindGameplayEntitiesCloseToPoint( entities, this.position, @@ -90,7 +90,7 @@ class RER_StaticEncounter { for (i = 0; i < entities.Size(); i += 1) { hashed_name = entities[i].GetReadableName(); - // we found a nearby enemy that is from the same template + // We found a nearby enemy that is from the same template if (this.isTemplateInEntry(hashed_name)) { NLOG("StaticEncounter already spawned"); @@ -133,7 +133,7 @@ class RER_StaticEncounter { } // - // return `true` if the roll succeeded, and false if it didn't. + // Return `true` if the roll succeeded, and false if it didn't. private function rollSpawningChance(small_chance: float, large_chance: float): bool { var spawn_chance: float; diff --git a/src/static_encounters/static_encounters_manager.wss b/src/static_encounters/static_encounters_manager.wss index 7e93eecd..3d9408a6 100644 --- a/src/static_encounters/static_encounters_manager.wss +++ b/src/static_encounters/static_encounters_manager.wss @@ -32,7 +32,7 @@ statemachine class RER_StaticEncounterManager { size = StaticEncounterType_SMALL; - // a 20% chance to be a large creature + // A 20% chance to be a large creature. if (RandRange(100, 0) < 20) { size = StaticEncounterType_LARGE; } @@ -48,7 +48,7 @@ statemachine class RER_StaticEncounterManager { .init( false, position, - 20, // by default a 20 meters radius + 20, // By default a 20 meters radius. size, placeholder_type ); @@ -1622,7 +1622,7 @@ latent function RER_registerStaticEncountersAeltoth(master: CRandomEncounters) { StaticEncounterType_SMALL ); - // A abandonned house with skeletons and hanged people in the forest + // An abandonned house with skeletons and hanged people in the forest. RER_registerStaticEncounter( master, CreatureHUMAN, @@ -1632,7 +1632,7 @@ latent function RER_registerStaticEncountersAeltoth(master: CRandomEncounters) { StaticEncounterType_SMALL ); - // a mountain near the swamp + // A mountain near the swamp RER_registerStaticEncounter( master, CreatureFORKTAIL, @@ -1642,7 +1642,7 @@ latent function RER_registerStaticEncountersAeltoth(master: CRandomEncounters) { StaticEncounterType_LARGE ); - // a flat surface in the mountain near the swamp + // A flat surface in the mountain near the swamp RER_registerStaticEncounter( master, CreatureWYVERN, @@ -1662,7 +1662,7 @@ latent function RER_registerStaticEncountersAeltoth(master: CRandomEncounters) { StaticEncounterType_SMALL ); - // a ruined castle near a swamp + // A ruined castle near a swamp RER_registerStaticEncounter( master, CreatureENDREGA, @@ -1933,7 +1933,7 @@ latent function RER_registerStaticEncountersAeltoth(master: CRandomEncounters) { StaticEncounterType_LARGE ); - // a big stone where there is sometimes a cyclop in vanilla + // A big stone where there is sometimes a cyclop in vanilla. RER_registerStaticEncounter( master, CreatureCYCLOP, diff --git a/src/storage/base_storage.wss b/src/storage/base_storage.wss index 9ae632d7..d8eacd56 100644 --- a/src/storage/base_storage.wss +++ b/src/storage/base_storage.wss @@ -1,6 +1,6 @@ - -// any storage used in RER inherits from this class. +// Any storage used in RER inherits from this class. abstract class RER_BaseStorage { + public function save(): bool { NLOG("RER_BaseStorage::save()"); return true; diff --git a/src/storage/bounty.wss b/src/storage/bounty.wss index 216bb8b6..5660b2c4 100644 --- a/src/storage/bounty.wss +++ b/src/storage/bounty.wss @@ -1,5 +1,5 @@ -// in this class you will find all persistent data about the bounties the mod +// In this class you will find all persistent data about the bounties the mod // stores in the user save files. class RER_BountyStorage extends RER_BaseStorage { var whiteorchard_level: int; @@ -10,4 +10,4 @@ class RER_BountyStorage extends RER_BaseStorage { var unknown_level: int; var current_bounty: RER_Bounty; -} +} \ No newline at end of file diff --git a/src/storage/collection.wss b/src/storage/collection.wss index 3800c898..8a32f849 100644 --- a/src/storage/collection.wss +++ b/src/storage/collection.wss @@ -1,5 +1,5 @@ -// a collection of all storage classes the mod uses +// A collection of all storage classes the mod uses. class RER_StorageCollection { var general: RER_GeneralStorage; var ecosystem: RER_EcosystemStorage; @@ -8,7 +8,7 @@ class RER_StorageCollection { var tracker: RER_TrackerStorage; } -// an helper function to get the full storage collection +// A helper function to get the full storage collection. function RER_loadStorageCollection(master: CRandomEncounters) { if (!master.storages) { NLOG("RER_loadStorageCollection() - Instantiating new storage collection"); diff --git a/src/storage/contract.wss b/src/storage/contract.wss index c64e60af..aca26019 100644 --- a/src/storage/contract.wss +++ b/src/storage/contract.wss @@ -1,15 +1,15 @@ -// in this class you will find all persistent data about the contracts the mod +// In this class you will find all persistent data about the contracts the mod // stores in the user save files. class RER_ContractStorage extends RER_BaseStorage { /** - * the time the contracts were last generated. The int value in the hours + * The time the contracts were last generated. The int value in the hours * of playtime the player has spent in the save. */ var last_generation_time: RER_GenerationTime; /** - * an array of the currently completed contracts. It is flushed if the + * An array of the currently completed contracts. It is flushed if the * last_errand_injection_time is refreshed. */ var completed_contracts: array; @@ -17,4 +17,4 @@ class RER_ContractStorage extends RER_BaseStorage { var active_contract: RER_ContractRepresentation; var has_ongoing_contract: bool; -} +} \ No newline at end of file diff --git a/src/storage/ecosystem.wss b/src/storage/ecosystem.wss index 12f72eaf..40076cc1 100644 --- a/src/storage/ecosystem.wss +++ b/src/storage/ecosystem.wss @@ -1,6 +1,6 @@ -// in this class you will find all persistent data about the ecosystem the mod +// In this class you will find all persistent data about the ecosystem the mod // stores in the user save files. class RER_EcosystemStorage extends RER_BaseStorage { public var ecosystem_areas: array; -} +} \ No newline at end of file diff --git a/src/storage/general.wss b/src/storage/general.wss index 71fd70ec..d6f8f047 100644 --- a/src/storage/general.wss +++ b/src/storage/general.wss @@ -1,9 +1,9 @@ /** - * A general storage for generic data + * A general storage for generic data. */ class RER_GeneralStorage extends RER_BaseStorage { var playthrough_seed: int; var placeholder_static_encounters: array; -} +} \ No newline at end of file diff --git a/src/templates.wss b/src/templates.wss index f75bb57e..bce07450 100644 --- a/src/templates.wss +++ b/src/templates.wss @@ -110,7 +110,7 @@ function rollDifficultyFactor(out factor: DifficultyFactor, difficulty: RER_Diff } // https://github.com/Aelto/W3_RandomEncounters_Tweaks/issues/34 - // if the selected difficulty is RANDOM, then we randomly pick the difficulty + // If the selected difficulty is RANDOM, then we randomly pick the difficulty. if (difficulty == RER_Difficulty_RANDOM) { difficulty = RandRange(RER_Difficulty_RANDOM - 1); } @@ -127,22 +127,22 @@ function rollDifficultyFactorWithRng(out factor: DifficultyFactor, difficulty: R } // https://github.com/Aelto/W3_RandomEncounters_Tweaks/issues/34 - // if the selected difficulty is RANDOM, then we randomly pick the difficulty + // If the selected difficulty is RANDOM, then we randomly pick the difficulty. if (difficulty == RER_Difficulty_RANDOM) { difficulty = RandRange(RER_Difficulty_RANDOM - 1); } return (rng.nextRange( getMinimumCountBasedOnDifficulty(factor, difficulty, added_factor), - // +1 because RandRange is [min;max[ + // +1 because RandRange is [min;max] getMaximumCountBasedOnDifficulty(factor, difficulty, added_factor) + 1 )) as int; } -// return true if atleast of the bestiary entries is known. -// if all entries are unknown then return false +// Return true if atleast of the bestiary entries is known. +// If all entries are unknown then return false. latent function bestiaryCanSpawnEnemyTemplateList(template_list: EnemyTemplateList, manager: CWitcherJournalManager): bool { - // we use a list too avoid loading twice the same journal entry + // We use a list too avoid loading twice the same journal entry. var already_checked_journals: array; var can_spawn: bool; @@ -152,21 +152,21 @@ latent function bestiaryCanSpawnEnemyTemplateList(template_list: EnemyTemplateLi var entryBase : CJournalBase; for (i = 0; i < template_list.templates.Size(); i += 1) { - // 1. first checking if the entry was already checked + // 1. First checking if the entry was already checked. for (j = 0; j < already_checked_journals.Size(); j += 1) { - // 2. the entry was checked already, we skip it + // 2. The entry was checked already, we skip it. if (already_checked_journals[j] == template_list.templates[i].bestiary_entry) { continue; } } - // 3. check the entry + // 3. Check the entry. can_spawn = bestiaryCanSpawnEnemyTemplate(template_list.templates[i], manager); if (can_spawn) { return true; } - // 4. entry unknown, add it to the checked list + // 4. Entry unknown, add it to the checked list. already_checked_journals.PushBack(template_list.templates[i].bestiary_entry); } diff --git a/src/timer/events/blood_necrophages.wss b/src/timer/events/blood_necrophages.wss index 76c9e19e..c4efcca3 100644 --- a/src/timer/events/blood_necrophages.wss +++ b/src/timer/events/blood_necrophages.wss @@ -1,5 +1,5 @@ -// When the player is hurt (not full life) necrophages ambush can appear around him +// When the player is hurt (not full health) necrophage ambushes can appear around him. class RER_ListenerBloodNecrophages extends RER_EventsListener { var time_before_other_spawn: float; default time_before_other_spawn = 0; @@ -19,7 +19,7 @@ class RER_ListenerBloodNecrophages extends RER_EventsListener { .GetVarValue('RERevents', 'eventBloodNecrophages') ); - // the event is only active if its chances to trigger are greater than 0 + // The event is only active if its chances to trigger are greater than 0. this.active = this.trigger_chance > 0; } @@ -30,14 +30,14 @@ class RER_ListenerBloodNecrophages extends RER_EventsListener { is_in_combat = thePlayer.IsInCombat(); - // to avoid triggering more than one event per fight + // To avoid triggering more than one event per fight. if (is_in_combat && (was_spawn_already_triggered || this.already_spawned_this_combat)) { this.already_spawned_this_combat = true; return false; } - // to avoid triggering this event too frequently + // To avoid triggering this event too frequently. if (this.time_before_other_spawn > 0) { time_before_other_spawn -= delta; @@ -46,8 +46,8 @@ class RER_ListenerBloodNecrophages extends RER_EventsListener { this.already_spawned_this_combat = false; - // this will be used to scale the % chances based on the missing health - // the lower the health the higher the chances. + // This will be used to scale the % chances based on the missing health. + // The lower the health the higher the chances. health_missing_perc = 1 - thePlayer.GetHealthPercents(); if (RandRangeF(100) < this.trigger_chance * chance_scale * health_missing_perc) { @@ -60,7 +60,7 @@ class RER_ListenerBloodNecrophages extends RER_EventsListener { type = this.getRandomNecrophageType(master); createRandomCreatureAmbush(master, type); - // so that we don't spawn an ambush too frequently + // So that we don't spawn an ambush too frequently. this.time_before_other_spawn += master.events_manager.internal_cooldown; NLOG("RER_ListenerBloodNecrophages - spawn triggered type = " + type); @@ -152,8 +152,8 @@ class RER_ListenerBloodNecrophages extends RER_EventsListener { .fillSpawnRoller(spawn_roller); #ifdef ENABLE_BESTIARY_FEATURE { - // when the option "Only known bestiary creatures" is ON - // we remove every unknown creatures from the spawning pool + // When the option "Only known bestiary creatures" is ON + // we remove every unknown creatures from the spawning pool. if (master.settings.only_known_bestiary_creatures) { manager = theGame.GetJournalManager(); diff --git a/src/timer/events/ecosystem_kills.wss b/src/timer/events/ecosystem_kills.wss index 9513f76f..fd2e9eba 100644 --- a/src/timer/events/ecosystem_kills.wss +++ b/src/timer/events/ecosystem_kills.wss @@ -18,7 +18,7 @@ class RER_ListenerEcosystemKills extends RER_EventsListener { var new_checkup: array; var checkup_difference: array; - // to save performances we do a ckeckup only every few seconds and if the time + // To save performances we do a ckeckup only every few seconds and if the time // is still greater than 0 than no need to go further. if (this.time_before_next_checkup > 0) { time_before_next_checkup -= delta; @@ -30,21 +30,21 @@ class RER_ListenerEcosystemKills extends RER_EventsListener { is_player_in_combat = thePlayer.IsInCombat(); - // the player was not in combat before and is still not in combat, we leave. + // The player was not in combat before and is still not in combat, we leave. if (!is_player_in_combat && !this.was_player_in_combat) { return false; } - // so it's time to notify about the creatures + // So it's time to notify about the creatures // he killed by doing a new checkup, comparing the old checkup with the new // and by excluding all alive creatures. Which gives us all creatures who were // there before and are not anymore and that we couldn't find alive. // // This method has a flaw, if the player runs away from a creature. So far away // that the checkup doesn't find the creature it will consider it dead. - // But i don't think it matters, i don't think players often flee or atleast + // But i don't think it matters, I don't think players often flee or atleast // not frequently enough to break the system. And increasing the range could - // severely impact performances so i still want to keep the checkup radius + // severely impact performances so I still want to keep the checkup radius // as small as possible. new_checkup = this.getCreatureTypesAroundPlayer(master); @@ -53,7 +53,7 @@ class RER_ListenerEcosystemKills extends RER_EventsListener { NLOG("new checkup:"); this.debugShowCheckup(new_checkup); - // we get here the create that were here before but are no longer here and + // We get here the create that were here before but are no longer here and // alive now. checkup_difference = getDifferenceBetweenCheckups( this.last_checkup, @@ -68,7 +68,7 @@ class RER_ListenerEcosystemKills extends RER_EventsListener { this.last_checkup = new_checkup; this.was_player_in_combat = is_player_in_combat; - // do not checkup more than once every 5 seconds. + // Do not checkup more than once every 5 seconds. this.time_before_next_checkup += 5; return false; @@ -83,9 +83,9 @@ class RER_ListenerEcosystemKills extends RER_EventsListener { FindGameplayEntitiesInRange( entities, thePlayer, - 25, // radius - 10, // max number of entities - , // tag + 25, // Radius + 10, // Max number of entities + , // Tag FLAG_Attitude_Hostile + FLAG_ExcludePlayer + FLAG_OnlyAliveActors + FLAG_OnlyActors, thePlayer, // target 'CNewNPC' @@ -120,12 +120,12 @@ class RER_ListenerEcosystemKills extends RER_EventsListener { // returns creatures that were in `before` and are no longer in `after` private function getDifferenceBetweenCheckups(before: array, after: array): array { var i: int; - // use CreatureType as the index. + // Use CreatureType as the index. var differences: array; - // for every creature we find in `before` we will increment difference[creature_type] by 1 - // then for every creature we find in `after` we will decrement differences[creature_type] by -1 - // then we take any monster whose value is greater than 0 + // For every creature we find in `before` we will increment difference[creature_type] by 1. + // Then for every creature we find in `after` we will decrement differences[creature_type] by -1. + // Then we take any monster whose value is greater than 0. for (i = 0; i < CreatureMAX; i += 1) { differences.PushBack(0); } @@ -142,7 +142,7 @@ class RER_ListenerEcosystemKills extends RER_EventsListener { } private function notifyEcosystemManager(master: CRandomEncounters, differences: array) { - // uses CreatureType as the index + // Uses CreatureType as the index. var power_changes: array; var i: int; @@ -155,7 +155,7 @@ class RER_ListenerEcosystemKills extends RER_EventsListener { RER_tutorialTryShowEcosystem(); master.ecosystem_manager - // at this point the power_changes[i] is simply the enemy count + // At this point the power_changes[i] is simply the enemy count. .updatePowerForCreatureInCurrentEcosystemAreas( i, differences[i] * -1, diff --git a/src/timer/events/enters_swamp.wss b/src/timer/events/enters_swamp.wss index 64d19bac..903e503a 100644 --- a/src/timer/events/enters_swamp.wss +++ b/src/timer/events/enters_swamp.wss @@ -1,5 +1,5 @@ -// When the player enters a swamp, there is a small chance for drowners or hags to appear +// When the player enters a swamp, there is a small chance for drowners or hags to appear. class RER_ListenerEntersSwamp extends RER_EventsListener { var was_in_swamp_last_run: bool; var type: CreatureType; @@ -16,7 +16,7 @@ class RER_ListenerEntersSwamp extends RER_EventsListener { .GetVarValue('RERevents', 'eventEntersSwamp') ); - // the event is only active if its chances to trigger are greater than 0 + // The event is only active if its chances to trigger are greater than 0. this.active = this.trigger_chance > 0; } @@ -29,7 +29,7 @@ class RER_ListenerEntersSwamp extends RER_EventsListener { is_in_swamp_now = master.rExtra.IsPlayerInSwamp(); - // the player is now in a swamp and was not in one last run + // The player is now in a swamp and was not in one last run // it means he just entered it this run. if (is_in_swamp_now && !was_in_swamp_last_run && RandRangeF(100) < this.trigger_chance * chance_scale) { type = this.getRandomSwampCreatureType(master); @@ -92,8 +92,8 @@ class RER_ListenerEntersSwamp extends RER_EventsListener { .fillSpawnRoller(spawn_roller); #ifdef ENABLE_BESTIARY_FEATURE { - // when the option "Only known bestiary creatures" is ON - // we remove every unknown creatures from the spawning pool + // When the option "Only known bestiary creatures" is ON + // we remove every unknown creatures from the spawning pool. if (master.settings.only_known_bestiary_creatures) { manager = theGame.GetJournalManager(); diff --git a/src/timer/events/fight-noise.wss b/src/timer/events/fight-noise.wss index 01215ed0..115626f5 100644 --- a/src/timer/events/fight-noise.wss +++ b/src/timer/events/fight-noise.wss @@ -19,7 +19,7 @@ class RER_ListenerFightNoise extends RER_EventsListener { .GetVarValue('RERevents', 'eventFightNoise') ); - // the event is only active if its chances to trigger are greater than 0 + // The event is only active if its chances to trigger are greater than 0. this.active = this.trigger_chance > 0; } @@ -28,14 +28,14 @@ class RER_ListenerFightNoise extends RER_EventsListener { is_in_combat = thePlayer.IsInCombat(); - // to avoid triggering more than one event per fight + // To avoid triggering more than one event per fight. if (is_in_combat && (was_spawn_already_triggered || this.already_spawned_this_combat)) { this.already_spawned_this_combat = true; return false; } - // to avoid triggering this event too frequently + // To avoid triggering this event too frequently. if (this.time_before_other_spawn > 0) { time_before_other_spawn -= delta; @@ -53,12 +53,12 @@ class RER_ListenerFightNoise extends RER_EventsListener { return false; } - // we disable it for the fight so it doesn't spawn non-stop + // We disable it for the fight so it doesn't spawn non-stop. this.already_spawned_this_combat = is_in_combat; this.time_before_other_spawn += master.events_manager.internal_cooldown; - // create a random ambush with no creature type chosen, let RER pick one + // Create a random ambush with no creature type chosen, let RER pick one // randomly. createRandomCreatureAmbush(master, CreatureNONE); diff --git a/src/timer/events/fill_creatures_group.wss b/src/timer/events/fill_creatures_group.wss index d642f92e..0eb5d15e 100644 --- a/src/timer/events/fill_creatures_group.wss +++ b/src/timer/events/fill_creatures_group.wss @@ -21,7 +21,7 @@ class RER_ListenerFillCreaturesGroup extends RER_EventsListener { this.can_duplicate_creatures_in_combat = inGameConfigWrapper .GetVarValue('RERevents', 'eventFillCreaturesGroupAllowCombat'); - // the event is only active if its chances to trigger are greater than 0 + // The event is only active if its chances to trigger are greater than 0. this.active = this.trigger_chance > 0; } @@ -48,10 +48,10 @@ class RER_ListenerFillCreaturesGroup extends RER_EventsListener { } if (RandRangeF(100) < this.trigger_chance * chance_scale) { - // it's done inside the if and only after a successful roll to avoid retrieving + // It's done inside the if and only after a successful roll to avoid retrieving // the creature's height every interval. It's an attempt at optimizing it. // - // small creatures will have a higher chance to pass, while larger creatures + // Small creatures will have a higher chance to pass, while larger creatures // will have a lower chance. The height is divided by two because some creatures // are 4 meters tall like fiends and dividing their chances by 4 would be // too much. So instead we divide their chance by 4meters / 2. @@ -69,10 +69,10 @@ class RER_ListenerFillCreaturesGroup extends RER_EventsListener { this.duplicateEntity(master, random_entity_to_duplicate); this.time_before_other_spawn += master.events_manager.internal_cooldown; - // NOTE: this event SHOULD return true but doesn't because it doesn't affect + // NOTE: This event SHOULD return true but doesn't because it doesn't affect // the other events. Other events use the "true" to know if another event - // spawned a creature. But as this one only add creatures that are out of - // combat it should not infer with the other event. + // spawned a creature. But as this one only adds creatures that are out of + // combat it should not interfere with the other events. return false; } @@ -93,27 +93,27 @@ class RER_ListenerFillCreaturesGroup extends RER_EventsListener { FindGameplayEntitiesInRange( entities, thePlayer, - 300, // radius - 100, // max number of entities - , // tag + 300, // Radius + 100, // Max number of entities + , // Tag FLAG_Attitude_Hostile + FLAG_ExcludePlayer + FLAG_OnlyAliveActors, - thePlayer, // target + thePlayer, // Target 'CNewNPC' ); - // to avoid duplicating bosses + // To avoid duplicating bosses. boss_tag = thePlayer.GetBossTag(); for (i = 0; i < entities.Size(); i += 1) { if ((entities[i] as CNewNPC) && (entities[i] as CNewNPC).GetNPCType() == ENGT_Enemy - // this one removes animals like bears, wolves - // and also humans like bandits + // This one removes animals like bears, wolves + // and also humans like bandits. // && (entities[i] as CNewNPC).IsMonster() - // if the user allows even creatures who are in combat - // or if the creature is not in combat + // If the user allows even creatures who are in combat + // or if the creature is not in combat. && ( this.can_duplicate_creatures_in_combat || !(entities[i] as CNewNPC).IsInCombat() diff --git a/src/timer/events/meditation_ambush.wss b/src/timer/events/meditation_ambush.wss index 7d1ed598..958a9430 100644 --- a/src/timer/events/meditation_ambush.wss +++ b/src/timer/events/meditation_ambush.wss @@ -1,5 +1,5 @@ -// When the player enters a swamp, there is a small chance for drowners or hags to appear +// When the player comes out of meditation there is a chance for an ambush to appear. class RER_ListenerMeditationAmbush extends RER_EventsListener { var trigger_chance: float; @@ -13,7 +13,7 @@ class RER_ListenerMeditationAmbush extends RER_EventsListener { .GetVarValue('RERevents', 'eventMeditationAmbush') ); - // the event is only active if its chances to trigger are greater than 0 + // The event is only active if its chances to trigger are greater than 0. this.active = this.trigger_chance > 0; } @@ -36,7 +36,7 @@ class RER_ListenerMeditationAmbush extends RER_EventsListener { // NLOG("current state = " + current_state); - // if the player is not meditating right now + // If the player is not meditating right now // we can early cancel the event here. if (!is_meditating) { // the player was meditating and is no longer meditating @@ -49,16 +49,16 @@ class RER_ListenerMeditationAmbush extends RER_EventsListener { return false; } - // to avoid triggering this event too frequently + // To avoid triggering this event too frequently. if (this.time_before_other_spawn > 0) { time_before_other_spawn -= delta; return false; } - // at this point it means the player is meditating + // At this point it means the player is meditating. - // the player just started meditating + // The player just started meditating. if (time_spent_meditating == 0) { time_spent_meditating = CeilF(delta); } @@ -73,17 +73,17 @@ class RER_ListenerMeditationAmbush extends RER_EventsListener { // + (float)(time_spent_meditating / 3600) + " final = " // + (this.trigger_chance * (0.8 + (float)(time_spent_meditating / 3600) / 12.0)) * chance_scale); - // once we know how many seconds the player meditated, - // we can increase the chances + // Once we know how many seconds the player meditated, + // we can increase the chances. // 12 hours increase the chances by 100%, 24h by 200%. - // the default value is 80% of what the user set in the settings - // so when starting a meditation we're at 80% - // 12 hours later it's at 180% - // 24 hours later it's at 280% + // The default value is 80% of what the user set in the settings. + // So when starting a meditation we're at 80%. + // 12 hours later it's at 180%. + // 24 hours later it's at 280%. if (RandRangeF(100) < ((this.trigger_chance * (0.8 + (time_spent_meditating / 3600) as float) / 12.0)) * chance_scale) { NLOG("RER_ListenerMeditationAmbush - triggered, % increased by meditation = " + time_spent_meditating / 3600); - // this check is done only when the event has triggered to avoid doing it too often + // This check is done only when the event has triggered to avoid doing it too often. if (shouldAbortCreatureSpawn(master.settings, master.rExtra, master.bestiary)) { NLOG("RER_ListenerMeditationAmbush - cancelled"); @@ -92,7 +92,7 @@ class RER_ListenerMeditationAmbush extends RER_EventsListener { this.time_before_other_spawn += master.events_manager.internal_cooldown; - // create a random ambush with no creature type chosen, let RER pick one + // Create a random ambush with no creature type chosen, let RER pick one // randomly. createRandomCreatureAmbush(master, CreatureNONE); diff --git a/src/timer/events_listener.wss b/src/timer/events_listener.wss index f9f230c5..5a8ae526 100644 --- a/src/timer/events_listener.wss +++ b/src/timer/events_listener.wss @@ -12,7 +12,7 @@ abstract class RER_EventsListener { } public latent function onInterval(was_spawn_already_triggered: bool, master: CRandomEncounters, delta: float, chance_scale: float): bool { - // Do your thing and return if a spawn was triggered or not + // Do your thing and return if a spawn was triggered or not. return was_spawn_already_triggered; } diff --git a/src/timer/events_manager.wss b/src/timer/events_manager.wss index ef72ec0e..5cf09ee5 100644 --- a/src/timer/events_manager.wss +++ b/src/timer/events_manager.wss @@ -1,13 +1,13 @@ statemachine class RER_EventsManager extends CEntity { - //#region listeners + // #region listeners public var listeners: array; public function addListener(listener: RER_EventsListener) { this.listeners.PushBack(listener); } - //#endregion listeners + // #endregion listeners public var master: CRandomEncounters; @@ -27,8 +27,8 @@ statemachine class RER_EventsManager extends CEntity { public var delay: float; - // this exists because i don't want the the event % chances to trigger - // to scale on the interval. Because it means if a player wants his events + // This exists because i don't want the the event % chances to trigger + // the scale on the interval. Because it means if a player wants his events // to trigger less often he has to either increase the interval or reduce // the % chances one by one. And the interval should NOT be increased unless // for performance reasons. @@ -39,7 +39,7 @@ statemachine class RER_EventsManager extends CEntity { this.delay = this.master.settings.event_system_interval; - // only start the system if the delay is above 0 + // Only start the system if the delay is above 0. if (this.delay > 0) { this.GotoState('Starting'); } diff --git a/src/timer/states/starting.wss b/src/timer/states/starting.wss index b78c5fce..cc62510f 100644 --- a/src/timer/states/starting.wss +++ b/src/timer/states/starting.wss @@ -30,7 +30,7 @@ state Starting in RER_EventsManager { .GetVarValue('RERevents', 'eventSystemICD') ); - // the chance_scale also scales with the mod power + // The chance_scale also scales with the mod power. parent.chance_scale = parent.delay / parent.internal_cooldown * parent.master.getModPower(); NLOG("RER_EventsManager - chance_scale = " + parent.chance_scale + ", delay =" + parent.delay); diff --git a/src/trail_maker.wss b/src/trail_maker.wss index 9144ab59..07fd296e 100644 --- a/src/trail_maker.wss +++ b/src/trail_maker.wss @@ -3,16 +3,16 @@ struct RER_TrailMakerTrack { var template: CEntityTemplate; var monster_clue_type: name; - // some track templates need a higher trail ratio - // so when you add a track with a multiplier greater than 1 - // the TrailMaker trail ratio will increased to accomodate. - // the TrailMaker uses the highest trail_ratio_multiplier among + // Some track templates need a higher trail ratio. + // So when you add a track with a multiplier greater than 1. + // The TrailMaker trail ratio will increased to accomodate. + // The TrailMaker uses the highest trail_ratio_multiplier among // its track lists. var trail_ratio_multiplier: float; default trail_ratio_multiplier = 1; } -// the trail maker is class used to create trails of blood or tracks on the +// The trail maker is class used to create trails of blood or tracks on the // ground. It handles cases where you must draw a trail from point A to point B, // or simple cases where you only need one track at a specific location. // @@ -21,7 +21,7 @@ struct RER_TrailMakerTrack { // where we can say only draw 0.25 or 0.50, etc... class RER_TrailMaker { - // tells how many are skipped when drawing a trail. If it is set at `1` then + // Tells how many are skipped when drawing a trail. If it is set at `1` then // it will draw every track, if set at `2` it will draw every 2 tracks. private var trail_ratio: int; default trail_ratio = 1; @@ -34,7 +34,7 @@ class RER_TrailMaker { this.trail_ratio_index = 1; } - // loops through the tracks and find the highest trail ratio multiplier + // Loops through the tracks and find the highest trail ratio multiplier. private function getHighestTrailRatioMultiplier(): float { var i: int; var highest_multiplier: float; @@ -50,9 +50,9 @@ class RER_TrailMaker { return highest_multiplier; } - // an array containing entities for the tracks when - // using the functions to add a track on the ground - // it adds one to the array, unless we reached the maximum + // An array containing entities for the tracks when + // using the functions to add a track on the ground. + // It adds one to the array, unless we reached the maximum // number of tracks. At this moment we come back to 0 and // start using the tracks_index and set tracks_looped // to true to tell we have already reached the maximum once. @@ -137,7 +137,7 @@ class RER_TrailMaker { if (this.tracks_entities.Size() == this.tracks_maximum) { this.tracks_looped = true; - // because the recycling process starts first by doing `tracks_index + 1` + // Because the recycling process starts first by doing `tracks_index + 1` // it is by default set at -1 so the first track it starts recycling is // the track at index 0. this.tracks_index = -1; @@ -162,14 +162,14 @@ class RER_TrailMaker { return this.tracks_entities[this.tracks_entities.Size() - 1]; } - // `use_failsage` stops the trail if it drew more than `this.tracks_maximum` - // tracks. It can be useful if the trail is too long, to avoid a crash + // `use_failsafe` Stops the trail if it drew more than `this.tracks_maximum` + // tracks. It can be useful if the trail is too long, to avoid a crash. public latent function drawTrail( from: Vector, to: Vector, destination_radius: float, - /* set both trails_details parameters or none at all */ + // Set both trails_details parameters or none at all. optional trail_details_maker: RER_TrailDetailsMaker, optional trail_details_chances: float, @@ -205,17 +205,16 @@ class RER_TrailMaker { do { // 50 / 100 = 0.5 - // it's a % going from 100% to 0% as we get closer + // It's a % going from 100% to 0% as we get closer. distance_left = 1 - (total_distance_to_final_point - distance_to_final_point) / total_distance_to_final_point; current_track_translation = VecConeRand( VecHeading(to - current_track_position), - // the closer we get to the final point, the smaller the degrees randomness is + // The closer we get to the final point, the smaller the degrees of randomness are. 40 + 50 * distance_left, - // the closer we get to the final point, the smaller the distance between - // tracks is. + // The closer we get to the final point, the smaller the distance between tracks is. 0.5 + distance_left * 0.5, 1 + 1 * distance_left ); @@ -250,7 +249,7 @@ class RER_TrailMaker { distance_to_final_point = VecDistanceSquared2D(current_track_position, to); - // small chance to add a corpse near the tracks + // Small chance to add a corpse near the tracks. if (trail_details_chances > 0 && RandRange(100) < trail_details_chances) { trail_details_maker.placeDetailsHere(current_track_position); } @@ -283,9 +282,9 @@ class RER_TrailMaker { } /** - * set it to true if you don't want the class to clean all tracks when it's + * Set it to true if you don't want the class to clean all tracks when it's * destroyed. Especially useful if you create a temporary TrailMaker just - * to quickly draw trails + * to quickly draw trails. */ var dont_clean_on_destroy: bool; @@ -297,12 +296,12 @@ class RER_TrailMaker { } -// the `TrailDetailsMaker` is a class used by the `TrailMaker` class when -// drawing a trail. It is an abstract class with only one method: +// The `TrailDetailsMaker` is a class used by the `TrailMaker` class when +// drawing a trail. It is an abstract class with only one method. // ``` // placeDetailsHere(position: Vector) // ``` -// when drawing a trail there is a chance we add small details among the tracks +// When drawing a trail there is a chance we add small details among the tracks // such as corpses, blood around the tracks, a creature, etc... This is what // this class is for. // @@ -311,7 +310,7 @@ class RER_TrailMaker { // this new class we just created and that's it. abstract class RER_TrailDetailsMaker { - // override it + // Override it. public latent function placeDetailsHere(position: Vector) {} } @@ -319,8 +318,8 @@ abstract class RER_TrailDetailsMaker { class RER_CorpseAndBloodTrailDetailsMaker extends RER_TrailDetailsMaker { - // because it creates corpses and blood spills, we must set these to members - // before using this DetailsMaker + // Because it creates corpses and blood spills, we must set these to members + // before using this DetailsMaker. public var corpse_maker: RER_TrailMaker; public var blood_maker: RER_TrailMaker; diff --git a/src/zones.wss b/src/zones.wss index 0695a223..f84b967f 100644 --- a/src/zones.wss +++ b/src/zones.wss @@ -1,6 +1,6 @@ //--- RandomEncounters --- -// Made by Erxv +// Made by Erxv. enum EREZone { REZ_UNDEF = 0, REZ_NOSPAWN = 1, @@ -132,7 +132,7 @@ class CModRExtra { private function isNearNoticeboard(radius_check: float): bool { var entities: array; - // 'W3NoticeBoard' for noticeboards, 'W3FastTravelEntity' for signpost + // 'W3NoticeBoard' for noticeboards, 'W3FastTravelEntity' for signpost. FindGameplayEntitiesInRange( entities, thePlayer, @@ -180,14 +180,14 @@ class CModRExtra { current_area = theGame.GetCommonMapManager().GetCurrentArea(); - // HACK: it can be a great way to see if a settlement is nearby + // HACK: It can be a great way to see if a settlement is nearby // by looking for a noticeboard. Though some settlements don't have // any noticeboard. if (this.isNearNoticeboard(radius_check)) { return true; } - // the .isInSettlement() method doesn't work when is skellige + // The .isInSettlement() method doesn't work when in skellige // it always returns true. if (current_area == AN_Skellige_ArdSkellig) {