Author Topic: HANDOB Position  (Read 5579 times)

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
HANDOB Position
« on: December 07, 2014, 09:51:34 pm »
Is HANDOB position configured per draw routine? Is it configurable? Is it a dynamically generated y position? I'm working on a sprite derivative of the arthropod, which looks to be a derivative of the muton. the HANDOB sits lower than it should, and the length of the torso is longer on my sprite so not sure if it's calculating something there based on the first non blank pixel it finds on the y axis, or if it's always positioned at something like 20 pixels from the bottom. Just trying to figure out if this is something I fix in code or if I need to adjust the sprites?

Attached is both units overlaid, so you can see the height difference between the two layers. although onion skinning these should still result in everything lining up properly for the unit sprite, just not the default HANDOBS.

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: HANDOB Position
« Reply #1 on: December 07, 2014, 10:39:44 pm »
see here
https://github.com/SupSuper/OpenXcom/blob/master/src/Battlescape/UnitSprite.cpp#L245
mutons and other soldier have different x/y positions
other drawingroutines have similar defined positioniong rules

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: HANDOB Position
« Reply #2 on: December 08, 2014, 03:45:01 am »
positioning is based on the unit's height.

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: HANDOB Position
« Reply #3 on: December 08, 2014, 04:12:43 am »
positioning is based on the unit's height.

Is there any way to override in the rule file? I swapped out my custom sprite with the original muton implementation in the xcom 1 ruleset and it still seems like the handob sits below the hand.

looks like stand and kneel values on the unit control the positioning to some degree, but not sure what the values translate to. I had vales from a shorter unit and it was messing things up.
« Last Edit: December 08, 2014, 04:28:37 am by jackstraw2323 »

misterx

  • Guest
Re: HANDOB Position
« Reply #4 on: January 16, 2020, 04:12:24 pm »
Interesting topic, should be moved in the "help" section: https://openxcom.org/forum/index.php/board,24.0.html

So actually if i got correctly: handob are automatically generated by openxcom or these must be drawned bythe modder?

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9090
    • View Profile
Re: HANDOB Position
« Reply #5 on: January 16, 2020, 04:18:57 pm »
must be drawn

misterx

  • Guest
Re: HANDOB Position
« Reply #6 on: January 16, 2020, 06:19:24 pm »
ok thanks. But how determine the position?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11722
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: HANDOB Position
« Reply #7 on: January 16, 2020, 07:03:28 pm »
ok thanks. But how determine the position?

It's the graphics itself, plus the unit height definition.

misterx

  • Guest
Re: HANDOB Position
« Reply #8 on: January 28, 2020, 02:37:26 pm »
OK, some more info here  :)