Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulpkanin Rework: Number Changes #713

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Content.Client/Flash/FlashSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ private void OnFlashableHandleState(EntityUid uid, FlashableComponent component,
// Few things here:
// 1. If a shorter duration flash is applied then don't do anything
// 2. If the client-side time is later than when the flash should've ended don't do anything
var calculatedStateDuration = state.Duration * state.DurationMultiplier;

var currentTime = _gameTiming.CurTime.TotalSeconds;
var newEndTime = state.Time.TotalSeconds + state.Duration;
var newEndTime = state.Time.TotalSeconds + calculatedStateDuration;
var currentEndTime = component.LastFlash.TotalSeconds + component.Duration;

if (currentEndTime > newEndTime)
Expand All @@ -53,7 +55,7 @@ private void OnFlashableHandleState(EntityUid uid, FlashableComponent component,
}

component.LastFlash = state.Time;
component.Duration = state.Duration;
component.Duration = calculatedStateDuration;

var overlay = _overlayManager.GetOverlay<FlashOverlay>();
overlay.ReceiveFlash(component.Duration);
Expand Down
6 changes: 6 additions & 0 deletions Content.Server/Atmos/Components/FlammableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,11 @@ public sealed partial class FlammableComponent : Component
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float FirestackFade = -0.1f;

/// <summary>
/// How stronger will firestack increases be?
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
VMSolidus marked this conversation as resolved.
Show resolved Hide resolved
public float FireStackIncreaseMultiplier = 1f;
}
}
3 changes: 3 additions & 0 deletions Content.Server/Atmos/EntitySystems/FlammableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@ public void AdjustFireStacks(EntityUid uid, float relativeFireStacks, FlammableC
if (!Resolve(uid, ref flammable))
return;

if (relativeFireStacks > 0)
relativeFireStacks *= flammable.FireStackIncreaseMultiplier;

flammable.FireStacks = MathF.Min(MathF.Max(MinimumFireStacks, flammable.FireStacks + relativeFireStacks), MaximumFireStacks);

if (flammable.OnFire && flammable.FireStacks <= 0)
Expand Down
2 changes: 2 additions & 0 deletions Content.Server/Flash/FlashSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ public void Flash(EntityUid target,
RaiseLocalEvent(used.Value, ref ev);
}

flashDuration *= flashable.DurationMultiplier;

flashable.LastFlash = _timing.CurTime;
flashable.Duration = flashDuration / 1000f; // TODO: Make this sane...
Dirty(target, flashable);
Expand Down
14 changes: 13 additions & 1 deletion Content.Shared/Flash/FlashableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ public sealed partial class FlashableComponent : Component
public float Duration;
public TimeSpan LastFlash;

// <summary>
// How much to modify the duration of flashes against this entity.
// </summary>
[DataField]
public float DurationMultiplier = 1f;

[DataField]
public CollisionGroup CollisionGroup = CollisionGroup.Opaque;

Expand All @@ -22,10 +28,16 @@ public sealed class FlashableComponentState : ComponentState
public float Duration { get; }
public TimeSpan Time { get; }

public FlashableComponentState(float duration, TimeSpan time)
// <summary>
// How much to modify the duration of flashes against this entity.
// </summary>
public float DurationMultiplier { get; }

public FlashableComponentState(float duration, TimeSpan time, float durationMultiplier)
{
Duration = duration;
Time = time;
DurationMultiplier = durationMultiplier;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Flash/SharedFlashSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public override void Initialize()

private static void OnFlashableGetState(EntityUid uid, FlashableComponent component, ref ComponentGetState args)
{
args.State = new FlashableComponentState(component.Duration, component.LastFlash);
args.State = new FlashableComponentState(component.Duration, component.LastFlash, component.DurationMultiplier);
}
}
}
3 changes: 2 additions & 1 deletion Resources/Prototypes/DeltaV/Damage/modifier_sets.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
- type: damageModifierSet
id: Vulpkanin
coefficients:
Heat: 1.15
Heat: 1.30
Cold: 0.70

- type: damageModifierSet
id: Harpy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- type: HumanoidAppearance
species: Vulpkanin
- type: Hunger
baseDecayRate: 0.019166666659 # 15% more than default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This for me personnaly is a nono.
I seen the effect of it and its horible. (on frontier)

Just please remove this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree, I've also seen the effects of this and it was a rather interesting experience.

Copy link
Contributor Author

@angelofallars angelofallars Aug 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mnemotechnician I reduced the 25% increased hunger rate to 15% due to feedback. What do you think is the ideal number for it?

I initially chose 25%, because EE does not have an increased hunger rate unlike Delta-V (see DeltaV-Station/Delta-v#1302, DeltaV-Station/Delta-v#1384). A 25% increase does not come even close to the default Delta-V hunger rate, which is 0.035f.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FoxxoTrystan I've done some research on the hunger rate changes of vulps on Frontier. It seems like they were set to a whopping 3x hunger increase from the Frontier base hunger rate (0.02f).
image

That's a LOT and puts it in context for me. A 1.25x hunger increase will likely not feel the same at all as a drastic 3x hunger increase.

With the base hunger rate of ~0.0166, the fastest time to get to starving is around 72 minutes. With the hunger rate multiplied to 25%, it's still 58 minutes, still nearly an hour of playing. With that in mind, I'm reverting the hunger rate increase to 25%.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mnemotechnician I reduced the 25% increased hunger rate to 15% due to feedback. What do you think is the ideal number for it?

Oh, I meant the opposite - I agree with the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay then. we are sticking with 25%. if the global hunger rate gets increased like in DV, that's when i'm inclined to take another look at the hunger rate increase

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

25% is still huge in my opinion, but we will see.

Honestly i do prefer the 15%

- type: Carriable # Carrying system from nyanotrasen.
- type: Inventory # Allows vulps to wear properly shaped helmets
speciesId: vulpkanin
Expand Down Expand Up @@ -105,6 +106,13 @@
understands:
- GalacticCommon
- Canilunzt
- type: ConsumeDelayModifier
foodDelayMultiplier: 0.5
drinkDelayMultiplier: 0.5
VMSolidus marked this conversation as resolved.
Show resolved Hide resolved
- type: Flammable
fireStackIncreaseMultiplier: 1.25
- type: Flashable
durationMultiplier: 1.5

- type: entity
save: false
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/Traits/skills.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
- type: ConsumeDelayModifier
foodDelayMultiplier: 0.5
drinkDelayMultiplier: 0.5
requirements:
- !type:CharacterSpeciesRequirement
inverted: true
species:
- Vulpkanin

- type: trait
id: ParkourTraining
Expand Down
Loading