你如何使一个批次篮板保存/载入CMD? [英] How do you make a save/load cmd for a batch rpg?

查看:134
本文介绍了你如何使一个批次篮板保存/载入CMD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做一个基于文本的一批角色扮演游戏(RPG)。 (就在最近开始学习......)
我的RPG没有卫生之类的东西,它更多的是故事类RPG的。

I'm making a text-based batch Role Playing Game (RPG). (Just recently starting learning...) My RPG doesn't have health and stuff like that, its more of a story type of RPG.

基本上,你选择你想要做的选项和您继续的故事和每个选项可以更改的结局。

Basically you choose which options you want to do and you proceed with the story and each option can change the ending.

所以,我想知道是否有办法救你的(因为缺乏一个更好的词)在RPG页。 (例如:我已经标记各个页面为:01:02,等等...)

So, I was wondering if there was a way to save your (for lack of a better word) 'page' in the RPG. (example: I've been labeling each 'page' as :01, :02, and so on...)

因此​​,如果有人退出游戏他们可能必须开始新的游戏,或者继续的选项。

So, if someone exited the game they could have the option to start a new game or continue.

推荐答案

您可以保存 02 来一个叫save.dat文本文件,然后读取该文件,并使用该跳转到该页面。

You can save 02 to a text file called save.dat and then read the file and use that to jump to the page.

set page=02
>save.dat echo %page%

和加载它的:

set /p "page="<save.dat
echo %page%
goto :%page%

您可能需要保存的姓名和详细信息,太 - 这取决于你如何结构化你的游戏

You may need to save the name and more information too - it depends on how you have structured your game.

这篇关于你如何使一个批次篮板保存/载入CMD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆