News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 389
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 265
Total: 265

Author Topic: Skills - How does it all work?  (Read 3352 times)

0 Members and 111 Guests are viewing this topic.

Re: Skills - How does it all work?
« Reply #15 on: »
Edit 5: It's come to my attention that you can't use the ADD STAT effect on custom stats. How do you modify them?

Not true.  You may have read the wiki entry about the ADD STAT effect not being modified by stats, perhaps.  Custom stats can only really be modified by ADD STAT, CLEAR STAT or SET STAT.  But you want to type the target stat's name in the NAME field, not the STAT field.  The STAT field indicates a modifier to be added to the formula that produces the final output of the effect.  The STAT field is non-functional for the ADD STAT/SET STAT effects.

For example:
You create a Damage effect.  Min/Max are 100, no stat is used to modify the damage, NOGRAPH is false and the graph is not overridden, and so uses the Damage effect's default graph, which I think is MONSTERHEALTH.  The formula is something like this (I think it's written out in the Effect Dictionary):

output graph(x/100) where x = {min:max}*(stat*stat percent/100)
output graph(x/100) = {100:100}*(1)

Note that if no stat is specified, that portion of the formula is omitted.  So, we get graph(100/100) or graph(1).  MONSTERHEALTH at 1 is something like 10, so this damage effect will apply 10 damage to its target before mitigation.

Now, skills like Coup de Grace use a character stat to determine damage.  Coup de Grace uses Strength.  So it's damage effect formula starts with these inputs:

MIN/MAX = 3; STAT=CHARACTER STRENGTH; STATPERCENT=100; NOGRAPH=true

Since NOGRAPH is true, the formula skips the step of referencing the graph array and looks like this:

output = {min:max}*(stat*statpercent/100)

output = {3:3}*(CHARACTER STRENGTH*100/100)

output = 3*CHARACTER STRENGTH



This is what you can't do with ADD STAT.  You can't modify the output by a dynamic or static stat, which limits its functionality in a lot of ways that many modders wish we could have.  I don't know if ADD STAT will use a graph or not.  By default it has no graph.

Okay, that was a bunch of tangential information.  Lemme address some of your other queries if I can.

Re: Skills - How does it all work?
« Reply #16 on: »
Quote
Exodemus said:
Edit: And I looked for the PLAYER CHARGEBAR EFFECTS stat, couldn't see it in the stats editor.

Not all static stats are declared in the stat editor.  For a full list of available stats for us to play with, look here.  Be aware that you need to declare a stat in the stat editor, even one that's already used internally, if you want it to not cause a crash in-game.  For example, Character Magic is not declared in GUTS by default.  Create a new stat, set it to a Predetermined Dynamic Stat (or something like that) and you'll be able to reference it in Effects, UI widgets, etc.

Quote
Edit 2: I added the passive to the relevant skilltab, and the tooltip on that updates dynamically. I should be able to scav that.

This is a good option and one that you should be able to find in the Skill Tree Overrides.  But I still think there's an easier way to do this.  Lemme open GUTS, it's getting kinda rusty...



Voila.  This list should populate the PLAYER CHARGE EFFECTS stat, iirc.  Add your affixes here and they should show in your new UI.  If you're using a custom chargebar and chargebar tooltip, you also need to change the references to those.  In the upper right, you'll see the 'UI' box, with the item OUTLANDERCHARGEBAR.  That's the reference to the charge bar UI file's NAME property.  So, when you create a new charge bar UI, you need to save it with a unique filename, but also go to the NAME property and make that a unique name as well.  If you do this correctly, you should, after reloading GUTS (or maybe just the Unit Editor), be able to select your charge bar UI from the list using the MODIFY button.

Re: Skills - How does it all work?
« Reply #17 on: »
On the topic of custom stats, SET STAT can be modified by a stat.

Re: Skills - How does it all work?
« Reply #18 on: »
First of all, WELCOME to these forums @Exodemus s, it's nice to have you here!

How To Make Things Actually Happen Through Skills

Here's an overview-level guide.

@Chthon that was such a great overview tut I just had to transcribe it onto the wiki!
« Last Edit: November 08, 2015, 04:04:57 am by Phanjam »


Re: Skills - How does it all work?
« Reply #19 on: »
On the topic of custom stats, SET STAT can be modified by a stat.

Say what!?  I probably conflated the failure of ADD STAT to work for my purposes with the failure of all STAT effects to be modified by a stat.

Re: Skills - How does it all work?
« Reply #20 on: »
On the topic of custom stats, SET STAT can be modified by a stat.

Say what!?  I probably conflated the failure of ADD STAT to work for my purposes with the failure of all STAT effects to be modified by a stat.

Yup, it works.

In fact, it's crucial to one of my favorite tricks: When I need to tag who is the "owner" of a certain effect, I set a custom stat on the caster to a  random value between 1 and 1million in an event start block, then do a set stat to copy the owner's custom stat to a (possibly different) custom stat on the target in the same block when I apply the effect I want to track, and then other skills can filter for matches using a statwatcher. Here's an example of copying a custom stat:
Code: [Select]
[EFFECT]
<STRING>NAME:ID_SHADOWBIND_TARGET
<STRING>ACTIVATION:DYNAMIC
<STRING>DURATION:INSTANT
<INTEGER>LEVEL:1
<STRING>TYPE:SET STAT
<STRING>STATMODIFYNAME:ID_SHADOWBIND_CASTER
<STRING>STATMODIFYPERCENT:100
<FLOAT>MIN:1
<FLOAT>MAX:1
<FLOAT>CHANCE:100
[/EFFECT]

 

Recent Topics+-