Jump to content
  • Advertisement
Sign in to follow this  
runnerbuddy

Making an Item Editor for an RPG in VB6

This topic is 5028 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

First of all, i have a series of textboxes and comboboxes on the form to change the properties of an item. The properties for an item are stored in a custom type I built to hold data for items. The problem is how to save the array and then load it back again. I have a text box at the bottom of the form that has all the data for all items exactly as it was put into the array. I was thinking about saving the data in the textbox as a text file until the game is complete, and then encrypt it. Then the problem is when it gets loaded, how to put it back into the array. If any code from the program is needed to do what i asked here, just tell me.

Share this post


Link to post
Share on other sites
Advertisement
Write the list with individual items seperated by a slash, period, semicolon, whatever.

Then all you have to do is when you read the list of items is to parse the list looking for the special character you made to seperate each item.

Example:

pie;large swimming pool;rubber hose;floppy;carpet cleaning agent

Read in until you find the token you use to seperate, and then write that to your array. Go on to the next item and the next item after that until you are left with no more items.

Share this post


Link to post
Share on other sites
You can save or load any variable in visual basic with Get and Put (I find it's best to always use files in Binary format). If you want to output in a specific format, (you might need to limit variables to byte size for example) it's best to copy them to a temporary variable first, but generally VB6 is pretty easy to save and load with.

The thing that really annoys me about VB6 is the stupid out of bounds errors (which seem to vanish when you use hex) and the lack of shift and rotate commands!

Mark
Sound Effects For Game Developers
http://www.indiesfx.co.uk

Share this post


Link to post
Share on other sites
i forgot to put i had each item in the textbox seperated by a comma, so that would work for the parsing, but i dont know how to code something to parse it. Could someone shed some light on this topic?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!