Jump to content
Sign in to follow this  
azrapse

Multiple Enemy Carriers

Recommended Posts

Hi.

Now that my modmixer is nearly done, I was thinking on an idea for a mod, but I don't know if it would be even possible, because I have not even started browsing the code files... So I ask you experts, because maybe you have evidence already of the impossibility of this.

My idea would be having multiple enemy factions. Currently we have the blue guys and the red guys. Would it be possible to add another faction, let's say, yellow, with another carrier that behaves exactly like the enemy one we have now, but that also attacks the red guys?

I mean, they would start with some yellow islands, move around conquering neutral, red and blue islands, and in case of meeting a rival carrier, fight it (be it realtime if it is the player's carrier, or algorithmically if it is the red carrier).

Any idea of the feasibility of this?

Thanks!

Share this post


Link to post
Share on other sites

Off the top of my head I'm going to say I believe it's not possible. There are just too many references to the single enemy carrier, and that's just in the files I've worked on.

EDIT: Looking again, maybe it is theoretically possible as there aren't all that many references to the specific APA carrier, so maybe it was designed so that it could be expanded like this. Whether the AI has been made to control multiple carriers is a whole other thing, as well as the performance impact of having even just one extra carrier.

Edited by Species1571

Share this post


Link to post
Share on other sites

The idea is good and crazy at the same time. My point of view is: I have problems when I am fighting one carrier, but if there is another fraction, I am getting crazy. Immagine those two, decide to attack me at the same time. There would be only one strategy: retreat and wait til one of them sinks the other. Then going in and finish the already damaged thing, which survived.

And there it is: the problem for the game. AI manages red and neutral side. You could teoretically change neutral into Yellow, but you cannot add another fraction in the game. You have to add another AI for the Yellow fraction. And we have seen, how difficult it is, ask the devs....

Share this post


Link to post
Share on other sites

Well, as far as I have found, the factions are actually just abstract players that the game creates when you start a strategic game. This is where it is declared

class Classic_Campaign extends CCCampaign
{	
CCPlayer PlayerNeutral;
CCPlayer PlayerUEC;
CCPlayer PlayerAPA;

And it declares also stockpiles, productions, and other stuff for each. I wonder what would happen if I create an array of several PlayerAPA players, and whenever an APA thing is referenced, I replace it with a loop iterating over all APA things.

If this is what it is, I could theoretically add as many "players" as I wished..., and even change their colors if this is what I think it is:

// Neutral player already exist - just read!
	PlayerNeutral = game.GetPlayer( 0 );

	//! DO NOT CHANGE ORDER, OR ELSE EVERYTHING WILL SCREW UP!
	PlayerUEC = game.CreateNewPlayer( "UEC" );
	PlayerUEC.SetColors( 0xff00aeff, /* 0xfff6a80e */ 0xffffffff,/* 0xff4aaafc */ 0xffffffff );

	PlayerAPA = game.CreateNewPlayer( "APA" );
	PlayerAPA.SetColors( 0xffff0000, 0xffe30107, 0xffbc0207);

	g_Game.SetControlledPlayer( PlayerUEC.GetID() /* 1 */ );

It seems to just create the two non-neutral factions and then give control of the UEC one to the user.

Of course, all of this would go to hell if there is something hardcoded in the binary code that expects 3 and only 3 factions...

Share this post


Link to post
Share on other sites

I tried changing that section before, it just assigns the colours of the map icons, radar sweep etc, not the colour of the ship or units.

Share this post


Link to post
Share on other sites

When you say the color of the "ships or units" you mean the icons on the map? Like the little triangles for mantas and bullet shapes for walruses? The color of the enemy carrier shape in the radar?

Share this post


Link to post
Share on other sites

No, it changes those, but not the physical colour of the actual ships and units. If you reverse the values, UEC units are still blue and APA are still red, even though they will show the opposite on the map.

Share this post


Link to post
Share on other sites

Well, I was kind of expecting that. The enemy units and carrier must take their colors from different texture files. In the worst case, all enemy factions units would show red APA 3D (with the little dragon symbol) objects like they do now, and your units would show the UEC colors. I think even in this worst case, it would be okay and playable. Maybe a little bit confusing when you join a combat between two opossing factions, it would look like a civil war.

In the best case, we can find where the game binds a faction with the texture files, and replace them with other modded textures. I saw a mod where one guy altered the colors of the carrier. So it's maybe is possible, unless it's harcoded.

Thanks for your answers, Species. Really helpful. :)

Share this post


Link to post
Share on other sites

Hi. I have been testing and I have successfuly added an additional enemy faction, that in the code has the codename of Ordos, but the game advisors will still refer to it as APA.

It's colors are bright green and they will have about half of the islands the enemy holds at the beginning of the strategy mode.

They have thier own carrier and production, and both Red APA and Green APA carriers will attack islands simultaneously, so it can be tricky.

I believe the victory condition of destroying the enemy carrier is broken and currently it is considered completed if you destroy any carrier, not necessarily both of them.

If you feel intrigued, please test the mod and tell me what you think about it. Thanks!

Download it here

Share this post


Link to post
Share on other sites
Hi. I have been testing and I have successfuly added an additional enemy faction, that in the code has the codename of Ordos, but the game advisors will still refer to it as APA.

It's colors are bright green and they will have about half of the islands the enemy holds at the beginning of the strategy mode.

They have thier own carrier and production, and both Red APA and Green APA carriers will attack islands simultaneously, so it can be tricky.

I believe the victory condition of destroying the enemy carrier is broken and currently it is considered completed if you destroy any carrier, not necessarily both of them.

If you feel intrigued, please test the mod and tell me what you think about it. Thanks!

Download it here

I tried it, and here a short summary: I started the mod, which the first time, as I clicked on "restart strategy game" quitted without further notice. I started ccgm again and clicked again on strategy game, there was now the button "New Game", of course I clicked on it !! I found myself with now three fractions plus a neutral field (the settings are the default ones from v1.6.011 without steam) I started to conquer the green first, the AI was responding well, enemyside as well myside. Soon I myself found to try out my combatskills, against three mantas, well, it ended good because I had help ;-). But, the autoaim routine wasn´t responding. I had to aim myself as good I could.

The firewall hacking in automatic worked fine to, all three walrusses, hacked the firewall, as instructed.

Sorry it is not much. The autoaim feature is not working in mantas or walrusses. The Island was taksaven. Good Work. I am surprised that it worked pretty good.

Share this post


Link to post
Share on other sites

Excellent work! Is it possible to modify the script to add even more factions?

If we can work out how to bind different textures per faction, I can see this being really fun - 8 carriers fighting over Fulcrum would just be great!

Share this post


Link to post
Share on other sites
I tried it, and here a short summary: I started the mod, which the first time, as I clicked on "restart strategy game" quitted without further notice. I started ccgm again and clicked again on strategy game, there was now the button "New Game", of course I clicked on it !! I found myself with now three fractions plus a neutral field (the settings are the default ones from v1.6.011 without steam) I started to conquer the green first, the AI was responding well, enemyside as well myside. Soon I myself found to try out my combatskills, against three mantas, well, it ended good because I had help ;-). But, the autoaim routine wasn´t responding. I had to aim myself as good I could.

The firewall hacking in automatic worked fine to, all three walrusses, hacked the firewall, as instructed.

Sorry it is not much. The autoaim feature is not working in mantas or walrusses. The Island was taksaven. Good Work. I am surprised that it worked pretty good.

Interesting that the autoaim thingie stopped working. Were you fighting the Red Enemy or the Green Enemy? Does it work against red but not against green?

Thanks for the testing!

Excellent work! Is it possible to modify the script to add even more factions?

If we can work out how to bind different textures per faction, I can see this being really fun - 8 carriers fighting over Fulcrum would just be great!

Yes. But I'm not sure if it will need further modding for that.

Neutral islands seem to be player 0. The human player is player 1, and the Red APA is player 2. I just added another player, the green APA, to be player 3.

I saw that in the xml files, there were graphic definitions for a Player3 that weren't used until I modded it in. I don't know why the developers added that Player3 there, it basically is a copy of player 2, so its carrier and units use the APA textures. Theoretically we can change the textures by modifying those xml files, and maybe add more players. I have been experimenting with the logo on the carrier and the color of the walruses and mantas models. They seem easy to modify.

But I foresee some problems:

  • I think the xml files aren't really parsed by the game but it is the binary database, that another modder recently managed to edit, the place where those values must be changed. I wouldn't like to have to edit that database because that would render make this mod not mergeable with any other through the mod mixer, unless I somehow modify the modmixer to be able to merge different versions of that database. Can that database be built from scratch from the xml files?
  • Unless I'm mistaken, the AI is hardcoded somewhere. Right? That means that all factions we add will be allied against the human player. Has anyone found something that proves me wrong? It would be nice if we can manage the different factions to attack eachother. Right now, this mod is just a harder version of the Strategy Game, because you have to deal with two (or more in the future) carriers taking over your islands.

Thanks for your reports and encouragement. :)

Share this post


Link to post
Share on other sites

I just went through the script and attempted to add a 4th player using your template. Wouldn't even load to the start screen so must be something I did wrong :(

Share this post


Link to post
Share on other sites
Interesting that the autoaim thingie stopped working. Were you fighting the Red Enemy or the Green Enemy? Does it work against red but not against green?

Thanks for the testing!

Thanks for your reports and encouragement. :)

Hi, I restarted the strategy game, anew. That means, New Game Button clicked, not a old savegame loaded. Settings again default. Here is the situation, Obsidian is red. Styx is green.

I visited Obsidian, I launched my manta and got autoaiming. I shot easy one manta, and than landed quickly my manta on the carrier and off to Styx (green one). Arrived there I started my manta and engaged the green forces, again, I got a welcoming party of three mantas, they shot me quickly in bad shape, but not quickly enought to test the autoaim feature. Nope no autoaiming on the green side, but yes autoaiming on the read side, in the same game.

I tried to find out where the red forces had their HQ, but on the way there I came near of one of my islands which meanwhile was under attack. I dropped out of "Quicktime" and was intercepted by the red carrier. The End.

Hope I was helpful. :-)

Share this post


Link to post
Share on other sites

Thank you, Antares. Yes, I guess it's a good hint that the autoaim works with the default enemy but not with the added one. I guess somewhere in the code there is something that is expecting the Player 2 as a target, and finds instead the player 3. I will have to find it.

Thanks again!

PS: Did you notice Greens being crazy overpowered? Or Reds?

Share this post


Link to post
Share on other sites

PS: Did you notice Greens being crazy overpowered? Or Reds?

This question is a bit vague, I think. Carrier Command was Always a bit tough when you fighting against the enemy. (both the one 1980s and 2012s ) I think, that the mantas are a bit weak from start. If you would compare the manta of 80s against the 12er, the old one would win. (standard weaponry on the 80s, LASER, this ones have just machine guns, poooh)

Both colors behaved the same way, very angry. But I started just for checking the autoaim feature. The default setting is never my first choice. I like to play with a little headstart in technology. I will test it with that.... than we´ll see. Please promise me, that you do not touch the fight parameters, I would like just see only multiple enemies, with the option to change the technology as players choice. Thanks you in advance.

---------- Post added at 00:15 ---------- Previous post was at 23:06 ----------

Alrighty, I tested it with MY settings. I had two interesting encounters. First a green carrier, it sank as soon I had it intercepted, I catched him trying to conquer one of MY islands. (only over my dead body, sonny!). Then the red carrier, tried it at MY islands, well, I intercepted him, too. I attacked him, with all mantas and walrusses like before, he tried to stay afloat but failed.

The carrier command program, showed itself a bad looser, sadly, it crashed before the endscene could come up.

http://www.flickr.com/photos/salvo682/9495592583/

Edited by Antares

Share this post


Link to post
Share on other sites
Please promise me, that you do not touch the fight parameters, I would like just see only multiple enemies, with the option to change the technology as players choice. Thanks you in advance.

I have no plans to change anything that isn't strictly related to adding more enemy carriers (and their own faction) and whatever is needed to make it happen with some quality (like, if possible, adding some UI to select the amount of enemy factions, and textures to make them look different.

As much as I love the awesome work Species has done with Deadly Islands, I prefer not stuffing too many different unrelated features together in the same mod, but instead make several different combinable mods, so that you can mix together whatever you want with the modmixer I'll release soon. I usually play with combined NoFilmGrain + DeckViews + GripMod + this one while testing, and I will keeping it that way.

Alrighty, I tested it with MY settings. I had two interesting encounters. First a green carrier, it sank as soon I had it intercepted, I catched him trying to conquer one of MY islands. (only over my dead body, sonny!). Then the red carrier, tried it at MY islands, well, I intercepted him, too. I attacked him, with all mantas and walrusses like before, he tried to stay afloat but failed.

The carrier command program, showed itself a bad looser, sadly, it crashed before the endscene could come up.

http://www.flickr.com/photos/salvo682/9495592583/

I have tried to kill Green in two different games, and in one I managed but in the second he escaped. Then Red took my Stockpile in the other end of the archipelago. I gathered myself and defeated the Red carrier, but I didn't see Green appear ever again, or atleast until I had to go to bed. I wonder if he limped back to some of his islands and is still waiting to repair (not sure if the AI carrier has to do that) because his network was quite broken by mine and Red's and I guess most of his islands aren't contributing to his economy. Since then, I have reworked how Green gets islands at the start (before, his initial network could be basically chopped in two by Red's), and now the island networks are laid out thinking on a balanced 4 player arrangement (although still randomized).

I will not try adding Player 4 (Any suggestion for color? Orange, Purple, Yellow?) until I fix all crashes. I believe your crash after your second kill is totally explainable by the unfinished state of the coding right now. If you could send my the crash.log or and error.log, it would be awesome, but I believe it's because the first carrier you kill makes the "Defeat the Enemy Carrier" objective completed. Then the second carrier attempts to make that objective completed too and it fails. I will change that objective to be completed only if you defeat ALL enemy carriers.

I have found the game more thrilling when you know that you might be fighting one enemy while the other is sneaking into your undefended production islands. But once you defeat them there is no more of that. Should I do as Species did with Deadly Islands and add some kind of carrier respawning?

This thread implies that MP is better supported by the underlying framework than I had thought.

I have my doubts. I believe coop multiplayer, where all human players are in the same carrier controlling the different vehicles, should be definitely possible. But certainly that sounds less fun than a versus mode with different players controlling different carriers.

However, the way the game seems to work, only one island map can be loaded at a time. That would make it impossible to have players in different islands doing stuff unless the devs somehow remove that limitation, maybe by reworking the networking code to allow different players at different islands load different maps, and only those players in the same island would bother to sych with eachother. Now that I verbalize those thoughts, it doesn't sound that impossible. But of course, I know nothing of the limitations of the engine.

By having a quick look at the half-finished multiplayer code present in the files, it seems like they had prepared a couple of versus multiplayer modes: "Deathmatch" and "Capture the Command Center". That sounds totally like they absolutely scrapped the strategic map for multiplayer, ironically the main attractive of Carrier Command. It would have been a really shallow multiplayer experience and I undestand now that they dropped it.

Edited by azrapse

Share this post


Link to post
Share on other sites

Hi again, if I understood you right you want my crash and error logs. Which are created automatically by the main program. Let´s begin with crash.log then:

---------------------------------------------

Log C:\Users\DELL\Documents\CarrierCommand\crash.log started at 21.07. 00:49:19

------------------------------------

DELL-PC, 21.07 2013 00:49:18

NULL pointer to instance

Class: 'MyGame'

Function: 'OnUpdate'

Stack trace:

scripts/CCGame.c:9012

Runtime mode

CLI params: mod deckviews

------------------------------------

DELL-PC, 21.07 2013 00:50:06

Unhandled exception

Program: D:\win7_giochi\Bohemia Interactive\carrier.exe

Reason: Access violation. Illegal read by 40c85a at d8

Script callstack:

Class: 'MyGame'

Function: 'OnUpdate'

Stack trace:

scripts/CCGame.c:9012

SymGetSymFromAddr:487, addr:0x0040c85a

SymGetSymFromAddr:487, addr:0x0040c85a

(Press Retry to debug the application - JIT must be enabled)

Runtime mode

CLI params: mod deckviews

---------------------------------------------

Log C:\Users\DELL\Documents\CarrierCommand\crash.log started at 09.08. 23:10:59

------------------------------------

DELL-PC, 09.08 2013 23:10:59

Unhandled exception

Program: D:\win7_giochi\Bohemia Interactive\carrier.exe

Reason: Access violation. Illegal read by 1 at 1

SymGetSymFromAddr:126, addr:0x00000001

SymGetSymFromAddr:126, addr:0x00000001

(Press Retry to debug the application - JIT must be enabled)

Runtime mode

---------------------------------------------

Log C:\Users\DELL\Documents\CarrierCommand\crash.log started at 11.08. 17:53:01

------------------------------------

DELL-PC, 11.08 2013 17:53:01

NULL pointer to instance

Class: 'Classic_Campaign'

Function: 'InitPlayersNetwork'

Stack trace:

scripts/Campaign/Classic_Campaign.h:1195

scripts/Campaign/Classic_Campaign.h:1765

Runtime mode

CLI params: mod MultipleEnemies

------------------------------------

DELL-PC, 11.08 2013 17:53:05

Unhandled exception

Program: D:\win7_giochi\Bohemia Interactive\carrier.exe

Reason: Access violation. Illegal read by 65ea33 at eb8

Script callstack:

Class: 'Classic_Campaign'

Function: 'InitPlayersNetwork'

Stack trace:

scripts/Campaign/Classic_Campaign.h:1195

scripts/Campaign/Classic_Campaign.h:1765

SymGetSymFromAddr:487, addr:0x0065ea33

SymGetSymFromAddr:487, addr:0x0065ea33

(Press Retry to debug the application - JIT must be enabled)

Runtime mode

CLI params: mod MultipleEnemies

---------------------------------------------

Log C:\Users\DELL\Documents\CarrierCommand\crash.log started at 11.08. 22:39:54

------------------------------------

DELL-PC, 11.08 2013 22:39:54

NULL pointer to instance

Class: 'Classic_Campaign'

Function: 'InitPlayersNetwork'

Stack trace:

scripts/Campaign/Classic_Campaign.h:1195

scripts/Campaign/Classic_Campaign.h:1765

Runtime mode

CLI params: mod MultipleEnemies

------------------------------------

DELL-PC, 11.08 2013 22:39:58

Unhandled exception

Program: D:\win7_giochi\Bohemia Interactive\carrier.exe

Reason: Access violation. Illegal read by 65ea33 at eb8

Script callstack:

Class: 'Classic_Campaign'

Function: 'InitPlayersNetwork'

Stack trace:

scripts/Campaign/Classic_Campaign.h:1195

scripts/Campaign/Classic_Campaign.h:1765

SymGetSymFromAddr:487, addr:0x0065ea33

SymGetSymFromAddr:487, addr:0x0065ea33

(Press Retry to debug the application - JIT must be enabled)

Runtime mode

CLI params: mod MultipleEnemies

---------------------------------------------

Log C:\Users\DELL\Documents\CarrierCommand\crash.log started at 12.08. 23:01:32

------------------------------------

DELL-PC, 12.08 2013 23:01:32

Unhandled exception

Program: D:\win7_giochi\Bohemia Interactive\carrier.exe

Reason: Access violation. Illegal read by 589898 at 175717c

SymGetSymFromAddr:487, addr:0x00589898

SymGetSymFromAddr:487, addr:0x00589898

(Press Retry to debug the application - JIT must be enabled)

Runtime mode

CLI params: mod MultipleEnemies

------------------------------------------------------------------------------------/* end of file */----------------------------------------------------------

and now the error.log

---------------------------------------------

Log C:\Users\DELL\Documents\CarrierCommand\error.log started at 13.08. 12:20:08

Loading config '$profile:ccsettings.xml'

/* end of file */

Share this post


Link to post
Share on other sites

this looks very promising i will be certainly watching this thread closely :)

Share this post


Link to post
Share on other sites
Hi again, if I understood you right you want my crash and error logs. Which are created automatically by the main program. Let´s begin with crash.log then:

Thanks a lot.

I see most of the crashes you have had with MultipleEnemies are related to a bug I already solved, regarding Green not being able to create his starting island network. I will upload the revised version in a couple of hours.

Meanwhile, I will keep on trying to make the autoaim work with Green targets.

Share this post


Link to post
Share on other sites

This is a new update to the mod. It's not yet ready for "official" release because I have not managed yet to find out why the autoaim isn't working with player 3.

However I have fixed these problems:

- "Destroy Enemy Carrier" objective will now only complete when all enemy carriers have been destroyed (hopefully preventing the crash happening when the animation of the second carrier sinking is about to happen. I have not been able to check if it fixes it, can anyone please try?).

- Green enemy will have a proper island network at the beginning, not isolated islands here and there, (preventing one crash that was happening when UEC player was starting with lower amount of islands than the enemy).

DOWNLOAD HERE

Edited by azrapse

Share this post


Link to post
Share on other sites
I have my doubts. I believe coop multiplayer, where all human players are in the same carrier controlling the different vehicles, should be definitely possible. But certainly that sounds less fun than a versus mode with different players controlling different carriers.

However, the way the game seems to work, only one island map can be loaded at a time. That would make it impossible to have players in different islands doing stuff unless the devs somehow remove that limitation, maybe by reworking the networking code to allow different players at different islands load different maps, and only those players in the same island would bother to sych with eachother. Now that I verbalize those thoughts, it doesn't sound that impossible. But of course, I know nothing of the limitations of the engine.

By having a quick look at the half-finished multiplayer code present in the files, it seems like they had prepared a couple of versus multiplayer modes: "Deathmatch" and "Capture the Command Center". That sounds totally like they absolutely scrapped the strategic map for multiplayer, ironically the main attractive of Carrier Command. It would have been a really shallow multiplayer experience and I undestand now that they dropped it.

Yeah, I had noticed that as long as you did not approach another island close enough to see its vehicles, the last one that you had visited was in pretty much the same state. (I mean, how long can a recon drone hover on a basic load of fuel?)

In one game that I had played, two islands were close enough that I could fly my recon drone from one island to the other. Which, of course, I did. When the drone reached the location on the strategic map where the other island was supposed to be, there was nothing but sea. I honestly don't remember what happened when my carrier showed up, but...

1. It didn't leave me with an working recon drone.

2. I decided to never bother doing that again.

So, I won't claim that anything bad happened, but it certainly wasn't worth the effort.

Share this post


Link to post
Share on other sites

I'm pretty sure that only one island gets loaded at a time was to get it to fit on an xbox 360 :(

It absolutely sank without trace on that platform, maybe the devs have a PC codebase from an earlier build that would allow full-archipelago interaction suitable for multiplayer that we could use.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×