Kenthria's Forum Posts

  • Post deleted by poster.

  • Issue still exists. This is ridiculous. Can you please remove this pointless, patronising feature from construct 3 if youre retiring 2.

  • Or would anyone be willing to make a plugin for this?

  • Does Construct 2 have a way to use the Steam API for the Steam workshop?

    Docs:

    Creating a Workshop Item

    1. All workshop items begin their existence with a call to SteamAPICall_t CreateItem( AppId_t nConsumerAppId, EWorkshopFileType eFileType )

    The nConsumerAppId variable should contain the App ID for the game or application. Do not pass the App ID of the workshop item creation tool if that is a separate App ID.

    EWorkshopFileType is an enumeration type that defines how the shared file will be shared with the community. The valid values are:

    k_EWorkshopFileTypeCommunity - This file type is used to describe files that will be uploaded by users and made available to download by anyone in the community. Common usage of this would be to share user created mods.

    k_EWorkshopFileTypeMicrotransaction - This file type is used to describe files that are uploaded by users, but intended only for the game to consider adding as official content. These files will not be downloaded by users through the Workshop, but will be viewable by the community to rate. This is the implementation that Team Fortress 2 uses.

    2. Register a CallResult handler for CreateItemResult_t

    3. When the CallResult handler is executed, read the PublishedFileId_t value and store for future updates to the workshop item (e.g. in a project file associated with the creation tool).

    4. The m_bUserNeedsToAcceptWorkshopLegalAgreement variable should also be checked and if true, the user should be redirected to accept the legal agreement. See the Workshop Legal Agreement section for more details.

    5. CreateItemResult_t.m_eResult may return any of the defined EResult's, however the following should be handled:

    k_EResultInsufficientPrivilege - The user creating the item is currently banned in the community.

    k_EResultTimeout - The operation took longer than expected, have the user retry the create process.

    k_EResultNotLoggedOn - The user is not currently logged into Steam.

    Uploading a Workshop Item

    1.Once a workshop item has been created and a PublishedFileId_t value has been returned, the content of the workshop item can be populated and uploaded to the Steam Workshop.

    2. An item update begins with a call to UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID )

    3. Using the UGCUpdateHandle_t that is returned from StartItemUpdate, calls can be made to update the Title, Description, Visibility, Tags, Item Content and Item Preview Image through the various SetItem methods.

    bool SetItemTitle( UGCUpdateHandle_t handle, const char *pchTitle )

    Limit the title length to 128 ASCII characters

    bool SetItemDescription( UGCUpdateHandle_t handle, const char *pchDescription )

    Limit the description length to 8000 ASCII characters

    bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage )

    Specify the language of the title or description that will be set in this update.

    bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData )

    Set arbitrary metadata for the item (limited to 5000 ASCII characters). This metadata can be returned from queries without having to download and install the actual item content.

    bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility )

    Valid visibility values include:

    k_ERemoteStoragePublishedFileVisibilityPublic = 0

    k_ERemoteStoragePublishedFileVisibilityFriendsOnly = 1

    k_ERemoteStoragePublishedFileVisibilityPrivate = 2

    bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags )

    Utilizes a SteamParamStringArray_t which contains a pointer to an array of char * strings and a count of the number of strings in the array.

    bool AddItemKeyValueTag( UGCUpdateHandle_t updateHandle, const char *pchKey, const char *pchValue )

    Adds a key-value tag pair to the item. Keys can map to multiple different values (1-to-many relationship).

    Key names are restricted to alpha-numeric characters and the '_' character.

    Both keys and values cannot exceed 255 characters in length.

    Key-value tags are searchable by exact match only.

    bool RemoveItemKeyValueTags( UGCUpdateHandle_t updateHandle, const char *pchKey )

    Remove any existing key-value tags with the specified key

    bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder )

    pszContentFolder is the absolute path to a local folder containing one or more files that represents the workshop item. For efficient upload and download, files should not be merged or compressed into single files (e.g. zip files).

    bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile )

    pszPreviewFile is the absolute path to a local preview image file for the workshop item. It must be under 1MB in size. The format should be one that both the web and the application (if necessary) can render. Suggested formats include JPG, PNG or GIF.

    4. Once the update calls have been completed, calling SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote ) will initiate the upload process to the Steam Workshop.

    Register a CallResult handler for SubmitItemUpdateResult_t

    When the CallResult handler is executed, check the m_eResult to confirm the upload completed successfully.

    Note: There is no method to cancel the item update and upload once it’s been called.

    5. If desired, the progress of the upload can be tracked using EItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, uint64 *punBytesProcessed, uint64* punBytesTotal )

    EItemUpdateStatus defines the upload and update progress.

    punBytesProcessed and punBytesTotal can be used to provide input for a user interface control such as a progress bar to indicate progress of the upload.

    punBytesTotal may update during the upload process based upon the stage of the item update.

    6. In the same way as Creating a Workshop Item, confirm the user has accepted the legal agreement. This is necessary in case where the user didn't initially create the item but is editing an existing item.

    Additional Notes

    Workshop items were previously designated as single files. With ISteamUGC, a workshop item is a representation of a folder of files.

    If a workshop item requires additional metadata for use by the consuming application, you can attach metadata to your item using the SetItemMetadata call--this metadata can be returned in queries without having to download and install the item content. Previously we suggested that you save this metadata to a file inside the workshop item folder, which of course you can still do.

  • Thanks, purchased Its an interesting thing for a great price too.

    I'll have to consider if Construct's save and load system is good enough for Steam. Might not look great to have a save to file popup when playing the game.

  • I want to use this for a PC game. Do you have a way to store the saved images in Local Storage- or the upload from a download file- so they can be brought back up?

  • I understand why Construct reaches the calculation. I just wish to remove the spam box so I dont have my computer freak out because chrome is forced open whenever I open my project.

  • Here is a quote from Ashley regarding image sizes:

    [quote:3f6876bj]Some people struggle with memory usage on mobile devices with Construct 2, but usually from lack of awareness to how images are stored in memory. Your game might be a 5mb download since all the images are compressed as PNG or JPEG, but they are extracted to uncompressed (basically BMP) in memory for rendering, which can easily make it 5-10x bigger in memory than the download size. Because lots of people ran in to this we recently added a memory usage tracker in the Construct 2 status bar. It's just an estimate, but will give you a useful approximate figure (e.g. 5mb download size, 40mb memory use).

    Source is Here.

    More useful info can be found in Ashley's latest blog:

    Understanding CPU and memory measurements.

    But my game runs at 60fps. It's also just in the Main Menu. It's used as a 'scrolling' background.

  • My game download is 77mb, it is 60fps in all places.

    Construct thinks it's memory use is over 1 gig though. This is because I added some Main Menu backgrounds about 6000x4500 in size. (otherwise the game is pixel art).

    I have a popup every time I load the project with a memory warning that shouldnt be there. It also force opens my browser.

    How do I stop this happening please? It is very annoying especially considering the message is wrong.

  • Answers :

  • Brilliant it works thanks for the help! Nailed it completely

    Very happy with it.

  • Okay it isnt working as is.

    Here is an image of the code and the debug information for the array after save. Loading game currently just loads the array state of that previous state and is not replacing it with the localstorage info (localstorage is untouched too). Same issue without checking the key exists too.

    I have checked and the event- on item get- IS being called, however setting array to key is not.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I did but nothing under Arrays was on there.

    My bad, that was the bit I needed thanks. Will say how it goes asap! Thanks.

  • The array has a "Load" action, which you put the JSON string into.

    What would the string be please?

    I have entered LocalStorage.Key however it does not work and does allow me to point to a specific key.

  • linkman2004

    I create the key and set it to array.asJson. Now, I'm trying to use Localstorage.itemValue("array_key") do load Json and I can't. Do you know where is the problem? Thanks in advance.

    It's a shame this never got answered.

    I too am wondering what JSON string I need to tell the array to load. The only thing I can enter is 'LocalStorage.Key' but it will not let me specify which key.