Build 293.1 - Release version

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I don't get it. Are you saying it's working as intended? That seems unintuitive/illogical for a parent event to always make a child event (which requires no object picking because it's a singleton) false.

    ? No, not at all. I say that Start Loop messes up the object selection, so it should not be used in the actions of a parent event (because the object selection is propagated to child events, and this is done after the last action of the parent event). Fixing this is a bit tricky and might cause performance issues, so I'm not sure this will be fixed. You should move the Start Loop action from the parent event to an Always line as first child event, so that the object selection is modified only in this new line and doesn't interfere with object scoping in other child events.

    It's a similar issue to the known one when you use Start Loop with other actions, sometimes you have to move Start Loop to a new event line if it modifies the selection of the objects used in other actions.

    Quote

    Instead of the object picking being reset, it keeps the object selection but none of them qualify so it's like a list of 0 "Player Flag"s now being tested. In the first example, I make a condition designed to pick (Fixed Value = *) and instead of looking at all bullets, it checks a list of 0 bullets and finds none. Is that really how it's supposed to be?

    Maybe, not sure if I understand what you mean either. And no it's not supposed to work like that, it's due to the Start Loop action which doesn't preserve object scoping.

    Let me take your example:

    Code
    * onJump of Player Controls = 1
    
    
    	+ Hanging of Player Flags = 1
    		Special : Start loop "TryUnduck" 1 times
    		 Special : Send Str$(Hanging( "Player Flags" )) to output window
    
    
    		+ Hanging of Player Flags = 1
    			Sound : Play sample click

    1. First line selects the Player Controls object that have the onJump value equal to 1.

    2. Second line selects the Player Flags object that have the Hanging value equal to 1, and runs the actions:
    => when Start Loop returns for some reason the Player Flags selection list is cleared, so zero Player Flags is marked as selected.
    => Send Str$(Hanging( "Player Flags" )) to output window will seem to work because IIRC in expressions if no object is selected the engine takes the first instance.
    => after callind these actions, the engine saves the current object scoping that will be used in each child event.

    3. Third line, as it's a child event it takes the object selection saved after the parent actions => no Player Flags is marked as selected. So the "Hanging of Player Flags = 1" will be false.

    If you move Start Loop to a new line, this works the normal way, as the Start Loop issue doesn't interfere with the other child ev:

    1. First line selects the Player Controls object that have the onJump value equal to 1, no change.

    2. Second line selects the Player Flags object that have the Hanging value equal to 1. No action, so it just saves the current object selection, i.e. one Player Flags object is selected (and if the Player Controls object is used in child events this one is also saved).

    3. Third line, the Always event line. The object selection saved above is restored, and the actions are executed.

    4. Fourth line, the object selection saved above is also restored before the conditions are evaluated, in this case there is one Player Flags object selected, so the condition can be evaluated and is true.

    Hopefully it's more clear.

  • Normally when loading in a ContentID value, they'll roll over into the negatives, and if I'm lucky I'll get something like 2496e+10^9 or whatever.

    ...

    Is there any any ANY chance the number of significant digits Fusion can read can be upped from 8 to 16? Mondrian is heavily reliant on user generated content and this bug could basically kill the game and nearly force me to remove it from market.

    It depends. If it's a simple sign issue, then we can probably fix it. If they use values above 4,294,967,295 then it's a different story and we would need to add new actions/conditions/expressions (which is possible too but more complicated).

    EDIT: I don't see why a negative value would be a problem, it's probably just a display problem as the source code seems to use unsigned values (but maybe I didn't see everything).

    Edited once, last by Yves (December 29, 2020 at 6:51 PM).

  • It depends. If it's a simple sign issue, then we can probably fix it. If they use values above 4,294,967,295 then it's a different story and we would need to add new actions/conditions/expressions (which is possible too but more complicated).

    EDIT: I don't see why a negative value would be a problem, it's probably just a display problem as the source code seems to use unsigned values (but maybe I didn't see everything).

    Been working with Phi and Naitor over on Discord, and here's what we discovered. Using the old .NET extension, Phi was able to whip up a function that converts a big number into a string. So loading the ContentID values works there, even if it is a bit ugly. The problem though is loading those ContentID strings back into the Steamworks extension to then download the files on Workshop, because once they're converted back into Val's, they take on the 2.23646e+09 format, and the extension can't understand that. Even if it did, the rounded number would be incorrect.

    Right now the files on our workshop are both sitting in the 2-billion range: 2236459396 and 2339258573 respectively. I don't know how Steam generates the numbers, whether they're completely random or adding up one at a time from Workshop items across the entire network. If they're random then there's a chance the billions spot could be any value between 1 and 9.

    The negative value is a problem because the numbers have to be loaded into a list or array first, and then fed back into the Steamworks object to download the files at the associated ContentIDs. Since the ContentID's on Steam side aren't negative, you just get a statusErrorFailedToDownloadFile.

    I feel like the best possible solution would be to load ContentID's in as strings, rather than values, since it's just pulling them from a URL essentially anyway.

  • Been working with Phi and Naitor over on Discord, and here's what we discovered. Using the old .NET extension, Phi was able to whip up a function that converts a big number into a string. So loading the ContentID values works there, even if it is a bit ugly. The problem though is loading those ContentID strings back into the Steamworks extension to then download the files on Workshop, because once they're converted back into Val's, they take on the 2.23646e+09 format, and the extension can't understand that. Even if it did, the rounded number would be incorrect.

    Right now the files on our workshop are both sitting in the 2-billion range: 2236459396 and 2339258573 respectively. I don't know how Steam generates the numbers, whether they're completely random or adding up one at a time from Workshop items across the entire network. If they're random then there's a chance the billions spot could be any value between 1 and 9.

    The negative value is a problem because the numbers have to be loaded into a list or array first, and then fed back into the Steamworks object to download the files at the associated ContentIDs. Since the ContentID's on Steam side aren't negative, you just get a statusErrorFailedToDownloadFile.

    Could you send me a little MFA that shows the problem so that I debug it and see what happens in the code?

  • Thanks, Yves. This one's really got me in a panic. I dunno what the plan is if content isn't downloadable.

    In your example the problem comes from the Val function that you use to convert the string content from the List object. Val works with signed integers, and if the value is out of range (i.e. less than -2147483647 or greater than 2147483648), it converts it to a floating point value, and then when it's converted back to an integer value when it's passed to the Steamworks object, it gets out of range and an incorrect limit value is passed.

    A possible solution is that you store the content ID to the line data in the List box object, and directly retrieve it from there, instead of using Str$ and then Val:

    List : Set line fileNumber( "steamChecker" ) data to SteamLastUGCContentId( "SteamWorks" )

    ...

    SteamWorks : Download file to Apppath$ + "\Downloads\" for content with id List Data( "List", fileNumber( "steamChecker" ) ) at priority 0

    Is this possible and does this work?

  • Gave this a test, tried it a couple different ways, and just couldn't get the list data to store the SteamUGCContentID. Always came out as -1. So, on a whim, I also added a number array to store the values, and they came out with the negative values I got when trying to store the value as a string.

    MFA attached.

  • Gave this a test, tried it a couple different ways, and just couldn't get the list data to store the SteamUGCContentID. Always came out as -1.

    This is not normal, are you sure you used the correct index?

    So, on a whim, I also added a number array to store the values, and they came out with the negative values I got when trying to store the value as a string.

    Well, negative values are OK as they are correctly converted when they are passed as parameter to the Steamworks object (what was not OK was the floating point value returned by Val).

    Sorry I can't test your app, it doesn't display anything on my machine (I guess because I don't own the Steam app?), but I'm pretty sure this works (I tried with a simple Download File action from the value that's in your example, via a List line data, and I didn't get the error message).

  • This is not normal, are you sure you used the correct index?

    My setup looks like this:
    * SteamWorks : On loop through search content results in session "subs"
    List : Set line SteamLastUGCLoopIndex( "SteamWorks" ) data to SteamLastUGCContentId( "SteamWorks" ) [The line # = the SteamLastUGCLoop Index]
    steamData : Write Value SteamLastUGCContentId( "SteamWorks" ) to (SteamLastUGCLoopIndex( "SteamWorks" )) [This writes the last ContentID value to to the loop index X spot on the array]
    steamChecker : Set lineDataValue to List Data( "List", SteamLastUGCLoopIndex( "SteamWorks" ) ) [This is the alterable value that checks the line data value]


    Quote

    Well, negative values are OK as they are correctly converted when they are passed as parameter to the Steamworks object (what was not OK was the floating point value returned by Val).


    I'll reactivate the download function again pull the values from the array instead and see what happens there.

    Edit: No dice. I made some small changes to add a "numberOfFiles" value to the active. Then it's supposed to download the workshop file at the ContentID in the corresponding array X position, and stop when fileNumber("steamChecker") == numberOfFiles("steamChecker") but I get the statusErrorFailedToDownloadFile message again. I think what was preventing the error from appearing this time was comparing the fileNumber value to the number of lines, and since there were no lines, it basically started out finished.

    Quote

    Sorry I can't test your app, it doesn't display anything on my machine (I guess because I don't own the Steam app?), but I'm pretty sure this works (I tried with a simple Download File action from the value that's in your example, via a List line data, and I didn't get the error message).


    Lemme know if you want a key. ;)

    Edited once, last by dsilvers (December 30, 2020 at 3:29 PM).

  • I was having that same problem too. It does if you convert the values to strings and add them as a line, but not if you add line data.

    Make sure though that you've gone over to workshop and subscribed to one or two items, because the Steam object's loop looks specifically for subscribed items, not all items.

  • I was having that same problem too. It does if you convert the values to strings and add them as a line, but not if you add line data.

    Yes you have to add a line before being able to set its data. But anyway I'm trying to test the Array solution, I add the item ID to the list at the same time just to see it on screen, but after suscribing to 3 items it doesn't list anything (I've added a counter that is incremented on each loop, just to be sure). I'm using the first example you posted.

  • Yes you have to add a line before being able to set its data. But anyway I'm trying to test the Array solution, I add the item ID to the list at the same time just to see it on screen, but after suscribing to 3 items it doesn't list anything (I've added a counter that is incremented on each loop, just to be sure). I'm using the first example you posted.

    Alright I spiced things up a little bit, the results are the same but the data is a little clearer. It now starts with an Add Line function, which lists the Workshop item title. Each line stores the ContentID number, but they're still coming out negative. I also added a counter at top to display the ContentID.

    Here's the updated MFA, it should work as is but just in case make sure the Steam AppID is set to 1087050.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!