Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old August 21st, 2012, 11:37 AM
Here is how I have this set up in the meantime, working for conditions. Essentially, what this does is, you see how many rounds something lasts, add it to the current round (manually) and put it in the duration field. Now, each round the duration is listed in number of rounds remaining (but only by checking the conditions button). Fortunately, you know the effect is in effect because the conditions are appended to the summary of combat. Unfortunately, I want to do the same for adjustments (which include spells for me) but I'm unable to append to the summary of the combat notes. It still ticks down on the conditions page, under the adjustments, but I have no way to know the effect is in place outside of typing it in myself (which is the option I am going with at the moment). It would be nice if it auto-filled in the Notes like conditions do, but that may not be possible.

@Final (Users) 50000
Code:
~ If we're not enabled, get out now.
doneif (field[pIsOn].value = 0)

~ If we're not in combat, get out now.
doneif (state.iscombat = 0)

~ Summarize our effect and turns remaining.
var durnum as number
var durstr as string
var turn as number
turn = state.combatturn
durstr = field[pDuration].text
durnum = durstr
durnum -= turn 
durstr = durnum
field[pChkName].text = "Stun " & durstr & "rds"
Notice that stun is the condition being applied. This also works with adjustments (as long as the adjustments don't have a chooser). Not sure how to make the chooser work yet, but I haven't spent any time on it yet, I'm sure I'll find a way. One option I have, is to use the Source field as a round counter instead of appending it to pChkName.

So, for example, if you are in round 5, and a stun effect lasts 4 rounds, you would just fill in the duration field with the number 9. Each round the field for Stun will read "Stun X rds" where X is the countdown of rounds remaining. When the number is at 0 on that character's turn, the effect ends.

Last edited by Kendall-DM; August 21st, 2012 at 11:41 AM.
Kendall-DM is offline   #11 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old August 22nd, 2012, 09:23 AM
Quote:
Originally Posted by Aaron View Post
I've looked into this and the Condition text in green at the bottom of the tactical console is generated by the tacSummary portal itself, which I don't think you can manipulate. It pulls from the "tacDefer" field first, then appends the tagnames for any Condition tags on the hero, and then appends the "tactNotes" field text to generate the text.
Obviously, the tacSummary portal is not accessible, even though it is being placed like a field. The tacDefer field is numeric, so no idea what it is doing, probably referencing a table that I've got no access to. However, each of these items that are being appended, what are they being appended to (the logical conclusion is the field that is going to be eventually displayed)? And once it is all appended together, where is it being placed for display, it should be a text field of some type internal to the system shouldn't it?
Kendall-DM is offline   #12 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old August 23rd, 2012, 10:48 PM
Alright, I have this all figured out. I had to do a little fancy trickery with the coding, but I think everyone will be pleased with the result. You can now have round counters in your Tactical Console! But, a few caveats to begin with which will make your job much easier.

First, there might be a few Adjustments you may want to source (where the effect is originating) in the Editor so that you won't have to source them during play. You can do this in your Adjustment tab by clicking on the Field button and inputing "pSource" as the Field ID and the origin of the effect in the Value. I would only do this if it is static and the originating source never changes (for example, a Bless is always the same source, so by sourcing it as a Bless, you don't need to do it on the fly while in the midst of a battle in the Tactical Console). This is just a suggestion, it is not needed. If you do not source an Adjustment, it will default to the name of the Adjustment. And you can always source it right in the Tactical Console as needed.

Second, the conditions work slightly differently than the temporary adjustments. Conditions have the round counter in the condition summary window (the big eye button) and appears next to the actual condition. You just have to remember to check on it each round in this window (and it's just a good idea with the counters to call up the window for each character that acts). Temporary adjustments appear in the Tactical Notes with the durations attached so you can keep an eye on them, but again, always a good idea to check those notes in the conditions window since they have a tendency to run off the screen (and thus, be hidden). When the round counter is at 0 AND it is the relevant character's turn, you need to go into the conditions window and remove both the duration and the checkmark. If you DON'T do this, the temporary adjustment will disappear from the Tactical Notes, BUT the effects will still be applied (the effect is still active because it is checked).

Third, in order to get the round counter to work, you will need to look at the current round number, then add to that the number of rounds the effect would last, putting that into the Duration box on the Conditions window. At that point, each round it will count down until it gets to 0. For example, if Bless lasts 5 rounds and the current round it was cast was Round 1, you would put the number 6 into the Duration box for the effect you would have for a Bless Adjustment (condition or temporary). If there is no duration (say for a condition, such as Dying), putting no duration in the Duration box will still display the effect without a duration (therefore letting you know it is active on the character in question).

Finally, DO NOT type anything into the Tactical Notes area of the Condition window. Anything you do type there will get deleted almost immediately (this was the only way I could get the round counters to appear the way they do, it's a trade off I know).

I think that about covers it. I may have missed something, but I can't think of it at the moment. Here is the nice thing about this, it doesn't require you to do a lot of coding, you only need the following bit of code to get this to work. In order for it to apply at all times for every character in the Tactical Console, you will need to have a Condition (not a Temporary Adjustment) that you can edit in the Editor. If you do not, don't worry, just go to the Adjustment tab in the Editor, select the Duplicate button at the bottom, and select the Blinded condition. Rename the Unique ID to pcnBlinded (d20 system), then on the middle right side, put pcnBlind in the box labeled Replaces Thing ID. Save this replaced condition and test it. If you already have a Condition you created in the Editor handy, use that one instead.

Now click the Eval Script button on the right side, then click the "Click to add another eval script". Set the new script's Phase to Final Phase (Users) and it's Priority to 50000. Once you have done that, copy and paste the following code into the new script, hit OK, then save and test. Your combats will now always have round counters for conditions and temporary effects!

Code:
~ If we're not in combat, get out now.
doneif (state.iscombat = 0)

~ Summarize our effects and turns remaining.
var first as number
first = 1
trustme
herofield[tactNotes].text = ""
foreach pick in hero where "Helper.AdjTemp | Helper.AdjCond"
  var durnum as number
  var durstr as string
  var turn as number
  turn = state.combatturn
  durstr = each.field[pDuration].text
  durnum = durstr
  durnum -= turn
  if (each.field[pIsOn].value <> 0) then
    if (durnum >= 0) then
      if (each.tagis[Helper.AdjCond] <> 0) then
        each.field[pChkName].text &= " {text 00ff00}" & durnum
      elseif (first = 1) then
        herofield[tactNotes].text = each.field[pSource].text & " " & durnum
        first = 0
      else
        herofield[tactNotes].text &= ", " & each.field[pSource].text & " " & durnum
      endif
    elseif (each.tagis[Helper.AdjTemp] <> 0) then
      if (compare(each.field[pSource].text, "") = 0) then
        each.field[pSource].text = each.field[pChkName].text
      endif
      if (first = 1) then
        herofield[tactNotes].text = each.field[pSource].text
        first = 0
      else
        herofield[tactNotes].text &= ", " & each.field[pSource].text
      endif
    endif
  endif
nexteach
See, there is always a way if you can think a bit "outside the box".

Last edited by Kendall-DM; August 24th, 2012 at 09:17 AM. Reason: Minor edits and corrections.
Kendall-DM is offline   #13 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old August 24th, 2012, 05:17 AM
Awesome. Nice work, Kendall.
Sendric is offline   #14 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old August 24th, 2012, 08:09 AM
Nice Job Kendall!
Aaron is offline   #15 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old August 24th, 2012, 09:16 AM
Thanks guys!

I realized when I woke up this morning, I dreamed a way to make this slightly better by drawing one's attention up to the conditions in the condition panel. I've put that change in the above code, highlighting the durations of conditions in green. I can't do that with the temporary adjustments though, since the Tactical Notes field is a raw field, and it would display the raw code.
Kendall-DM is offline   #16 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:21 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.