Joined: 08 Feb 2009 Location: The United States of America
Posted: Wed Jul 29, 2009 9:07 am Post subject:
Open a map ingame from external app, return result, close.
Subject description: Any possible way? (Ares, maybe?)
(2 quick notes: 1.) Most of this stuff is outside of the actual YR engine. I'm not trying to add Global Conquest to YR, but use YR as a "battle engine", so to speak. 2.) I use TFD) I'm planning on making a mod for YR in the vein of KW's Global Conquest mode. I could do a reasonable job with the GC part, but I can't program an RTS to save my life. Otherwise I'd probably be rich by now. ;P I wanted to know if there was a way to hack YR so that it'd start a singleplayer map that I specified via commandline ("gamemp.exe -spmap alliedgermany.map"), then when you won/lost, it saved the result to a plain text file (it's pretty much on the honesty system that you don't just write "Victory" in the file if you lost and then click Status Report in the GC part), then exit out of YR. I've been hearing about Ares and DLL linking and stuff, and saw that they have a SourceForge page (IIRC, maybe was just Subversion, maybe was just dreaming @_@). Would Ares allow new command line parameters, writing to a file based on winning or losing, and exiting the game after victory/fail? The cmdline thing is the thing I'm most worried about, since that might be in the part before the DLL is initialized. I remember that if you used GameSpy Arcade to go into a multiplayer battle in TS, the game started up and wet straight to the battle (well, there were loading screens, of course). Note that I also want to disable the multiplayer and skirmish (and probably singleplayer) options in the menu. Is this doable? Also, has anyone ever heard of something like this? QUICK_EDIT
Hmm, difficult but i think i found way which might work for you already now, without waiting for Ares.
1. You can quite simple edit the menu (at least in TS which i'm more familiar). That's why it shouldn't be a problem to remove certain buttons.
2. With an edited menu and also an edited battle.ini you could make a quite simple new campaign which consists of only one mission. This mission, defined in battle.ini, should be easy to change as you only have to open the ini with a simple text editor (which also every simple C, C++ program can do)
With that done you could start the game which offers only one mission in the campaign and that mission could be changed externally in battle.ini by your program.
3. The hardest part is the output of the Match Results. Right now i could only imagine to use the Highscore list (does RA2 even has one ) and find the place where RA2 saves it. Then it should be easy to read this file and check the last highscore. You could even delete the highscore list on every start, so there is only the one entry from the mission you've just played. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Joined: 08 Feb 2009 Location: The United States of America
Posted: Thu Jul 30, 2009 2:21 am Post subject:
CCHyper wrote:
Yeah, that's quite an in depth thing.
I would suggest learning C++ and using Ares to code your own "game mode" basically as you say. But I doubt anyone would code such a thing...
The only thing I'd need to program in Ares would be the "go straight to SP mission" thing (which could easily be skipped if I got the menu to only display the allied campaign thing and the options, though it's a lot more professional) and the "write 'Mission Accomplished' or 'Your Mission is a Failure' when you win/lose the mission, then exit game" thing. As I said, the GC stuff is all external. Let me put it this way:
There's my project. It has two parts, the Global Conquest part, written by me, and the YR part, written in C++ by WW and modified by Ares.
I have the perfect object-oriented programming language for the GC part (perfect for me, anyway). It can display statistics, text, webpages, and graphics with great ease. The only downside is that it doesn't work natively on Linux. But 1.) it works with WINE, and 2.) I don't know of any Command and Conquer game for Linux. ;P (It doesn't work with Mac, though, unless Mac now works with Windows apps, which I heard it does. My memory might be screwed up, though. Anyway, is there a version of YR for Mac?)
I'm thinking of converting some units from static ini entries to dynamic entries, as in instead of writing a section of text directly to the file, it generates text based off stats and writes that to file.
If anyone would volunteer to help write the Ares "write result to file and exit game" thing. I also realize now that it could simply start the game in the allied campaign instead of starting a specific mission, if there's any way to do that.
Meanwhile, I'm still writing the rules(md).ini generator. It committed suicide when I tried passing it all the building entries (about 400 entries), so I removed all civilian buildings besides the sandbags. I'm planning on adding some of them back in at some point, as I think it's simply that it can't handle a single string that large. In fact, I just thought of a workaround (amending the buildings, listed in another file, to rules(md).ini before continuing generation), which I'll implement after a while.
So while I'm working on the base, I want suggestions on how to do stuff. What did you like about GC, and what did you dislike? Are there any interesting additions you'd like? I'm thinking of having random plot events, like defending America from Soviets or England from Ants. Yes. I'm also going to include a cutscene for the Ants thing.
I also want to give a variety of maps for battle. IIRC, KW's GC only had 2 or 3 maps. My maps system would be based on where the battle was taking place. Each map would have preplaced objects representing the Base, War Factory, Power Plants, etc. and any possible infantry. The Power Plants, for example, would point to [InitialAlliedPowerPlant1] through [InitialAlliedPowerPlant10], and the game, when it was generating the rules(md).ini file, would either put the info for the powerplant under those sections or put strength=0 under them, depending on how many powerplants a base had. Naval battles (as in, NO land) might be possible, or I may do the teleporting ships thing and disallow you from building ship taskforces. I'll probably allow you to create a Hero unit, who defaults to Tanya. I'd have to balance them, though.
So, anyone want to help with the Ares stuff or give ideas? QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum