Author Topic: CMP vehicles into non-CMP maps?  (Read 190 times)

Offline VolkssturmGewehr

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
CMP vehicles into non-CMP maps?
« on: 21-11-2017, 14:11:04 »
I'm trying to figure out a way to implement some of the CMP aircraft onto my own custom map loadouts. Namely the ME262 which I transferred the vehicle files over to the FH2 client/server vehicle archives, it does spawn in-game on my custom Seelow map however I get a CTD upon entry. Obviously I'm missing something. Has anyone ever done this?

Offline GeoPat

  • Jr. Member
  • **
  • Posts: 422
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #1 on: 21-11-2017, 18:11:55 »
No need to transfer it into the mod.  Just copy the ClientArchives.con and ServerArchives.con from inside the server zip of any cmp map.  Put them in the server zip of your map.  That way your map runs the CMP minimod.

Offline VolkssturmGewehr

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #2 on: 21-11-2017, 22:11:04 »
Thanks for the reply. I thought that this would work but simply get a CTD at 3%. I tried just putting in the vehicles, weapons, common, menu, archive lines into client/serverarchives.con which allowed the map to load but still CTD upon entry of a CMP vehicle. The CMP vehicles work fine on CMP maps so surely they must work on others, I'm still overlooking something. There are a lot of really great CMP aircraft I'd love to implement.
« Last Edit: 21-11-2017, 23:11:17 by VolkssturmGewehr »

Offline GeoPat

  • Jr. Member
  • **
  • Posts: 422
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #3 on: 22-11-2017, 03:11:39 »
You are doing it wrong.

Offline VolkssturmGewehr

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #4 on: 22-11-2017, 03:11:48 »
Yes, I mean I know it's possible. All the same engine right.
 
The procedure with the client/serverarchives.con is extremely simple being it simply determines where the resources are located. Swapping the two .con files results in CTD at 3%. Swapping only certain lines causes CTD upon ME262 entry.   
 
The simplicity makes it difficult to nail down the problem. If it was something more complicated then I could sort thru and find issues easier.
 
Edit: I see, it works fine with the MP Seelow but not seelow_coop (I'm aware this is a mod too) which sortof defeats the purpose. I'll have to figure out why that is. I'm sure the ME262 isn't coded for the AI to fly, but I could use it against the AI.
« Last Edit: 22-11-2017, 04:11:26 by VolkssturmGewehr »

Offline GeoPat

  • Jr. Member
  • **
  • Posts: 422
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #5 on: 22-11-2017, 05:11:09 »
You didn't say it was coop.
I think it has to be coded to interact with AI, otherwise the bots would notice it, etc.  That must be why you are getting the crash when you enter.
Maybe it is easy to code a plane.  Are there planes in coop?  I never play it.
I don't think you will ever get a ship to work.

~edit  I don't have the coop Seelow since that is custom.
I'm looking at the GPO of Hurtgen coop and I notice that they activesafe the vehicles at the top of it like:
ObjectTemplate.activeSafe PlayerControlObject m4a3
ObjectTemplate.dontClearTeamOnExit 1
Maybe you forgot to do that step.
As for the client and server archives.  I just added the two lines about noise and texture to the cmp client archives and then added/replaced the cmp archive into the server zip.  That should work unless the custom coop guy changed them.
« Last Edit: 22-11-2017, 05:11:20 by GeoPat »

Offline VolkssturmGewehr

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #6 on: 22-11-2017, 05:11:49 »
Must be from not being AI coded as it works fine in MP Conquest but crashes at 3 or 4% for Coop no matter what map. I figured bots just wouldn't use it. I don't have any experience coding AI yet, but for example the BMW R75 motorcycle doesn't have an AI folder however bots drive it just fine. The driveable fuel truck doesn't either. The bots just don't use it, but it doesn't CTD.
 
Coop has all the planes included with FH2, and the bots are deadly accurate with them. 
 
I was placing the client/serverarchives.con files correctly. Pasting lines under the existing lines.
 
Unfortunately I have no big MP backing community to create custom maps that aren't Coop. 
 
Edit: Even though I was certain it wouldn't work I created an ai folder & objects.con file basically copy/pasted the fw190 & changed everything inside of it to me262. It of course didn't work, which I knew it wouldn't be so easy.
 
Edit: The CMP He111 is coded for AI, still the same CTD at 4% so likely the problem exists elsewhere. Also unless I'm overlooking something the Civ vehicles don't have ai files either yet they don't CTD.
« Last Edit: 22-11-2017, 06:11:46 by VolkssturmGewehr »

Offline GeoPat

  • Jr. Member
  • **
  • Posts: 422
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #7 on: 22-11-2017, 17:11:40 »
I tried to put the me262 on coop Totalize just to see if you were missing some simple step.  I put it in both the GPO and the assemble xml.
I got this error when trying to enter it:
"Text: you tried to enter a vehicle that is not prepared for use with AI: me262"

You should run in "windowed mode" if you are going to mess around with this game.  You will get helpful error messages.

Offline VolkssturmGewehr

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #8 on: 22-11-2017, 19:11:37 »
I'll try the running in windowed mode thing to see if I get any helpful error messages. 
 
However I don't even get the chance to enter the vehicle as it CTD at 3 or 4% upon loading UNLESS I leave out several CMP archives. The Swordfish is AI coded, same thing. The clivewil_He111 is also fully AI coded, same CTD 4%.
 
The only way I could get a Coop map to load so I can even attempt to enter the Me262 or He111 is if I do not include all of the CMP archive lines in Client/ServerArchives.con. 
   
Like this for ClientArchives.con:
Code: [Select]
fileManager.mountArchive levels/cmp_minimod/cmp_objects_vehicles_client.zip Objects
fileManager.mountArchive levels/cmp_minimod/cmp_objects_vehicles_client_textures.zip Objects
fileManager.mountArchive levels/cmp_minimod/cmp_objects_weapons_client.zip Objects
fileManager.mountArchive levels/cmp_minimod/cmp_objects_weapons_client_textures.zip Objects
 
And this for ServerArchives.con:
Code: [Select]
fileManager.mountArchive levels/cmp_minimod/cmp_objects_vehicles_server.zip Objects
fileManager.mountArchive levels/cmp_minimod/cmp_objects_server.zip Objects
fileManager.mountArchive levels/cmp_minimod/cmp_objects_weapons_server.zip Objects

As you can see there are several lines missing from each one. Only then could I get the map to load 100% and get CTD upon entering the CMP vehicle. If I include all of the CMP archive lines from the two CMP map Client/ServerArchives.con files then I get CTD at 4% on any Coop map.
 

Now take for example the Italian MC200, it does not have its own dedicated objects.ai as it is coded for the FW190 AI file as seen in mc200.tweak
Code: [Select]
ObjectTemplate.aiTemplate fw190AI 
 
 
The me262.tweak file has lines for AI. I did not create these:
Code: [Select]
ObjectTemplate.aiTemplate me262AI
ObjectTemplate.aiTemplate me262_CannonsAI
 
 
So I created an ai folder + objects.ai: vehicles\air\de\me262\ai\objects.ai :
Code: [Select]
rem *** Plugins ***
aiTemplatePlugIn.create Unit me262Unit
aiTemplatePlugIn.equipmentTypeName Plane
aiTemplatePlugIn.setStrategicStrength 0 8
aiTemplatePlugIn.setStrategicStrength 1 8
aiTemplatePlugIn.cullDistance 1000

aiTemplatePlugIn.create Armament me262Arms
aiTemplatePlugIn.setIsAntiAircraft 1

aiTemplatePlugIn.create Physical me262Physical
aiTemplatePlugIn.setStrType AirPlane

aiTemplatePlugIn.create ControlInfo me262Ctrl
aiTemplatePlugIn.driveTurnControl     PIYaw
aiTemplatePlugIn.driveThrottleControl PIThrottle
aiTemplatePlugIn.aimHorizontalControl PIYaw
aiTemplatePlugIn.aimVerticalControl   PIPitch
aiTemplatePlugIn.driveRollControl     PIRoll
aiTemplatePlugIn.drivePitchControl    PIPitch
aiTemplatePlugIn.aimRollControl       PIRoll
aiTemplatePlugIn.aimThrottleControl   PIThrottle
aiTemplatePlugIn.throttleSensitivity -3.0
aiTemplatePlugIn.pitchSensitivity    -0.5
rem aiTemplatePlugIn.rollSensitivity     -1.3
aiTemplatePlugIn.rollSensitivity     -1.0
aiTemplatePlugIn.yawSensitivity       0.3
aiTemplatePlugIn.throttleLookAhead    1.0
aiTemplatePlugIn.pitchLookAhead       1.2
aiTemplatePlugIn.rollLookAhead        1.5
aiTemplatePlugIn.yawLookAhead         0.3
aiTemplatePlugIn.throttleScale        1.0
rem *** Angle in radians ***
aiTemplatePlugIn.pitchScale           0.0010
aiTemplatePlugIn.rollScale            0.0001
aiTemplatePlugIn.yawScale             0.0175
aiTemplatePlugIn.maxRollAngle         0.6667
aiTemplatePlugIn.maxClimbAngle        1.0472

aiTemplatePlugIn.create Mobile me262Mobile
aiTemplatePlugIn.vehicleNumber -1
aiTemplatePlugIn.maxSpeed 80.0
aiTemplatePlugIn.turnRadius 20.0
aiTemplatePlugIn.setSoundSphereRadius 0.0 500.0
aiTemplatePlugIn.setHearingProbability 0.01 0.3

rem *** AITemplate ***
aiTemplate.create me262AI
aiTemplate.addType ITUnit
aiTemplate.addType ITMobile
aiTemplate.addType ITHasWreck
aiTemplate.addType ITAir
aiTemplate.degeneration 5
aiTemplate.allowedTimeDiff 0.5
aiTemplate.basicTemp 500
aiTemplate.commonKnowledge 0
aiTemplate.addPlugIn me262Unit
aiTemplate.addPlugIn me262Arms
aiTemplate.addPlugIn me262Physical
aiTemplate.addPlugIn me262Ctrl
aiTemplate.addPlugIn me262Mobile

 
The objects.ai I created for the me262 is based upon the FW190 .ai file with a couple small tweaks, which I intended on fine tuning once I actually got it working. It did not work, CTD 4%. Then I tried editing the me262.tweak AI lines to use the FW190AI instead of my own. That did not work either, CTD 4%. I'll try to see if I can't get some sort of error message to get give me a clue, but I'm really stumped at this point. Doesn't explain the 4% CTD with the clivewil_He111 which is coded for AI.
 
Obviously I'm not a master software dev, but I'd like to think I'm not completely stupid either...

Offline VolkssturmGewehr

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #9 on: 22-11-2017, 20:11:53 »
Ok. The 4% crash error. Now what I did in this instance is I copied/pasted all of the lines from the CMP Client/ServerArchives.con files over to the seelow_coop (map doesn't matter as long as it's coop) however I did not place any CMP related objects into the map. Appears to be some sort of conflicting file. Trying to investigate this now. 
 

Offline VolkssturmGewehr

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #10 on: 22-11-2017, 21:11:35 »
Oh yes. Success. I removed the cmp_objects_statics archive lines from the seelow_coop Client/ServerArchives.con & the map loaded. Not using any CMP statics. There are files in the other CMP archives the me262 requires. After that I placed the me262 w/editor, loaded up coop/no bots, tested it myself, worked perfect. Then I loaded 35 bots, and watched a bot go flying off in the Me-262.
 
I believe I will have to do some tweaks to my new me262 objects.ai file for realism, so the bots can take advantage of the performance. Using the FW190AI as my base I did slightly increase maxClimbAngle & maxSpeed while decreasing turnRadius. I'm not 100% sure what all values to adjust for maximum realism so the bots can take advantage of the upper-hand the Me-262 gives them. I've been examining all the other objects.ai files for reference, such as the P-51D since it's the most high-performance coded for AI. The actual me262.con/tweak I'm leaving alone.
 
I only just discovered all the airplanes in CMP, there are some great ones I hope to incorporate into my own Coop map loadouts. Such as the Bf110, He111, He219, Ho229, P38J, B17, Zero(Once I figure out how to Navmesh & create a US/JP map). I chose the Me-262 because it only has one cannon (simplicity), to see if I could do it, and because I like it. If only FH2 had the Me-163 Komet, one of my favorite planes. Someday I'll figure out how to port it from FH1.

Do I get credit for making the Me-262 have AI support? A first for me :)

(Sorry for making a new post, wouldn't let me attach the screenshot.)


Offline VolkssturmGewehr

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #11 on: 24-11-2017, 05:11:55 »
I will say it certainly is fun shooting up AI with the Me-262 however when the bots fly it themselves they don't do much but fly around. It only has a 30mm cannon of course, which I coded for AI too, but I've yet to see a bot make a ground strafing run with the 30mm or dogfight. In fact I don't recall ever seeing any planes do strafing runs with MG's or cannons. And I've seen the bots dogfight in other planes too, but no ground attacks. Is this possible? 
 
Now I just finished coding the Bf-110 w/500lb bombs for AI and the bots bomb the f*ck out of the enemy with that, thus I'm fairly certain I am doing the coding correctly. Not 100% certain on the rear gunner yet however.

Offline GeoPat

  • Jr. Member
  • **
  • Posts: 422
    • View Profile
Re: CMP vehicles into non-CMP maps?
« Reply #12 on: 24-11-2017, 17:11:30 »
Try changing the Me262 to 20mm.  I know we had problems with that 30mm in the past.