printf() has predictable, reliable results each and every time - either it produces a string, or the stack is full and no string can be produced. May as well do it the easy way - It works. I may get more control doing it some other way, but I don't need it. I'm not going to be loading anything but one savefile. Singleplayer, so the key problem is irrelevant. None of those datums reference other datums or objects (Except the player, of course.) The only datums a player ever references are as follows: I'm not actually using any tmp or const variables that shouldn't be saved, at least for mobs. Then the players need to figure out the checking algorithm to cheat without getting caught and branded as a cheater. Encrypt several variables for the mob, and add a 'check' value that is a combination of several other variables. If I do set up a scoreboard of some sort for it, though, then I'll have to encrypt the savefile. People don't tell you not to use the 'printf()' proc in C because you can do exactly what it does by messing with memory directly - printf() is there so that you don't have to mess with memory.Īnyway, it's singleplayer. I don't want to have to go through the objects list and decide what needs saving - Dantom have included a procedure that does it for me. It is, in several ways, much easier in this case. I'm using savefile << object to save mobs in a roguelike I'm writing. BYOND's good like that, but unless you're just hacking something in as a temporary test or fix, it's better to spend the extra effort to have more control. You might as well just write the variables you care about, then read the variables that you care about, instead of just relying upon BYOND to do all the work for you. It's a complicated explanation, but it's what's responsible for a "rollback" bug which plagued My Life as a Spy until Skysaw finally figured it out.Į) It's lazy. If you load a mob which contains a mob variable, then the savefile will also load the saved mob, and if the saved mob contains a key, then if the player is actually connected to the game at the time, he or she will be spontaneously connected to this older copy of his or her mob. If you save a mob, it also saves the key variable automatically. If you write an object to a savefile, then if any variables of that object point to another object, BYOND will save both objects to the file!ĭ) It's dangerous. Most people aren't careful to declare their variables as tmp or const as needed, so variables that don't need to be saved are saved even though they won't be used once loaded.Ĭ) It saves more than you might think. People with access to the savefile can change any of the variables they like, and add additional variables for the BYOND game to load, assuming they know the appropriate variable names.ī) It's wasteful. where object is something to write directly to the savefile. I should note that more advanced DM developers will never write: Decide what's critical and what isn't critical, perform periodic verifications of data, and range check things such that certain things are wholly impossible. At the same time, no security at all equals anarchy, and many people are incapable of living in anarchy productively (e.g., riots).Īs Hegel would say, it's best to achieve a compromise through the dialectic process. The best strategy is similar to the modern world: totalitarian bureaucracy doesn't work, because then you're spending so much time authenticating and authorising that you don't have any time to actually get any work done. If you know how, you can whip up a savefile editor in a couple minutes. Sometimes I'll make a private server for a game I like (assuming the game creator put the files up for everyone to host) and I have given myself a custom, multi-tiled icon, custom equipment (It is of the same type as something already defined, but its icon and stats are changed), and other things that certain games leave themselves open to. Even if what's in them isn't anywhere in the programming. sav files only load what it's coded to load, right? sav files are so easy to mess with then anyone can host and mess with them, but. Well I was right then, because I said that if. No, but you can make a program that makes a text version of the savefile, open that in notepad and make yourself level 1000, then convert it back into a savefile. You can't just open them up in Word Pad and change a couple numbers and go "Woohoo i'm a level 1000 god!" Yes, but how easy is it to mess with them?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |