News: Go to the front page portal to create a Torchmodders account | Visit the wiki!
August 17, 2018, 05:34:20 AM
collapse

Author Topic: [TL2] Ultimate Respec Lite  (Read 1410 times)

Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 157
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #15 on: August 07, 2018, 08:52:38 AM »
@Lord Nyriox
Thanks for the link!

Try this code:
Code: [Select]
[SKILL]
<STRING>NAME:Respec_Aura
<TRANSLATE>DISPLAYNAME:Respec Aura
<TRANSLATE>BASE_DESCRIPTION:Enables stat respec
<STRING>ACTIVATION_TYPE:PASSIVE
<STRING>TARGET_ALIGNMENT:GOOD
<STRING>TARGET_TYPE:SELF
<FLOAT>RANDOMRANGE:0
<FLOAT>TURNRATEOVERRIDE:-1
<BOOL>CAN_BE_SILENCED:0
<INTEGER64>UNIQUE_GUID:4921236809504979266
[LEVEL1]
<FLOAT>RANDOMRANGE:0
[EVENT_START]
<STRING>FILE:media/skills/monsters/questunits/respec_aura.layout
<BOOL>FOLLOWS:1
<BOOL>NOSTEALEFFECTS:0
<BOOL>STATSHIDDEN:1
<BOOL>CAN_CLONE:0
[AFFIXES]
<STRING>TARGET:FRIEND
<STRING>TARGETTYPE:PLAYER
<STRING>AFFIX:RESPEC_GENERIC
[/AFFIXES]
[/EVENT_START]
[EVENT_END]
<BOOL>CAN_CLONE:0
[AFFIXESREMOVE]
<STRING>AFFIX:RESPEC_GENERIC
[/AFFIXESREMOVE]
[/EVENT_END]
[/LEVEL1]
[/SKILL]

@Aherin
I think the lagging issue here is similar with Potion of Insight mod earliest lag issue, regarding skill being executed endlessly.
« Last Edit: August 07, 2018, 09:08:20 AM by doudley »

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 113
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #16 on: August 07, 2018, 10:57:14 PM »
Try this code:
Code: [Select]
	[LEVEL1]
<FLOAT>RANDOMRANGE:0
[EVENT_START]
<STRING>FILE:media/skills/monsters/questunits/respec_aura.layout
<BOOL>FOLLOWS:1
<BOOL>NOSTEALEFFECTS:0
<BOOL>STATSHIDDEN:1
<BOOL>CAN_CLONE:0
[AFFIXES]
<STRING>TARGET:FRIEND
<STRING>TARGETTYPE:PLAYER
<STRING>AFFIX:RESPEC_GENERIC
[/AFFIXES]
[/EVENT_START]
[EVENT_END]
<BOOL>CAN_CLONE:0
[AFFIXESREMOVE]
<STRING>AFFIX:RESPEC_GENERIC
[/AFFIXESREMOVE]
[/EVENT_END]
[/LEVEL1]


So, the changes here, are adding "<BOOL>CAN_CLONE:false", and an "EVENT_END" block.

Can you explain what each does, in terms of the aura? 

I think the lagging issue here is similar with Potion of Insight mod earliest lag issue, regarding skill being executed endlessly.


Given that the slightest interruption here can result in a loss of stat-points (this "aura" continually applies an active Skill to all nearby Player Units, which is then partially enabled/disabled using Stats and UI Logic), might changing this increase the risk of things going wrong?

Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 157
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #17 on: August 08, 2018, 08:53:51 AM »
So, the changes here, are adding "<BOOL>CAN_CLONE:false", and an "EVENT_END" block.

Can you explain what each does, in terms of the aura?


Can't clearly remember what "CAN_CLONE" bool does but I read somewhere (Maybe on Torchmodders wiki) that can_clone should always be off unless needed. I'm not sure if this would make sense but I think what it does, is make sure that the skill is being executed on a single instance and not make the game tag that skill to your player continuously, because doing so makes the game's cache to overload.

The event end is a safety precaution, it tells the game that when the skill ends it will do as it is told/scripted. Just try the skill with the event end and if the respec function got broken, remove it.

Given that the slightest interruption here can result in a loss of stat-points (this "aura" continually applies an active Skill to all nearby Player Units, which is then partially enabled/disabled using Stats and UI Logic), might changing this increase the risk of things going wrong?

I think, the activation of the skill depends on the "LAYOUT" skill that triggers a pulse, on which it radiates from the Vendor/NPC, then hitting the player units. Making the pulse rate lesser than the chance the player can click the button of the recpec menu, will give a high chance of not activating the skill's effect efficiently. So, as long as the layout skill is hitting the player, the skill function will continue to work. As you can see in the new code, only the "RESPEC_GENERIC" affix would be removed and that means it will stop the self-cast skill activation given by that affix and let the game continue without the self-cast skill affix when your player is not in range with the NPC anymore.

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 113
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #18 on: August 08, 2018, 04:16:44 PM »
Alright.  Thanks, @doudley!

Unfortunately, I will not be able to test this for a few weeks.  I am having some technical difficulties with my computer. 

That aside, do you think you can help me code a button, that does something along the lines of gytfunke's suggestion for a "Reset All" button for a Stat?

Quote from: gytfunke
It'd probably be easier to get a difference between the class' base for the stat and the current stat. Then save the difference as a third stat and use that stat to subtract from the character's stat and refund stat points.


P.S.  Please note that, in my variant, the "class base" for each Stat is always equal to 5

Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 157
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #19 on: August 09, 2018, 05:13:29 AM »
That aside, do you think you can help me code a button, that does something along the lines of gytfunke's suggestion for a "Reset All" button for a Stat?
I need to see the Logic Group of your UI for me to understand how all these work. A screen capture would help but I do understand that you don't have access to GUTS too for a while.

What I do noticed and curious of, why is there multiple stat for add dex, add str, add, add foc, and add vit? Stats are empty to begin with, I don't think it is needed like that. The logic can assign a 1, a 10, and 100 in a single stat.

Quote from: gytfunke
It'd probably be easier to get a difference between the class' base for the stat and the current stat. Then save the difference as a third stat and use that stat to subtract from the character's stat and refund stat points.


P.S.  Please note that, in my variant, the "class base" for each Stat is always equal to 5.
If I would try to do a reset all stat function, I will make it like somewhere similar to my Brother-in-Arms (2017) mod. On which, the human companion have its own character stat menu (Attribute points), where you can subtract and add stat points easily. But for the "reset all stat button", it is something similar with the human companion's skill menu, where as all skill points are being monitored by another stat (dummy) then able to return/convert them back to unused skill points whenever the respec skill button is pressed.

So the key condition here is that this would only work if the attribute stats distribution were monitored from the start of the game, so that the dummy stat can return all the new attribute stats gained by the player.

Another way might be to have a dummy stat for each attribute (Dex, Str, Foc, & Vit), so that you can return them to unused points.

I may need to refresh my memory regarding this intricate system, I'll also try to review my BiA logic groups.

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 113
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #20 on: August 09, 2018, 10:44:25 PM »
@doudley

I need to see the Logic Group of your UI for me to understand how all these work. A screen capture would help but I do understand that you don't have access to GUTS too for a while.

Currently, my entire computer system is down for the count.  I am replying to this discussion on a phone.  :P 

What I do noticed and curious of, why is there multiple stat for add dex, add str, add, add foc, and add vit? Stats are empty to begin with, I don't think it is needed like that. The logic can assign a 1, a 10, and 100 in a single stat.

As I understand it, the author of the "Ultimate Respec" mod, simply extended the methods already used in the original "FreeSpec" mod.

Feel free to draft a method to simplify that mess, for me.  ;}

So the key condition here is that this would only work if the attribute stats distribution were monitored from the start of the game, so that the dummy stat can return all the new attribute stats gained by the player.

I want to keep this mod as lightweight as reasonably possible—which is part of why I eliminated the "starting stats" concept when I turned the mod generic. 

To put my prior request in better terms: 
Quote from: Lord Nyriox
How would you make a button, that sets the player's points for a specific stat, to exactly "5"—then gives a number of "investable Stat Points", equal to "the Old Value of the Stat, minus 5"? 

« Last Edit: August 09, 2018, 10:46:43 PM by Lord Nyriox »

Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 157
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #21 on: August 11, 2018, 07:41:30 AM »
To put my prior request in better terms: 
Quote from: Lord Nyriox
How would you make a button, that sets the player's points for a specific stat, to exactly "5"—then gives a number of "investable Stat Points", equal to "the Old Value of the Stat, minus 5"? 

I can give you my new code for "RESPEC_GENERIC.DAT" right now but we still need to make adjustment with the logic group of the UI.

I think it would be difficult to make a reset all button function, I'm not sure if "AWARD STATPOINT" effect can be statmodified...this need to be tried and be tested. If statmodify doesn't work, the last resort would be to make an auto pressing UI logic...as seen in my "Auto-Spend Stat Points" mod. This would make the respec stat activate continuously until it reaches the value of dex 5, str 5, foc 5, and vit 5.

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 113
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #22 on: August 13, 2018, 07:00:29 AM »
I can give you my new code for "RESPEC_GENERIC.DAT" right now but we still need to make adjustment with the logic group of the UI.

Well, I would certainly like to at least see your proposed code. 

Any potential optimizations would likely be welcomed.  :}

I think it would be difficult to make a reset all button function, I'm not sure if "AWARD STATPOINT" effect can be statmodified...this need to be tried and be tested. If statmodify doesn't work, the last resort would be to make an auto pressing UI logic...as seen in my "Auto-Spend Stat Points" mod. This would make the respec stat activate continuously until it reaches the value of dex 5, str 5, foc 5, and vit 5.

If the auto-pressing method would be simpler to implement, then I have no problem using it. 

I would prefer a more "proper" method, of course—but we can use whatever is easiest.  ;} 



Final Request

I also have one final proposal, that I would like your input on. 

Target 4:  Add a system to allow purchasing additional Stat-points and Skill-points. 

In other words, there would be 2 additional UI buttons (each with a gold-price next to it), which add investable Stat and/or Skill points—without triggering a Respec or Level-up event.

For Stat-points, this should be fairly easy ("AWARD STATPOINT" with a gold-cost)—but there is apparently no equivalent effect for Skill-points (check "EffectsList.dat" if you do not believe me). 

Is there some in-game method (that you know of) to add investable Skill-points to a player?


Thanks again for all your help! 

Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 157
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #23 on: August 14, 2018, 09:38:37 AM »
I don't think there's a way to add direct skill points unless cheated. Maybe an item that can give fame...I'm not sure.

Although it is very possible to make a UI that award stat points and simultaneously deduct money from your character. But I'm not sure how I feel about that, especially there are potions that does that already.

Offline Sch123

  • 🎮 & 💡
  • Legendary
  • *
  • Posts: 576
  • Country: 00
    • status game
    • View Profile
  • Mood: mood cheesy
Re: [TL2] Ultimate Respec Lite
« Reply #24 on: August 14, 2018, 09:48:35 AM »
Hi @doudley

What about this skill_potion Mod. :)

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 113
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #25 on: August 14, 2018, 11:45:42 PM »
I'm not sure how I feel about that, especially there are potions that does that already.

Keep in mind that there are also "Stat Respec" potions, which also provide similar functionality to this mod.

Technically, this mod works using the exact same Effect coding as "Restat" potions, but triggered by a UI. 

I don't think there's a way to add direct skill points unless cheated. Maybe an item that can give fame...I'm not sure.

My proposed use case for this, is players who are already at max Level and Fame—but still want more Skill points in their builds.

Adding Fame and/or Levels would be technically unfeasable at that point.

Unless you can somehow reduce a character's Fame Level, without losing Skill points in the process?

What about this skill_potion Mod. :)


The potions in that mod work by boosting existing Skills, and only temporarily.  They do not change the total number of investable Skill-points available to a player. 
« Last Edit: August 14, 2018, 11:52:27 PM by Lord Nyriox »

Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 157
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #26 on: August 15, 2018, 12:45:59 AM »
Unless you can somehow reduce a character's Fame Level, without losing Skill points in the process?
This sounds interesting. We should experiment around this.

@Sch123
Hi! The effects on this potion mod could lead to interesting workarounds, like specific skill temp upgrades, or affect skills by their category. I think there's an old effect skill that does that, I'm not sure if they are functional.

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 113
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #27 on: August 15, 2018, 05:23:12 AM »
Unless you can somehow reduce a character's Fame Level, without losing Skill points in the process?
This sounds interesting. We should experiment around this.

In TL1, there was a mod called "NoLevelUp", which used a ring Item with this Effect code:

Code: [Select]
[EFFECT]
<STRING>ACTIVATION:PASSIVE
<STRING>TYPE:XP GAIN BONUS
<BOOL>NOGRAPH:1
<FLOAT>MIN:-2000000
<FLOAT>MAX:-2000000
[/EFFECT]

Though this is XP—rather than Fame—I always wondered whether XP loss also affected Stats and Skills.  Back then I did not have the nerve to find out for myself, though. 

The effects on this potion mod could lead to interesting workarounds, like specific skill temp upgrades, or affect skills by their category.


There were a few experimental mods that did exactly this, but the "SKILL BONUS" Effect has been plagued with bugs.  Most notably, @Chthon reported that using it on Passive Skills came at a massive performance penalty:

Quote from: Chthon
Do not do passive skills. There's a bug that slows the CPU to a crawl if the "SKILL BONUS" effect is applied to certain passives.

Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 157
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #28 on: August 15, 2018, 07:54:13 AM »
What I was thinking of is more on to quest editing rather than a fame debuff effect (Although there's a Fame Gain Bonus increase/decrease effect).  Maybe instead of granting positive fame points, you will alter it to grant negative fame points? But if you happen to do this, you need to set up a UI that checks if the player have gained enough fame before being allowed to be reset.

...I always wondered whether XP loss also affected Stats and Skills.  Back then I did not have the nerve to find out for myself, though. 
There's a high chance that the game only grants those points (stat & skill). Reducing xp/fame points will not affect already earned stat/skill points.


The effects on this potion mod could lead to interesting workarounds, like specific skill temp upgrades, or affect skills by their category.


There were a few experimental mods that did exactly this, but the "SKILL BONUS" Effect has been plagued with bugs.  Most notably, @Chthon reported that using it on Passive Skills came at a massive performance penalty:

Quote from: Chthon
Do not do passive skills. There's a bug that slows the CPU to a crawl if the "SKILL BONUS" effect is applied to certain passives.
Good point and great find!

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 113
  • Country: us
    • status busy
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #29 on: August 15, 2018, 03:04:36 PM »
What I was thinking of is more on to quest editing rather than a fame debuff effect (Although there's a Fame Gain Bonus increase/decrease effect).  Maybe instead of granting positive fame points, you will alter it to grant negative fame points? But if you happen to do this, you need to set up a UI that checks if the player have gained enough fame before being allowed to be reset.


FYI, in Quests, Fame is granted by a "reward" tag in the Quest's DAT file—which may not even support negative values.  I have never checked.

But is it even possible to make a repeatable Quest in TL2?

Also, the "XP Gain Bonus" requires time to work (it behaves identically to normal XP gain, except that it reduces XP per kill, rather than increases it). 

There's a high chance that the game only grants those points (stat & skill). Reducing xp/fame points will not affect already earned stat/skill points.

If this does somehow turn out to be the case, then an item with the Effect field I previously described (like a 3-hour potion), could fill the appropriate use case nicely—without the headache that hooking it into UI code would cause.

Good point and great find!

For my "Lazarus Pack" project (which is a modpack that "resurrects" outdated content from TL1 and old TL2 mods), I was experimenting with adding content from Diablo 2. 

Since half the items in D2 have some sort of "+X to Skill Y" effect, it was inevitable that my research would stumble upon that RG thread, at some point.

Tags: respec mod npc gui tweak 
 

* Quick Search


* Member Information

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Mod Boards Activity

* Who's Online

  • Dot Guests: 1
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Calendar

August 2018
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 [17] 18
19 20 21 22 23 24 25
26 27 28 29 30 31

No calendar events were found.

* Recent Topics

"Skills Masteries" Classless Concept by Sch123
[Today at 04:29:49 AM]


Request: Custom UI / HUD by Aherin
[Today at 01:06:07 AM]


[TL2] Ultimate Respec Lite by Lord Nyriox
[August 16, 2018, 04:48:33 PM]


Torchlight Frontiers announced by Kva3imoda
[August 16, 2018, 06:53:08 AM]


The "One Project" Idea / Distributed Modding by doudley
[August 15, 2018, 08:32:44 AM]


Pet Variants Mod by Phanjam
[August 14, 2018, 07:54:08 AM]


Level scaling affixes by Ings
[August 13, 2018, 09:59:33 PM]


Guts Error: Unhandled Exception by steffire3
[August 11, 2018, 09:35:10 PM]


Classy Classes - Use any Skill on any Class by Sch123
[August 10, 2018, 08:40:57 PM]


Variant Classes Mod Information by Sch123
[August 10, 2018, 10:40:06 AM]


Merge Requests: Exclusive to doudley's mods by Sch123
[August 07, 2018, 04:24:45 PM]


Skills on weapons by F430
[August 06, 2018, 09:18:20 PM]


Torchlight 2 Refreshed by Phanjam
[August 05, 2018, 10:02:25 AM]


(WIP) Loot Overhaul by Phanjam
[August 05, 2018, 05:28:45 AM]


Skills Expansion: Bugs Report & Ideas by Sch123
[August 05, 2018, 03:35:53 AM]

* Popular Topics