BEP-mod grafic tank problem
-
- Burner Inserter
- Posts: 17
- Joined: Sun Apr 10, 2016 9:18 am
- Contact:
BEP-mod grafic tank problem
BEP-mod grafic tank problem
Hello Community, we have a problem with our mod and need help. We work since a year now on our Projekt. We try to expand the game with some warfare things like tanks and miniguns. But we have problems with the massive artwork bundle we would like to make. So here is one of the main problems:
The tank spin arround proberly but the tower isnt in the right place and i dont know what to do. All Sprites are taken from models. turret and base, hase both 64 pictures and all are cutten of by us and put to gehter with a web sprite sheet maker.
Here the problem pictures:
http://steamcommunity.com/sharedfiles/f ... =800263048
http://steamcommunity.com/sharedfiles/f ... =800263112
http://steamcommunity.com/sharedfiles/f ... =800263179
http://steamcommunity.com/sharedfiles/f ... =800263257
Download Code:
http://www.mediafire.com/file/3mo8neuaz ... 4.0.12.rar
Download Modpack to play and test
http://www.mediafire.com/file/rttj8uuaenuudm3/mods.rar
There is a problem at BEP>prototypes>entity>tank.lua [--panzer-3--]
pictures you will find under grafics>entity>tanks
Can you help us with some hints?
SIrWillam, from Black Eagles
Hello Community, we have a problem with our mod and need help. We work since a year now on our Projekt. We try to expand the game with some warfare things like tanks and miniguns. But we have problems with the massive artwork bundle we would like to make. So here is one of the main problems:
The tank spin arround proberly but the tower isnt in the right place and i dont know what to do. All Sprites are taken from models. turret and base, hase both 64 pictures and all are cutten of by us and put to gehter with a web sprite sheet maker.
Here the problem pictures:
http://steamcommunity.com/sharedfiles/f ... =800263048
http://steamcommunity.com/sharedfiles/f ... =800263112
http://steamcommunity.com/sharedfiles/f ... =800263179
http://steamcommunity.com/sharedfiles/f ... =800263257
Download Code:
http://www.mediafire.com/file/3mo8neuaz ... 4.0.12.rar
Download Modpack to play and test
http://www.mediafire.com/file/rttj8uuaenuudm3/mods.rar
There is a problem at BEP>prototypes>entity>tank.lua [--panzer-3--]
pictures you will find under grafics>entity>tanks
Can you help us with some hints?
SIrWillam, from Black Eagles
Last edited by BlackEagles on Wed Nov 16, 2016 12:08 am, edited 1 time in total.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: BEP-mod grafic tank problem
Uploading mod to github would make it lots easier for people to see what's actually going on.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: BEP-mod grafic tank problem
Moving entities are a bit fiddly, make sure that you rotate the sprite around the center of the frame. Then there is a "shift" value for each "turret_animation" layer which will position the sprite in relation to the"selection_box".
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
-
- Burner Inserter
- Posts: 17
- Joined: Sun Apr 10, 2016 9:18 am
- Contact:
Re: BEP-mod grafic tank problem
I try to uploud it tommorow.aubergine18 wrote:Uploading mod to github would make it lots easier for people to see what's actually going on.
-
- Burner Inserter
- Posts: 17
- Joined: Sun Apr 10, 2016 9:18 am
- Contact:
Re: BEP-mod grafic tank problem
I use the shift command but it seem that the pictures within the animation are not all at the same center. But that is not possible, because the object lay the whole time at the same point.Arch666Angel wrote:Moving entities are a bit fiddly, make sure that you rotate the sprite around the center of the frame. Then there is a "shift" value for each "turret_animation" layer which will position the sprite in relation to the"selection_box".
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: BEP-mod grafic tank problem
If the turret is wobbling around when you drive in a circle with the tank, then the turret is not centered on the entity. Position the car/tank in the initial position = facing north and shift the turret up/down to see which direction the wobbling gets less. shift = {0, 0.5} would move the center of the sprite half a tile downwards, shift = {0, -0.5} half a tile upwards.
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: BEP-mod grafic tank problem
Remember that the grid within tiles has a maximum resolution of 32 px / 256, so it will always snap to increments of 0.003921568627451 (or 0 if less than that number). (source)
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: BEP-mod grafic tank problem
Could you post a single frame of the turret sprite?
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
-
- Burner Inserter
- Posts: 17
- Joined: Sun Apr 10, 2016 9:18 am
- Contact:
Re: BEP-mod grafic tank problem
It is uploading right now. The Mod-PAck we use to play the tank and show his error.Arch666Angel wrote:Could you post a single frame of the turret sprite?
And only BEP-mod with the code for debbuging
-
- Burner Inserter
- Posts: 17
- Joined: Sun Apr 10, 2016 9:18 am
- Contact:
Re: BEP-mod grafic tank problem
http://www.mediafire.com/file/3mo8neuaz ... 4.0.12.rar
http://www.mediafire.com/file/rttj8uuaenuudm3/mods.rar
There is a problem at BEP>prototypes>entity>tank.lua [--panzer-3--]
pictures you will find under grafics>entity>tanks
http://www.mediafire.com/file/rttj8uuaenuudm3/mods.rar
There is a problem at BEP>prototypes>entity>tank.lua [--panzer-3--]
pictures you will find under grafics>entity>tanks
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: BEP-mod grafic tank problem
The red dot indicates the middle of the frame, the blue dot the (eyeballed) rotation point of the turret. They should best be on top of each other, so either you shift the picture ingame or go to your picture editor and move the sprite over.
Two other things, even if this produces bigger frames with empty pixels: It's much easier to deal with these if you size the frames to a multiple of 32/16 so in your example I would have chosen a size of 96 width and 80 height. Another thing is that in my experience you need some space between the last non empty pixel and the border of the frame, because factorio wont draw them. 16px is enough in some cases, I make most frames with a 32 pix empty border to be save.
Resized the picture to 200%:
Here is an example from one of my renders, the blue dot is the rotation point for the turret and also the center of the frame.
Two other things, even if this produces bigger frames with empty pixels: It's much easier to deal with these if you size the frames to a multiple of 32/16 so in your example I would have chosen a size of 96 width and 80 height. Another thing is that in my experience you need some space between the last non empty pixel and the border of the frame, because factorio wont draw them. 16px is enough in some cases, I make most frames with a 32 pix empty border to be save.
Resized the picture to 200%:
Here is an example from one of my renders, the blue dot is the rotation point for the turret and also the center of the frame.
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
-
- Burner Inserter
- Posts: 17
- Joined: Sun Apr 10, 2016 9:18 am
- Contact:
Re: BEP-mod grafic tank problem
Hey thank you. That is an excelent anwser, but how you make the blue and red dot? I need this tool too ^^
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: BEP-mod grafic tank problem
@Arch666Angel - with the transparent border autocropping that factorio does, have you noticed any variance in entity orientation?
When I was working with the wooden bridge sprites, the horizontal ones always worked fine... however the vertical ones would be cropped in strange ways and I often had to manually shrink down the transparent borders manually in the png images to prevent that from happening.
When I was working with the wooden bridge sprites, the horizontal ones always worked fine... however the vertical ones would be cropped in strange ways and I often had to manually shrink down the transparent borders manually in the png images to prevent that from happening.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
- Arch666Angel
- Smart Inserter
- Posts: 1636
- Joined: Sun Oct 18, 2015 11:52 am
- Contact:
Re: BEP-mod grafic tank problem
I usually make the transparent frame bigger if factorio crops the images, in most cases this fixes the problem. But there seem to be entity related restriction on how big a frame/sprite can be. For example an assembler can be almost any size you want, where a loader entity will be cropped if it is outside of the 2x1 area. So yeah your observation might be correct and it is an issue related to entities using orientation.aubergine18 wrote:@Arch666Angel - with the transparent border autocropping that factorio does, have you noticed any variance in entity orientation?
When I was working with the wooden bridge sprites, the horizontal ones always worked fine... however the vertical ones would be cropped in strange ways and I often had to manually shrink down the transparent borders manually in the png images to prevent that from happening.
Angels Mods
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"
I. Angel's Mods Subforum
II. Development and Discussion
III. Bugs & FAQ
"should be fixed"