All language subtitles for 68. Saving and Loading Meta Progression Data

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Let's get our metal upgrade save data saving and loading

To and from the disc

Before we do still let's configure the directory

Where are Seaham fireworks

So let's go to project project settings

And under the application config section

If you don't see any of the settings go ahead and toggle on the advanced settings here

And we are going to use what called the custom user directory

And if you read this it says that it's going to save user data

To this day

Install Alex playing this more once we get into the actual saving but I didn't click that

To set a timer

And then give you a game and I'm just going to call it

2D survival

Course

Because that's what my project is called

Basically give

Input field whatever whatever folder you want your save data to existing in the user

And then walk around and close

Ok so I'm going to now go ahead and open up our meta progression see Nan

Subtitled by online-courses.club We compress knowledge for you!

That

File

And we want to save and load this as all the first thing we want to do is on ready we want

Load the data from the disk if it

Right

So let's create a new load data function

And actually in the car loads

File

That sounds better to me

Unless just right pass on here for now

Let's define a path for saved data so I'm going to up here create a constant variable called

Save file path

And that's going to be equal to in quote

User

Colon

4 / 4

And then whatever whatever you want to call the

What's a game that's

So what does the saying

This is a shorthand that could deal use

To point to the user directory on

The players device

Install for Windows this will be in the appdata directory

And I'm not sure what the other directories are on Mac and linux and mobile and all day

But there are designated areas in each of the systems for user data to be stored and Godot

Uses those under the hood

And when we configured in our project settings this custom user

This directory is going to be created

Inside of that

2-years ago

And then this file is going to be the file that were reading and writing to

So now we have the same file path defined let's do this

We're going to say yes

Not

File access dot file exist

Save file path

Just going to return

So saying is if the files are created yet that's fine I'll just use this default data here

Ok and that we're gonna read data is the following we need a grab a file

Am I going to save r file equals file access open

Open the save file path

And we're going to open it with file access

Reed

So that's telling us to open up that file for Reading

And then once we have that file we're going to say

Save underscore dealer is equal to

File

Underscore VR which stands forget variant

Insult that's going to

Get that variant which is going to be our dictionary

So we're going to store this dictionary in the file

And said that to see if the

So central was saying this is our default data for when we have no saved data

And

When the game is loaded or when the save files loaded will just replace that object with whatever is in the

Ok so now I'm ready

We want to do load saved

Just likes

So go ahead and Run the game

And make sure that everything works you shouldn't see any errors at all and if not everything is good to go

Alright son now the fun part let's go ahead and save the data so

Save

Save

And in here what we want to do

To save our file is equal to file access open

I'm going to do the same file path and in this time

We're going to do

File access

Because we're riding day

Sourcing open at file for writing

Never going to save file dad's store

Bar

I'm going to pass on this evening

Ok so it's really dad's

So you can see

Will taking the save data dictionary writing it to that file

And and

Loading it up here and

Assigning that save data back to that

Alright and that's it what just does few lines we've got

Loading and saving

Now one thing that we can do

To check if this is working

We can do this

So on experience Collective

Let's go ahead and just call Steve

After experience is collected every time

And then let's go home

Let's go and play

And then collect one experience while

Ok and then go ahead and close the game after you collect

Experience mi

And now that's remove that save

And then in the load save file function go ahead and print your saved

So print save data

And then Run the game

And look at your helper console and if it worked what you can see is that your metre upgrade currency is now set to

So that means that is were

I'm going to remove that print

And where is the save file actual

Add if you got a project

You can then click on the option open userdata file

And it will take you write 2

Where that file is when you can see in here

Look at the two dates of

Course

Direct

And then also our

James Avery

Which is right here

So that's where our game save actually is on the disk

And the final thing to do before we end this lesson

Call Steve at the

Red x

So what I'm going to do is I'm going to go to my

Arena time manager I'm going to open at

And in here in this group

When we

Put the end screen in place that introduces the fact that the user has

1

What we want to do is we want to call Safe so I'm going to go to my

M

Progression I'm going to call that save

Just like so

Let's go to main

E.ON player died Sydney

The other point

Which where showing the end screen

Let's call meta progression

Save there as well

This is doing essential

Whenever the player loses or winds were going to Save the Day

Alright so that's it for saving and loading

The next step is to make upgrades actually choosable by the player

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.