I’ve loosely integrated SDL-console 1.2 (wacha.ch/wiki/sdlconsole/) into VCMI. It features alpha blending, activation/deactivation, command completion and so on.
It is possible to have several of these, so a second console could be used as a chat box input.
It already integrates nicely. Screenshot attached.
The code needs to be c++ified but that shouldn’t be a big deal.
Should I keep working on that ?
Hmm, looks nice. Is it possible to set its default look more similar to H3 console?
There’s a console in H3 ???
I think that as long as the console is a rectangle, it can be configured the way you want. It already supports a background image, but I didn’t try it.
I also didn’t know there was a console in H3. But I’m not very used with consoles in general (I rarely play MP).
As for integration in VCMI, let me know if you want me to re-edit all the resolutions above x900, to make a box for it in the right panel (if you believe it’s a good idea to put it there), same as I did for 1280x1024: bugs.vcmi.eu/file_download.php?f … 2&type=bug
The console is a different object. It appears/disappear with a key combination and get the keyboard focus. The game is still playable though.
Yes. I actually knew that much, as I remember using such consoles in a couple of 3D Shooters many years ago (must be already 5-6 years). But because of my very little experience with them, I don’t really know if integrating them in the game interface would be a good idea or not (and if it’s ever done at all).
But if it’s not for the console, then I wouldn’t know for what else exactly we could use that space. If this were an RTS, it may have been the perfect place for updates (“your workers have completed…”, “player X has declared war on Y” etc). But for a TBS, I don’t know what else could it be used for… Quest Log maybe? But that’s not a core element in Heroes to justify a permanent box in the main interface… Maybe have all (/most) logs integrated in there, with the possibility of cycling between them (Quest log, Chat log, Console log etc…)?
Yes, there is. Press the tab button, enter any text and press enter - it works in both H3 and VCMI. I think you should take a look at CInGameConsole class in VCMI if you didn’t know about it.
I think we should ask Tow before any serious effort is put into making this console work.
I see. So that’s actually a chat box, not a console.
And since there is a chat box, that functionality in the existing console can go away.
So in the end we will have a chat box and a drop-down console for debugging/cheating/…
I think we could merge both consoles, in the end no one’s going to use separate window for debugging and testing. There’s no need to multiplicate beeings. Keep in mind that at some stage we’re going to get rid of endless logs once they’re not nessessary.
Using the chat bar for console might be best. Commands could be prepended with a slash.
It could be something like UT, where Tab lets you enter a single line of console input which is more or less what’s already done for the chatting and the key above that flips up a console above it with a nice scrollable history and unlimited input until you hit the console key again.
I’ve finally cleaned up the code a bit. diff file attached if anyone wants to give it a try. Activation/hidding can be done anytime with ctrl+1.
console3.zip (95 KB)
I’d be curious to give it a try, but I don’t know how to enable it in the first place. It seems to be not just a matter of placing the .diff file in a certain folder, but really compiling, right?
Yes, you need to compile it, which I can’t do for you because I don’t use windows.
the *.diff file contains changes in code - so it need be merged with existing code and THEN compiled. if ubuntux updated also project file/makefile it would be easy to compile
That’s fine. I’m gonna wait for the next dev release.
@majaczek: everything is there. you just need to re-run configure to generate the makefile.
@Zamolxis: since the code is not integrated (and may never be), it won’t be in the next release. Now, Tow could very well generate a second binary with the patch applied for testing purposes.
hey ubuntux - one thing - act fast because changes in code are deep and fast and some time it may become unmergable before it would be merged
There are two files missing in your package: ConsoleFont.bmp and DT_drawtext.h. Fortunately it was easy to find them on the net and I’ve built the win binaries.
It is SVN revision 1363 with applied the console patch.
Download link: download.vcmi.eu_with_console.7z
The new console, as Ubuntux wrote, can be opened in game by pressing ctrl+1.
I’ve only built the package, I’ll review the whole patch within a day or two (sorry, I have a lot of work with sutdies).
Is it meant as a replacement for system console or the internal game console?
As I said earlier, I’m not familiar with consoles, so I didn’t know what to test. But just out of curiosity:
- I typed in it “test”, and I got a message saying “Player 0 sends a message: test”
- I typed in it “save”, and VCMI crashed.
DT_drawtext.h is not needed. I folded it into CConsole.h.
That console is both a system and game console. ie. where you can type debug command or issue cheats. So the existing in game console is for chat only. I believe both are two different concepts and as such should be split. The old console is only there to spit out debug messages, doesn’t get keyboard input anymore and eventually should go away.
Zamolxis, “save” takes a file name. The current code to process commands doesn’t check anything