Remember me
You are here: HomeForumCyberix3D ForumGeneral Discussionsave game (variable encryptor)
Welcome, Guest
Username: Password: Remember me

TOPIC: save game (variable encryptor)

save game (variable encryptor) 4 years 2 weeks ago #1874

  • GODEBEX
  • GODEBEX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Thank you received: 42
plugin link: www.gamemaker3d.com/player?pid=054616150971

This is a complement that allows you to save your game data by encrypting the value of many variables in one, in order to generate a code that can load their respective values.

These are the main values that you can modify:

- data menu: As its name says, it allows you to display the menu where you save and load the data, including the text where it shows the generated code. if its value is in "1" the menu will be active, if its value is in "0" the menu will not be active

- limit var: Determine the maximum number of matrices of each variable, you should always add one more unit. This will display a message to see if the data was loaded or saved correctly (this is experimental).

HOW TO SAVE GAME DATA:


Introduction to variables and arrays (default):

First of all you need to have knowledge about arrays and strings (you can know how to use them and their respective function at the end of this topic).

You can see in the workflow three matrices and three variables those of coins, score and life, each of these variables has another one with its same name only that added with "saved", for example (coins_saved), this type of variables shows the value of the original variable but encrypted and this is how each of the variables that exist works, among these are:

- coins
- coins_saved
- score
- score_Saved
- life
- life_saved

each of the variables with the text highlighted in red, which I mentioned above have as their value the first, "q", the second, "w" and the third "e" this serves as a label and to distinguish which is the matrix a which belongs to each of these three variables, since among these are:

- array_q that belongs to the variable coins_saved that is labeled or has the value "q"
- array_w that belongs to the score_saved variable that is labeled or has the value "w"
- array_e that belongs to the variable life_saved that is labeled or has the value "e"

Each of the matrices mentioned above, within these are the values or (set array) which each of these have their respective position and value, for example the "array_q", has a total of 10 values, that of the positionX "0" is or has the value "░". the code generated for each variable value, its encryption depends on the values that are within an array since these will be reflected in the code, of course the matrix to which each variable corresponds, for example:

- the array_q has the (set array) as positionX "5" and as the value of that matrix "╡", then if the
Coin variable that has a value of 5 and belongs to the array "q" then its variable will be encrypted in "╡"
(That is the value that will be reflected in the text), the same goes for the other variables.

So with the aforementioned, we could say that you cannot encrypt the value of a variable that is outside the parameters of the position of an array, so it would be necessary to create more values to the matrices so that you can encrypt the value of any variable, Of all three variables that come by default, their maximum value that can be encrypted is 9 and their minimum is 1, they should only take into account something YOU CANNOT ENCRYPT A VARIABLE WITH A VALUE OF "0" This is one of the mistakes that I hope to correct in a future version.

Modify or replace the name of the variables and arrays (default):

If you want to replace the name of the variables and arrays with others, first of all you need the "word" program, I do not recommend that they do it one by one because there are also other values besides the variables and arrays that you have to modify, because within the "operations" group, you need to take the name of the variables and arrays, then you can select the "source" option of the editor, copy the entire code with the keys (ctrl + a), then paste it to word and most important of all, in paste options you keep only the text so that the codes are the same as in the editor and follow the next steps

we click on word search

img2.png


Next we will see the navigation panel

img3.png


Then we look there for the name of the variable we want to change, for example the variable "coins" and to replace them we do the following:

select the button that is indicating red and then the option (replace)

img4.png


and now we simply write the name by which we want to replace it and give it in (replace all)

img5.png


the same can be done with the other variables And arrays this will save us a lot of time to not replace one by one, in the end you only copy the word text and paste it to the cyberix3d editor, in case you save the values or the Encrypt them appear question marks, you must change the value within each matrix.

Create variables:

To create a variable you must follow the same steps as the others were created, for example you create a variable called "steps", then create another one but add the name "steps_saved" and therefore create another array and put it the values, something very important, within the group of "operations" there are two "loops" the first encrypts the data and the second one loads them, then by default there are up to 3 comparisons of the same variable, which is responsible for encrypting each variable. same when loading, then as in that case there are three logically means that there are three variables, so if you are going to create another, add another comparison of "a" say it would be 4, then you must replace all the values with the new variable, same matrix, after this you must enter the group of (print_value), and look there for the (text input) "saved value" that is responsible for displaying the encrypted values on screen, then there you must add the new variable that you want to be show in all the commands that are within this, since the values shown in this text change position because it is random, this is so that the code is not always the same if the value of the variables does not change and ready, you will have created A new variable


CODE TABLE:
To encrypt a value, take out the symbols on the next page, the last table corresponds to the ones I chose to introduce them to the matrices, remember that you cannot repeat any of the values of an array in others because the values will be confused
link: fsymbols.com/es/teclado/windows/alt-codes/lista/

There will be a future update in which you can save infinite values ​​without creating more values ​​in an array, for the moment you can add more values ​​within the arrays, to be able to save the value of a variable up to what you prefer.

on the (arrays): wiki.gamemaker3d.com/editor:blocks:variables:array
Last Edit: 4 years 2 weeks ago by GODEBEX.
The administrator has disabled public write access.
The following user(s) said Thank You: cyberix3d, ViraX, Symbiotic Interactives

save game (variable encryptor) 4 years 2 weeks ago #1882

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
This is great.
Now, you can combine your saved data with the Save and Load commands to save many varibles in your game at once.
Regards,
Cyberix3D team
The administrator has disabled public write access.

save game (variable encryptor) 4 years 2 weeks ago #1885

  • GODEBEX
  • GODEBEX's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 158
  • Thank you received: 42
As I would do to save the elements that one generates within the game, is it possible?
The administrator has disabled public write access.

save game (variable encryptor) 4 years 2 weeks ago #1886

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 658
  • Thank you received: 624
You can save and load each varible seperatly, but if you maintain a single value that stores all the data, you can save and load with one save and one load commands at once.
The administrator has disabled public write access.
Time to create page: 0.270 seconds