• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Tactical Console - Rounds

I've been working with an idea for the tactical console to automate a few things. So far everything is going off as I'd like, but I'm curious about one thing. Is there a way to access the current round from the hero state? I can access the tactical tidbits stored on the hero, but wondered if there was a field I could access within the console itself that would indicate the current round? Just a hair-brained idea on how to improve the tactical console with a script rather than through hard coding, but I need to know if I can access things within the console itself. I know it's a long shot, but anyone know?
 
Well, I have a working counter... sort of. I can get the counter to decrement the rounds, but I still have no way to determine the current round non-dynamically. I could use the incrementer, but that has some use beyond setting the round. Because of the dynamic nature of the fields in the tactical console, it doesn't work as I intended. However I was able to shortcut a little bit by setting the Duration in the duration field and having it display that duration to the Notes window. I still believe I can do something here, but it might be a bit of work before I get there. New ideas already percolating in my brain pan.
 
Ah, there's a field that is being used in the Tactical Console, but I can't seem to figure out what it is. The herofield[tactNotes].text appends to it to add the conditions checked, anyone know what this field is? It's like the field[descript].text for the live field[CustDesc].text in Specials, it's not listed in the field list but it exists. What is this field for the hero that relates to herofield[tactNotes].text? If I can get this, I have this nailed down!
 
Monday is meetings and travel as well, so we'll be back in the office on Tuesday. Just heading out the door to the convention center, no time to post further but I'll see you in a few days.
 
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.
 
Hmmm, are you sure there is no field I can manipulate like a Summary. I have the counter working, but I can't have the tactNotes field append to itself (it grows exponentially long repeating itself). I need to append to a summary field of some type. I have the conditions working with the counter, but I would like to get the tactNotes to work with the counter. For that, I would need to append to something that isn't tactNotes. If I get this to work, we would have a way to tick off rounds perfectly. Hmmmm, there has got to be a way...
 
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:
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?
 
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:
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.
 
Back
Top