Author Topic: Can Players Change Combat Icons?  (Read 2919 times)

Offline Dinonykos

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2344
    • Dinonykos Dungeon Craft
Re: Can Players Change Combat Icons?
« Reply #30 on: June 15, 2017, 01:38:36 AM »
Without your tutorial, I would not have known that this was even possible, let alone how to do it. I feel stupid that I couldn't tell if my own logic block event was evaluating to "true" or "false".
I assume that I probably am the one who uses logic block events most often, e.g. for time based events or events triggered by quest stages, and I regularly confuse things. I think one aspect that confused me in the beginning was how the letters A, B, C and so on for the different slots on are used, and how to use expressions like "numeric greater". Let's say you put "numeric greater" between slots A and B, it means, if I remember correctly, "if B is bigger than A, the result is true", but I would have expected an alphabetical order. It becomes even more interesting if using the "not" check boxes... :D

I would have used GPDL scripts more often without logic blocks, but I was confused in the beginning that "Execute GPDL function" can be found under "event triggers"...  ::)
« Last Edit: June 15, 2017, 01:50:08 AM by Dinonykos »
Find four contributions to the Pre-Generated Character Mini-Module Design Contest on my homepage.
New: THE AMBASSADOR'S LETTER, my contribution to the 7-day-challenge.
DINONYKOS DUNGEON CRAFT DESIGN HOMEPAGE

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9863
Re: Can Players Change Combat Icons?
« Reply #31 on: June 15, 2017, 11:32:47 AM »
« Last Edit: June 15, 2017, 11:36:41 AM by manikus »

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Nol Drek's Web Site
Re: Can Players Change Combat Icons?
« Reply #32 on: June 15, 2017, 07:10:40 PM »
I think one aspect that confused me in the beginning was how the letters A, B, C and so on for the different slots on are used, and how to use expressions like "numeric greater". Let's say you put "numeric greater" between slots A and B, it means, if I remember correctly, "if B is bigger than A, the result is true", but I would have expected an alphabetical order. It becomes even more interesting if using the "not" check boxes... :D

You are correct that the inputs go from top to bottom, not in alphabetical order. So "numeric greater" is true if (B>A) not the other way around.

Another thing I just discovered is that "numeric greater" behaves oddly with non-numeric string inputs, so the comparisons ("apple" > "banana") and ("banana" > "apple") are both "false". I would have assumed a lexicographical order.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2237
Re: Can Players Change Combat Icons?
« Reply #33 on: June 16, 2017, 08:52:04 AM »
"Numeric greater"  means 'numbers'.  "Apple"
and "Banana" are both zero.

If there is no "Alphabetic Greater" and you can convince
me that it is needed, it can be easily added.  Most anything
can be easily added.  Ask and convince and it shall be
delivered unto you.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9863
Re: Can Players Change Combat Icons?
« Reply #34 on: June 16, 2017, 12:29:47 PM »
If there is no "Alphabetic Greater" and you can convince
me that it is needed, it can be easily added.  Most anything
can be easily added.  Ask and convince and it shall be
delivered unto you.

It doesn't geet much better than that. ;)

Offline steve_mcdee

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 1953
Re: Can Players Change Combat Icons?
« Reply #35 on: June 18, 2017, 05:36:27 AM »
Who isn't to say whether apples or bananas are greater? It seems fairly subjective. I suspect that bananas may tend to polarise more than apples; I know there are some people who really can't stand bananas.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Nol Drek's Web Site
Re: Can Players Change Combat Icons?
« Reply #36 on: October 21, 2017, 02:57:16 PM »
If what I suggested does not work, let me know and we'll work on it until it does work. ;)

Changing icons works if you know the name of the character
    Set Icon Index by Name: Gandalf=2 works

Changing icons does not work if you use GPDL functions
    Set Icon Index by Name: $GET_CHAR_NAME($GET_PARTY_ACTIVECHAR())=2  //does nothing
    Set Icon Index by Name: $GET_CHAR_NAME(0)=2                                         //does nothing

Is there a GPDL Function that sets the icon index? Something like "$SET_CHAR_ICON_INDEX(0,2)" to set character index 0 to use icon frame 2?

"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2237
Re: Can Players Change Combat Icons?
« Reply #37 on: October 21, 2017, 03:07:47 PM »
Quote
$GET_CHAR_NAME(0)=2                                         //does nothing

Oh dear.  I'll have to fix that.  It should cause at least
a couple of errors.

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9863
Re: Can Players Change Combat Icons?
« Reply #38 on: October 21, 2017, 04:33:19 PM »
Quote
$GET_CHAR_NAME(0)=2                                         //does nothing

Oh dear.  I'll have to fix that.  It should cause at least
a couple of errors.

Yes, it should cause errors, but not "set" anything.

Changing icons is done via the Logic Block, which can be run in a Combat.

Complete list of GPDL functions:
http://www.dianneandpaul.net/UAF/Help/GPDLListOfFunctions.html
http://www.dianneandpaul.net/UAF/Help/SASpecialAbilitiesScripts.html

List of most functions with explanation (I know, I need to update)
http://manikus.reonis.com/Help/GPDLListOfFunctions.html

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Nol Drek's Web Site
Re: Can Players Change Combat Icons?
« Reply #39 on: October 22, 2017, 12:36:12 AM »
To summarize, there is no GPDL function which can change a character's icon and the logic block only takes literal strings from a text field "CharName=2" or"Hercules=3" but not $GET_CHAR_NAME(0) + "=2".
« Last Edit: October 22, 2017, 11:16:51 AM by Nol Drek »
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2237
Re: Can Players Change Combat Icons?
« Reply #40 on: October 22, 2017, 10:14:47 AM »
Quote from: Noel Drek
To summarize, there is no GPDL function

That is correct.  Such a function could be easily implemented
if someone were to convince me that it would be put to good use.

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Can Players Change Combat Icons?
« Reply #41 on: October 22, 2017, 11:39:22 AM »
A number of reasons come to mind...  but can one really prove that people will use it?

   • Accurate avatars:
            It could allow for updating the equipped weapon and shield; bow/crossbow, or sling
            The generic Dead PC might be substituted for a dead version of the specific PC
            Disintegrated PCs might leave an ash pile as remains
   
   • Spell effects:
            It might allow for polymorphing druids, mages, lycanthropes, and vampires to be shown in animal form
            It might also allow for 'enlarged' PCs to really appear so; the same with Invisibility, Blur, Fire Shield, and Mirror Image
   
   • Narrative effects:
            It might enable story related avatar changes; like an avatar that changes in immediate circumstance, or over the
            course of the adventure.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2188
    • Nol Drek's Web Site
Re: Can Players Change Combat Icons?
« Reply #42 on: October 22, 2017, 10:22:56 PM »
That is correct.  Such a function could be easily implemented
if someone were to convince me that it would be put to good use.

A) If you implement it, I will use it in a DC mod that I'm working on.
B) If you do not implement it, then I will require the player to use a pre-generated party in which I know what the names of the characters literally are.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2237
Re: Can Players Change Combat Icons?
« Reply #43 on: October 23, 2017, 09:10:04 AM »
There are many possibilities:

We could add an additional Logic Block option that
identifies characters by index.

We could allow the current Logic Block to contain
'substitution' strings so instead of "name=2"
you might say "%D=2".

You asked for a  GPDL function and that seems
as if it would work well.  Let us assume assume this
solution for now.

Next, we need to to know how you want to identify
the particular character (or combatant).  You don't
like to use the character's name.  You suggested the
character index.  Another possibility is some attribute
of the character such as his class, his race, an
object in his possession, a spell he has memorized,
a special ability, an ASL entry, etc.  In combat,
a spell effect might be used to select the icon.

So I leave it to you to decide what might work best.

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Can Players Change Combat Icons?
« Reply #44 on: October 23, 2017, 09:57:15 AM »
I consider myself less than a novice with GDPL (at the moment), but in another (indie) game that I extensively mod, we have several functions available to access party characters... by name, variable party position, character ordinal (unchanging, and probably like your PC Index); as well as by race, class, and  inventory checks like :hasItem("dagger"), status checks like :hasCondition('paralyzed').  Iterating the list of PCs with these allows detection of champions that meet criteria.

*This is not a request for these features—per se; DC probably has some of these already.

Hypothetically, with equivalents to the above, perhaps a script could be written that checks the time, moon phase, and for any lycanthropes in the party; and updates their combat icons to a werewolf icon.  Or similarly checks for equipped shields, and updates the icon if one exists* for equipped shield.

*Do I recall correctly that DC avatars can technically have more than two frames?


« Last Edit: October 23, 2017, 09:58:52 AM by Mechanaut »