Maldekian Man Posted August 15, 2015 Share Posted August 15, 2015 (edited) So I wanted to implement a few new weapons in to Xenonauts and I edited some of the unused stuff to look a lot more proper while adding magazines to the weapons like this SVD: since I also want to make the ballistic weapons more varied yet I seem to be having a problem with pistols. When ever I add this Colt: in to the game it comes out deformed after I put it in to the inventory. It looks fine in the weapon selection menu and changes the moment you drag it in to the inventory of one of your troopers. I have absolutely no idea why is it happening. I want to specifically make guns looks a lot smaller and take up less space (around 2x2 instead of 3x3 - still haven't gotten to that part). Could someone tell me what am I doing wrong? And yes if you are curious I did try using the standard image size for the handguns but it came out "enlarged" instead of being small as it is now. Instead I used the same image size that rifles have. You see I'm trying to make certain visual improvements based on weapon size. This is generally what I'm aiming for: Edited August 15, 2015 by Maldekian Man Quote Link to comment Share on other sites More sharing options...
aajs Posted August 15, 2015 Share Posted August 15, 2015 Hi, looking at your pistol pic it has lots of space around it.. In fact it looks like the image size is the same size as the rifle but with a pistol in the middle...if that's correct this will never work correctly as in the GC gui the weapon slot is half the size so your weapon would look all squashed. You need to copy an existing pistol image and paste your new pistol into that so the image is the same size. so your image size for the following folders should be roughly. \Xenonauts\assets\weapons\blah 308 x 204 Xenonauts\assets\gui\weapons 308 x 204 Xenonauts\assets\gui\weapons\small 200 x 132 These sizes work generally fine, you can keep these file sizes for pistol size weapons but enlarge or reduce the pistol image within the file to control the amount of space around the pistol. Hope that helps a bit.. Quote Link to comment Share on other sites More sharing options...
Maldekian Man Posted August 15, 2015 Author Share Posted August 15, 2015 Well the size is actually the problem like I mentioned. I need to change the size of the weapon, but the game itself "stretches my image" no matter what size it is. In order to get rid of the problem I would have to set the image to a: 204 x 204 size and set the inventory size of the gun to 2x2. How do I set the inventory size of a weapon to 2x2? Right now it's 3x2. Quote Link to comment Share on other sites More sharing options...
aajs Posted August 15, 2015 Share Posted August 15, 2015 Well the size is actually the problem like I mentioned. I need to change the size of the weapon, but the game itself "stretches my image" no matter what size it is.In order to get rid of the problem I would have to set the image to a: 204 x 204 size and set the inventory size of the gun to 2x2. How do I set the inventory size of a weapon to 2x2? Right now it's 3x2. Trust me for the gui/folders set the weapon image size for pistol as I suggested, however the ones in the weapons sub folders are the ones that you want to change as these are the pictures that get displayed in the soldier equipment screen. Regarding those, you can set them all the same width if you like, because as long as you do not make it wider than a rifle image it will be fine as this width is actually set by the size of the menu... However a change in height of these file sizes will be noticed in the listing. Then you just scale your weapon within the picture...(a smaller weapon like a pistol will have more space around it) Quote Link to comment Share on other sites More sharing options...
SoulFilcher Posted August 15, 2015 Share Posted August 15, 2015 Well the size is actually the problem like I mentioned. I need to change the size of the weapon, but the game itself "stretches my image" no matter what size it is.In order to get rid of the problem I would have to set the image to a: 204 x 204 size and set the inventory size of the gun to 2x2. How do I set the inventory size of a weapon to 2x2? Right now it's 3x2. To change the inventory size you need to edit weapons.xml. Keep in mind that doing so will probably screw with the scaling of the image you're already using. Quote Link to comment Share on other sites More sharing options...
Maldekian Man Posted August 15, 2015 Author Share Posted August 15, 2015 I said the standard size does not work. The image is still "searched" because the game forces the weapon to be in a certain size. I don't want the pistol to look big and stretched in a 200x132 size. I made the weapon smaller to actually "make" it look small compared to a rifle. Ah... damn... I'll make this short. How do I change the space a weapon takes up in the inventory? I need a 2x2 size for guns, a 3x2 size for carbines, 4x2 for rifles and finally a 5x2 size for large weapons (sniper rifles, heavy weapons etc.). To change the inventory size you need to edit weapons.xml. Keep in mind that doing so will probably screw with the scaling of the image you're already using. Yes! Thank you! What value do I need to change? In other words what is responsible for the inventory size? Quote Link to comment Share on other sites More sharing options...
SoulFilcher Posted August 15, 2015 Share Posted August 15, 2015 Yes! Thank you! What value do I need to change? In other words what is responsible for the inventory size? There are 2 values, one for width and one for height, most of these XML files have an example list at the beginning describing each value and the same order is used for all entries, so it will be easy to find what you want. Quote Link to comment Share on other sites More sharing options...
aajs Posted August 15, 2015 Share Posted August 15, 2015 (edited) I said the standard size does not work. The image is still "searched" because the game forces the weapon to be in a certain size. I don't want the pistol to look big and stretched in a 200x132 size. I made the weapon smaller to actually "make" it look small compared to a rifle.Ah... damn... I'll make this short. How do I change the space a weapon takes up in the inventory? I need a 2x2 size for guns, a 3x2 size for carbines, 4x2 for rifles and finally a 5x2 size for large weapons (sniper rifles, heavy weapons etc.). Yes! Thank you! What value do I need to change? In other words what is responsible for the inventory size? M Hi Maldekian Man, So sorry if we are not explaining ourselves very well. I have a mod called xenononaut choices... If you download part one of that, there is 50+ weapons and all have different sizes in the inventory. You can just copy them as templates, however here is an example: The size of the image is a fairly simple to work out as soulfilcher says. It is a very simple calculation... Lets say I want to make a very small pistol that size is 2x2 squares..... This Is what I would do step by step..... go to the weapons xml and see how many squares a normal pistol takes up... slotsizex 3 slotsizey 2 Now see what size picture that weapon has in pixels by opening it in an editor...standard pistol is... 308 x204 pixels. so a standard 1 tile width would be slotsize 3 / 308 pixes which would equal. 102 pixels per tile width. the tile is a square so it would also be 102 pixels high.. Now you have that magic figure for an individual tile you can make what size you want. My 2x2 pistol would need an image file of 102 pixels x 2 therefore my image for a 2x2 pistol would be 204x204... As long as I also set that size for my weapon tiles in the xml file all is good. slotsizex 2 slotsizey 2 Hope that makes more sense.... 1x1 = 102x102 2x2 = 204x204 3x2 = 308x204 4x2 = 410x204 5x2 = 512x204 5x3 = 512x306 etc.etc. Edited August 15, 2015 by aajs Quote Link to comment Share on other sites More sharing options...
Maldekian Man Posted August 16, 2015 Author Share Posted August 16, 2015 (edited) Thank you! I've done a bit of tinkering and testing and I'm now able to fully resume my work. I've also discovered that you can keep the ratio and go from 2x2 = 204x204 to 2x2 = 170x170 and adjust the size of a weapon that way as well. It will still have the right proportions. I check out your XMC mod aajs, but not entirely. There are just so many things in it I'm having a hard time wrapping my head around it. Right now I just want to make a mod which will actually focus on making this conflict in to an actual war. I want to base this on some of my personal experiences and knowledge of extraterrestrials in this "alternative universe setting". Edited August 16, 2015 by Maldekian Man 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.