How would I go about creating a savefile like this:
There is a list of verbs in the savefile. In this list is an ordered group of 1's and 0's. If there is a 1, you give the user their verb when they log in. If there is a 0, they dont. (or 1 and nothing, w/e floats the boat)
An example with &:
skills = "1&1&1&1&1&&&&&&&&&&&&&&&&&&&&&&&&&&&&1&1&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
An example of list iventory:
inv = list(50,1,555,34,1,56,17,0)
ID:157565
Feb 12 2010, 3:48 pm (Edited on Feb 12 2010, 6:32 pm)
|
|
In response to Keeth
|
|
Basically what I would like to go about doing (and I'm not too particular on it) is to make a list in which there would be 2 differentiating operators (could be nothing there at all) and if one of the operators is in the person's save file, they will have the according verb added when read (or logged in). I'm really not sure where to start, I'm not asking for somebody to code me something, but if somebody could give me a small example with the commands I should look up in reference, that would be cool! (Thank you for helping for at least reading this).
In other words, a numerical list that decides whether verbs should be added or not, like if somebody obtained a skill, in this skills = list(0,0,0) It could change to: skills = list(1,0,0) and because that 1 was there, the verb would be added when the savefile was read to their commands. Or maybe im misenterpiting this and it is deciding if it is set hidden or not? Maybe there is an easier way to do this? |
In response to Darkjohn66
|
|
Since verbs automatically save why can't you use a simple add or remove verb system?
for instance give the players all the skills you want them to have at the beginning and the ones you don't make it so that must acquire or learn them. It seems kind of obvious so I may not be grasping the full weight of what you are trying to ask, if that's the case my apologies. |
In response to Dariuc
|
|
Verbs don't automatically save. You have to save them manually.
I'm not quite sure why it's necessary to have a list and needing to encode/decode it, though. Just save and load the verbs list. |
In response to Kaiochao
|
|
I'd like to have small save files which would be easy to manipulate in a save editor.
|
In response to Darkjohn66
|
|
Why would you want the saves to be easy to edit in a savefile editor? I fail to see the point of doing that to your own game. Just edit them in DM through the game code.
|
In response to Gunbuddy13
|
|
if only this was commented a bit more. I know the basics but really dont get how it truly works. (OBJ save demo) I know this isnt exactly what I was talking about but this would help to understand, and thanks!
/* |
In response to Kaiochao
|
|
I've never had to save any of the verbs i use for my mob. Then again i've never had to add any verbs either. I use objects to handle skills and such.
|
In response to Dariuc
|
|
The difference in size is negligible and decoding a sequence of 1s and 0s is not any easier than having, you know, the actual type paths written out for you.
Of course, you should be using objs to represent dynamic access to actions, rather than directly modifying the verbs list anyway, which you're already apparently doing and will automatically be saved. So, I don't see any problem. |
// writing Please consult the reference for more information about savefiles, the datum procs Write() and Read(), and lists. |
In response to Keeth
|
|
Say I wanted to check a certain spot in the list. If that certain spot was equal to the value I wanted, when the savefile was read, it would do some kind of action such as outputing a message.
|
In response to Darkjohn66
|
|
You read the list using the method I just provided, and then you treat the list like a list. If you don't know how to use lists, there is a reference.
|
I'd comment on the other stuff you're talking about, but until you explain yourself more clearly, I'd rather not make any suggestions.