Bridge Commander Central

BC Forums => BC Scripting => Topic started by: MLeo on February 24, 2008, 09:45:52 AM

Title: Bridge Commander: Core
Post by: MLeo on February 24, 2008, 09:45:52 AM
I'm excited to present to you, BC: Core, doing absolutely nothing!
It just loads a couple of icons and allows you to move the mouse around and play with the console.

But it does load without errors, and that's the main thing of this excursion.

Before I start on it's purpose: This isn't a mod, it isn't intended to be used with other mods, such as KM1.0, this is just a blank, empty BC, scripts wise.

Now, what's the purpose of this, aside for getting a minimal BC without errors?

I've included all the icon definitions, since they can be usefull (for example, the mouse and fonts are icons, so if I didn't include them, then you couldn't even see the console, let alone use it properly).

It provides a platform for a totally new BC, build from the ground up.
From GUI (making use of the old GUI as building blocks is required, since that's part of the executable we can't remove it, or replace it) to ships, AI and missions, you have to implement it.

Atleast, that's something I plan to do with it. ;)
If Dasher allows for it, I'd like to call that "mod" BC: Foundation 8)

It has tought me a couple of things, BC requires atleast a single movie (blank or otherwise, included as Blank.bik) to be played. It first calls a function that sets up the handlers (or atleast, that's how BC does it) and then it starts the movies.
Some magic constants, like "NoMinimize" (in respect with StylizedWindows) are defined in a file called StylizedWindow.py

It also calls quite a lot of other files from the executable.
I haven't yet had the chance to do any documentation, and I somewhat doubt I'll do that. :P
Basicly, for GUI, you need to implement AddHandlers and BuildInterface, while keeping the original things there.
In Multiplayer, you basicly only need to implement a single function, but I suggest you just copy over the old one, and required files to make your life easier. :P
I stripped it down because I wanted a minimal BC, and I don't play MP at all anyway.


For new scripters, I suggest you wait for BC: Foundation, or create a conventional script.

As for BC: Foundation, my plan is basicly to make BC more component oriented. Such as an options component, single player component (maybe seperating campaigns and single missions, but I think I might just combine them), etc, etc. It's my plan for the entire GUI to be component based, basicly Foundationfied (is that a word?).

So, without further ado, I present you BC: Core!
Title: Re: Bridge Commander: Core
Post by: FekLeyr Targ on February 24, 2008, 10:31:23 AM
It sounds great. I've just downloaded and installed it on my km1.0 custom installation. And then I start BC, I get a bsod with mouse and music.
Until you know a solution, I'll restore the backups.
Title: Re: Bridge Commander: Core
Post by: El on February 24, 2008, 10:45:18 AM
Good work MLeo, I know lots of people have been wanting a stripped down BC for a while.

It sounds great. I've just downloaded and installed it on my km1.0 custom installation. And then I start BC, I get a bsod with mouse and music.
Until you know a solution, I'll restore the backups.

Why would you do that? These are core scripts for building BC up from scratch, a scripting tool.
Title: Re: Bridge Commander: Core
Post by: MLeo on February 24, 2008, 10:47:07 AM
It sounds great. I've just downloaded and installed it on my km1.0 custom installation. And then I start BC, I get a bsod with mouse and music.
Until you know a solution, I'll restore the backups.
Like I said, this isn't intended for the casual user.
It mostcertainly isn't intended with use of KM1.0. :P

And that isn't a console report, that's the normal 1.5.2 Python interpretter.


Thanks Elminster, it's something I wanted to do with Excalibur as well.

I better put an additional notice that this isn't a mod, technicly speaking, it only subtracts. :P
Title: Re: Bridge Commander: Core
Post by: FekLeyr Targ on February 24, 2008, 10:51:06 AM
Good work MLeo, I know lots of people have been wanting a stripped down BC for a while.

It sounds great. I've just downloaded and installed it on my km1.0 custom installation. And then I start BC, I get a bsod with mouse and music.
Until you know a solution, I'll restore the backups.

Why would you do that? These are core scripts for building BC up from scratch, a scripting tool.

ah. sorry. I must have failed to notice something.
Title: Re: Bridge Commander: Core
Post by: LJ on February 24, 2008, 11:52:52 AM
Wow :-D  Well done!

Feel free to use the Immersion Evolved interface libs! :-)
Title: Re: Bridge Commander: Core
Post by: MLeo on February 25, 2008, 06:02:03 PM
Thanks LJ, I may just borrow some things here and there... ^_^


Also, thanks for the nomination! Now I know who to vote for. ;)
And that to consider I forgot a couple of things, like the CardSpecificSetup.py (thought it was usefull for older computers, since it's called automaticly anyway), the config loading and saving code (boilerplate) and the KeyboardConfig, which is a mess anyway. :P But was a genuine forgot case. But, basicly, you don't want to re-implement it (actually, I might in the future :S).
Title: Re: Bridge Commander: Core
Post by: Picard_1 on February 25, 2008, 07:22:02 PM
This makes me wonder how many more years we can get out of BC, expanding
seems limitless with python, and if it will even run tie to tie with excalibur in terms
of customization (graphics aside).
Title: Re: Bridge Commander: Core
Post by: NeoKaede on February 26, 2008, 06:37:06 AM
Sorry Mleo, but I don?t get it. What?s this? A stripped down version of BC to be used as a testbed for new scripts before throwing them in normal BC? Or are you trying to expand the engine without touching the exe?
Title: Re: Bridge Commander: Core
Post by: MLeo on February 26, 2008, 01:30:15 PM
The purpose of this is to provide a (nearly) completely empty BC that allows scripters who like an adventure to implement the scripting side of BC in their way (from scratch).

So it's a foundation for a new BC (scripts-wise).

It's something I want to do, especially since Excalibur wanted to do that as well. But since we are using NanoGE now, I want to continue the idea of rebuilding BC from the core up.
Title: Re: Bridge Commander: Core
Post by: NeoKaede on February 26, 2008, 04:42:03 PM
Ah, I see. Thanks.
Title: Re: Bridge Commander: Core
Post by: FekLeyr Targ on February 27, 2008, 12:22:25 PM
Ah, I see. Thanks.
I also fully understand the purpose now. Thanks.
Title: Re: Bridge Commander: Core
Post by: teeth_03 on February 27, 2008, 03:52:17 PM
this would be perfect for a more 'dedicated' dedicated server app,as a seperate program that launches just the dedicated server portion of BC
Title: Re: Bridge Commander: Core
Post by: MLeo on February 27, 2008, 05:33:58 PM
this would be perfect for a more 'dedicated' dedicated server app,as a seperate program that launches just the dedicated server portion of BC
Ah, it still launches BC, with window (done by the executable).

And people still would need the same scripts (also something done by the executable) so the clients would also need the empty BC. :P
Title: Re: Bridge Commander: Core
Post by: eclipse74569 on February 29, 2008, 06:38:21 AM
This is great!  Perhaps when I start scripting more often I can use this :).  I want to learn how to do it all in terms of this game.  Model, Texture, Script, and Hardpoint.  And this would be a good opportunity to learn Python :).  Thanks for this MLeo!  And let's hope that Dasher will allow it.  "BC: Foundation"  has a nice ring to it!
Title: Re: Bridge Commander: Core
Post by: MLeo on February 29, 2008, 06:40:58 AM
Do note that you will have to do this yourself (in terms of model hp etc etc loading). Or take a peek at the normal files. ;)
Title: Re: Bridge Commander: Core
Post by: eclipse74569 on February 29, 2008, 10:29:21 AM
That was the whole point of my post :P Of course there are mod teams I could join LOL.  But I'd like to do things on my own for better experience, and yes I know about the normal files it's only....logical :P
Title: Re: Bridge Commander: Core
Post by: XFSIllusion on April 06, 2008, 12:42:30 PM
I know this is an old thread, but i just got around to trying this out.  Correct me if i'm wrong, but i assume it is installed by deleting the existing data and scripts folders in BC 1.1 and replacing them with this package.  I would also like to get an idea of what to expect so I know it's loading right, at first I got nothing but a blank screen, had to use the task manager to close it.  I replaced blank.bik with an actual video(renamed it to blank.bik) and it plays the video but then goes to the same black screen.  I understand that this is a blank core of BC, but i'm seeing menu files in there and such, am I supposed to get a basic GUI or anything.  Any help would be appreciated as I haven't attempted to mod BC for quite some time.
Title: Re: Bridge Commander: Core
Post by: MLeo on April 06, 2008, 01:56:14 PM
As stated before, this is just the very core of BC, things like GUI, ships, missions, everything else, are bolted onto it.
Title: Re: Bridge Commander: Core
Post by: XFSIllusion on April 06, 2008, 02:03:03 PM
Thats what i figured, i got confused when i looked at the MAINMENU.PY because it seems to call music and a simple interface...at least it seemed to in the script included in the core.
Title: Re: Bridge Commander: Core
Post by: MLeo on April 06, 2008, 02:06:28 PM
It's used to initialize the ability to do GUI.

I suppose it does need some stuff from data (like GUI related textures, such as fonts for the console).
Title: Re: Bridge Commander: Core
Post by: XFSIllusion on April 06, 2008, 03:23:45 PM
Ya that was it.  When you said this was a core foundation, you meant it ;)
Title: Re: Bridge Commander: Core
Post by: Technerd89 on April 21, 2008, 09:19:59 PM
while i know almost nothing about BC scripting, this sounds like a fascinating prospect. if i understand this correctly, this allows someone to utilize a bare BC engine, and basically build the rest of the game from the ground up. if this is true, i admit i can neither contribute nor make use of this as it is, but i think that once MLeo, as well as the rest of the scripting community, start poking it and experimenting with it more, perhaps we can start seeing more tutorials and SDKs that allow people to start building "different" games out of the BC engine

*edit: i left something out that made this not make sense, fixed*
Title: Re: Bridge Commander: Core
Post by: MLeo on April 22, 2008, 12:59:55 PM
That's basicly the idea.

If you have all the old scripts present, then you are way too tempted to re-use them, as you should actually. :P
Title: Re: Bridge Commander: Core
Post by: MLeo on October 22, 2008, 05:10:15 PM
Wow....

I got some work done for this!


I've noticed that once you get into missions, the game needs more files.
For example, it needs physical modules, so no fake "DIY" modules.
And it needs the AI.Setup module, and the TacticalInterfaceHandlers module. And I suppose several more modules are yet to be found.


I also found out that my consolelogger eats exceptions, not it's own exceptions, but the exceptions generated when the exe side can't find modules such as the AI.Setup module. It keeps them from the debug console that pops up, to make matters worse, it doesn't output them in the log file either. :(
Title: Re: Bridge Commander: Core
Post by: captain_obvious on October 22, 2008, 06:04:27 PM
Wow....

I got some work done for this!


I've noticed that once you get into missions, the game needs more files.
For example, it needs physical modules, so no fake "DIY" modules.
And it needs the AI.Setup module, and the TacticalInterfaceHandlers module. And I suppose several more modules are yet to be found.


I also found out that my consolelogger eats exceptions, not it's own exceptions, but the exceptions generated when the exe side can't find modules such as the AI.Setup module. It keeps them from the debug console that pops up, to make matters worse, it doesn't output them in the log file either. :(

surely you could whack something together to force the EXE to dump them?
Perhaps an additional line or two of code, although then it wouldn't quite* be BC core then...
Title: Re: Bridge Commander: Core
Post by: MLeo on October 22, 2008, 06:10:10 PM
Well, considering it's basicly "crashing" right now, DrWatson will have quite a few core dumps ready. :P

I've got it partially work now. I'm not entirely happy by it, but I guess it will have to do for now.


I don't think I'll do another BC:Core release, since that "runs". When you want to do missions (and I guess you would) you will have to wait for BC:Foundation.
Memo to me, ask Dasher about that name.