Skip to content

Commit

Permalink
Merge pull request #75 from cyb3rpsych0s1s/chore/tweak-templates
Browse files Browse the repository at this point in the history
Chore/tweak templates
  • Loading branch information
Roms1383 authored Aug 11, 2023
2 parents f7e7ec4 + 78ce7bf commit 04e6244
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 525 deletions.
Binary file modified archive/source/archive/addicted/localization/en-us.json
Binary file not shown.
14 changes: 0 additions & 14 deletions archive/source/raw/addicted/localization/en-us.json.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,13 @@
"primaryKey": 0,
"secondaryKey": "Mod-Addicted-Thresholds"
},
{
"$type": "localizationPersistenceOnScreenEntry",
"femaleVariant": "Barely",
"maleVariant": "",
"primaryKey": 0,
"secondaryKey": "Mod-Addicted-Threshold-Barely"
},
{
"$type": "localizationPersistenceOnScreenEntry",
"femaleVariant": "V start getting barely addicted past this threshold",
"maleVariant": "",
"primaryKey": 0,
"secondaryKey": "Mod-Addicted-Threshold-Barely-Desc"
},
{
"$type": "localizationPersistenceOnScreenEntry",
"femaleVariant": "Mildly",
"maleVariant": "",
"primaryKey": 0,
"secondaryKey": "Mod-Addicted-Threshold-Mildly"
},
{
"$type": "localizationPersistenceOnScreenEntry",
"femaleVariant": "V start getting mildly addicted past this threshold",
Expand Down
20 changes: 10 additions & 10 deletions pages/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ At the current time of this writing the project is being developed with:
| Tools | versions |
|--------------------------|----------|
| WolvenKit | 8.9.0 |
| CET | 1.24.0 |
| RED4ext | 1.11.1 |
| REDscript | 0.5.11 |
| RED Hot Tools | 0.4.8 |
| TweakXL | 1.1.3 |
| ArchiveXL | 1.4.2 |
| Codeware | 1.1.0 |
| CET | 1.25.2 |
| RED4ext | 1.15.0 |
| REDscript | 0.5.14 |
| RED Hot Tools | 0.4.12 |
| TweakXL | 1.2.1 |
| ArchiveXL | 1.5.1 |
| Codeware | 1.1.8 |
| clipTester | ? |
| cybercmd | 0.0.7 |
| Native Settings UI | 1.92 |
| mod_settings | 0.0.13 |
| cybercmd | 0.0.11 |
| Native Settings UI | 1.94 |
| mod_settings | 0.2.0 |

It also has been tested with these other mods:

Expand Down
63 changes: 0 additions & 63 deletions scripts/Addicted/Tweaks.reds
Original file line number Diff line number Diff line change
Expand Up @@ -314,66 +314,3 @@ private final func Apply() -> Void {
}
wrappedMethod();
}

// object action effects
//
// reduce boilerplate in YAML Tweaks
public class HealerTweaks extends ScriptableTweak {
protected cb func OnApply() -> Void {
let notably = "NotablyWeakened";
let severely = "SeverelyWeakened";
let prefixes = [notably, severely];
let maxdoc = "FirstAidWhiff";
let bounceback = "BonesMcCoy70";
let healthbooster = "HealthBooster";
this.Derive(prefixes, maxdoc, ["_inline2", "_inline6", "_inline6"]);
this.Derive(prefixes, bounceback, ["_inline2", "_inline2", "_inline6"]);
this.Derive(prefixes, healthbooster,["_inline1"]);
}
// create object action effect for weakened healers :
// e.g. Items.NotablyWeakenedActionEffectFirstAidWhiffV0 from Items.FirstAidWhiffV0_inline2
// with status effect set as BaseStatusEffect.NotablyWeakenedFirstAidWhiffV0
private func Derive(prefixes: array<String>, diminutive: String, versions: array<String>) -> Void {
let size: Int32 = ArraySize(versions);
let many = size > 1;
let name: String;
let suffix: String;
for prefix in prefixes {
let i = 0;
for version in versions {
if many {
// consumables with versions, e.g. FirstAidWhiff
name = diminutive + "V" + ToString(i);
suffix = version;
} else {
// consumables without version, e.g. HealthBooster
name = diminutive;
suffix = "";
}
let original: String = name + suffix;
let variantItem: String = prefix + "ActionEffect" + name;
let variantEffect: String = prefix + name;
let originalItemId: TweakDBID = TDBID.Create(("Items." + original));
let variantItemName: CName = StringToName(("Items." + variantItem));
let variantItemId: TweakDBID = TDBID.Create(("Items." + variantItem));
let variantEffectId: TweakDBID = TDBID.Create("BaseStatusEffect." + variantEffect);
let cloned = TweakDBManager.CloneRecord(variantItemName, originalItemId);
if cloned {
let item: ref<TweakDBRecord> = TweakDBInterface.GetRecord(variantItemId);
let effect: ref<TweakDBRecord> = TweakDBInterface.GetRecord(variantEffectId);
TweakDBManager.SetFlat(item.GetID() + t".statusEffect", effect.GetID());
TweakDBManager.UpdateRecord(item.GetID());
}
i += 1;
}
}
}
}
77 changes: 36 additions & 41 deletions tweaks/Addicted/blacklace.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,12 @@
Effectors.Fibromyalgia:
$type: Effector_Record
effectorClassName: PlaySFXEffector
activationSFXName: ono_v_pain_short
unique: false

UIIcon.WithdrawnFromBlackLace:
$type: UIIcon_Record
atlasPartName: craving_for_drugs_icon
atlasResourcePath: base\gameplay\gui\widgets\healthbar\atlas_buffinfo.inkatlas

UIData.WithdrawnFromBlackLace:
$base: BaseStatusEffect.BlackLaceV0_inline2
description: LocKey#Mod-Addicted-Withdrawn-BlackLace-Desc
displayName: LocKey#Mod-Addicted-Craving-For-BlackLace
iconPath: WithdrawnFromBlackLace

BaseStatusEffect.NotablyWithdrawnFromBlackLace:
$base: BaseStatusEffect.WithdrawalSymptom
packages:
- $type: GameplayLogicPackage_Record
stats:
- $type: ConstantStatModifier_Record
modifierType: Multiplier
statType: BaseStats.Reflexes
value: 0.9
- $type: GameplayLogicPackage_Record
BaseStatusEffect.$(threshold)WithdrawnFromBlackLace:
$instances:
- threshold: Notably
modifier: 0.9
modifiers: 90
effectors: [Effectors.Fibromyalgia]
uiData:
$base: UIData.WithdrawnFromBlackLace
intValues: [90]

BaseStatusEffect.SeverelyWithdrawnFromBlackLace:
$base: BaseStatusEffect.WithdrawalSymptom
packages:
- $type: GameplayLogicPackage_Record
stats:
- $type: ConstantStatModifier_Record
modifierType: Multiplier
statType: BaseStats.Reflexes
value: 0.7
- threshold: Severely
modifier: 0.7
modifiers: 70
effectors:
- $base: Effectors.Fibromyalgia
prereqRecord:
Expand All @@ -55,9 +23,36 @@ BaseStatusEffect.SeverelyWithdrawnFromBlackLace:
$base: Prereqs.DurationPrereq
duration: 9
randRange: 3
$base: BaseStatusEffect.WithdrawalSymptom
packages:
- $type: GameplayLogicPackage_Record
stats:
- $type: ConstantStatModifier_Record
modifierType: Multiplier
statType: BaseStats.Reflexes
value: $(modifier)
- $type: GameplayLogicPackage_Record
effectors: $(effectors)
uiData:
$base: UIData.WithdrawnFromBlackLace
intValues: [70]
intValues: [ $(modifiers) ]

Effectors.Fibromyalgia:
$type: Effector_Record
effectorClassName: PlaySFXEffector
activationSFXName: ono_v_pain_short
unique: false

UIIcon.WithdrawnFromBlackLace:
$type: UIIcon_Record
atlasPartName: craving_for_drugs_icon
atlasResourcePath: base\gameplay\gui\widgets\healthbar\atlas_buffinfo.inkatlas

UIData.WithdrawnFromBlackLace:
$base: BaseStatusEffect.BlackLaceV0_inline2
description: LocKey#Mod-Addicted-Withdrawn-BlackLace-Desc
displayName: LocKey#Mod-Addicted-Craving-For-BlackLace
iconPath: WithdrawnFromBlackLace

UIIcon.InsanityIcon:
$type: UIIcon_Record
Expand Down
Loading

0 comments on commit 04e6244

Please sign in to comment.