Next part for the community TD is needed! this one may be a bit more work and is a part of triggers a lot of people don't understand.
Trigger Exercise #3
This trigger exercise is going to be producing a banking system for an actual map. The SC2Mapster Community Project. This may be a lot more trickier than and I am not sure of the full capacity that is storeable in banks as I have not yet used them. So I am leaving this up for discussion and to be built with what is possible.
This will be built in a map on its own, and i will copy the code into the final map at a later date.
What does this Banking System need to do?
OK so what we know about the TD so far, is there are several tracks to play on, there is going to be 3 additional difficulties so that all players can adjust to their skill, also there are several levels/waves of creeps. Ideally I would like to track whether a player has completed a track, if he hasn't what max level has he achieved, and on what difficulty.
Additional, a global high score would be cool where you get points depending on what level of difficulty you finished a track and how many. now someone mentioned This, so what I understand from that is to get a high score table you have to store the top players in everyones banks and spread that through everyone that plays, and the result is a high score table that is stored locally in everyones bank. Correct me if I'm wrong :P
I would like there to be a builder level, so as you play more your builder levels unlocking perks and abilities( these abilities should save between games ), there is also a possibility of doing achievements, which means you would have to track which ones they had gotten etc.
First things to do first, would be to find out whether all of the above is possible to be stored into a bank, encrypted would be ideal so that players can't cheat their way to the top etc. and if not what can we store.
I look forward to learning from this exercise and discussing with you
So we are wanting to store if possible
Players Builder Level
Whether player has finished a track or not, and if player has, on what difficulty
If player hasn't finished a track whether player has played it or not
Any acheivements unlocked by player
I think that is all?
Examples
Player 1. Has finished 4 tracks on easy, and 2 on medium, and gotten to level 30 on hard on another his builder level is 14, and has 3/15 achievements
Player 2. Has finished all tracks on medium and is on the high score list
Player 3. Has never played
If you have any questions regarding the system/aspects I have missed, bring it up and I will clarify and edit this post
Yea, ofcourse, once the TD ones are completed, I can continue making some easier trigger based exercises. At the moment though they are directed at this TD :)
But if I think about it would probably be with these types of variables
Level = builder level would be experience so an integer
Difficulty = 3 difficulties so probably an integer from 1 - 3
Achievements = I am not yet sure the best way to go about this, but i would imagine numbered achievements with a boolean for whether they had achieved it or not
Round number = integer
If there are better ways to store this information then by all means I'm listening, I have not implemented this information into the map because I thought storing it in the bank may be harder, if there is an easier way to store them in a bank then we will go with it that way
The most efficient way of doing this that I've found is to store everything into it's own variable, then combine those variables into a string to save space. Then hash, encrypt, and bank the string.
The banking itself is rather simple. I use STARCODE for my maps. There's a handy sample map with instructions on how to bank within the link.
The hardest part will be figuring out how and when to store your variables and when to save the bank.
builder level
reached level for every map and difficulty (0 means unplayed, 30 means finished)
achievement if possible as binary values. need to know how much there are going to be
this is really easy. I'me done with the stuff basharTag has said for my own map
starcode is awesome :)
Lets take away achievements, and look to only store, if they have completed a track if not what level and what difficulty. and also a builder level :)
Should be simple enough. A three-tiered global boolean array should be enough to store the level. Something like: Track Completed[Track ID][Difficulty][Player] = false (default)
So when player 1 completes track 1 on the easiest difficulty, set Track Completed[1][0][1] = True
Save the bank immediately to prevent data loss.
Another integer array should take care of the current level. Any time a level is complete, set Level Complete[Track ID][Difficulty][Player] + 1. Then save the bank. Saving the bank at the end of each round will let you do things like restore a level if a player drops and doesn't actually lose - or if he does lose, he can continue from the level he was on.
Alternatively, you can just use the Level Complete variable and check if it's equal to the maximum number of levels on a particular track and proceed accordingly. But I don't think the number of variables thus far will significantly impact game speed.
Builder level would just be a simple integer array. Builder Level[Player] = 0 (default)
When you go to save the bank, convert all of these into one string value (with spaces between each variable) to save space and bank the string. The position of the variables will be important when loading the values back again, since you'll use the "Word of String" condition to figure out what the string actually contains.
the question is how the heck to you reopen the sme bank file? if you open it once its in the cache.ok
if you remove it from the cache and use the same open function to open it again it doesnt open!!!! is this a stupid bug? or a stupid limitation!?
single player map always.
so does that mean you are combining the map??? .. bit unrelated. But can you have more than 1 person working on the same map at the same time?
its not about have 2 players in the same map, it like a "force reset" to your bank file for any reason.
why cant you reopen the bank like it would when you started the game? like restart game without restarting it ;-)
after all why the hell is there a clean cache bank function if it doest allow to "reopen" a bank again? what's the point if its not a bug?
btw where can we report map editor bugs? i tried our EU b.net forums and were crashing with the stupid error page "i s* a bug"
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Next part for the community TD is needed! this one may be a bit more work and is a part of triggers a lot of people don't understand.
Trigger Exercise #3
This trigger exercise is going to be producing a banking system for an actual map. The SC2Mapster Community Project. This may be a lot more trickier than and I am not sure of the full capacity that is storeable in banks as I have not yet used them. So I am leaving this up for discussion and to be built with what is possible.
This will be built in a map on its own, and i will copy the code into the final map at a later date.
What does this Banking System need to do?
OK so what we know about the TD so far, is there are several tracks to play on, there is going to be 3 additional difficulties so that all players can adjust to their skill, also there are several levels/waves of creeps. Ideally I would like to track whether a player has completed a track, if he hasn't what max level has he achieved, and on what difficulty.
Additional, a global high score would be cool where you get points depending on what level of difficulty you finished a track and how many. now someone mentioned This, so what I understand from that is to get a high score table you have to store the top players in everyones banks and spread that through everyone that plays, and the result is a high score table that is stored locally in everyones bank. Correct me if I'm wrong :P
I would like there to be a builder level, so as you play more your builder levels unlocking perks and abilities( these abilities should save between games ), there is also a possibility of doing achievements, which means you would have to track which ones they had gotten etc.
First things to do first, would be to find out whether all of the above is possible to be stored into a bank, encrypted would be ideal so that players can't cheat their way to the top etc. and if not what can we store.
I look forward to learning from this exercise and discussing with you
So we are wanting to store if possible
Examples
Player 1. Has finished 4 tracks on easy, and 2 on medium, and gotten to level 30 on hard on another his builder level is 14, and has 3/15 achievements
Player 2. Has finished all tracks on medium and is on the high score list
Player 3. Has never played
If you have any questions regarding the system/aspects I have missed, bring it up and I will clarify and edit this post
hey nevjmac im wondering are you gonna do more trigger exercises because the give me a chance to learn. imo the last ones were really advance
Yea, ofcourse, once the TD ones are completed, I can continue making some easier trigger based exercises. At the moment though they are directed at this TD :)
there is a lot you want to be saved :) currently working on banks for my own map, maybe coming back later
@b0ne123: Go
again I have not used banks :P thats why I'm not sure if its possible
@nevjmac: Go
we need to know how the level, difficulty, achievements, and round number are stored or presented in game before we can start
otherwise we will have to make up stuff that may not be compatible with your map.
@Usernameisntworkingright: Go
They are not yet implemented in the map.
But if I think about it would probably be with these types of variables
Level = builder level would be experience so an integer
Difficulty = 3 difficulties so probably an integer from 1 - 3
Achievements = I am not yet sure the best way to go about this, but i would imagine numbered achievements with a boolean for whether they had achieved it or not Round number = integer
If there are better ways to store this information then by all means I'm listening, I have not implemented this information into the map because I thought storing it in the bank may be harder, if there is an easier way to store them in a bank then we will go with it that way
The most efficient way of doing this that I've found is to store everything into it's own variable, then combine those variables into a string to save space. Then hash, encrypt, and bank the string.
The banking itself is rather simple. I use STARCODE for my maps. There's a handy sample map with instructions on how to bank within the link.
The hardest part will be figuring out how and when to store your variables and when to save the bank.
okay: values we need to save
builder level
reached level for every map and difficulty (0 means unplayed, 30 means finished)
achievement if possible as binary values. need to know how much there are going to be
this is really easy. I'me done with the stuff basharTag has said for my own map
starcode is awesome :)
@b0ne123: Go
where do you get the value 30 from?
there are 35 tracks
Up to 70 levels
Acheivements, no idea on how many shall we say 10? for now
it was just a number :) just read about the rank system. that is a bit tougher
Is this exercise out-dated?
@Tekaichi: Go
nope there is someone working on one atm, just waiting for him to get back to me with what he has done so far :)
@nevjmac: Go
Ok, will be a huge td.
@Tekaichi: Go
Quite possibly :) Banking still hasn't been done, the guy that was keen to do it hasn't got back to me.
I think we should simplify this a little...
Lets take away achievements, and look to only store, if they have completed a track if not what level and what difficulty. and also a builder level :)
Should be simple enough. A three-tiered global boolean array should be enough to store the level. Something like: Track Completed[Track ID][Difficulty][Player] = false (default)
So when player 1 completes track 1 on the easiest difficulty, set Track Completed[1][0][1] = True
Save the bank immediately to prevent data loss.
Another integer array should take care of the current level. Any time a level is complete, set Level Complete[Track ID][Difficulty][Player] + 1. Then save the bank. Saving the bank at the end of each round will let you do things like restore a level if a player drops and doesn't actually lose - or if he does lose, he can continue from the level he was on.
Alternatively, you can just use the Level Complete variable and check if it's equal to the maximum number of levels on a particular track and proceed accordingly. But I don't think the number of variables thus far will significantly impact game speed.
Builder level would just be a simple integer array. Builder Level[Player] = 0 (default)
When you go to save the bank, convert all of these into one string value (with spaces between each variable) to save space and bank the string. The position of the variables will be important when loading the values back again, since you'll use the "Word of String" condition to figure out what the string actually contains.
still open? I'm bored anyways
the question is how the heck to you reopen the sme bank file? if you open it once its in the cache.ok
if you remove it from the cache and use the same open function to open it again it doesnt open!!!! is this a stupid bug? or a stupid limitation!?
single player map always.
so does that mean you are combining the map??? .. bit unrelated. But can you have more than 1 person working on the same map at the same time?
its not about have 2 players in the same map, it like a "force reset" to your bank file for any reason. why cant you reopen the bank like it would when you started the game? like restart game without restarting it ;-) after all why the hell is there a clean cache bank function if it doest allow to "reopen" a bank again? what's the point if its not a bug?
btw where can we report map editor bugs? i tried our EU b.net forums and were crashing with the stupid error page "i s* a bug"