playMaker

Author Topic: Run FSM string values get confused  (Read 2619 times)

Sarahsauce

  • Playmaker Newbie
  • *
  • Posts: 2
Run FSM string values get confused
« on: March 14, 2022, 06:58:15 AM »
A short while ago I had trouble getting the string values from an FSM template to use the correct string. They would constantly shift to using entirely different string variables.



I have a video link. It's also in the verified-support channel of the discord.
https://imgur.com/a/aMj43bS

What I did:
Made an object that does conversation (in which the name and message are string values). It worked great. I copied the object with CTRL+D so I could make one for treasure boxes. Copying may have cause the issue. I then create a new FSM template for loot type and loot name, which are also strings. These strings got confused with the name and message strings. I tried deleting the loot type & loot name, then I created new strings. No luck though.

My fix was:
..To create a new object with new FSMs from scratch. It was the only way.

Sarahsauce

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Run FSM string values get confused
« Reply #1 on: March 19, 2022, 08:59:20 AM »
Another error I encountered. This time it's with a non-converted Int value. Again an input related problem. The game luckily takes the correct value, but the value reported in Variables is wrong.

https://imgur.com/a/4biZiPA

You can see the Int Switch uses the correct value - it's supposed to be 2. But the input value reports at 45, which is not actually a value that is anywhere else in this FSM.

« Last Edit: March 19, 2022, 09:00:53 AM by Sarahsauce »

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Run FSM string values get confused
« Reply #2 on: April 05, 2022, 01:06:59 AM »
Copying definitely caused the same issues for me too.
Available for Playmaker work

jasperPT

  • Full Member
  • ***
  • Posts: 115
  • I am a VFX Animator teaching myself to make games
Re: Run FSM string values get confused
« Reply #3 on: April 17, 2022, 06:32:52 PM »
I am having a similar issue I think.
I have an FSM that does a bunch of maths on the current date, converting it to strings and back into Ints / floats etc.

The FSM works perfectly when I just have it out on a game object, but it trips up when I use it via RunFSM, seemingly because it is not able to use the strings properly.

Luceid

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Run FSM string values get confused
« Reply #4 on: August 21, 2023, 02:20:34 PM »
I found this old topic trying to see if I was doing something wrong. Run FSM seems to be majorly bugged still in the latest playmker 1.9.7. It's basically unusable it's so bad. Strings will get mixed up as mentioned above. I was using CSVs and wanted to stuff the data crunching into a template. So I used run FSM only to find the arrays with my CSV references had been replaced by the CSV content as well as several other strings being mixed up.

But float variables can get locked to a single value and won't change no matter how many times an action tries to do so. The value seems to be determined by an input variable of the same type, though it seems to choose a random variable inside the template to lock. Deleting the variable and recreating it seems to fix the issue, but that was only after I deleted the input as well.

Honestly the number of bugs I've run into with playmaker has me looking at dropping it completely. This isn't production ready. Which is really too bad because I love the workflow and design process. How are major bugs like this still not fixed? Templates are touted as a major feature to help make code reusable and powerful similar to how traditional code is.

Luceid

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Run FSM string values get confused
« Reply #5 on: August 22, 2023, 09:51:21 AM »
After some more investigation, it appears at least some, and potentially all of this problem is a merely visual bug. So when you toggle a breakpoint inside a run fsm template, it will show all these wrong scrambled values inside the template as outlined in previous posts. But in all the cases I've tested thus far, the output is still correct as long as the code inside the template is good.

Even if it a purely visual error, this is still a huge problem though IMO. It makes debugging templates inside a runfsm basically impossible as many of the variables you see at your breakpoint are wrong. You can paste the template into a test fsm and set it up there, but that's a pretty large hassle for what should be a simple debugging process. I'll do some more testing to see if my runFSMs functionality actually breaks when set up correctly.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Run FSM string values get confused
« Reply #6 on: August 25, 2023, 05:53:06 PM »
Hi.
Yeah Run fsm can be very useful but also fragile.

I can also confirm that during runtime values displayed get mixed up.

Also If you are already using a template somewhere, its not recommended to expose new variables.

RicardoThomas

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Run FSM string values get confused
« Reply #7 on: October 12, 2023, 04:35:40 AM »
It's common to encounter issues with FSM templates and object duplication. Creating a fresh object with new FSMs, as you did, is often the best solution for resolving such problems. For several years, I have been utilizing this https://letsgradeit.com/ website for my writing and tutoring needs, and I have been consistently impressed with their services. They offer a broad selection of services at competitive prices and one of the most appealing features is their easy-to-use interface. If you are looking for a writing or tutoring service, I highly recommend it. It offers a wide range of services, and its prices are competitive
« Last Edit: October 20, 2023, 08:25:12 AM by RicardoThomas »