Set Appear Events [EDIT]

Author Topic: Set Appear Events [EDIT]  (Read 2810 times)

Swollows New topic
Note, This is made to replace the old Apearence events. I will make sure it is up to date, All it does is add 2 events.

After requesting several times, I finally decided to make it myself.
It adds, events:

RestoreFace Restores the clients avatar... But only on the face. Useful for RPG amour through events.
RestoreSkin Like Thee above. But restores the hands as well.

Recommended with Avatar Events

Update 2

Download
Should Work, I haven't tested it yet.

Version 2 and 3 do not work.
Anyone who has v1 should be fine...
« Last Edit: January 30, 2018, 11:01:33 AM by soldier101@ »

That's actually pretty neat. Thanks!

The restore events in that mod are the only things that work, everything else is broken

The restore events in that mod are the only things that work, everything else is broken
jesus christ they work fine you probably have some stuffty addon conflicting

jesus christ they work fine you probably have some stuffty addon conflicting
Seriously? We have been through this, lol. I tried these events on a default install of Blockland.

Before I go into to detail, let me correct myself - when I said they were "broken" I actually meant "oddly working" or "partially functional" imo

Let me explain the issues that Deo and I had with these events a bit more thoroughly:

1. The pushed appearance is deleted after you pop your appearance - WHY?!?!

2. Even if your avatar is locked, you can still change the appearance via events - not sure if this was intentional or not but it's a bit strange

3. Bogged up events list - There should not be 5 different output events just to change node colors and visibility / face / decal when you can do it with a single output event

4. Console errors when restoring appearance as I mentioned here which you never addressed but now the topic is too old.



I'm not trying to be mean, Swollow, I am simply stating that these things are a real turn off for the mod itself as a whole - please revise!

Seriously? We have been through this, lol. I tried these events on a default install of Blockland.

Before I go into to detail, let me correct myself - when I said they were "broken" I actually meant "oddly working" or "partially functional" imo

Let me explain the issues that Deo and I had with these events a bit more thoroughly:
1. The pushed appearance is deleted after you pop your appearance - WHY?!?!
this is exactly how push and pop are supposed to function
https://www.cs.cmu.edu/~adamchik/15-121/lectures/Stacks%20and%20Queues/Stacks%20and%20Queues.html
2. Even if your avatar is locked, you can still change the appearance via events - not sure if this was intentional or not but it's a bit strange
locking your avatar prevents users from changing it in the avatar gui
3. Bogged up events list - There should not be 5 different output events just to change node colors and visibility / face / decal when you can do it with a single output event
the alternative is a stuffty text box entry? theres no support for dynamic drop down menus, its concise and clear
4. Console errors when restoring appearance as I mentioned here which you never addressed but now the topic is too old.

I never expereienced that, but it would be a single line of code to fix that


my issue is you claim "everything is broken" and the only thing you have presented is a single console error that doesnt actually effect the usability of the mod, everything is functioning as intended

probably should have written a "fetchAppearance" so it doesnt have to be popped off, but fair enough i guess

Code: [Select]
%error = ForceRequiredAddOn("Event_Appearance");
if(%error == $Error::AddOn_NotFound)
{
error("ERROR: Event_AppearanceMod - required add-on Event_Appearance not found");
return;
}

registerOutputEvent("player","restoreFace","",1);
registerOutputEvent("player","restoreSkin","",1);
function player::restoreFace(%pl,%cl)
{
if((%db = %pl.getDatablock()).shapeFile !$= "base/data/shapes/player/m.dts" && !%db.cstar fisheSwolNodeEvents)
return;
%pl.setFaceName(%cl.faceName);
%pl.setNodeColor("headskin",%cl.headColor);
}
function player::RestoreSkin(%pl,%cl)
{
    if ((%db = %pl.getDatablock()).shapeFile !$= "base/data/shapes/player/m.dts" && !%db.cstar fisheSwolNodeEvents)
return;
    %pl.unHideNode("headskin");
    if (%cl.hip)
    {
        %pl.unHideNode("skirthip");
        %pl.unHideNode("skirttrimleft");
        %pl.unHideNode("skirttrimright");
    }
    else
    {
        %pl.unHideNode("pants");
    }
    %pl.setFaceName(%cl.faceName);
    %pl.setNodeColor("headskin",%cl.headColor);

    %pl.setNodeColor("rhand",%cl.rhandColor);
    %pl.setNodeColor("lhand",%cl.lhandColor);
    %pl.setNodeColor("rhook",%cl.rhandColor);
    %pl.setNodeColor("lhook",%cl.lhandColor);
}

please revise your mod so that it separate

also you don't have to require my addon for yours to work since it has no relevant code pertaining to my mod so just remove the forceRequiredAddon if you wish either way


probably should have written a "fetchAppearance" so it doesnt have to be popped off, but fair enough i guess
it just never occured to me that someone would have any reason for loading the same appearance multiple times for any reason
and a better name would be saveAppearance and loadAppearance





Also I have updated my addon to have that console error fixed, this addon in its current state will overwrite that fix of course
« Last Edit: January 25, 2018, 04:08:24 AM by Swollow »

this is exactly how push and pop are supposed to function
then for the love of god at least make an event to SAVE the avatar PERMANENTLY
or even a pref that changes the way pop appearance works

locking your avatar prevents users from changing it in the avatar gui
But they can still change it with events - add a second bool to the lockAvatar event that when ticked prevents players from changing it with events - would make the event a bit more 'dynamic' as you say

the alternative is a stuffty text box entry? theres no support for dynamic drop down menus, its concise and clear
I can understand if someone doesn't know the node/face/decal names - but maybe they outta learn them if they are messing around with the players appearance? I can literally type the name of the node I want faster than I can select it from a loving drop down box

I never expereienced that, but it would be a single line of code to fix that
So, your saying you didn't fully test it?

my issue is you claim "everything is broken" and the only thing you have presented is a single console error that doesnt actually effect the usability of the mod, everything is functioning as intended
I corrected myself did I not?

Upon further testing I found that if I put on a hat and pack , push the appearance, remove the hat and pack via avatar menu then pop the appearance - nothing happens!

it just never occured to me that someone would have any reason for loading the same appearance multiple times for any reason
They die and want their hat back? idk

saveAppearance and loadAppearance
This is where we do things differently - I think avatarLoad and avatarSave are more efficient names - especially in a gui that is alphabetically organized
« Last Edit: January 25, 2018, 04:17:43 AM by Goth77 »

then for the love of god at least make an event to SAVE the avatar PERMANENTLY
or even a pref that changes the way pop appearance works
I don't understand why you would need to load an appearance more than once
But they can still change it with events - add a second bool to the lockAvatar event that when ticked prevents players from changing it with events - would make the event a bit more 'dynamic' as you say
sounds unnecessarily complicated
I can understand if someone doesn't know the node/face/decal names - but maybe they outta learn them if they are messing around with the players appearance? I can literally type the name of the node I want faster than I can select it from a loving drop down box
good for you, my addon is intended to create the easiest end user experience
Upon further testing I found that if I put on a hat and pack , push the appearance, remove the hat and pack via avatar menu then pop the appearance - nothing happens!
thanks for the bug report, upon close inspection I had accidentally named a variable improperly and the issue is now fixed
They die and want their hat back? idk
this add-on handles things per player not per client, if the player dies the saved avatar is gone
This is where we do things differently - I think avatarLoad and avatarSave are more efficient names - especially in a gui that is alphabetically organized
that is a nicer naming convention I'll give you that, but I prefer my event names


Edit: since you were talking about typing the name of the node faster this addon might also interest you
https://forum.blockland.us/index.php?topic=291624.0
« Last Edit: January 25, 2018, 04:32:39 AM by Swollow »

I don't understand why you would need to load an appearance more than once
Someone dies with a blue shirt they 'bought' and now they have the default starter avatar (or team uniform) but want their blue shirt back?

Glad I could be of assistance in ze bug testing

Now I'm just wondering if you are you going to add the "revised" events soldier added to the original mod since this topic is using an outdated version?

Now we have "Appearance Events 2.2" and "Appearance Events Revised" at the top of the add-ons board, lol.
« Last Edit: January 25, 2018, 04:50:19 AM by Goth77 »

she requested soldier to drop any included original setappearance event code in the addon and just have it be a dependency instead

she requested soldier to drop any included original setappearance event code in the addon and just have it be a dependency instead
Alrighty sounds good hopefully soldier renames this to something like "Appearance Events Extended" to avoid any confusion with the original

Someone dies with a blue shirt they 'bought' and now they have the default starter avatar (or team uniform) but want their blue shirt back?
this add-on handles things per player not per client, if the player dies the saved avatar is gone

Now I'm just wondering if you are you going to add the "revised" events soldier added to the original mod since this topic is using an outdated version?
as far as I'm concerned these are extended events and theres no point in including them in my addon since they are niche

For some reason I see everything except the "restore face" and "restore skin" events.