I am starting work on a program that lets you create dynamic content for players on the fly, managed remotely, even while they are in-game.
Basically, my steps for a map maker to do so is this:
Create a unique bank file name and my program finds that bank and creates a new bank file in the same directory/path.
Users/players would have to download this program and "subscribe" to the maps they want dynamic content from.
The program would update this bank file periodically that creates encryptions based on developer-defined keys.
The map would read this updated bank file when needed to create the dynamic content.
With this, you could for example in RPG's create events that occur when YOU want them to, globally all at the same time. Have vendors/item shops have different items at different times instead of updating the map directly. You could pretty much do anything, even inject code.
So, just wondering, does anyone see this being possible before I dive myself into this? Is it feasible?
EDIT: Scroll down for more info, but here are some test files with dynamic content!
Run the map in local test mode. It's not programmed for online play - YET (Easily done, don't care atm)
Run the USER version of the program. This is what will update your bank file!
Run the ADMIN version of the program if you want to change the text the game shows.
I was actually going to attempt something like this.
But yes, if we got most of the top played map to use this system, and more than one map used it, then yes, I believe it would work, and people would use it.
I was actually going to attempt something like this.
But yes, if we got most of the top played map to use this system, and more than one map used it, then yes, I believe it would work, and people would use it.
Yeah, that'd be a nice start! Did you know the editor can read files like normal C+ +? For example,
C:\ \blah\ \blah.dds or even the ..\? Pretty interesting to me.
If I'm understanding your post right, the dynamic content should work while we are in game. I.e. shop inventory should be able to change based on the program.
I don't think it's possible because of the way banks work (According to some tests I ran a long time ago). Disprove me if my observations and theories are wrong, but here is what I discovered (About 2 years ago).
Banks can only be preloaded at the map start. Attempting to do this during the game will result in complete failure to read the data. Closing a bank file, then reopening it again, will result in a broken bank file with empty sections and keys.
Once a bank is preloaded, a data buffer is created and the bank contents are unloaded to it. When you call the save to bank function, the buffer will commit the contents to the bank.
Modifying the bank file while it is preloaded will not result in the bank data being changed in game, one would need to modify the data in the buffer, and to do so we would effectively need to have the 3rd party program detecting the bank data in memory and modify the values there, this might not exactly be legal since Blizzard discourages the use of 3rd party programs that modify the game state (?).
Proof of the point above is that I could change the values in my bank, then run a trigger to read that value in game. Presto, the value loaded is that which was in the original bank commit (save) that was done from the game, not the one that was done from the bank file itself.
Banks can only be preloaded at the map start. Attempting to do this during the game will result in complete failure to read the data. Closing a bank file, then reopening it again, will result in a broken bank file with empty sections and keys.
I'm fairly sure this is the case. I'm hoping that we're going to see some form of mySQL compatibility or a so-called "global bank" for maps in the future. I started working on a program sort of like this myself, but I never got around to finishing it. Maybe I'll get around to in the future, who knows. But as far as I'm aware, you cannot modify banks mid-game. You could still create a program that updates banks while they're not in use, and I'm sure it would be very helpful if you could encourage people to install it.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
You can actually modify banks externally while a game is in progress, there is a function called Reload Bank, and when you call this function it reloads the bank file for any modifications. It requires time to load however, which is where you use the Wait for Bank function. I tested it online with one other person and it allowed us to change values in the bank manually and reload it, so it works fine online, though it took around I think 0.6 seconds to reload the bank with 100 integers in it.
That sounds useful.
Initially I couldn't even tell why you would want this, why not just make another map? But I guess this lets you keep everything in one place including the votes and general image.
I assume for dynamic content everyone is already thinking of stuff like making new areas appear by loading actor IDs and their new locations from the bank, that would probably be the logical conclusion of all this, though I think it would push bank capacity to the limit.
I suspect Blizzard will ban people using it due to Warden probably being very angry about this and will most likely even go to court with you if you are unlucky. So I suggest you do not do this :)
You should probably look for other dynamic content options. We already had experiments with this, for example with dynamically create terrain (usually ugly as fuck) and quests. Maybe you should try to advance in that direction. If you could create dynamic set pieces that can be connected to each other, similar to how Diablo games work and if those actually were looking good level design and lighting wise, that would be quite the feat to achieve and would increase replayability a lot.
Yes, Banks are needed to be opened at map init last I checked as well. But that's not to big of an issue, since it's an easy workaround. I'll create a quick problem and map demonstrating this ability - I'll let you dynamically update a string variable from my program.
Here are the programs + map to test it on. Very simple test of just a string. How to use it? Well, I am assuming here that you have SC2 installed on a C:\ drive - if not, let me know I'll actually make it compatible for all drive installs... Didn't feel like doing it atm.
Run the map in local test mode. It's not programmed for online play - YET (Easily done, don't care atm)
Run the USER version of the program. This is what will update your bank file!
Run the ADMIN version of the program if you want to change the text the game shows.
Done.. (Fixed - forgot to make it safe against sql injection)
EDIT: So after all this work, I conclude that dynamic content is indeed possible and the features are near limitless on what you can add. Graphics, text, stores, inventory, items, abilities, events, etc, can all be made DYNAMICALLY WHILE PLAYERS ARE IN GAME
Yes, I had to exaggerate that because if you just stop and think about that for a second, that is pretty powerful, IMO!
EDIT2: Program fixed - working.
EDIT3: For those of you looking at the code in the sc2map file, there are two banks for INTEGRITY. One is backend, one is frontend. This is to prevent users from just creating their own dynamic content - I'm working on encrypt/decrypt functions with user-provided keys and custom encrypt settings.
I can't test it myself right now ( Writing from a phone) but I'll check it out later. If you can make this relatively easy to use for moderately experienced mappers, it could get huge :)
I'm working on a 50 player map as we speak as well. (A simple TD) - As a note, creating "virtual" chat channels to merge players from multiple games seem to have instantaneous-500ms delay. Not bad seeing as that's chat. This 50 player map also only requires one player to have the program running in the background.
EDIT: For mappers, they would simple import the library I am working on. Then they would give me their database info, or I can set them up for one, whatever.
For example - making announcements GLOBALLY to all players would just be one column needed called "Announcement" and using the Admin program, just click "Announce" and bam... That's a string though, so it's obviously simple for that end. It'll get a little more complicated when you want an entire dynamically scripted event to go through. I'm currently also working on creating functions dynamically by means of string and custom event handling.
Who put in that they "Wonder why it lags so much?" Can you tell me in detail where you saw lag?
EDIT: Fixed all bugs I believe? Try new versions
EDIT2: Now I fixed all bug fixes - I did not want people to spam my database 1000000000x a second, lol.
EDIT3: By the Gods, I have managed to bypass SC2's input delay for WASD movement! (Input delay is now on my server-side, but MASSIVELY less than battle.net's)
Hello,
I am starting work on a program that lets you create dynamic content for players on the fly, managed remotely, even while they are in-game.
Basically, my steps for a map maker to do so is this:
With this, you could for example in RPG's create events that occur when YOU want them to, globally all at the same time. Have vendors/item shops have different items at different times instead of updating the map directly. You could pretty much do anything, even inject code.
So, just wondering, does anyone see this being possible before I dive myself into this? Is it feasible?
EDIT: Scroll down for more info, but here are some test files with dynamic content!
Third-party tools that have to run on the players/clients computers doesn't normally get used a whole lot.
@Enexy: Go
I was actually going to attempt something like this.
But yes, if we got most of the top played map to use this system, and more than one map used it, then yes, I believe it would work, and people would use it.
Great to be back and part of the community again!
Yeah, that's what I'm afraid of as well...
Yeah, that'd be a nice start! Did you know the editor can read files like normal C+ +? For example,
If I'm understanding your post right, the dynamic content should work while we are in game. I.e. shop inventory should be able to change based on the program.
I don't think it's possible because of the way banks work (According to some tests I ran a long time ago). Disprove me if my observations and theories are wrong, but here is what I discovered (About 2 years ago).
I'm fairly sure this is the case. I'm hoping that we're going to see some form of mySQL compatibility or a so-called "global bank" for maps in the future. I started working on a program sort of like this myself, but I never got around to finishing it. Maybe I'll get around to in the future, who knows. But as far as I'm aware, you cannot modify banks mid-game. You could still create a program that updates banks while they're not in use, and I'm sure it would be very helpful if you could encourage people to install it.
You can actually modify banks externally while a game is in progress, there is a function called Reload Bank, and when you call this function it reloads the bank file for any modifications. It requires time to load however, which is where you use the Wait for Bank function. I tested it online with one other person and it allowed us to change values in the bank manually and reload it, so it works fine online, though it took around I think 0.6 seconds to reload the bank with 100 integers in it.
That sounds useful.
Initially I couldn't even tell why you would want this, why not just make another map? But I guess this lets you keep everything in one place including the votes and general image.
I assume for dynamic content everyone is already thinking of stuff like making new areas appear by loading actor IDs and their new locations from the bank, that would probably be the logical conclusion of all this, though I think it would push bank capacity to the limit.
@LinkD: Go
Is that's new function? I honestly don't remember it being there
@FuzzYD: Go
Not sure when it was added, I actually discovered and tested it today.
I suspect Blizzard will ban people using it due to Warden probably being very angry about this and will most likely even go to court with you if you are unlucky. So I suggest you do not do this :)
You should probably look for other dynamic content options. We already had experiments with this, for example with dynamically create terrain (usually ugly as fuck) and quests. Maybe you should try to advance in that direction. If you could create dynamic set pieces that can be connected to each other, similar to how Diablo games work and if those actually were looking good level design and lighting wise, that would be quite the feat to achieve and would increase replayability a lot.
Yes, Banks are needed to be opened at map init last I checked as well. But that's not to big of an issue, since it's an easy workaround. I'll create a quick problem and map demonstrating this ability - I'll let you dynamically update a string variable from my program.
@Enexy: Go
Sounds like a lot of Catalog Field Value Set.
Sounds like fun! :P
@MasterWrath: Go
No catalog useage at all. Working on program now - got it running.
Just making the "user" program.
Here are the programs + map to test it on. Very simple test of just a string. How to use it? Well, I am assuming here that you have SC2 installed on a C:\ drive - if not, let me know I'll actually make it compatible for all drive installs... Didn't feel like doing it atm.
Done.. (Fixed - forgot to make it safe against sql injection)
@Enexy: Go
Files attached - thanks for waiting guys.
EDIT: So after all this work, I conclude that dynamic content is indeed possible and the features are near limitless on what you can add. Graphics, text, stores, inventory, items, abilities, events, etc, can all be made DYNAMICALLY WHILE PLAYERS ARE IN GAME
Yes, I had to exaggerate that because if you just stop and think about that for a second, that is pretty powerful, IMO!
EDIT2: Program fixed - working.
EDIT3: For those of you looking at the code in the sc2map file, there are two banks for INTEGRITY. One is backend, one is frontend. This is to prevent users from just creating their own dynamic content - I'm working on encrypt/decrypt functions with user-provided keys and custom encrypt settings.
@Enexy: Go
I can't test it myself right now ( Writing from a phone) but I'll check it out later. If you can make this relatively easy to use for moderately experienced mappers, it could get huge :)
@zeldarules28: Go
Yeah, it's gonna be easy to use for any mapper.
I'm working on a 50 player map as we speak as well. (A simple TD) - As a note, creating "virtual" chat channels to merge players from multiple games seem to have instantaneous-500ms delay. Not bad seeing as that's chat. This 50 player map also only requires one player to have the program running in the background.
EDIT: For mappers, they would simple import the library I am working on. Then they would give me their database info, or I can set them up for one, whatever.
For example - making announcements GLOBALLY to all players would just be one column needed called "Announcement" and using the Admin program, just click "Announce" and bam... That's a string though, so it's obviously simple for that end. It'll get a little more complicated when you want an entire dynamically scripted event to go through. I'm currently also working on creating functions dynamically by means of string and custom event handling.
@Enexy: Go
Who put in that they "Wonder why it lags so much?" Can you tell me in detail where you saw lag?
EDIT: Fixed all bugs I believe? Try new versions
EDIT2: Now I fixed all bug fixes - I did not want people to spam my database 1000000000x a second, lol.
EDIT3: By the Gods, I have managed to bypass SC2's input delay for WASD movement! (Input delay is now on my server-side, but MASSIVELY less than battle.net's)
THIS. NOW MMORPG IS POSSIBLE.
..sorry for all caps, but this has so, so much potential.
Battle.net currently has 14 player limit. Say game A starts with 10 players, and later game B starts with 7 players. (with the same map)
1. game A's trigger compresses all player data into bank, and external program sends it to game B.
2. game B's trigger then decompresses that data, and creates units / use ability / give orders to 'simulate' the game A's actual progress.
3. game B's trigger compresses all player interaction into bank, and external program sends it to game A.
...and so on.
the practical problem would be the delay between each transmission, the trigger would have to "compensate" the delay.