Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Modding, Customising, Editing » Custom IMP Portrait Issues
Custom IMP Portrait Issues[message #336841] Mon, 20 October 2014 01:13 Go to next message
Vherid
Messages:6
Registered:October 2013
So I've been implementing my own custom imp portraits and etc, everything is working fine except for animations.

Personally I could care less for the animations, just the icon is good enough for me, but apparently using only a 1 image stacked STI because it doesn't animate froze the hell out of the game for a period of 30-90 seconds on every animation attempt, I assume it trying to look for the files and not finding anything and getting locked.

So I simply fixed the issue by giving it "fake" animations, and basically just copying the face on all 7 stacks, so it has things to blink between and is happy, but none of them are actually different so no animation shows.

The problem I have now, is that even with coordinates set to 0 on everything, and this is for sure on a new campaign, the portraits are constantly flashing when they animate, the consecutive images being about 1-5 pixels southeast of where the static image lays.

Looking in the face viewer, all 0 should sit the images perfectly over the static without moving, but for some reason it seems like the game refuses to acknowledge that I have it all set to 0 for the coords.

Any ideas?
Re: Custom IMP Portrait Issues[message #336842] Mon, 20 October 2014 01:23 Go to previous messageGo to next message
Flugente

 
Messages:3091
Registered:April 2009
Location: Germany
As you found out yourself, the subsequent images are used to display the eye and mouth movement. These are overlays over the original image. So you have a face and then images of slightly different mouths and eyes. These are then drawn over the face.

If I recall correctly,TableData/IMPPortraits.xml tells the game the offsets it should use for this. For example,


0
200
0
8
5
8
21
3
0
7
2
1
tells the game to use any 'eye'-pictures it has with an offset of 8/5 over the original face. In your case, this will copy over the same image then... I think setting the offsets to 0/0 should help you.


Re: Custom IMP Portrait Issues[message #336843] Mon, 20 October 2014 01:27 Go to previous messageGo to next message
Vherid
Messages:6
Registered:October 2013
Flugente
As you found out yourself, the subsequent images are used to display the eye and mouth movement. These are overlays over the original image. So you have a face and then images of slightly different mouths and eyes. These are then drawn over the face.

If I recall correctly,TableData/IMPPortraits.xml tells the game the offsets it should use for this. For example,


0
200
0
8
5
8
21
3
0
7
2
1
tells the game to use any 'eye'-pictures it has with an offset of 8/5 over the original face. In your case, this will copy over the same image then... I think setting the offsets to 0/0 should help you.


Right, so basically what I'm saying is that's what I've done, and it's still offset and flashing, despite all being 0/0.

[Updated on: Mon, 20 October 2014 01:27] by Moderator

Re: Custom IMP Portrait Issues[message #336845] Mon, 20 October 2014 01:32 Go to previous messageGo to next message
Flugente

 
Messages:3091
Registered:April 2009
Location: Germany
Hmm. In that case, are you sure you edited the correct xml (there is one in Data, and one in Data-1.13, which you should edit), and are there no offsets in the sti image itself? You can see those on the top bar of the editor.


Re: Custom IMP Portrait Issues[message #336846] Mon, 20 October 2014 01:40 Go to previous messageGo to next message
Vherid
Messages:6
Registered:October 2013
Wait are you saying I need to edit BOTH of those? I only edited the 1.13 one.

http://i.imgur.com/goIXyVL.png

   
      
      20
      221
      0
      0
      0
      0
      0
      1
      0
      0
      0
      0
   

[Updated on: Mon, 20 October 2014 01:41] by Moderator

Re: Custom IMP Portrait Issues[message #336848] Mon, 20 October 2014 01:46 Go to previous messageGo to next message
Flugente

 
Messages:3091
Registered:April 2009
Location: Germany
Nope, the 1.13 one should be enough...

What happens if you, say, overwrite the data of slot 18/218.sti with your picture instead?

[Updated on: Mon, 20 October 2014 01:47] by Moderator



Re: Custom IMP Portrait Issues[message #336849] Mon, 20 October 2014 01:52 Go to previous messageGo to next message
Vherid
Messages:6
Registered:October 2013
Flugente
Nope, the 1.13 one should be enough...

What happens if you, say, overwrite the data of slot 18/218.sti with your picture instead?


Do you want me to change 218's xml to point to my image, or save my image as 218?
Re: Custom IMP Portrait Issues[message #336850] Mon, 20 October 2014 01:53 Go to previous messageGo to next message
Flugente

 
Messages:3091
Registered:April 2009
Location: Germany
Save image as 218, and then go on from there to see whether the error is in the images or some data.


Re: Custom IMP Portrait Issues[message #336851] Mon, 20 October 2014 02:03 Go to previous messageGo to next message
Vherid
Messages:6
Registered:October 2013
Hmm, so I saved it as 218, quick made a imp with it, obviously it had preset Coordinates so it flashed, set them all to 0 for 218 and tried again, and it seems to be working. Not sure why it wasn't working for the others then, I'll try the others again to make sure.
Re: Custom IMP Portrait Issues[message #336852] Mon, 20 October 2014 02:15 Go to previous message
Hawkeye

 
Messages:1605
Registered:October 2005
Location: Australia
I'm surprised you won't have some sort of flashing while using frames as large as your first frame.
I had a similar issue when wishing to animate the entire face/frame rather than cut down pieces.

Kazuya made made this comment in the user made face database post;

Quote:
Well, there is a good reason why the eyes and mouth animations are stored in smaller pieces. The animation technique used by JA2 for the faces is called dirty rectangle animation. Your approach of using a subsurface with the same size as the original portrait goes against the very concept of dirty rectangle animation and several problems will inevitably arise.

As you correctly pointed out, the subsurfaces of the eyes and mouth are blited over at special coordinates in order to show up at the right place. If you insert a subsurface with the dimension of the portrait, that subsurface will be blited to the lower right, unless the coordinates are set to (0,0). Setting the eye coordinates to (0,0) is possible, but then all subsurfaces for the eyes have to use those coordinates as well.
You can not however use (0,0) for the mouth coordinates. The mouth coordinates should always have a higher y-value than the y-value of the eyes plus the height of the eyes subsurfaces. Setting the y-value of the mouth to zero will inevitably blit over the eye animation and therefore interfere with it.


If you are still getting flashes I suggest cropping your animation frames to something smaller and follow the co-ordinate steps above.


Previous Topic: Cyberpunk 2020
Next Topic: Save game editor
Goto Forum:
  


Current Time: Thu Aug 17 12:49:55 EEST 2017

Total time taken to generate the page: 0.00837 seconds