OleGreyGhost Posted November 7, 2008 Share Posted November 7, 2008 Hi all, Hope someone can figure out why the vehicle code causes the game to CTD. Here is a copy of the mission.xml. <?xml version="1.0" encoding="ISO-8859-1"?> <mission_script> <xi:include href = "/data/levels/common/common.xml#xpointer(/common/*)"/> <xi:include href = "/data/levels/common/coop_ranks_ogr_quarry.xml"/> <xi:include href = "/data/levels/common/coop_rules.xml"/> <!--Set up for the game ==================--> <event name = "start_mission"> <!--Environment variables wind, smoke etc--> <element type = "SetWindEnable" value = "true" start_time = "2"/> <element type = "SetWindDirection" degrees = "90" variation = "30" time = "5" start_time = "4"/> <element type = "SetWindTilt" degrees = "-5" variation = "15" time = "8" start_time = "6"/> <element type = "SetWindSpeed" unit = "beaufort" speed = "2" variation = "2" time = "7" start_time = "3"/> <element type = "SetSpawnLocation" location = "coop_spawn" side = "1" set = "true"/> <!--Start the first trigget location, activate vehicle, a trigger for group01 dying and for the objectives complete/end of game trigger--> <element type="StartTrigger" name="t_loc_trig01" start_time = "1"/> <element type="StartTrigger" name="t_patrol01_dead" start_time = "2"/> <element type="StartTrigger" name="t_objectives_complete" start_time = "10"/> <element type="ActivateVehicle" vehicle_id="panhard01"start_time="0.5"/> <element type="OrderCar" vehicle_id="panhard01" order="move" position="9048 -7820 362" speed=".6" start_time="1"/> <element type="StartTrigger" name="t_panhard01_unload" preserved="false"/> <trigger name="t_panhard01_unload" interval="2.0" preserved="false"> <condition type="UnitInLocation" location="loc_panhard01_unload" vehicle_id="panhard01" equal="1"/> <event name="e_dropoff01"/> </trigger> <event name="e_dropoff01"> <element type="ExitPassengers" vehicle_id="panhard01"/> </event> </event> <!--Location 01 ============--> <trigger name="t_loc_trig01" interval="2" preserved="false"> <condition type="UnitInLocation" location="loc_trig01" player_type="team_a" greater_than="0"/> <event name="e_loc_trig01"/> </trigger> <event name="e_loc_trig01"> <element type="StopTrigger" name="t_loc_trig01"/> <!--Activate the enemy soldiers--> <element type="ActivateGroup" group_id="patrol01"/> <element type="ActivateGroup" group_id="sniper01"/> <!--Actvate trigger location messages--> <element type="ShowMessage" msg="Watch out for enemy patrols." kind="splash" start_time="0"/> <element type="StartTrigger" name="t_loc_trig02" start_time="4"/> </event> <!--Location 02 ============--> <trigger name="t_loc_trig02" interval="2" preserved="false"> <condition type="UnitInLocation" location="loc_trig02" player_type="team_a" greater_than="0"/> <event name="e_loc_trig02"/> </trigger> <event name="e_loc_trig02"> <element type="StopTrigger" name="t_loc_trig02"/> <element type="ShowMessage" msg="Enemy patrols ahead..!!!" kind="splash" start_time="0" /> </event> <!--patrol01 all dead ========================--> <trigger name="t_patrol01_dead" interval="2" preserved="false"> <condition type="SoldiersKilled" group_id="patrol01" amount="all"/> <event name="e_patrol01_dead"/> </trigger> <event name="e_patrol01_dead"> <element type="ShowMessage" msg="You killed group01 - now extract!" kind="splash" start_time="0"/> <element type="StopTrigger" name="t_patrol01_dead"/> </event> <!--Extraction/End of Game ========================--> <!--Check to see if players are all in extract location and if so, call e_win to complete the game--> <trigger name="t_objectives_complete" interval="1" preserved="false"> <condition type="UnitInLocation" location="loc_extraction" player_type="team_a" amount="all"/> <event name="e_win"/> </trigger> <!--Complete the game--> <event name="e_win"> <element type="ShowMessage" msg="Well done ghosts - You won!" kind="splash" start_time="0"/> <element type="EndRound" winner_side="1" reason="Well done ghosts - Let's go home!" start_time="2"/> </event> <gametype_info name="enemies_to_kill" value="1"/> </mission_script> And this is the error I am receiving from the crash log. Crash in application version: 30621.2989 data\lib\managers\worldmanager.dsf(-1): No logic named t_panhard01_unload SCRIPT STACK: data\lib\managers\worldmanager.dsf(0) data\lib\managers\eventmanager.dsf(0) data\lib\managers\eventmanager.dsf(0) data\lib\managers\eventmanager.dsf(0) data\lib\managers\eventmanager.dsf(0) data\lib\managers\eventmanager.dsf(0) data\lib\managers\eventmanager.dsf(0) data\lib\managers\worldmanager.dsf(0) data\lib\script_network\gametype\gametype.dsf(0) data\lib\script_network\gametype\gametype.dsf(0) data\lib\script_network\gametype\gametypecustom.dsf(0) data\lib\script_network\gametype\gametypecustom.dsf(0) data\lib\script_network\networkmanager.dsf(0) data\lib\script_network\networkmanager.dsf(0) data\lib\setups\setup.dsf(0) data\level\level.dsf(0) Renderer: normal Physics : threaded Where the crash log refers to "t_panhard01_unload" in the start trigger that name is referenced in the trigger section. From what I can see there aren't any typos. So this immediately puts the code over my head. Not hard, as this is my first foray into XML. Up to this point I didn't have any problems following the wiki instructions. Everything functioned well. Other than typos or forgetting to close a tag now and then, my typing skills are atrocious, the wiki is a piece of cake. It brings together Wolfsongs' excellent tutes in any easy visual hands on manner. Kudos to Davros. Any help will be greatly appreciated. Sincerely OleGreyGhost Quote Link to comment Share on other sites More sharing options...
davros Posted November 7, 2008 Share Posted November 7, 2008 Congrats on starting a mission outstanding you have gotten this far. Are you using XML Marker to do you editing? If not, and I suspect not, get it now (http://symbolclick.com/). It's free and will highlight and tag errors and makes it soooo much easier to avoid and correct code errors like this one. It's also very simple and easy to use. A must have for all moders. Now, to the error. The issue is that you have not closed off your initial <event name = "start_mission"> tag. --------------------------------------------------------------------------------------------- . . . <element type="OrderCar" vehicle_id="panhard01" order="move" position="9048 -7820 362" speed=".6" start_time="1"/> <element type="StartTrigger" name="t_panhard01_unload" preserved="false"/> </event> <-----This is where the below closing tag should be. <trigger name="t_panhard01_unload" interval="2.0" preserved="false"> <condition type="UnitInLocation" location="loc_panhard01_unload" vehicle_id="panhard01" equal="1"/> <event name="e_dropoff01"/> </trigger> <event name="e_dropoff01"> <element type="ExitPassengers" vehicle_id="panhard01"/> </event> </event> <----- This sould be up there before the start of the trigger tag. You need to close a tage before opening another. --------------------------------------------------------------------------------------------- Hope that makes sense? If not pls. post and I'll try and explain it a diff. way. Dav. Quote Link to comment Share on other sites More sharing options...
OleGreyGhost Posted November 7, 2008 Author Share Posted November 7, 2008 (edited) Davros, Thanks for the quick reply. I use Notepad++ to type in the code , has a magnifier, and XML Marker to check for errors. XML marker does not reveal any errors with the code in the previous post. I believe the Start Mission has the proper closing tag. I did notice an anomaly where { interval="2.0" } was typed in. Other entries had the { interval="2" }. Changed it to that and still received the CTD. After posting I noticed the trigger had as the last attribute { preserved="false" }. Shouldn't there be an attribute for a { start_time="value" }. That is the only other thing I can think of with my limited knowledge of XML. Cheers. OleGreyGhost P.S. Like the new format to the Wiki frontpage. A positive step forward. OGG Davros, I apologize. I see what you mean about the event closing tag. In other words all triggers must be outside the start mission event. Only the start triggers should be inside the start mission event. OGG Edited November 7, 2008 by OleGreyGhost Quote Link to comment Share on other sites More sharing options...
davros Posted November 7, 2008 Share Posted November 7, 2008 Davros, Thanks for the quick reply. I use Notepad++ to type in the code , has a magnifier, and XML Marker to check for errors. XML marker does not reveal any errors with the code in the previous post. Ah, cool...yep, just checked it myself...and it does not show the error...it should. I believe the start Mission has the proper closing tag. Sorry, but that's the error. I did notice an anomaly where { interval="2.0" } was typed in. Other entries had the { interval="2" }. Changed it to that and still received the CTD. 2 or 2.0, does not matter to the game...treats it as the same. After posting I noticed the trigger had as the last attribute { preserved="false" }. Shouldn't there be an attribute for a { start_time="value" }. That is the only other thing I can think of with my limited knowledge of XML. Start time is optional, if left out is assumed to be 0. P.S. Like the new format to the Wiki frontpage. A positive step forward. OGG Thanks... Davros, I apologize. I see what you mean about the event closing tag. LOL....just typed all of this then got to this text All good. In other words all triggers must be outside the start mission event. Only the start triggers should be inside the start mission event. OGG StartTrigger elements can go inside other event tags in the xml, just as you have in your script for <event name="e_loc_trig01">. It's more that you can not have tags within other tags. ie, tag is a superset that can have elemts inside it, and needs to be closed out before opening anothe tag. Does that make sense? Cheers, Dav. Oh, btw...I am on Skype if you want to chat? ID is davros123123 Cheers, EDIT : Now, the location of the </event> tag is correct in my above post! ARGH!!! Dav Quote Link to comment Share on other sites More sharing options...
OleGreyGhost Posted November 7, 2008 Author Share Posted November 7, 2008 Davros, Yes, having the event tags closed before starting another event does make sense. Sort of like putting a period at the end of a sentence. Would love to chat, but do not have that capability. As you can see, I am probably not using the quote capability here incorrectly. But I do notice formatting bar at the top of this window. But now this brings up another question. Originally when I typed in the vehicle code, I placed the three elements ( ActivateVehicle, OrderCar & StartTrigger ) inside trigger01 section. The rest of the code was placed as a block further down. I did this so I could see the vehicle approach and unload. This did not cause the editor to crash. The vehicle actually appeared in the game, with the crew and passengers. Only it just sat there. The vehicle did not go to the unload location. That is how I got to the version of the code in this post. I went back to the basics. Follow instructions. Will go and correct the tag placement now and let you know how I made out. Cheers, OleGreyGhost Quote Link to comment Share on other sites More sharing options...
davros Posted November 7, 2008 Share Posted November 7, 2008 Cool...look forward to the results. Quote Link to comment Share on other sites More sharing options...
OleGreyGhost Posted November 8, 2008 Author Share Posted November 8, 2008 Davros, Here is the correction to the script. It was like you said, I used the closing tag in the wrong place. <!--Start the first trigget location, activate vehicle, a trigger for group01 dying and for the objectives complete/end of game trigger--> <element type="StartTrigger" name="t_loc_trig01" start_time = "1"/> <element type="StartTrigger" name="t_patrol01_dead" start_time = "2"/> <element type="StartTrigger" name="t_objectives_complete" start_time = "10"/> <element type="ActivateVehicle" vehicle_id="panhard01"start_time="0.5"/> <element type="OrderCar" vehicle_id="panhard01" order="move" position="9048 -7820 362" speed=".6" start_time="1"/> <element type="StartTrigger" name="t_panhard01_unload" preserved="false"/> <!--DEBUG CODE - Useful for making the ghost invisible/tough for testing the mission <element type="AlterGroupStats" player_type="team_a" invisible="true" max_health="5000" health="5000" start_time="15"/> <!--DEBUG CODE - REMOVE--> </event> <!--Reinforcements unload--> <trigger name="t_panhard01_unload" interval="2.0" preserved="false"> <condition type="UnitInLocation" location="loc_panhard01_unload" vehicle_id="panhard01" equal="1"/> <event name="e_dropoff01"/> </trigger> <event name="e_dropoff01"> <element type="ExitPassengers" vehicle_id="panhard01"/> </event> <!--Location 01 ============--> The vehicle now appears in the game with the crew & passengers, as it did when I originally used the location trigger. It spawns into the correct location as set up in the editor. Then it just sits there. The vehicle will not move to the unload location. I triple checked everything in the editor and script. Vehicle co-ordinates - 13015 -6084 369 start node for ai.gph - 12962 -6432 362 unload co-ordinates - 9048 -7820 362 ending node - 9133 --6432 366 Any thoughts will be greatly appreciated. Cheers, OleGreyGhost Quote Link to comment Share on other sites More sharing options...
davros Posted November 8, 2008 Share Posted November 8, 2008 Odd...Can you pls. upload it to smestorage and I'll take a look. PM sent with details. Dav. Quote Link to comment Share on other sites More sharing options...
OleGreyGhost Posted November 8, 2008 Author Share Posted November 8, 2008 Dav, File is uploaded. Appreciate your time and effort. OleGreyGhost. Quote Link to comment Share on other sites More sharing options...
davros Posted November 8, 2008 Share Posted November 8, 2008 NP...but brain is at risk of exploding... Consurrent activities...looking after kidsinstalling steam to get new coop zombie gamegetting your missionfinalising and uploading a new video to wikisms'ing mates who are hassling me about zombie gamechatting with wife about what we need from the shopsARGHHH!!! All good. Dav Quote Link to comment Share on other sites More sharing options...
OleGreyGhost Posted November 8, 2008 Author Share Posted November 8, 2008 (edited) Dav, Your itinerary sounds like mine. Better half keeps me hopping. Take your time. I'll try to fit in some more reading time with the scripting manual to see if I can find what I screwed up. Hope the new video pertains to helicopters!! Cheers, OleGreyGhost Edited November 8, 2008 by OleGreyGhost Quote Link to comment Share on other sites More sharing options...
davros Posted November 8, 2008 Share Posted November 8, 2008 OK, have found the issues. 1. You need to extend the human AI graph to where the vehicle starts ai_graph.jpg 2. You need to put a few (2 more) vehicle nodes at the corner so it knows to turn. You should see a line linking the nodes. Perhaps also pull the existing corner vehicle ai node back a bit from the edge of the road. vehicle graph 3. the vehicle stops short of the loc_panhard01_unload loaction. Either move the location closer, or move the vehicle destination coordinates out further into the loc_panhard01_unload loaction. move loc_panhard01_unload Oh, might want to drag the coop_spawn location over to on top of a roof near where the vehicle starts so you can see it better without having to run. Cheers, Dav. PS...no, it's about sociability of maps. Will do heli's next then. Quote Link to comment Share on other sites More sharing options...
OleGreyGhost Posted November 8, 2008 Author Share Posted November 8, 2008 Dav, 1. I remember the way you did the video, looping the human ai.gph around the block. The vehicle ai.gph was set up. But I did not realize they had to be completely intertwined together. Will go back tomorrow and watch the video again. 2. I was going to, but I remembered your instruction in the video not to put too many nodes too close together. At least this clarifies my ignorance. 3. I'll try tweaking the co-ordinates in the xml file. Switching menus and returning to the map gives my old peepers a probem. Will have to use a prop in the future. It's not my legs, just the grunts. But will take your suggestion to heart. Have to put this to bed for now. Will let you know how it works out. (as long as I don't screw something else up) I really appreciate your assistance. OleGreyGhost Quote Link to comment Share on other sites More sharing options...
davros Posted November 8, 2008 Share Posted November 8, 2008 NP...thanks for taking the time to work through this. One of the prob's with doing vid's and instructions on the wiki is that I make assumptions and do not explain all that I should. I am hoping that by having it on a wiki, folks like yourself that see things I have missed will jump on the wiki and correct it. So please feel free to go and edit/add to the wiki at any time. I am truly hoping it is not viewed as my wiki, but belonging to all GRAW2 modders so go crazy on it! Oh, and btw...I am only a half step ahead of you wrt. to stuff so will make mistakes - but hey, we're both learning Just make sure you take time to have fun with it. And again thank you for taking the time to have a go and post...so few do. Dav. Quote Link to comment Share on other sites More sharing options...
OleGreyGhost Posted November 9, 2008 Author Share Posted November 9, 2008 Dav, Great news. Vehicle now shows up on the unload location. All working as programmed in the mission.xml. These are the steps I took after reading your instructions. 1. I extended the human ai.gph to the intersection where the vehicle was to turn. I reviewed the video and observed the graph exteded past the unload location a good distance but did not go around the corner to your vehicle. It appears that as long as you make enough room behind the vehicle for the passengers to exit it should be OK. 2. Just as you described. I placed one node before the intersection, second node pointing in the direction I wanted the vehicle to turn & the last completing the rough curve. 3. The unload location was tricky. It seems if I set the location, then place the last node where I think the center of the location is, when I go back to the location menu to double check, the editor crashes. So I tried a different approach. I increased the size of the location, placed a prop where I thought the center was located, and then placed the last node. Fired up the server, walked down the block, and there was the vehicle waiting for me, with the passengers unloaded. It feels good to see the the game behave the way you planned My intention was to be able to watch the vehicle approach & unload the passengers. So now it is just a matter of tweaking the start time and/or the speed to have the vehicle follow the script. Or I could use one of the other triggers to better control the delay, then the speed/time to fine tune the action.. Thanks for all your assistance. Keep up the great work. OleGreyGhost. Quote Link to comment Share on other sites More sharing options...
davros Posted November 9, 2008 Share Posted November 9, 2008 Excellent news mate. Thanks for posting back. Yeah, on reflection I think you are right about the human ai graph not needing to cover the whole area...so likely it was the vehicle ai nodes. Although, I did notice that without the human ai graph extending to the vehicle, the guys were unresponsive...ie. I could stand at the vehicle and shoot at them and they would not move...so perhaps the nee to be on an ai graph to be able to react? Not sure... So, given that vehicles behave unpredictably (ie. sometimes unload early if shot at), as do players, it might be worth extending to human ai graph along the vehicle path so if the mexicans do unload, they can react. re. unload location - yeah, the crashing is a pain..I notice certain sequences will cause the editor to crash...and think it's a great idea to place props to get the x,y,z coordinates from. I was using (v. small square) loactions for this when I made my map...that way you can move them about if needed and get the coords from looking in the world.xml. Well done again for making it this far. I am very much looking forward to playing your map. And thankyou for the supportive feedback. If you get a chance - would you be able to update the wiki with your discoveries? Dav Quote Link to comment Share on other sites More sharing options...
OleGreyGhost Posted November 11, 2008 Author Share Posted November 11, 2008 Dav, You were correct in your assessment of my original mission.xml. It turns out that a combination of the human ai.gph and the drop-off location were both too small. Probably three or four vehicle lengths past the location would work, just so they have enough room to interact with the ai.gph. Although, I did notice that without the human ai graph extending to the vehicle, the guys were unresponsive...ie. I could stand at the vehicle and shoot at them and they would not move...so perhaps the nee to be on an ai graph to be able to react? Not sure... I noticed when I purposely placed a Mex unit on the map they just stay where you place them. Also with the snipers, when shot at they just move back and forth. I think this has something to do with the size of their guard area when you initially place them on the map. and think it's a great idea to place props to get the x,y,z coordinates from. I was using (v. small square) loactions for this when I made my map. Empty shell casings work great for me. Once you get your info you can place as many as you want to show the ferocity of the combat. If you get a chance - would you be able to update the wiki with your discoveries? I'll give it a shot. But I'm still learning how to get around this site. Enjoy your trip. Would probably be quicker if you if you borrowed the Tardis. Catch you on the return. OleGreyGhost Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.