Skip to content

Commit

Permalink
AutoAutoSave integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ToxicFrog committed Aug 14, 2023
1 parent 91ccba5 commit b72c9ef
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 5 deletions.
27 changes: 22 additions & 5 deletions NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,45 @@ Three possible operating modes:

- feature: automatic respec on level up, clearing all upgrades and resetting level to 0
- feature: automatic level up on map clear
- how do we configure this? levels per map, maps per level, both?
- maps per level
- are levels flat or catch-up

- automatically generate UPGRADES.md using console commands

- weapon: Familiarization, scales damage based on levels cleared (ever, or since you got the upgrade?)
- player: Ammo Crate, refills ammo up to 40/70/90/100% between maps
- player: Medical Supplies & Repair Kit, as above but for health and armour, probably 50/100/150/200
- weapon: some sort of upgrade that resets on level change and gets stronger per kill or something?
- per kill scaling of stuff in general?

- HE shots do lots of self-damage when used with weapons like the shotgun/SSG
- Juggler should work with fancy weapon switch animations (Hellrider, Project Brutality, etc)
- Bandolier incompatible with Dehacked Defence and with Trailblazer
- Rapid Fire makes it impossible to drop weapons in Legendoom
- Balance: thunderbolt is probably still too powerful
- Balance: dark harvest and leech health/armour should probably only increase the cap when leveled and increase the amount much more rarely
- Minelayer upgrade? Dead enemies turn into mines, or you drop mines sometimes. Upgrade for Explosive Death maybe? Appears only if you have ExD and Minelayer?
- submunitions are still completely OP

### 0.11.x?

- split laevis into its own mod
- Beam hitscan upgrade -- currently WIP, rename Hypervelocity
- Singularity on-kill upgrade, spawns a black hole that sucks enemies (but not the player) towards it

### Soon

- Make melee detection more permissive, but only trigger melee upgrades when the player is in melee
- Juggler should work with fancy weapon switch animations (Hellrider, Project Brutality, etc)
- Balance: thunderbolt is probably still too powerful
- Spread Fire projectile upgrade, projectile shots spawn multiple reduced-damage projectiles
- upgrade that spawns extra projectiles every N shots
- Beam hitscan upgrade -- currently WIP, rename Hypervelocity
- Singularity on-kill upgrade, spawns a black hole that sucks enemies (but not the player) towards it

### Ideas

### doomthing445

- night vision upgrade that adjusts sector light levels
- projectile/impact aoe effect that does something other than damage

### AvzinTW

An upgrade that causes projectiles to bounce off you, as an alternative to the ECM upgrade collection.
Expand Down
1 change: 1 addition & 0 deletions gun-bonsai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ options screen and fix them.

- New:
- Screen flash colour on level up can be customized
- AutoAutoSave support
- Balance:
- `Infernal Kiln`:
- softcap at 10 seconds, +5/level
Expand Down
6 changes: 6 additions & 0 deletions gun-bonsai/CVARINFO
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ server bool bonsai_use_builtin_actors = true;
// Whether weapons that don't use ammo count as "wimpy".
server bool bonsai_ammoless_weapons_are_wimpy = true;

// AutoAutoSave integration
// Need to be server, not user, because AAS integration works by injecting a
// token object into the game, and if users have different settings for this
// it will desync.
server bool bonsai_autosave_after_level = true;

// LEGENDOOM INTEGRATION //

// How many times a gun needs to level up before it gets a new Legendoom effect.
Expand Down
6 changes: 6 additions & 0 deletions gun-bonsai/LANGUAGE.en-options
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ TFLV_OPT_HEADER_COMPATIBILITY = "Compatibility Settings";
TFLV_OPT_HEADER_XP_SOURCE = "XP Source Settings";
TFLV_OPT_HEADER_XP_BALANCE = "XP Balance Settings";
TFLV_OPT_HEADER_LEGENDOOM = "LegenDoom Integration";
TFLV_OPT_HEADER_AUTOAUTOSAVE = "AutoAutoSave Integration";

// Strings for option names and tooltips

Expand Down Expand Up @@ -84,6 +85,11 @@ TFLV_OPT_TT_BONUS_LD_EFFECT_SLOTS = "How many extra effect slots legendary guns
TFLV_OPT_NAME_IGNORE_GUN_RARITY = "Ignore original gun rarity for new effects";
TFLV_OPT_TT_IGNORE_GUN_RARITY = "Whether weapons can learn LD effects that are rarer than the one they spawned with.";

// Mod integrations
TFLV_OPT_AUTOAUTOSAVE_NOTE = "These options require \c[WHITE]AutoAutoSave\c- installed.";
TFLV_OPT_NAME_AUTOSAVE_AFTER_LEVEL = "Autosave after level-up";
TFLV_OPT_TT_AUTOSAVE_AFTER_LEVEL = "Autosave after choosing your upgrades for a level-up (i.e. as soon as the level-up menu closes).";

// Strings for the various option enums

// HUD orientation settings
Expand Down
7 changes: 7 additions & 0 deletions gun-bonsai/MENUDEF
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ OptionMenu "GunBonsaiOptions"
Slider "$TFLV_OPT_NAME_LEVEL_COST_MUL_FOR_WIMPY", "bonsai_level_cost_mul_for_wimpy", 0.1, 5.0, 0.1, 1
TFLV_Tooltip "$TFLV_OPT_TT_LEVEL_COST_MUL"

StaticText ""
StaticText "$TFLV_OPT_HEADER_AUTOAUTOSAVE_INTEGRATION", GOLD
StaticText "$TFLV_OPT_AUTOAUTOSAVE_NOTE"

Option "$TFLV_OPT_NAME_AUTOSAVE_AFTER_LEVEL", "bonsai_autosave_after_level", "OnOff"
TFLV_Tooltip "$TFLV_OPT_TT_AUTOSAVE_AFTER_LEVEL"

StaticText ""
StaticText "$TFLV_OPT_HEADER_LEGENDOOM", GRAY

Expand Down
4 changes: 4 additions & 0 deletions gun-bonsai/ca.ancilla.bonsai/PerPlayerStats.zs
Original file line number Diff line number Diff line change
Expand Up @@ -447,5 +447,9 @@ class ::PerPlayerStats : Object play {
prevScore = owner.score;
}
}

void Autosave() {
owner.Spawn("aas_instant_bonsai_token", owner.pos);
}
}

1 change: 1 addition & 0 deletions gun-bonsai/ca.ancilla.bonsai/PlayerUpgradeGiver.zs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class ::PlayerUpgradeGiver : ::UpgradeGiver {
} else {
stats.FinishLevelUp(::Upgrade::BaseUpgrade(new(candidates[index].GetClassName())));
}
if (bonsai_autosave_after_level) { stats.Autosave(); }
Destroy();
}

Expand Down
2 changes: 2 additions & 0 deletions gun-bonsai/ca.ancilla.bonsai/WeaponUpgradeGiver.zs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ::WeaponUpgradeGiver : ::UpgradeGiver {
void InstallUpgrade(int index) {
if (index < 0) {
wielded.RejectLevelUp();
if (bonsai_autosave_after_level) { wielded.stats.Autosave(); }
Destroy(); return;
} else if (candidates.size() == 0) {
wielded.FinishLevelUp(null);
Expand All @@ -23,6 +24,7 @@ class ::WeaponUpgradeGiver : ::UpgradeGiver {
if (--nrof) {
PostBeginPlay();
} else {
if (bonsai_autosave_after_level) { wielded.stats.Autosave(); }
Destroy();
}
}
Expand Down
8 changes: 8 additions & 0 deletions gun-bonsai/ca.ancilla.bonsai/util.zs
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ class ::Util : Object {
return found.size();
}
}

class aas_instant_bonsai_token : Actor {
States {
Spawn:
TNT1 A 0;
Stop;
}
}

0 comments on commit b72c9ef

Please sign in to comment.