diff --git a/extensions/community/SAVENLOAD.json b/extensions/community/SAVENLOAD.json new file mode 100644 index 000000000..3e65c7796 --- /dev/null +++ b/extensions/community/SAVENLOAD.json @@ -0,0 +1,307 @@ +{ + "author": "", + "category": "Game mechanic", + "extensionNamespace": "", + "fullName": "SAVENLOAD", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWNvbnRlbnQtc2F2ZS1hbGwiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTcsN1YzSDdWN0gxN00xNCwxN0EzLDMgMCAwLDAgMTcsMTRBMywzIDAgMCwwIDE0LDExQTMsMyAwIDAsMCAxMSwxNEEzLDMgMCAwLDAgMTQsMTdNMTksMUwyMyw1VjE3QTIsMiAwIDAsMSAyMSwxOUg3QzUuODksMTkgNSwxOC4xIDUsMTdWM0EyLDIgMCAwLDEgNywxSDE5TTEsN0gzVjIxSDE3VjIzSDNBMiwyIDAgMCwxIDEsMjFWN1oiIC8+PC9zdmc+", + "name": "SAVENLOAD", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/43eeb621e73fe65c4653e2504b7cf201120c78c63b450c8be24347aad409fc60_content-save-all.svg", + "shortDescription": "Saving and loading is now 5x easier with this extension (only works for saving an objects behavior).\n\n\nI WILL BE MAKING SAVE AND LOAD FOR VARIABLES (AND MAYBE SLIDERS) SOON. ", + "version": "1.0.0", + "description": "SAVING AND LOADING AN OBJECT'S POSITION GREAT FOR ADDING A SAVE N' LOAD SYSTEM TO YOUR GAME.", + "tags": [ + "save", + "load", + "game mechanic" + ], + "authorIds": [ + "5ppw2lKgwrM6YND0J3wy72OkMg02" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [ + { + "name": "PLAYERSPOSITIONX", + "type": "number", + "value": 0 + }, + { + "name": "PLAYERSPOSITIONY", + "type": "number", + "value": 0 + } + ], + "eventsFunctions": [ + { + "description": "Saves the object's position.", + "fullName": "Save object's position", + "functionType": "Action", + "name": "SAVE", + "sentence": "Save_PARAM1_position", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "EcrireFichierExp" + }, + "parameters": [ + "\"PLAYERSPOSITION\"", + "\"X\"", + "PLAYERSPOSITIONX" + ] + }, + { + "type": { + "value": "EcrireFichierExp" + }, + "parameters": [ + "\"PLAYERSPOSITION\"", + "\"Y\"", + "PLAYERSPOSITIONY" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object that is going to be saved", + "name": "Object_that_is_going_to_be_saved", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Checks the object's position.", + "fullName": "Check object's position", + "functionType": "Action", + "name": "PLAYERSPOSITION", + "sentence": "_PARAM1_position", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PLAYERSPOSITIONX", + "=", + "Object.X()" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "PLAYERSPOSITIONY", + "=", + "Object.Y()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "(If there is a save) loads the objects position.", + "fullName": "Load object's position", + "functionType": "Action", + "name": "LOAD", + "sentence": "Load_PARAM1_position", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "ReadNumberFromStorage" + }, + "parameters": [ + "\"PLAYERSPOSITION\"", + "\"X\"", + "", + "PLAYERSPOSITIONX" + ] + }, + { + "type": { + "value": "ReadNumberFromStorage" + }, + "parameters": [ + "\"PLAYERSPOSITION\"", + "\"Y\"", + "", + "PLAYERSPOSITIONY" + ] + }, + { + "type": { + "value": "Delete" + }, + "parameters": [ + "Object_that_is_going_to_be_loaded", + "" + ] + }, + { + "type": { + "value": "Create" + }, + "parameters": [ + "", + "Object_that_is_going_to_be_loaded", + "PLAYERSPOSITIONX", + "PLAYERSPOSITIONY", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object that is going to be loaded", + "name": "Object_that_is_going_to_be_loaded", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Checks if the save doesn't exist.", + "fullName": "Save Doesn't Exist", + "functionType": "Condition", + "name": "SAVEDOESNOTEXIST", + "sentence": "Save_Doesn't_Exist", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "GroupExists" + }, + "parameters": [ + "\"PLAYERSPOSITION\"", + "\"X\"" + ] + }, + { + "type": { + "inverted": true, + "value": "GroupExists" + }, + "parameters": [ + "\"PLAYERSPOSITION\"", + "\"Y\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Checks if Save Exists.", + "fullName": "Save Exists", + "functionType": "Condition", + "name": "SAVEDOESEXIST", + "sentence": "Save_Exists", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"PLAYERSPOSITION\"", + "\"X\"" + ] + }, + { + "type": { + "value": "GroupExists" + }, + "parameters": [ + "\"PLAYERSPOSITION\"", + "\"Y\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + }, + { + "description": "Resets the save.", + "fullName": "Reset Save", + "functionType": "Action", + "name": "RESET", + "sentence": "Reset_Save", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "DeleteFichier" + }, + "parameters": [ + "\"PLAYERSPOSITION\"" + ] + } + ] + } + ], + "parameters": [], + "objectGroups": [] + } + ], + "eventsBasedBehaviors": [], + "eventsBasedObjects": [] +} \ No newline at end of file