Need XML Help Please

Post » Thu May 06, 2010 6:37 am

Hi all I need some XML help please.

I have a colored map mod but I am having a small issue. I added a coordinate system around the outer edge and added 50 pixels on each side, so 100 pixels vertically and 100 pixels horizontally total so the actual map area is still unchanged at 2048x2048, but the actual resolution is now 2148x2148

The problem I am having is now all of the map icons are offset here is a http://www.cmaher-vfx.com/images/shiloh/offset.jpg


I also tried resizing the image to 2048x2048 actual resolution and the offset was unchanged.

I tried fiddling around in the XML because I am assuming this is where this needs to be corrected and tried the following in the map_menu.xml

				<!-- Main map image				      NOTE: Map markers are allocated as child tiles to this tile and all children are removed every update,				      so don't add any children to this tile lest they get deleted after one update -->									 4 					 &true; 					 &true; 					 &true; 					 200 					 255 					 &true; 					 &scale; 					<_QuestMarkersVisible> &true; 	<!-- Set in code -->					 Interface\Worldmap\Wasteland_1024_no_map.dds 					 2148 					 2148 					<_Magnification> 1.0 		<!-- Scale factor used to zoom in / out of map -->															<!-- Width of map markers; set in code -->															<!-- Width of quest markers; set in code -->															<!-- Width of player cursor; set in code -->																																																							<!-- Use mouse drag to pan map -->																			 427.5 																			 427.5 																<!-- Use mouse drag to pan map -->																			 250 																			 250 									


The problem is changing the filehieght and filewidth didn't seem to have any effect.

Can anyone please help me resolve this offset issue.
User avatar
Marcus Jordan
 
Posts: 3474
Joined: Fri Jun 29, 2007 1:16 am

Post » Thu May 06, 2010 4:52 am

Anyone? :vaultboy:
User avatar
willow
 
Posts: 3414
Joined: Wed Jul 26, 2006 9:43 pm

Post » Thu May 06, 2010 7:46 am

You'll likely have to wait till DarN comes online. He probably knows the XML better than anyone (including Bethesda).
User avatar
Big Homie
 
Posts: 3479
Joined: Sun Sep 16, 2007 3:31 pm

Post » Thu May 06, 2010 2:49 pm

I can't really tell from the images posted, but it sounds like the map markers are placed relative to the image boundaries. What was the extra border space needed for?
User avatar
Quick Draw
 
Posts: 3423
Joined: Sun Sep 30, 2007 4:56 am

Post » Thu May 06, 2010 5:08 pm

I can't really tell from the images posted, but it sounds like the map markers are placed relative to the image boundaries. What was the extra border space needed for?


I added the extra space to put a coordinate system on the map but not have it overlay the map image.

Here is a link to the mod on Nexus http://newvegasnexus.com/downloads/file.php?id=35619

Currently I have resorted to completely readjusting the images, however in order for this to work I also have to crop the map by 50 pixels on each, side still not ideal. I am sure there has to be an XML way to fix this. Sad thing is I am pretty decent at programing but I just can't wrap my head around XML, i need structure and consistency dam it lol

I did manage at one point to actually nudge them back into position with the following modification in the map_menu.xml

<!-- MAP MARKER TEMPLATE: Used by Local / World maps -->	


However this resulted in a new problem where the map markers would start to "slide" when you zoomed the map in and out
User avatar
Franko AlVarado
 
Posts: 3473
Joined: Sun Nov 18, 2007 7:49 pm

Post » Thu May 06, 2010 2:13 pm

I cant really test it myself, because I dont have your map image and I'm too lazy to create one myself, but why not try something like this:

			<!-- Main map image				      NOTE: Map markers are allocated as child tiles to this tile and all children are removed every update,				      so don't add any children to this tile lest they get deleted after one update -->									 4 					 &true; 					 &true; 					 &true; 					 200 					 255 					 &true; 					 &scale; 					<_QuestMarkersVisible> &true; 	<!-- Set in code -->					 Interface\Worldmap\Wasteland_1024_no_map.dds 					 2048 					 2048 					<_Magnification> 1.0 		<!-- Scale factor used to zoom in / out of map -->															<!-- Width of map markers; set in code -->															<!-- Width of quest markers; set in code -->															<!-- Width of player cursor; set in code -->																																																							<!-- Use mouse drag to pan map -->																			 427.5 																			 427.5 																<!-- Use mouse drag to pan map -->																			 250 																			 250 																				 &true; 					 200 					 255 					 &true; 					 &scale; 					 Interface\Worldmap\Wasteland_1024_no_map_custom.dds 					 2148 					 2148 																																																							<!-- Use mouse drag to pan map -->																			 427.5 																			 427.5 																<!-- Use mouse drag to pan map -->																			 250 																			 250 									


Im pretty sure it won't work 1:1 like this, but it should give you an idea of what I had in mind.

This line "NOTE: Map markers are allocated as child tiles to this tile and all children are removed every update, so don't add any children to this tile lest they get deleted after one update" makes it clear that making any changes to the hotrect are overwritten by the engine, thats why your width changes have no effect (I once tried something similiar). What you can do instead is create your own map image element, which doesnt get overwritten and copies the necessary values for position and scale over from the original map. This new map has to be placed correctly on top of the old, and perhaps you have to overwrite the old map texture with completely black or transparent.
User avatar
Lindsay Dunn
 
Posts: 3247
Joined: Sun Sep 10, 2006 9:34 am

Post » Thu May 06, 2010 1:53 pm

I added the extra space to put a coordinate system on the map but not have it overlay the map image.

Here is a link to the mod on Nexus http://newvegasnexus.com/downloads/file.php?id=35619

Currently I have resorted to completely readjusting the images, however in order for this to work I also have to crop the map by 50 pixels on each, side still not ideal. I am sure there has to be an XML way to fix this. Sad thing is I am pretty decent at programing but I just can't wrap my head around XML, i need structure and consistency dam it lol

I did manage at one point to actually nudge them back into position with the following modification in the map_menu.xml

<!-- MAP MARKER TEMPLATE: Used by Local / World maps -->	


However this resulted in a new problem where the map markers would start to "slide" when you zoomed the map in and out

You need to take magnification into account when adding the offset. 50 at full scale, and then downwards from there. I'm guessing _x and _y are supplied using 2048 as dimensions here. Seems to be a value between 0 and 1, so something like this:

	 50 	


edit: Make it -25 if that worked...
User avatar
Marguerite Dabrin
 
Posts: 3546
Joined: Tue Mar 20, 2007 11:33 am

Post » Thu May 06, 2010 3:35 pm

You need to take magnification into account when adding the offset. 50 at full scale, and then downwards from there. I'm guessing _x and _y are supplied using 2048 as dimensions here. Seems to be a value between 0 and 1, so something like this:

	 50 	


edit: Make it -25 if that worked...


That fixed the sliding problem alright. However I noticed for some reason it looks like it is shifting the entire marker set over not dynamically distributing them according to map scale. Basically now the east side of the map is correct but the west side is offset too much ....

I think the safest bet is to continue with the modified image. I don't really want t have to require people to use a modified map_menu.xml for this anyway just a simple texture swap. Although I would love to still get this working properly for possible future updates, it would allow me to take great advantage of all that space around the map.

Any more input on trying to get this working properly would be great and thank you all so much for the assistance, it is greatly appreciated.
User avatar
kelly thomson
 
Posts: 3380
Joined: Thu Jun 22, 2006 12:18 pm

Post » Thu May 06, 2010 10:29 am

Rather than resizing the map image, would it be possible to put a second, larger image up behind the map image with its borders showing what you want?
User avatar
Hannah Barnard
 
Posts: 3421
Joined: Fri Feb 09, 2007 9:42 am

Post » Thu May 06, 2010 2:44 pm

That fixed the sliding problem alright. However I noticed for some reason it looks like it is shifting the entire marker set over not dynamically distributing them according to map scale. Basically now the east side of the map is correct but the west side is offset too much ....

I think the safest bet is to continue with the modified image. I don't really want t have to require people to use a modified map_menu.xml for this anyway just a simple texture swap. Although I would love to still get this working properly for possible future updates, it would allow me to take great advantage of all that space around the map.

Any more input on trying to get this working properly would be great and thank you all so much for the assistance, it is greatly appreciated.

If they behave differently on each side, you might have to add for one side and subtract for the other. It's been a while since I messed around with this particular code.

Rather than resizing the map image, would it be possible to put a second, larger image up behind the map image with its borders showing what you want?

Very possible. Requires XML editing though.
User avatar
Elina
 
Posts: 3411
Joined: Wed Jun 21, 2006 10:09 pm


Return to Fallout: New Vegas