Author Topic: Civilian medi-kit  (Read 11680 times)

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Civilian medi-kit
« on: December 14, 2013, 08:25:25 pm »
In the early days of the alien invasion, XCOM could use civilian-grade medi-kits. They provided 3 uses of HEALING, STIMULANT and PAIN KILLER. However, their bulk and weight limited their use to dedicated "Combat medics". Soon, XCOM felt the need to invent more efficient healing tools.


This expensive kit (10000$) may be used if you feel the need to save some rookie's life before medikit become available. Weight is 15 (!) and the 2x2 box can only fit in hand and backpack.
The Ufopedia text points to the other medikit's, so it uses available translations. I originally called it Medipack but the action "Use medi-kit" can't be customized by item.

I don't know what's the norm for modders to number new resources (like bigSprite), so I picked my member number (1020) and started counting at 00 for any sprite I may add. This should avoid conflicts.

Caveat:
The auto-equip system assumes that any healing item (battleType 6 = BT_MEDIKIT) is 1x2 and should be auto-equipped in top-right slot of belt...
I'm really not sure what to suggest to coders to make auto-equip more mod-friendly, because it's just impossible to be future-proof. Maybe, just maybe, it would already solve a lot of cases by providing a "no auto-equip" flag that modders can put on all items that auto-equip can't handle by itself. Anyway, auto-equip was only useful in vanilla because it didn't remember soldiers' equipments.

I drew the graphic from scratch, I put all this in public domain : Feel free to re-use, tweak to your liking, or use as a base for anything.
« Last Edit: April 20, 2014, 11:50:03 pm by yrizoud »

Offline Daedalus

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Civilian medi-kit
« Reply #1 on: December 18, 2013, 08:57:22 pm »
I don't know what's the norm for modders to number new resources (like bigSprite), so I picked my member number (1020) and started counting at 00 for any sprite I may add. This should avoid conflicts.

I think the numbers are seperate for each ruleset. I have few mods installed in my OXC which use the same sprite numbers and all of those mods work correctly, no graphics are overwritten. So it should work just fine if you use the first free sprite numbers.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Civilian medi-kit
« Reply #2 on: December 18, 2013, 10:56:18 pm »
Great! Thank you for the information.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Civilian medi-kit
« Reply #3 on: April 20, 2014, 05:16:13 pm »
Updated to v2 : upgraded graphic, added a floorobj, added listobj so it's listed before the researchable items, and increased TU cost to 20% instead of flat 10.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11755
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Civilian medi-kit
« Reply #4 on: April 20, 2014, 08:21:15 pm »
It's an interesting idea, but I'll wait for the mod to be complete - primarily for the handobs. It shouldn't be too hard, considering how skilled you seem to be with 2D graphics.

I would also like to ask you to add listOrder flags to the ruleset under "items":
Code: [Select]
    listOrder: 4290Because Medikit is 4300.

I can see you've already made a Ufopaedia listOrder; I'll assume it's directly above Medikit (can't check it right now). If it's just 1 point less (which I assume it is, seeing as the number is 4199), I would also advise you to change it to 4190 to leave some space between this and the Medikit, just in case.

See, I'm in the process of disassembling listOrder structure, so I'm a bit focused on it. :P

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Civilian medi-kit
« Reply #5 on: April 20, 2014, 11:51:29 pm »
v3, updated according to your comments : hand objects and fixed listOrder.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11755
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Civilian medi-kit
« Reply #6 on: April 20, 2014, 11:57:36 pm »
Awesome thanks - will use :)

One more thing though: it's called "Civilian Medi-Kit", which is a little weird - after all, it's anything but civilian. :) Why not simply call it a "First Aid Kit"? It's different enough from the Medikit, and it indicates that this item is "low-level", in the context of game logic.

EDIT: all's fine, although most (not all) handob orientations look a bit weird, like half the item is missing. It is especially visible when the soldier looks to the left.
« Last Edit: April 21, 2014, 12:02:40 am by Solarius Scorch »

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Civilian medi-kit
« Reply #7 on: April 21, 2014, 12:57:04 am »
The action menu still shows "Use medi-kit", so I had to get creative - on the upside, it allowed me to re-use the medikit Ufopedia text for all languages.
I know some rotations look weird, but the issue is that the game engine draws the kit UNDER the legs in some angles. It's an engine limitation that stopped me in my attempt to draw a tactical shield...

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11755
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Civilian medi-kit
« Reply #8 on: April 21, 2014, 01:07:05 am »
The action menu still shows "Use medi-kit", so I had to get creative - on the upside, it allowed me to re-use the medikit Ufopedia text for all languages.

I don't think you really need to stick to the word, as I understand that the "Use medi-kit" command refers to the whole class of healing devices, not a particular "Medikit" item. I don't think there would be any confusion or bad logic, and the "first aid kit" name would look much better. It's your party though, do whatever you wish. :)

I know some rotations look weird, but the issue is that the game engine draws the kit UNDER the legs in some angles. It's an engine limitation that stopped me in my attempt to draw a tactical shield...

Well, pity. I feared something like this... But nevertheless, these sprites look good. Nice work!

Offline Dioxine

  • Commander
  • *****
  • Posts: 5461
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: Civilian medi-kit
« Reply #9 on: April 21, 2014, 03:53:06 am »
To avoid conflicts with other mods, do NOT use Bigob/Handob/Floorob indexes over 1000 :)

The first available numbers should be:
- Bigob: 57
- Floorob: 73
- Handob: 128

Offline Recruit69

  • Colonel
  • ****
  • Posts: 110
    • View Profile
Re: Civilian medi-kit
« Reply #10 on: July 25, 2014, 11:04:16 pm »
This medical kit uses 20 TUs but in the battlescape, it says a cost of 10 TUs per use?