StrongArmand Posted May 9, 2010 Share Posted May 9, 2010 Hello, I've tried to use ADD_AREA_REGION_TRIGGER but I'm a little reluctant about syntax. Here for patch AR0300 : COPY_EXISTING ~AR0300.are~ ~override/AR0300.are~ ADD_AREA_REGION_TRIGGER SPRINT ab_RT_Name "#VTrav01" SET ab_RT_Type "2" SET ab_RT_BbLX "1513" SET ab_RT_BbLY "2343" SET ab_RT_BbHX "1460" SET ab_RT_BbHY "2250" SET ab_RT_VxPr "4" SET ab_RT_CuId "42" SPRINT ab_RT_Dest "#VAR01" SPRINT ab_RT_EntN "#VEntr01" SET ab_RT_Fbit SET ab_RT_Itxt SET ab_RT_TDtD SET ab_RT_TRmD SET ab_RT_TSet SET ab_RT_TDet SET ab_RT_LPoX SET ab_RT_LPoY SPRINT ab_RT_KeyI SET ab_RT_Rbcs SET ab_RT_ALPX SET ab_RT_ALPY Weidu send me an error : [Devin/Tp2externe/#VNewArea.tp2] ERROR at line 160 column 1-6Near Text: SPRINT Parsing.Parse_error ERROR: parsing [Devin/Tp2externe/#VNewArea.tp2]: Parsing.Parse_error Link to comment
Miloch Posted May 9, 2010 Share Posted May 9, 2010 For starters, you haven't defined values for half your variables, but you don't need to if you're not using them. Try this instead: COPY_EXISTING ~AR0300.are~ ~override/AR0300.are~ LAUNCH_PATCH_FUNCTION ADD_AREA_REGION_TRIGGER INT_VAR ab_RT_Type = 2 ab_RT_BbLX = 1513 ab_RT_BbLY = 2343 ab_RT_BbHX = 1460 ab_RT_BbHY = 2250 ab_RT_VxPr = 4 ab_RT_CuId = 42 STR_VAR ab_RT_Name = "#VTrav01" ab_RT_Dest = "#VAR01" ab_RT_EntN = "#VEntr01" END I haven't used this function so I don't know how well it works (Aurora uses a custom fj_add_area_structure function for this sort of thing). Link to comment
StrongArmand Posted May 10, 2010 Author Share Posted May 10, 2010 Yes, with you method the region is workable but X value and Y value on each vertex isn't recognize. See here : So thanks to informations that I see in weidu read me, I tried to implement them : COPY_EXISTING ~AR0300.are~ ~override/AR0300.are~ LAUNCH_PATCH_FUNCTION ADD_AREA_REGION_TRIGGER INT_VAR COPY_EXISTING ~AR0300.are~ ~override/AR0300.are~ LAUNCH_PATCH_FUNCTION ADD_AREA_REGION_TRIGGER INT_VAR ab_RT_Type = 2 SET ab_RT_Vx_X_0 = 1454 SET ab_RT_Vx_X_1 = 1485 SET ab_RT_Vx_X_2 = 1508 SET ab_RT_Vx_X_3 = 1494 SET ab_RT_Vx_Y_0 = 2247 SET ab_RT_Vx_Y_1 = 2323 SETab_RT_Vx_Y_2 = 2300 SET ab_RT_Vx_Y_3 = 2264 ab_RT_BbLX = 1508 ab_RT_BbLY = 2323 ab_RT_BbHX = 1454 ab_RT_BbHY = 2247 ab_RT_VxPr = 4 ab_RT_CuId = 42 STR_VAR ab_RT_Name = "#VTrav01" ab_RT_Dest = "#VAR01" ab_RT_EntN = "#VEntr01" END But I've an error. EDIT : Oh sorry I forgot to delete all "SET" and now it works. But the cursor index don't appear in game whereas in DLTCEP the region is operationnal. That's strange... EDIT 2 : Finally, I used "recalculate option" in DLTCEP an I could acquire the good bounding box values. So all work great ! Link to comment
StrongArmand Posted May 10, 2010 Author Share Posted May 10, 2010 I've another problem . Is it possible to create an entrance with this command ? Link to comment
Miloch Posted May 11, 2010 Share Posted May 11, 2010 I've another problem . Is it possible to create an entrance with this command ?I don't think so. You're better off grabbing Nythrun's fj_add_area_struct.tpa function from the Aurora mod and looking at its tp2 file for sample syntax (it's pretty easy once you figure it out - probably even easier than the above command). Link to comment
StrongArmand Posted May 11, 2010 Author Share Posted May 11, 2010 Indeed, I look in the tp2 file and I've been really impress by your work. The add_area_structure command is especially interesting. Do you think I can use this macro (fj_add_are_struct.tpa) in my mod ? But maybe should I ask to Ascension64, Gort or Nythrun for use this file.... Link to comment
Miloch Posted May 12, 2010 Share Posted May 12, 2010 Do you think I can use this macro (fj_add_are_struct.tpa) in my mod ? But maybe should I ask to Ascension64, Gort or Nythrun for use this file....It's Nythrun's but I'm sure you can use it. Here's an example from Aurora where we use it to patch in an actor, a trigger region and an entrance all in one swoop:COPY_EXISTING ar0500.are override //Bridge District PATCH_IF SOURCE_SIZE > 0x28f BEGIN LPF fj_add_are_structure INT_VAR fj_loc_x = 2780 fj_loc_y = 1955 fj_dest_loc_x = 2780 fj_dest_loc_y = 1955 fj_animation = 0x6110 //fighter female human fj_orientation = 15 //SSE STR_VAR fj_structure_type = actor fj_name = Aurora fj_cre_resref = agaurora END LPF fj_add_are_structure INT_VAR fj_type = 2 //travel fj_box_left = 3415 fj_box_top = 625 fj_box_right = 3450 fj_box_bottom = 700 fj_cursor_index = 30 //door fj_vertex_0 = 3415 + (625 << 16) fj_vertex_1 = 3450 + (650 << 16) fj_vertex_2 = 3450 + (700 << 16) fj_vertex_3 = 3415 + (676 << 16) STR_VAR fj_structure_type = region fj_name = Tran0540 fj_destination_area = ag0540 fj_destination_name = Exit0500 END LPF fj_add_are_structure INT_VAR fj_loc_x = 3490 fj_loc_y = 655 fj_orientation = 10 //NE STR_VAR fj_structure_type = entrance fj_name = Exit0540 END END BUT_ONLY Link to comment
StrongArmand Posted May 16, 2010 Author Share Posted May 16, 2010 It's Nythrun's but I'm sure you can use it. Ok cool. However... (yes again) However, Weidu said me that : ERROR: [AR0300.are] -> [override/AR0300.are] Patching Failed (COPY) (Not_found)Stopping installation because of error. Stopping installation because of error. I've used these lines for apply this macro : INCLUDE ~Devin/Tpa/fj_add_are_struct.tpa~ COPY_EXISTING ~AR0300.are~ ~override/AR0300.are~ // Zone à patcher PATCH_IF SOURCE_SIZE > 0x28f BEGIN LPF fj_add_are_structure INT_VAR fj_type = 2 //travel fj_box_left = 1454 // En haut à gauche de la bounding box fj_box_top = 2247 // En haut à droite de la bounding box fj_box_right = 1508 // En bas à gauche de la bounding box fj_box_bottom = 2323 // En bas à droite de la bounding box fj_cursor_index = 28 // stair fj_vertex_0 = 1454 + (2247 << 16) fj_vertex_1 = 1485 + (2323 << 16) fj_vertex_2 = 1508 + (2300 << 16) fj_vertex_3 = 1494 + (2264 << 16) fj_flags = 516 STR_VAR fj_structure_type = travel fj_name = "#VTrav01" fj_destination_area = "#VAR01" fj_destination_name = "#VEntr01" END LPF fj_add_are_structure INT_VAR fj_loc_x = 1540 fj_loc_y = 2298 fj_orientation = 7 //NW STR_VAR fj_structure_type = entrance fj_name = "#VEntr02" END END BUT_ONLY Maybe I've forgot to copy some files from aurora ? Link to comment
Miloch Posted May 17, 2010 Share Posted May 17, 2010 STR_VAR fj_structure_type = travel fj_name = "#VTrav01" fj_destination_area = "#VAR01" fj_destination_name = "#VEntr01" That structure_type should be region not travel. The type of region is already defined as travel (INT_VAR type = 2) above.ERROR: [AR0300.are] -> [override/AR0300.are] Patching Failed (COPY) (Not_found)Stopping installation because of error. Stopping installation because of error. (Thanks for the informative message there, WeiDU . Had to eyeball that code for a good 2 minutes before I saw the problem. I thought the bigg was going to put in at least the faulty variable or code line number where WeiDU bombed, for otherwise non-informative messages like these...) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.