Skip to content

add cheat_add_potion_buff, cheat_tp_to_npc#2

Open
Lernos wants to merge 10 commits intoJoewAlabel:masterfrom
Lernos:cheat_tp_to_npc
Open

add cheat_add_potion_buff, cheat_tp_to_npc#2
Lernos wants to merge 10 commits intoJoewAlabel:masterfrom
Lernos:cheat_tp_to_npc

Conversation

@Lernos
Copy link

@Lernos Lernos commented Nov 20, 2021

Potion Buff:
A simple utility command that allows to add most useful potion buffs without copying or painfully retyping their long ids. I made that because, while cheat_add_buff accepts search by name, it always applies the LAST buff it finds by name, and a lot of potion buffs have _DEPRECATED versions that get applied instead. It doesn't contain ALL potion buffs, only the ones I use the most (and would love to use in combat, but can't due to how the game works), but it's painfully easy to add new ones now. The code itself was copied from cheat_teleport_to, so I have no idea if it's needlessly excessive - a bit rusty with lua.

TP to NPC:
While we're at it, I've decided to add a command to teleport to an NPC immediately instead of searching for them and then manually typing in their coords in cheat_teleport. Yes, it will use the "if there's more than 1 item in the list, choose the last one" feature that annoyed me in Potion Buff, but I think the list will be >1 only if searching for nameless NPCs like "Miner" or "Guard", and you can't differentiate them with a glance, so who will ever need it, right? So, should work fine if you only teleport to uniquely named NPCs.
UPD: Improved to allow for "num" argument that will let you pick which NPC to teleport to from the list.

Charm:
A quick command to wash yourself from dirt and blood and apply the regular Charisma bonuses you'd get at Rattay bathhouse/Mill: Fresh Cut and Smitten.

Invisibility:
Improved the command cheat_add_buff_invisible in a major way by tweaking the vanilla invisibility buff using patched table files, making it actually set Visibility, Conspicuousness and Noise to 0.

A simple utility command that allows to add most useful potion buffs without copying or painfully retyping their long ids. I made that because, while cheat_add_buff accepts search by name, it always applies the LAST buff it finds by name, and a lot of potion buffs have _DEPRECATED versions that get applied instead. It doesn't contain ALL potion buffs, only the ones I use the most (and would love to use in combat, but can't due to how the game works), but it's painfully easy to add new ones now. The code itself was copied from cheat_teleport_to, so I have no idea if it's needlessly excessive - a bit rusty with lua.
Added num argument to choose from list, changed token to id, argsProcess actually processes this cheat's args and not cheat_find_npc's
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant