Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCHMOE lines could be used to initialize the Slots list as well as ANIM lines #9

Open
LeonaMorro opened this issue Feb 22, 2017 · 5 comments

Comments

@LeonaMorro
Copy link
Member

LeonaMorro commented Feb 22, 2017

Howard wrote:
At lines 268 and 307 within the ProcessLine function I've added a couple fairly simple routines which allow SCHMOE lines to be used within the default card. It simply adds a STRIDE to the slots list and gives SCHMOE a stride to modify. This has an additional benefit of enabling a menu user to add seats on the fly. The drawback to doing so is that changing from 4 available seats down to 2 is not possible, once added they stay added. This is my reason for tracking down Bug 2 and Bug 3. All I wanted to do is put an example together and open discussion about it but ended up chasing bugs in order to make the example. This one is open for discussion if you have other ideas, objections, or suggestions.
see 5a97170

@LeonaMorro LeonaMorro changed the title I came up with an idea that SCHMOE lines could be used to initialize the Slots list as well as ANIM lines SCHMOE lines could be used to initialize the Slots list as well as ANIM lines Feb 22, 2017
@LeonaMorro
Copy link
Member Author

Real World example: buying list
What can we do with a buying list?

  • we can grab an empty piece of paper to begin a new list (delete/initialize the list)
  • we can add a value to the list
  • we can remove a value from the list
  • we can change a value
  • we can drop the list into the wastebin (remove the list)

What we should be able to do with our Slots list:

  • remove/delete/initialize the list
  • add a value to the list
  • change a value

Currently we can:

  • remove/delete/initialize the list (with the first ANIM line in a NC)
  • add a value to the list (with ANIM lines in a NC)
  • change a value (With SCHMO(E) lines in a NC)

What we can't do:

  • remove/delete/initialize without adding a new value

In most cases (every day usage) we want to change a value inside the Slots list. That makes the SCHMO(E) command the most important commands in nPose. Even if the nPose user is accustomed to use ANIM to "change" the values of a Slots list.
Currently we use the ANIM command to setup the slots list and the SCHMO(E) commands to modify it. Even if we expand the capabilities of SCHMO(E) to also be able to add a value to a slots list, we still need the ANIM command to remove/delete/initialize the list.

With all this in mind, I don't see any need for simply expand the capabilitis of the SCHMO(E) commands. I would vote for one of the two following options:

  1. Don't change it. We would need code for doing so and the benifit is small.
  2. Thinking of a bigger solution (long term goal):
  • allow the slave to accept "" as an animation (this could come along with allowing the slave to accept a csv list as animations)
  • implement a new command to remove/delete/initialize the slots list in an easy way. For example: DEFSLOTS|numberOfSlots[|csv of seat names[|whatever]]
  • expand the SCHMO(E) commands as you outlined
  • mark the ANIM command as deprecated

@HowardBaxton
Copy link
Contributor

HowardBaxton commented Feb 23, 2017 via email

@LeonaMorro
Copy link
Member Author

"Rather we should ignore these empty slots in favor of doing what the builder expects, which is nothing."

When I add "sugar" to the 3. place of my empty buying list, I have an buying list with 3 elements "", "", "sugar".
If I then go to the Mall and buy things from my buying list the first element I have to buy is "". So doing nothing seems to be right. And that is exactly what I mean when I say: "allow the slave to accept "" as an animation". Perhaps I should have said: Allow the slave to not play an Animation if "" is found as an Animation name.
Nevertheless I have a buying list with 3 valid elements and If I see our slots list, that means that there are 3 slots and 3 people can sit on it. 2 people without an animation and one with an animation assigned.

"With the opportunity of an empty slot being inserted between 2 active slots ...."
I never talked about inserting between 2 active slots .. that can't work well as we discussed yesterday in IM.

@HowardBaxton
Copy link
Contributor

HowardBaxton commented Feb 23, 2017 via email

@LeonaMorro
Copy link
Member Author

"From the beginning of time nPose has not allowed another sitter unless there is a valid slot for them"
That is exactly what I want and what I have written. It seems that I'm again unable to explain it in an understandable way (maybe because of the language barrier), sorry.
Each slot in the slots list have to be valid, because if the slots list contains invalid slots we will get an huge amount of problems with our scripts and also with a lot of plugins. So we must not use invalid slots inside the slots list.


Let us check a few examples of one stride inside the slots list:
Example1:
["","","","","","","",""]
is this a valid slot? No it isn't.
Example2:
["meditation",<-0.75, 0.73, 0.80>,<0.0, 0.0, -0.38, 0.92>,"","","","",§seat1§WHATEVER§whatever]
this is an inworld example and it is a valid slot
Example3;
["animation", <0, 0, 0>, <0, 0, 0, 0>,"","","","",§seat1§WHATEVER§whatever]
This is also a valid slot.
Example4:
["", <0, 0, 0>, <0, 0, 0, 0>,"","","","",§seat1§WHATEVER§whatever]
this is currently invalid, because the slave isn't able to handle "" as an animation name
If we allow "" as an animation name, this would be a valid slot too. This is the first point in the "long term goal" proposal.


Let us asume an empty slots list and a NC with only one line:
SCHMOE|3|sugar|<0,0,0>|<0,0,0>
What does the user want? He wants a slots list with 3 entries and he wants to fill the third entry with an animation. So let us do it:

[
	"", <0, 0, 0>, <0, 0, 0, 0>,"","","","",§seat1§SCHMOE§whatever
	"", <0, 0, 0>, <0, 0, 0, 0>,"","","","",§seat2§SCHMOE§whatever
	"sugar", <0, 0, 0>, <0, 0, 0, 0>,"","","","",§seat3§SCHMOE§whatever
]

To check that this is working let us assume an empy slots list and an NC with 2 lines:
SCHMOE|3|sugar|<0,0,0>|<0,0,0>
SCHMOE|2|salt|<0,0,0>|<0,0,0>
after the first line we get the same result as above. After the second line we will get:

[
	"", <0, 0, 0>, <0, 0, 0, 0>,"","","","",§seat1§SCHMOE§whatever
	"salt", <0, 0, 0>, <0, 0, 0, 0>,"","","","",§seat2§SCHMOE§whatever
	"sugar", <0, 0, 0>, <0, 0, 0, 0>,"","","","",§seat3§SCHMOE§whatever
]

This is the third point in the "long term goal" proposal.


But we still need the anim command to get rid of the slots list. That is why I outlined a new command to do so:
DEFSLOTS|4|left,right,top,bottom
would make a slots list like:

[
	"", <0, 0, 0>, <0, 0, 0, 0>,"","","","",left§seat1§DEFSLOTS§whatever
	"", <0, 0, 0>, <0, 0, 0, 0>,"","","","",right§seat2§DEFSLOTS§whatever
	"", <0, 0, 0>, <0, 0, 0, 0>,"","","","",top§seat3§DEFSLOTS§whatever
	"", <0, 0, 0>, <0, 0, 0, 0>,"","","","",bottom§seat4§DEFSLOTS§whatever
]

This is the second point in the "long term goal" proposal.


At this point the ANIM command is not longer necessary and could be marked as deprecated. The last point in the "long term goal" proposal.


There isn't any invalid slot inside the slots list at any time if we allow "" as a valid animation name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants