53 super.CreateResultDataStructure();
59 super.ClearCatchingItemData();
78 super.InitCatchingItemData();
103 Debug.
Log(
"---InitCatchingItemData---",
"Fishing");
121 if (item.IsRuined() || item.IsSetForDeletion())
127 if (
g_Game.ConfigIsExisting(
path +
" resultQuantityBaseMod"))
129 if (
g_Game.ConfigIsExisting(
path +
" resultQuantityDispersionMin"))
131 if (
g_Game.ConfigIsExisting(
path +
" resultQuantityDispersionMax"))
133 if (
g_Game.ConfigIsExisting(
path +
" hookLossChanceMod"))
135 if (
g_Game.ConfigIsExisting(
path +
" baitLossChanceMod"))
138 if (
g_Game.ConfigIsExisting(
path +
" signalDurationMin"))
144 if (
g_Game.ConfigIsExisting(
path +
" signalDurationMax"))
151 if (
g_Game.ConfigIsExisting(
path +
" signalCycleTargetAdjustment"))
153 if (
g_Game.ConfigIsExisting(
path +
" signalCycleTargetEndAdjustment"))
158 if (item.GetInventory().GetCurrentAttachmentSlotInfo(slotID,
slotName))
195 Debug.
Log(
"---ModifySignalProbability---",
"Fishing");
197 Debug.
Log(
"easingTime: " + easingTime,
"Fishing");
198 Debug.
Log(
"probability: " + probability,
"Fishing");
212 bool ret = super.RollCatch();
234 return m_Result.GetYieldItemParticleId();
265 Debug.
Log(
"---RandomizeSignalDuration---",
"Fishing");
266 Debug.
Log(
"next signal duration: " + res,
"Fishing");
279 Debug.
Log(
"---RandomizeSignalStartTime---",
"Fishing");
280 Debug.
Log(
"next signal start time: " + res,
"Fishing");
296 if (lossChance >= 1 || roll < lossChance)
305 if (item && !
m_Player.IsQuickFishing())
307 item.SetPrepareToDelete();
322 if (lossChance >= 1 || roll < lossChance)
331 if (!
g_Game.IsMultiplayer() ||
g_Game.IsDedicatedServer())
342 return super.SpawnAndSetupCatch(yItemIdx,v);
void UpdateCatchingItemData()
class BaitData m_MainItem
ref CatchingResultBasic m_Result
float m_QualityDispersionMinMod
ref array< int > m_ProbabilityArray
float m_QualityDispersionMaxMod
PlayerSpawnPreset slotName
static const int MASK_ENVIRO_POND
static const int MASK_METHOD_ROD
const float POISSON_CYCLE_MEAN_DEFAULT
static const int MASK_ENVIRO_SEA
float GetCurrentCycleTime(CatchingContextFishingRodAction ctx)
float m_SignalTargetEndProbability
void ResetSignalCounter()
void OnAfterSpawnSignalHit()
int GetResultParticleId()
float m_SignalPoissonMean
void RecalculateProcessingData()
override bool ModifySignalProbability(inout float probability)
void InitItemValues(EntityAI item)
float GetSignalPoissonMean()
Deprecated, left here due to inheritance change.
void RemoveItemSafe(EntityAI item)
float RandomizeSignalDuration()
void ClearCatchingItemData()
only clear stuff you need to update
float GetHookLossChanceModifierClamped()
void InitCatchEnviroMask()
void OnSignalMiss()
release without signal
float m_SignalDurationMax
float m_SignalStartTimeMin
float m_SignalStartTimeMax
override void InitCatchingItemData()
float RandomizeSignalStartTime()
void CreateResultDataStructure()
float GetActionCycleTime()
float m_SignalDurationMin
int GetSignalMax()
Deprecated, left here due to inheritance change.
float GetBaitLossChanceModifierClamped()
float m_SignalCycleEndTarget
void InitCatchMethodMask()
void OnBeforeSpawnSignalHit()
float m_SignalCycleTargetEndAdjustment
override EntityAI SpawnAndSetupCatch(out int yItemIdx, vector v=vector.Zero)
float m_SignalCycleTarget
float m_HookLossChanceMod
override bool RollCatch()
float m_BaitLossChanceMod
float m_SignalCycleTargetAdjustment
override void GenerateResult()
done locally on both sides, needs a synced random
float m_SignalTargetProbability
Super root of all classes in Enforce script.
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
static float EaseInExpo(float t)
Input value between 0 and 1, returns value adjusted by easing, no automatic clamping of input(do your...
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
const float DAMAGE_HOOK
modifies chance for every signal roll
const float SIGNAL_START_TIME_MAX_BASE
const float SIGNAL_START_TIME_MIN_BASE
const float SIGNAL_DURATION_MIN_BASE
const float SIGNAL_DURATION_MAX_BASE
const float SIGNAL_MEAN_CHANCE_DEFAULT
re-purposed as soft cycle target
const float SIGNAL_CYCLE_MEAN_DEFAULT
const float SIGNAL_CYCLE_HARD_TARGET_DEFAULT
chance at MEAN
const float SIGNAL_HARD_TARGET_CHANCE_DEFAULT
hard cycle target
const float SIGNAL_FISHING_CHANCE_COEF
chance at HARD_TARGET (we probably want close to 100% here, randomness being random....
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
static proto float Ceil(float f)
Returns ceil of value.
proto native bool IsCLIParam(string param)
Returns if command line argument is present.