![]() |
||||||||||||
|
||||||||||||
blade2k
» articles & tutorials
Randomization of your world
Well this can be done using a variable randomization! After some weeks of thinking, I've come out with this way of doing. Adjustable for every game length, it does its role perfectly. The only thing it doesn't do: Putting me as credits. Yes, if you use this tutorial, I would appreciate having my name in an ending credit. Thank you. So here it is. What you need is: 8 variables, having the following names -Quest random -Quest Number 1 -Quest Number 2 -Quest Number 3 -Quest Number 4 -Quest Number 5 -Quest Number 6 -Quest Restore This tutorial shows the method for a long-epic length game. For a medium game, try with 4 numbers, and for short games, about 2-3 numbers. For really really small games, consider having just one number, and in this case, forget the tutorial. I'll go through all the codings and explain them by parts. In-game command "Comments" Is used. And yes, I suggest you use them too. This allows you to divide your work, add some notes and suggestions for later improvement and keep track of every single part of your game. Here it goes: --------------PART I---------------- THE RANDOM NUMBER GENERATING <>Variable [0001 Random Quest]Set, Random [100000-999999] This is used to create the sequence of numbers. I tell at the end of this tutorial how it can then be used for in-game situations. In this case, I needed a 6 digit number. So, it goes from 100000 to 999999, leaving all possibilities. NEVER PUT from 1 to 999999, because this will leave a couple of slots blank, which you don't want later on. -----------PART II------------- COPYING THE GREAT NUMBER <> Variable [0002 Quest Number 1] Set to [Random Quest] <> Variable [0003 Quest Number 2] Set to [Random Quest] <> Variable [0004 Quest Number 3] Set to [Random Quest] <> Variable [0005 Quest Number 4] Set to [Random Quest] <> Variable [0006 Quest Number 5] Set to [Random Quest] <> Variable [0007 Quest Number 6] Set to [Random Quest] <>Note ---------------------------------------------------------------- Yes, I copy this number to every Quest Number. I do this because we want that o so great and big number to be the same everywhere in every possibility. --------------PART III----------------- DISMEMBERING THE GREAT NUMBER (Hard part, but will be explained after) <>Variable [0002 Quest Number 1] divided by 100000 <>Variable [0008 Quest Restore] Set to [0002 Quest Number 1] <>Variable [0008 Quest Restore] Multiply by 100000 <>Variable [0003 Quest Number 2] Substract by [0008 Quest Restore] <>Variable [0004 Quest Number 3] Substract by [0008 Quest Restore] <>Variable [0005 Quest Number 4] Substract by [0008 Quest Restore] <>Variable [0006 Quest Number 5] Substract by [0008 Quest Restore] <>Variable [0007 Quest Number 6] Substract by [0008 Quest Restore] Note: ------------------------------------------------------------------- Alright, now the explaining part... I first divided the Quest Number 1 by its numerical position. Let's assume an example that I'll use all the way through. Let's say 675386. Rm2k does not adjust a division, meaning that in this case, if I divide 675386 by 100000, it won't do 7, it'll still do 6. I guess you do understand (I'm from Quebec, so I got an average english level). Okay, so I divided it by 100000, meaning Quest Number 1 now values 6. I want to leave it this way. But if I just continue dividing, the other Quest Numbers will be equal to 67, then 675 and so on. So you want to remove that 600000. This is where I use another Variable, the quest restore. I restore the number 6 to 600000, then substract it from every other Quest Number variable. From this on, you do understand right? I'll go on with all the rest of the codings for number 7 and 5, but I'll assume that you can understand the rest on your own. If not, PM me and I'll help you. <>Variable [0002 Quest Number 1] divided by 100000 <>Variable [0008 Quest Restore] Set to [0002 Quest Number 1] <>Variable [0008 Quest Restore] Multiply by 100000 <>Variable [0003 Quest Number 2] Substract by [0008 Quest Restore] <>Variable [0004 Quest Number 3] Substract by [0008 Quest Restore] <>Variable [0005 Quest Number 4] Substract by [0008 Quest Restore] <>Variable [0006 Quest Number 5] Substract by [0008 Quest Restore] <>Variable [0007 Quest Number 6] Substract by [0008 Quest Restore] Note: ------------------------------------------------------------------- <>Variable [0003 Quest Number 2] divided by 10000 <>Variable [0008 Quest Restore] Set to [0003 Quest Number 2] <>Variable [0008 Quest Restore] Multiply by 10000 <>Variable [0004 Quest Number 3] Substract by [0008 Quest Restore] <>Variable [0005 Quest Number 4] Substract by [0008 Quest Restore] <>Variable [0006 Quest Number 5] Substract by [0008 Quest Restore] <>Variable [0007 Quest Number 6] Substract by [0008 Quest Restore] Note: ------------------------------------------------------------------- <>Variable [0004 Quest Number 3] divided by 1000 <>Variable [0008 Quest Restore] Set to [0004 Quest Number 3] <>Variable [0008 Quest Restore] Multiply by 1000 <>Variable [0005 Quest Number 4] Substract by [0008 Quest Restore] <>Variable [0006 Quest Number 5] Substract by [0008 Quest Restore] <>Variable [0007 Quest Number 6] Substract by [0008 Quest Restore] Note: ------------------------------------------------------------------- Got it? ------------------PART IV------------------------ WHY IS IT USEFUL? I REAALLY DON'T KNOW WHY DOING ALL THIS STUFF!! Okay, so here's the use. In your game, some characters and quests will have fork conditions. This fork condition will be set on any of the Quest numbers. Let's say, if Quest Number 1 is equal to 6, the zombie quest is available (we all have a zombie-like quest). If not, this character is only talking about his backhouse. Why using 6 different variables? Probability chances. One number that can vary from 0 to 9 leaves 10 different possibilities... Good, but if your like me, not enough. But having 6 numbers that has each 10 different possibilities, this leaves... 1000000 different combinations!!! AWESOME!!! This gives every single game it's unique touch. This means you have to set multiple characters with each their own Quest Number, to change probabilities. It takes a little longer and more preparation to create your game, but assuming your really into rm2k, you'll find this little tutorial a good solution to complexify your world. TO USE ONLY WITH SECONDARY QUEST, OR ELSE I THINK THIS WILL LEAVE THE PRIMARY QUEST MORE COMPLICATED TO CREATE IN THE END |
|
|||||||||||
|
©2002-2012 blade2k.net - parsed in 0.003 seconds - view active users
[20137 members][newest member: Meatball97]
Active Users (0)
|
||||||||||||