Hind gunner crash!
Posted 22 March 2006 - 09:52 AM
What should I do?
PS: Is there any word on how to get the Euroforces vehicles into regular BF2 maps?
Posted 22 March 2006 - 01:59 PM
Btw, its no problem to use another similar (already defined) AI Template, if the basic function is the same. So you could use the AITemplate for the AHE gunner for the Hind, too without coding a new one.
Posted 23 March 2006 - 01:27 AM
Posted 23 March 2006 - 02:35 AM
rem ---EndComp --- ObjectTemplate.geometry xpak_hind ObjectTemplate.setCollisionMesh xpak_hind ObjectTemplate.mapMaterial 0 armor_body 31 ObjectTemplate.mapMaterial 1 armor_light 27 ObjectTemplate.mapMaterial 2 glass1 1006 ObjectTemplate.mapMaterial 3 wreck_col 60 ObjectTemplate.mapMaterial 4 cockpit 102 ObjectTemplate.mapMaterial 5 hind_envmap 22 ObjectTemplate.drag 2 ObjectTemplate.mass 10000 ObjectTemplate.floaterMod 0.8 ObjectTemplate.hasMobilePhysics 1 ObjectTemplate.hasCollisionPhysics 1 ObjectTemplate.physicsType Mesh ObjectTemplate.aiTemplate Ahe_Ah1z
rem ---EndComp --- ObjectTemplate.floaterMod 0 ObjectTemplate.hasMobilePhysics 1 ObjectTemplate.hasCollisionPhysics 1 ObjectTemplate.physicsType Mesh ObjectTemplate.aiTemplate AHE_AH1Z_Gun
rem ---EndComp --- ObjectTemplate.floaterMod 0 ObjectTemplate.hasMobilePhysics 1 ObjectTemplate.hasCollisionPhysics 1 ObjectTemplate.physicsType Mesh ObjectTemplate.aiTemplate AHE_AH1Z_Rockets
Those are the only references. What do I do next?
Posted 23 March 2006 - 08:02 AM
In contrary to most other properties , AI related files and names are CaSe SenSitIve. Extract the AI folder from the AHE and see what templates they provide. Re-use them on the Hind...
Start up a SP game with very few bots and enter the Hind. Switch through the PCO's. If you encounter the message 'You have entered a vehicle which is not prepared for AI' , you found the PCO lacking the AITemplate.
Posted 23 March 2006 - 09:06 AM
1) I don't mean to challenge your authority mschoeldgen, but I think the AHE refers to the Cobra from BF2, because the game refers to the Apache as xpak_apache.
2) I found it odd that the Hind had only 3 aitemplate entries, whereas the Apache had 4, so I added an extra to the Hind. Its .tweak file now looks like this
rem ---BeginComp:HelpHud ---
rem ---EndComp ---
The red line was previously missing. Should this line stay?
3) I'm not sure how to work with PCOs. All I know about them is that it stands for Play Controlled Object, how do I edit these, and what do they look like inside a file? Note: I'm not using the editor, I just edit the .tweak files for the vehicles using Notepad, is this sufficient?
4) I would just copy the AI folder over mschoeldgen, but the Hind nor the Apache have one...so should I just copy the AI folder in anyways, despite the fact that the entire thing references the Cobra?
5) What do you mean "switch between the PCOs?" The moment I hit F2 to go to the gunner's seat, the game crashes with a "You have tried to enter a vehicle that is not prepared for use with AI: xpak_hind_gunner" error. Everywhere I look however, there is no such folder in the vehicles folder, just an "xpak_hind" folder, with no mention of the gunner component.
Posted 23 March 2006 - 09:20 AM
Found a solution to your problem on BFSP:
It deals with your exact problem. They have a typo in one of the Gunners and the rocket is missing an AITemplate.
Edit: Ahh, i saw you were the last one to post over there.
Yes, by switching PCO's , i meant pressing F1,F2 and so forth to occupy the different positions in the heli. Obviously the F2 position (Copilot) didn't have a valid AITemplate. You can either add the (red) line you mentioned above or simply create a new Objects.ai file for the hind by copying the relevant parts from a heli that works. The Weapons.ai file carries the AITemplate for weapons, if necessary, create your own to, it isn't hard.
Posted 23 March 2006 - 09:55 AM
I kept the line that I put in red, and I copied the entire AI folder from the Cobra into the xpak_hind folder, and the game still crashes when I get into the gunner's seat.
Any ideas? When you said "relevant parts from a heli that works," should I have been more descriminating? I just copied both the weapons.ai and objects.ai files in their entirety, is there some part in there that is Cobra-specific that I should be deleting?
Posted 23 March 2006 - 11:34 PM
The AHE_10Z seems to have some usable ones, too. Fire up your winrar and look for a good Template inside the 'Objects_Server.zip' of vanilla BF2 and type that into the Hind. I guess you know more about the heli characteristics than me (gee, we're a WW2 mod) Remember case-sensitivity of AI files . GL
Posted 24 March 2006 - 05:10 AM
Does the Hind NOT crash the game for anyone out there? If so, please post your code! Thanks!
Posted 24 March 2006 - 07:00 AM
I didn't tweak this one, but simply borrowed the code for it.
The length of the code prohibits it from being posted.
Posted 24 March 2006 - 07:30 AM
You're then able to run the bf2_r.exe without fatal crashes due to shader errors.
The debugger creates a detailed log file in <YOURMOD>/logs. Run the game, invoke the crash. Examine the logfile. What's it saying ?
Posted 28 September 2006 - 08:39 PM
rem ---EndComp ---
The line in red is what I added to the xpak_hind.tweak file located in Objects_server.zip