Author Topic: OXCE Future plans  (Read 13284 times)

Online krautbernd

  • Colonel
  • ****
  • Posts: 477
    • View Profile
Re: OXCE Future plans
« Reply #75 on: April 09, 2019, 10:50:45 pm »
Its not 1x1, its 3x3 with 4 craft capacities, and Large workshop with 1 craft cap. But yes, only 1 craft show, not more.

Again, this is about being able to assign actual craft and hangar sizes/types, not about buildings.

Offline Alex_D

  • Colonel
  • ****
  • Posts: 270
    • View Profile
Re: OXCE Future plans
« Reply #76 on: April 10, 2019, 04:29:49 am »
Probably biggest problem was automatic handling of free space. You have X^Y combinations to check. Last time I worked on this it did needed lot of testing to work correctly. And testing is not thing that programmers like doing :>

We the players are for testing :-)
What is the structure of the space management you planned?


On another topic: Recalling the last reading of the mind probe (and similar devices). Like it's done with the Motion Scanner, is there any combination of of keys that would allow the player to see again the last mind probe read? Currently I take a screenshot, but that's not an elegant solution.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 8742
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: OXCE Future plans
« Reply #77 on: April 10, 2019, 11:42:58 am »
Yankes, are you planning to enable displaying several crafts per hangar as well?

Online krautbernd

  • Colonel
  • ****
  • Posts: 477
    • View Profile
Re: OXCE Future plans
« Reply #78 on: April 10, 2019, 03:42:52 pm »
Probably biggest problem was automatic handling of free space. You have X^Y combinations to check. Last time I worked on this it did needed lot of testing to work correctly. And testing is not thing that programmers like doing :>

Would this still be a problem if the sizes are exclusive? As in, only one size can be assigned per craft/hangar?

Default/vanillar hangar or non-defined size defaults to 1, number of free slots per hangar also defaults to 1 if not assigned to not break compatibility. Check the largest hangar size and max. number of total hangar slots per size, create an array with 1:[largest size] lines and 1:[max. hangar slots] columns. Write a 1 for every free slot per size. The sum of the array gives you your total slots.

Do the same for the crafts. Pad both arrays accordingly. Substract the craft array from the hangar array. The sum of the resulting array is your (total) free hangar space. Check the sums of the individual line vectors. If any of those are 0 or negative there is no free space for that type of craft.

Disclaimer: Above is (a probably overcomplicated way of) how i would implement this in matlab. I'm very bad at matlab and have no idea how this should actually be implemented.


You could always allow multiple sizes later on, but i for one would be happy to even be able to assign one type of size per craft/hangar. I think having multiple sizes per hangar while also having multiple slots per hangar might be overly complicated, at least for an initial implementation.
« Last Edit: April 10, 2019, 04:10:45 pm by krautbernd »

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2139
    • View Profile
Re: OXCE Future plans
« Reply #79 on: April 10, 2019, 09:52:17 pm »
Yankes, are you planning to enable displaying several crafts per hangar as well?
Right now I do not write any code that would do this, but overall functionality have explicit link between crafts and hangars.

Again, this is about being able to assign actual craft and hangar sizes/types, not about buildings.
Low level testing, I even do not run game once, probably over moth of coding without any tests. And I know first report: "game crash" and this will not help much.


Would this still be a problem if the sizes are exclusive? As in, only one size can be assigned per craft/hangar?

Default/vanillar hangar or non-defined size defaults to 1, number of free slots per hangar also defaults to 1 if not assigned to not break compatibility. Check the largest hangar size and max. number of total hangar slots per size, create an array with 1:[largest size] lines and 1:[max. hangar slots] columns. Write a 1 for every free slot per size. The sum of the array gives you your total slots.

Do the same for the crafts. Pad both arrays accordingly. Substract the craft array from the hangar array. The sum of the resulting array is your (total) free hangar space. Check the sums of the individual line vectors. If any of those are 0 or negative there is no free space for that type of craft.

Disclaimer: Above is (a probably overcomplicated way of) how i would implement this in matlab. I'm very bad at matlab and have no idea how this should actually be implemented.


You could always allow multiple sizes later on, but i for one would be happy to even be able to assign one type of size per craft/hangar. I think having multiple sizes per hangar while also having multiple slots per hangar might be overly complicated, at least for an initial implementation.
First of all, I paned that each hangar can store selected types of crafts, and this can overlap with other hangars. This mean one hangar can be used to store A, B or C, another can store A or B, and last hangar only B. Now depending order in with you allocate you can end up with free hangars and not allocated crafts.
e.g.  first get craft A, second B and last one cant fit C because only allow B. And now consider that you have 16 hangars and 16 crafts with different types.

Over all I write already algorithm that should solve this in some effective manner but it need lot of testing to fix all corner cases.


For any one interested WIP branch: https://github.com/Yankes/OpenXcom/commit/08bc53208f0e9dabdfccc323f5c6ac1a4c826bf9

Online krautbernd

  • Colonel
  • ****
  • Posts: 477
    • View Profile
Re: OXCE Future plans
« Reply #80 on: April 11, 2019, 05:08:56 pm »
For any one interested WIP branch: https://github.com/Yankes/OpenXcom/commit/08bc53208f0e9dabdfccc323f5c6ac1a4c826bf9

I take it those changes aren't implemented in the nightlies?

Offline Meridian

  • Global Moderator
  • Commander
  • ***
  • Posts: 5377
  • Aaand we're back!
    • View Profile
    • My Wiki
Re: OXCE Future plans
« Reply #81 on: April 11, 2019, 05:10:16 pm »
No WIP is ever in nightlies.

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2139
    • View Profile
Re: OXCE Future plans
« Reply #82 on: April 11, 2019, 08:16:38 pm »
Or in OXCE, this is simple state of my not finished work on this feature. When it will be done, then I will add it to OXCE.

Offline karnaugh_map

  • Sergeant
  • **
  • Posts: 33
    • View Profile
Re: OXCE Future plans
« Reply #83 on: May 26, 2019, 08:16:15 pm »
Fitting various craft into various hangers sounds a lot like the knapsack problem. Good luck!

Offline mercy

  • Colonel
  • ****
  • Posts: 309
    • View Profile
Re: OXCE Future plans
« Reply #84 on: September 02, 2019, 03:29:09 pm »
Any possibility to display kung-fu / martial arts moves for the soldiers? To visually make your job easier:
I guess the first frame of the new animation  should start from the resting pose you have = standing soldier, like now. Then continuing from that normal standing pose an animation that plays out a full a high kick for example, ending back in a pose near the resting pose. Maybe in a frame that is closer to the normal standing pose, but with some slightly bent knees and hands raised, to allude to being in "MMA mode" ?

Do you see it possible playing out additional animations, like this, if you have the new sprite sheet available that begins with your current standing soldier anim frame?

Offline mercy

  • Colonel
  • ****
  • Posts: 309
    • View Profile
Re: OXCE Future plans
« Reply #85 on: September 02, 2019, 03:34:17 pm »
Big Ships for XCOM:
The other day I was reading the big government / alien ship reports / results of interrogations and I thought what if XCOM could get a hold of those big ships? Shrine ship or a two decker gunboat?   Seizing ships?  Hauling one of the bigger trader or two-decker ships home and starting to repair them for 1 or 2 months.          Ah, forget it. Just a silly thought.

Online krautbernd

  • Colonel
  • ****
  • Posts: 477
    • View Profile
Re: OXCE Future plans
« Reply #86 on: September 02, 2019, 05:00:13 pm »
Any possibility to display kung-fu / martial arts moves for the soldiers? To visually make your job easier:
I guess the first frame of the new animation  should start from the resting pose you have = standing soldier, like now. Then continuing from that normal standing pose an animation that plays out a full a high kick for example, ending back in a pose near the resting pose. Maybe in a frame that is closer to the normal standing pose, but with some slightly bent knees and hands raised, to allude to being in "MMA mode" ?
Wouldn't that require different combat modes to begin with? Also, seeing how all forms of combat have to be handled on a "per item" basis (including the pseudo melee / integrated weapons options) you'd probably have to include extended sprite sheets for all soldiers in the weapon definition and be able to link to the correct sprite sheet.
Big Ships for XCOM:
The other day I was reading the big government / alien ship reports / results of interrogations and I thought what if XCOM could get a hold of those big ships? Shrine ship or a two decker gunboat?   Seizing ships?  Hauling one of the bigger trader or two-decker ships home and starting to repair them for 1 or 2 months.          Ah, forget it. Just a silly thought.
Isn't this possible alrady? Spawn an item in the mission that is used to manufacture said ship/craft/whatever. I don't think that this would need any added functionality in OXCE.
« Last Edit: September 02, 2019, 05:06:46 pm by krautbernd »

Offline mercy

  • Colonel
  • ****
  • Posts: 309
    • View Profile
Re: OXCE Future plans
« Reply #87 on: September 02, 2019, 08:09:09 pm »
Wouldn't that require different combat modes to begin with? Also, seeing how all forms of combat have to be handled on a "per item" basis (including the pseudo melee / integrated weapons options) you'd probably have to include extended sprite sheets for all soldiers in the weapon definition and be able to link to the correct sprite sheet.
I meant for "punch!" and for any already existing moves, like the martial arts for Gals and those kicks for the gnomes.  Instead of a mini hurricane / whirlwind sprite effect, "the gnome girl's normal standing sprite" would be replaced with the first sprite from the "kick" spritesheet and the entire action would end in the position "the gnome girl's normal standing sprite".
This was done beautifully, albeit a little bit too fast in Tactics Ogre: Let Us Cling Together.

Online krautbernd

  • Colonel
  • ****
  • Posts: 477
    • View Profile
Re: OXCE Future plans
« Reply #88 on: September 02, 2019, 10:02:18 pm »
I meant for "punch!" and for any already existing moves, like the martial arts for Gals and those kicks for the gnomes.  Instead of a mini hurricane / whirlwind sprite effect, "the gnome girl's normal standing sprite" would be replaced with the first sprite from the "kick" spritesheet and the entire action would end in the position "the gnome girl's normal standing sprite".
Hit sprite effects are simply overlaid unto unit sprites, and afaik they don't take direction/facing into account. Simply replacing them wouldn't work. You'd probably have to have separate hit animations for every facing direction for every unit type/variety (including skin tones+armor variants).

Offline Yankes

  • Moderator
  • Commander
  • ***
  • Posts: 2139
    • View Profile
Re: OXCE Future plans
« Reply #89 on: September 02, 2019, 10:19:45 pm »
Different hit animation is partially available in scripts, you can add new sprite that represents melee hit but you do not have all needed info to make it work correctly.
https://www.youtube.com/watch?v=q0-RwIvLUxw units on this video are NOT rotating, only script enforce rotation of sprites.

Right now only thing that scripts lacks is detection of moment when start playing this new animation.