News: Go to the front page portal to create a Torchmodders account | Visit the wiki!
May 25, 2019, 01:29:54 PM
collapse

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

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #15 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: 247
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #16 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: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #17 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: 247
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #18 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: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #19 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: 247
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #20 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: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #21 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 Sch123

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

What about this skill_potion Mod. :)

Offline wolfeng_

  • Common
  • *
  • Posts: 1
    • View Profile
Re: [TL2] Ultimate Respec Lite
« Reply #23 on: October 25, 2018, 04:13:55 AM »
Hi. there seems to be a bug with Hardcore Lite.

When both mods are loaded and you try to respec you gain more skill points and can keep clicking the button for even more.

Sadly I don't know nearly enough about modding to understand why this happens, even after looking through the files.

Offline Phanjam

  • Operator
  • Legendary
  • *
  • Posts: 2653
  • Country: ph
    • status ready
    • View Profile
  • Mood: mood angel
Re: [TL2] Ultimate Respec Lite
« Reply #24 on: October 25, 2018, 01:13:49 PM »
Hi @wolfeng_ thanks v much for bringing this to our attention. We havent heard from @Lord Nyriox in a while but @Aherin (author of Hardcore Lite) does come by quite often.

Yo Aherin is it possible the unitthemes you and Nyriox use for your respective mods are interfering with each other?

Edit
And welcome to the forums Wolfeng_!
« Last Edit: October 25, 2018, 01:15:52 PM by Phanjam »



Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #25 on: October 25, 2018, 11:58:45 PM »
When both mods are loaded and you try to respec you gain more skill points and can keep clicking the button for even more.

I would have to check the internals of that "Hardcore Lite" mod, to see what in its code may interfere with the standard "Respec all Skills" Effect. 

@doudley and @Aherin, any ideas?

is it possible the unitthemes you and Nyriox use for your respective mods are interfering with each other?


Technically, I did not write or change the Skill-respec component--but from what I could tell the affected button is just a shim for the vanilla "Respec" ("KEFFECT_TYPE_RESPEC") Effect, which is commonly used by Respec Potion mods.

The EffectsList.dat description for the Effect reads:
Quote from: EffectsList.dat
Refund all Skill Points


Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 247
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #26 on: October 27, 2018, 07:23:49 AM »
When both mods are loaded and you try to respec you gain more skill points and can keep clicking the button for even more.

I would have to check the internals of that "Hardcore Lite" mod, to see what in its code may interfere with the standard "Respec all Skills" Effect.
I'll do that to, later. Maybe something is disrupting the respec system of the mod.

Offline doudley

  • Cosmic Reality Entanglement Ethereal Probability
  • Rare
  • *
  • Posts: 247
  • Country: 00
  • Its personal...
    • status food
    • View Profile
    • Steam Profile
  • Mood: mood rolleyes
Re: [TL2] Ultimate Respec Lite
« Reply #27 on: November 04, 2018, 08:17:27 AM »
When both mods are loaded and you try to respec you gain more skill points and can keep clicking the button for even more.

I would have to check the internals of that "Hardcore Lite" mod, to see what in its code may interfere with the standard "Respec all Skills" Effect.
I'll do that to, later. Maybe something is disrupting the respec system of the mod.
The issue didn't occur to me when I used this mod with Hardcore Lite mod.

Could be just a mod conflict issue, @wolfeng_ should check his/her mod load order and probably put Ultimate Respec Lite on top.

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #28 on: December 22, 2018, 11:04:09 PM »
I have managed to work out a mockup of a partially-enhanced "Ultimate Respec" UI, adding the "Buy Statpoint" buttons we discussed previously.  I will still need help making the buttons functional, however. 

The updated source-code also includes your "Respec_Aura" patch.

The updated "Ultimate Respec Lite" files are attached to this post.

EDIT:  Sub-project abandoned.  Help request and files rescinded.
« Last Edit: January 21, 2019, 07:45:14 PM by Lord Nyriox »

Offline Lord Nyriox

  • Moderator
  • Rare
  • *
  • Posts: 161
  • Country: 00
    • status bored
    • View Profile
    • Github Profile
  • Mood: mood evil
Re: [TL2] Ultimate Respec Lite
« Reply #29 on: January 01, 2019, 04:21:05 AM »
Ugh, I have run into a roadblock on my "Buy Statpoints" project. 

I finally figured out how Layout logic can manipulate Gold (using the "Money Taker" object)...only to find out that GUTS considers it "not valid" for the "UI scene". 

Which means, basically, that I will have to either:
  • Jury-rig the gold-cost component (by attaching an additional non-UI Layout to the Respec merchant somehow), or...
  • Hand-edit the UI Layout file in a text editor, to manually inject the "Money Taker" to the Logic.

Option 1 is messy, inelegant, and prone to failure, and Option 2 not only breaks GUTS editing capabilities for the UI, but it may not even function.  Such fun!

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: 6
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Calendar

May 2019
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

Destroyer Rebalance by Phanjam
[Today at 02:28:58 AM]


Darkened TL2 UI (Re-texture Mod) by Phanjam
[May 21, 2019, 02:29:35 PM]


FEP+ April 2019 Update by Phanjam
[May 19, 2019, 10:34:51 PM]


Skills Expansion: Bugs Report & Ideas by Sch123
[May 16, 2019, 10:54:27 AM]


Charge Domination % by TwinkleToes
[May 11, 2019, 04:33:57 AM]


[Help Request] Putting Custom Dungeons Into Vanilla Zones by Phanjam
[May 09, 2019, 02:19:19 AM]


Triggerable Weapons by Phanjam
[April 29, 2019, 11:15:57 AM]


Need Help: Getting Translation into game by steffire3
[April 25, 2019, 10:23:02 PM]


FEP+ by LeavingUndad
[April 14, 2019, 06:47:25 PM]


Knowledge-basing For Level & Quest Making by Phanjam
[April 13, 2019, 01:51:42 PM]


Pet Variants Mod by Phanjam
[April 11, 2019, 02:53:00 PM]


[IDEA] Maika's Quest (children's mod) by Phanjam
[April 11, 2019, 09:33:41 AM]


Need Help: Template File List by steffire3
[April 10, 2019, 07:21:54 PM]


Deathknight class by Phanjam
[April 10, 2019, 12:47:27 AM]


TL1CP Update 4 - A new baseline (I hope) by Anarch16sync
[April 09, 2019, 03:25:53 PM]

* Popular Topics