FRUA & DUNGEON CRAFT Community Forums

Dungeon Craft => Dungeon Craft - Development => Topic started by: GoldBoxFan on November 11, 2011, 11:02:20 AM

Title: Can Players Change Combat Icons?
Post by: GoldBoxFan on November 11, 2011, 11:02:20 AM
There are certain PnP modules that have players cursed into other forms. In FRUA you can do nothing about this. I was wondering if there was a way to change a character from say a human to a werewolf combat icon?
Title: Re: Can Players Change Combat Icons?
Post by: Olivier Leroux on November 11, 2011, 12:57:51 PM
I might be mistaken, but I think the OAUA worldhack offered the possibility to change a player's icon to simulate shapeshifting/lycanthropy. It's probably not that easy to implement though and I don't remember how well it worked. In any case, the regular FRUA sadly does NOT allow for this (unless the 'player' character is actually an NPC).  :'(
Title: Re: Can Players Change Combat Icons?
Post by: Jaesun on November 11, 2011, 01:06:55 PM
IIRC (For both FRUA and DC currently) you as a designer can do nothing to change a PC's combat icon or portrait. The Player however can change their icon/portrait at any time, when in camp.

There was some new added functionality to DC a while back where things like walls, door, overlays, blockages can now be changed in game at anytime. Possibly with version 1.x the ability to change icons could be added.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on November 11, 2011, 02:14:07 PM
*** Feature Request ***

Competing SA

OnStartCombat hook

$SET_COMBATANT_ICON(filename);
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens on November 11, 2011, 04:17:52 PM
Might not someone want to change the
icon in the middle of combat?  Perhaps as
the result of a spell?

It is not as easy as changing the walls.  We
do not change a wall's graphic.  We change
the wall itself.  Changing a graphic dynamically
as you suggest messes up any attempt to
discover what graphics might be needed by
a module.  It also causes us to have to dynamically
create an internal graphic object.

Better would be to say:

Change Dork-the-Fighter's icon to be the
same as Monster-Icon-Holder-134.

Then you create an otherwise unused monster
named 'Monster-Icon-Holder-134' with the
icon you plan to use.

It is somewhat like Creative Accounting.  It
gets the job done in a round-about way without
obviously breaking any laws.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on November 12, 2011, 01:31:03 PM
*** Modified Feature Request ***

$SET_COMBATANT_ICON(string_index, string_monsterID);
// Sets the target's icon to be the same as that of a monster from the database
// e.g. $SET_COMBATANT_ICON($IndexOf($TargetContext()), "Werewolf");
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens on November 12, 2011, 01:58:27 PM
I think that is a perfectly reasonable feature request.

The effect would only last until the end of combat.
Is that your intent?  The word "COMBATANT" in the
name of the function implies as much - to me.

If we wanted to make some sort of permanent
change, we would have to apply the effect to
a character (which exists outside of combat).

Perhaps a simpler way (because it requires no
additional function) is to attach a "Special Ability"
to the combatant or character.  Then you could
make it temporary or permanent as you choose.
Maybe a Special Ability like _SYS_CombatIcon.

_SYS_CombatIcon = "Werewolf_Icon"

And it would be easy to remove.  Your solution
provides no way to remove the effect unless you
have another monster with the proper icon for
each of your characters.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on November 13, 2011, 01:57:16 PM
My intention was to have the script run in COMBATANT context, although I can see that a designer might want it to run in CHARACTER context.

I assume that we could make a SA whose parameter is the name of the original icon, and that any icon which is in the "ICON POOL" would be available for the enigine to use (e.g. icon_PC_DruidMale). This would make it possible to remove the effect after combat.
Title: Re: Can Players Change Combat Icons?
Post by: manikus on November 14, 2011, 01:55:24 PM
Gosh, I look away for one second and people are talking about adding feature requests in DC. Sorry, but unless Paul got sneaky and already did this, not going to happen until after version 1.0.

Besides, we can already do it in DC, I have even created a tutorial on how to do this:
http://manikus.reonis.com/files/DCTutorial_logicblockevent_iconindex.pdf

(Besides, if we are going to add one feature for changing graphics during the game, I think it should be to change the borders/frame. ;) )
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens on November 14, 2011, 03:17:00 PM
Well now.  Ain't that neat?  I wonder
where that came from.

Of course there is no way to make
the effect go away automatically after
combat.  Nor a way to apply the
effect during combat.  How is this done
in FRUA?

If it works reliably then we could do
the same thing with a script function.
We would not have to do it via the
indirect method that I suggested.
What happens if you give a character
an icon index that does not exist?
I see there is a check for negative but
no check for other impossible values.



Title: Re: Can Players Change Combat Icons?
Post by: manikus on November 14, 2011, 04:17:44 PM
The icon index was around before I was, so I refuse to take responsibility for it. :) I'm just the guy that figured out how to use it and then put together a tutorial.

To be honest, it's a real pain in the butt. It takes two events to use a different icon for only some of the combats. The most difficult part, though is that using the icon index 'trick' requires specailly made icons, which really limits it's use since the player has to choose an icon with the extra indeces, so a very small pool most likely.

I would prefer to have functions and scripts that could do this. But, there are lots of things I would like to add to DC. But it's a feature request, not a bug fix. FRUA doesn't allow this type of thing at all.

Title: Re: Can Players Change Combat Icons?
Post by: SilentThief on November 15, 2011, 05:31:32 PM
Unless I am mistaken, the change will not occur in mid combat, it can be changed just before or after, but the icon isn't changed in the combat event just at any combat events afterwards

ST
Title: Re: Can Players Change Combat Icons?
Post by: GoldBoxFan on November 15, 2011, 10:23:28 PM
Just want to know if DC can allow me to do things in my design that FRUA won't. I actually meant to change the icon outside of combat before you went to your next combat.

Anyway, if we could just change the names of classes we could have Top Secret and Boot Hill modules. I already know we can make the weapons.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on November 15, 2011, 11:23:01 PM
Anyway, if we could just change the names of classes we could have Top Secret and Boot Hill modules. I already know we can make the weapons.

Changing the names of the Baseclasses, the Classes, and the Races is easy to do in DC.

Many of the things that you would also want to change, such as which classes can cast spells and which baseclasses are in each multiclass combination, are hard-coded and likely to remain so for quite some time.
Title: Re: Can Players Change Combat Icons?
Post by: GoldBoxFan on November 16, 2011, 10:13:30 AM
Anyway, if we could just change the names of classes we could have Top Secret and Boot Hill modules. I already know we can make the weapons.

Changing the names of the Baseclasses, the Classes, and the Races is easy to do in DC.

Many of the things that you would also want to change, such as which classes can cast spells and which baseclasses are in each multiclass combination, are hard-coded and likely to remain so for quite some time.
But there is still the no magic in combat option? If we have to use magic classes for now, getting rid of their magic would be a temporary fix.
Title: Re: Can Players Change Combat Icons?
Post by: nologgie on November 16, 2011, 12:52:15 PM
Yep. You could also delete all the usable spells.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on June 02, 2016, 09:08:22 PM
Gosh, I look away for one second and people are talking about adding feature requests in DC. Sorry, but unless Paul got sneaky and already did this, not going to happen until after version 1.0.

Besides, we can already do it in DC, I have even created a tutorial on how to do this:
http://manikus.reonis.com/files/DCTutorial_logicblockevent_iconindex.pdf

(Besides, if we are going to add one feature for changing graphics during the game, I think it should be to change the borders/frame. ;) )

Does this feature still work with the current version of DC? I tried doing what it says in the tutorial as follows:

1) Make an icon that has 4 poses, with total dimensions 192x48.
2) Use a logic block to "Set Icon Index by Name" with "Name=2".

In combat, the PC icon is wide - 96x48. The frame 1 "ready" and "action" pose show up, and when the PC attacks, it displays the frame 2 "ready" and "action" poses. I think DC is reading the 192x48 PC icon as a wide icon with 1 frame instead of as a normal icon with 2 frames.
Title: Re: Can Players Change Combat Icons?
Post by: manikus on June 03, 2016, 02:53:36 PM
I tried this before we hit 1.0, but not since. I'll look at it this weekend. It would not surprise me at all to find it is broken.
Title: Re: Can Players Change Combat Icons?
Post by: manikus on June 06, 2016, 02:45:55 PM
There is a bug here, but not with Icon Index via Logic Block Event.
Nol, if you create an NPC or monster with more than one set of poses, it works fine - when adding image, set number of frames to appropriate number.
When adding an icon to the Icon Pool for use with creating new PCs, no matter what you set the frame count to, it always goes back to 2. And, as noted by Nol, it assumes that all icons are 48x48 in the icon preview during character creation, but will show the whole icon in combat, though no matter how many frames, the engine will tret it as 2 frames.
Title: Re: Can Players Change Combat Icons?
Post by: manikus on June 08, 2016, 03:30:07 PM
paul has made a new editor, version 2.44 that fixes the Icon Index issue. :)
(Available at his site.)
Title: Re: Can Players Change Combat Icons?
Post by: Milos Gulan on June 09, 2016, 01:35:14 AM
Thank You. :)
Title: Re: Can Players Change Combat Icons?
Post by: SilentThief on June 11, 2016, 05:55:30 PM
this is awesome. i have been wanting to see if I could get an idea which required icon changing to work. Now I gotta try.

ST the trying
Title: Re: Can Players Change Combat Icons?
Post by: manikus on June 11, 2016, 06:19:58 PM
this is awesome. i have been wanting to see if I could get an idea which required icon changing to work. Now I gotta try.

ST the trying

The best part is that it works exactly the same way it has since .910 or there abouts. ;)
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on June 12, 2017, 08:13:45 PM
Over the weekend, I was able to get a Test character, named "Test" to change into a Werewolf.

I'm embarrassed to admit that it took me a year to figure out what I was doing wrong. I did not understand how logic block events work. I'll explain what I learned, in the hope that I can save the next person who tries to switch a character's combat icon some of the frustration which I experienced.

For each one of the inputs, A,B,D,F, and G, an empty literal string "" is interpreted as the boolean value "false". Any other literal string value, such as "1", "true", or "potato salad" is interpreted as the boolean value "true". Type something, literally anything, in one of the input boxes and leave everything else set to the default values. Then, in the "First Action" box, select "Set Icon Index by Name" in the drop down menu and, right below that, type the name of the character, equals, and the frame number. For example: "Dracula=2" or "Gandalf=2" or "Lon Chaney=2". You first need to have an icon that is a 192x48 image made up of 4 poses (Ready #1, Action #1, Ready #2, Action #2, in that order left to right).

As it is, this only will work for a party of pre-generated characters, where the designer knows ahead of time what the characters' names are. I wish that I could set the icon index for the active character or based on party index (marching order), but I'm happy that I finally can turn a human into a Werewolf!
Title: Re: Can Players Change Combat Icons?
Post by: Dinonykos on June 13, 2017, 06:25:23 AM
Dear Nol, maybe I completely misunderstood your problem, but could you not just have marked "always" in the "first action" section instead of adding something into the inputs? Or did the "1" in input B have a certain purpose?
Title: Re: Can Players Change Combat Icons?
Post by: manikus on June 13, 2017, 01:56:33 PM
I was going to point out what Dinonyko already did. :D

Alsso, there are some functions that can help you, namely: $GET_PARTY_ACTIVECHAR() and $GET_CHAR_NAME( String ). So, if you want the active character to be the one changed into a werewolf, you would use:
$GET_CHAR_NAME($GET_PARTY_ACTIVECHAR())

Of coursse, you will have to make sure all of the player selectable icons have a werewolf option. :D
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens on June 13, 2017, 08:16:36 PM
Quote
make sure all of the player selectable icons have a werewolf option.

Certainly, all such characters would have the "Werewolf" Special Ability.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on June 13, 2017, 10:02:29 PM
Dear Nol, maybe I completely misunderstood your problem, but could you not just have marked "always" in the "first action" section instead of adding something into the inputs? Or did the "1" in input B have a certain purpose?

As I said, I did not understand how logic block events worked. I had been following manikus' tutorial exactly, so I was making my logic block look identical to the one in the tutorial, which was my mistake. Checking the "Always" radio button makes perfect sense.

I was going to point out what Dinonyko already did. :D

Alsso, there are some functions that can help you, namely: $GET_PARTY_ACTIVECHAR() and $GET_CHAR_NAME( String ). So, if you want the active character to be the one changed into a werewolf, you would use:
$GET_CHAR_NAME($GET_PARTY_ACTIVECHAR())

Of coursse, you will have to make sure all of the player selectable icons have a werewolf option. :D

Yes, all the PC icons in my icon pool have a Lycanthrope option.

I did not know that I could put a script into the box where I typed "Test=2". You are saying that I can type in "$GET_CHAR_NAME($GET_PARTY_ACTIVECHAR())=2" and it will work. I must try this at once... and then I will make the script choose a character at random instead.

Title: Re: Can Players Change Combat Icons?
Post by: manikus on June 14, 2017, 12:28:05 PM
I am sorry that my tutorial held you back...I am not the expert on Logic Blocks. Honestly, I owuld prefer to have an icon index function.

If what I suggested does not work, let me know and we'll work on it until it does work. ;)
These lycanthrope; all werewolves? Consider my curiosity piqued.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on June 14, 2017, 07:30:44 PM
I am sorry that my tutorial held you back...I am not the expert on Logic Blocks.

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". Still, it would be helpful if the image in the tutorial was updated so that the logic block executes its first action "Always" instead of "If True".

These lycanthrope; all werewolves? Consider my curiosity piqued.

I'm not telling what I'm actually doing with the DC editor... but I imagine a designer could do many things with this, such as:

1) You could force a PC's appearance to change based on whether they are wielding a sword or a mace or an axe, and whether they are wearing robes or leather or plate armor.
2) You could make a PC put on a disguise when they enter the villain's hideout if they choose the stealth option over a frontal assault.
3) You could have a PC's icon show the gradual onset of Lycanthropy or Mummy Rot or Old Age by using a sequence of many frames instead of just 2.
4) You could make Billy Batson's icon turn into Captain Marvel by uttering the magic word "Shazam!".
Title: Re: Can Players Change Combat Icons?
Post by: Dinonykos 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"...  ::)
Title: Re: Can Players Change Combat Icons?
Post by: manikus on June 15, 2017, 11:32:47 AM
Nol, do you mean this tutorial?
http://manikus.reonis.com/Help/EditorsInAction-IconIndex.html

edited to add:
Nevermind, you meant this one: http://manikus.reonis.com/files/DCTutorial_logicblockevent_iconindex.pdf
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek 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.
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens 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.
Title: Re: Can Players Change Combat Icons?
Post by: manikus 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. ;)
Title: Re: Can Players Change Combat Icons?
Post by: steve_mcdee 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.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek 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?

Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens 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.
Title: Re: Can Players Change Combat Icons?
Post by: manikus 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
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek 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".
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens 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.
Title: Re: Can Players Change Combat Icons?
Post by: Mechanaut 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.
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek 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.
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens 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.
Title: Re: Can Players Change Combat Icons?
Post by: Mechanaut 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?


Title: Re: Can Players Change Combat Icons?
Post by: manikus on October 23, 2017, 01:32:15 PM
I'm trying to lay catch-up here...maybe you already tried this and it didn't work...

There are two functions that retrieve an index:
$IndexOf( Actor )   -> use in conjunction with $Name( String ) if you have a specific name
$MyIndex(  )      -> use for the active party member

Also, I would really like to use the icon index feature, and would very much like to use it as a GPDL function, not as part of the Logic Block.
Title: Re: Can Players Change Combat Icons?
Post by: manikus on October 23, 2017, 01:38:39 PM
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.
DC can do all of these, including checking to see if items are readied and where in the enventory they are located. If anyone wants examples, just let me know.

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.
Yes, we can do this in DC. In the not-so-distant past, I had tried something similar to the shield idea for a special weapon, and it worked.

*Do I recall correctly that DC avatars can technically have more than two frames?
Yes. In theory any even number of cells can be used - never tried more than 6 myself.
Title: Re: Can Players Change Combat Icons?
Post by: Mechanaut on October 23, 2017, 02:32:29 PM
Yes. In theory any even number of cells can be used - never tried more than 6 myself.
So in theory, icons could become an optionally standardized sprite sheet; with several images that could be used if present.  An avatar could have one cell with a shield, and one for each class of weapon; possibly one for a corpse, and perhaps another for unconscious. Possibly three for a common transformation —or transition into animal forms, for those that can do that?

**Clever use of XOR could probably be allow loading only the changes (per cell) needed to update the icon from one cell to the next?
Title: Re: Can Players Change Combat Icons?
Post by: manikus on October 23, 2017, 02:58:00 PM
Yes. In theory any even number of cells can be used - never tried more than 6 myself.
So in theory, icons could become an optionally standardized sprite sheet; with several images that could be used if present.  An avatar could have one cell with a shield, and one for each class of weapon; possibly one for a corpse, and perhaps another for unconscious. Possibly three for a common transformation —or transition into animal forms, for those that can do that?

**Clever use of XOR could probably be allow loading only the changes (per cell) needed to update the icon from one cell to the next?

In theory, yes. :)
Title: Re: Can Players Change Combat Icons?
Post by: Nol Drek on October 23, 2017, 08:23:43 PM
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.

I believe that I can already write a script which checks the class, race, objects possessed, etc. for each party member using existing functions.

If $VAR target; stores the index of a character or combatant that I have selected in my script using existing functions, and iconIndex is an integer, then I want to be able to:

$SET_CHAR_ICON_INDEX(target,iconIndex)

So I am requesting a function: $SET_CHAR_ICON_INDEX(string,string)
Title: Re: Can Players Change Combat Icons?
Post by: manikus on October 24, 2017, 12:36:39 PM
If $VAR target; stores the index of a character or combatant that I have selected in my script using existing functions, and iconIndex is an integer, then I want to be able to:

$SET_CHAR_ICON_INDEX(target,iconIndex)

So I am requesting a function: $SET_CHAR_ICON_INDEX(string,string)

Duly noted. :) I have added it to the list, but modified it to requesst both $GET_CHAR_ICON_INDEX() and $SET_CHAR_ICON_INDEX().
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens on October 25, 2017, 06:26:45 PM
Editor and engine 3.32 implement Get and Set Icon Index.

Untested, of course.
Title: Re: Can Players Change Combat Icons?
Post by: manikus on October 25, 2017, 06:59:36 PM
Nice. Thanks, Paul. :)

I'll whip up something to test this and get back to everyone. The benedit of me doing this will mean I can provide an example of how the functions work.
Title: Re: Can Players Change Combat Icons?
Post by: manikus on October 26, 2017, 12:41:23 PM
Paul, engine 3.32 crashes spectacularly. :) I've attached a mini-mod to  show you when it occurs.

I've included the special icon, but you will need to add the rest of the Resources as usual.
Title: Re: Can Players Change Combat Icons?
Post by: Paul R. Stevens on October 26, 2017, 04:59:52 PM
I changed a 'G' to a 'S' and released engine version 3.33.
It seems to crash less often.