aliens

Author Topic: Incendiary mod  (Read 2970 times)

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Incendiary mod
« on: February 06, 2023, 04:02:59 am »
Hi everybody,
Is there a mod that gives incendiary rounds more direct hit damage? Kind of silly taking a rocket in the face doesn't cause massive damage on impact. Another thing that would make it more realistic is getting caught on fire should cause panic.

Offline Buscher

  • Colonel
  • ****
  • Posts: 167
    • View Profile
Re: Incendiary mod
« Reply #1 on: February 06, 2023, 10:12:09 pm »
No clue if there is one for vanilla.
But you can make your own sub mod. For example you can pick up the pistol mod to get you started.
Then you have to set up items: for type: STR_INCENDIARY_ROCKET, etc. and add a damageAlter with RandomType: 2.
For learning about items:, type, damageAlter and RandomType, checkout the handy reference.
Happy modding.

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Incendiary mod
« Reply #2 on: February 07, 2023, 02:07:40 am »
Thanks, Buscher. I want to learn how to mod, because I have a couple of good mod ideas. Do you know of any guides on creating a mod to change the look of a certain weapon?
« Last Edit: February 07, 2023, 02:38:06 am by Zeta Reticulan »

Offline Buscher

  • Colonel
  • ****
  • Posts: 167
    • View Profile
Re: Incendiary mod
« Reply #3 on: February 11, 2023, 05:30:58 pm »
I assume by look you mean that you want to edit the sprite.

Step one is probably to get the weapon sprites. Each weapon has 3 kind of sprites: Bigobs = Inventory pictures, Handobs = the sprites drawn as held by the soldier/alien for each of the 8 directions and floorob = the sprite on the battleScape floor/ground.

You can obtain the original files when you use Pckview as part of MapView to open the game files. MapView is actually a tool to create map tiles with but contains additional tools. The interesting files can be found in the UFO/UNITS directory: BIGOB.PCK, FLOOROB.PCK and HANDOB.PCK. Using PckView you can export the sprites as PNG for further editing.
Note that when you add elements to extraSprites Handobs will use 8 indices. That means if your gun handob with 8 directions is index 200, the next one should be 208 (200+8).

As for tools to edit the sprites with you can search around on the forum. Some are listed here and the community has made additional tools such as the UnitSprite Studio.

Edit: I meant Handobs when talking about the 8 indices with the 200+8 example
« Last Edit: February 12, 2023, 04:35:17 pm by Buscher »

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Incendiary mod
« Reply #4 on: February 12, 2023, 03:53:55 pm »
Thank you for the info, Buscher.

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Incendiary mod
« Reply #5 on: February 12, 2023, 06:13:51 pm »
I was looking under the different damagetypes you can place under damagealter. The description for ToMorale is, How much of the primary damage is applied to the unit's morale. Does that mean if the primary damage of the weapon is 60, and I want it to deal 100 damage to morale, I have to type, ToMorale: 1.7?

Offline Buscher

  • Colonel
  • ****
  • Posts: 167
    • View Profile
Re: Incendiary mod
« Reply #6 on: February 14, 2023, 07:14:02 pm »
ToMorale is a factor, so in essence yes.

But what you have to consider is damageModifier and armor. Let's say you hit a target and roll for 100 power. The target has a damageModifier to the related damageType of 50 % and the affected side of armor has a value of 20.

finalPower = power * damageModifier - remainingArmor
30 = 100 * 50 % - 20
Assuming ToHealth is 1 then it will turn into 30 Health Damage
Assuming ToMorale is 1.7 then it will also turn into 51 Morale Damage

Note that the 100 power in the scenario above is the result of a random value between 0-200% / 50-150% / etc. using the ammo's/weapon's power.

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Incendiary mod
« Reply #7 on: February 15, 2023, 12:29:24 am »
Sorry for asking so many questions. I created some sprites to replace the heavy cannon. For the index number of my sprites, do I just give it what ever number I want as long as I respect the reserved space for vanilla sprites? So for example, vanilla handobs goes up to 128, so I will be all right as long as my handob sprite is above 128?

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: Incendiary mod
« Reply #8 on: February 15, 2023, 01:41:00 am »
Here is a page with a list of the default used image values for base UFO & TFTD:
https://www.ufopaedia.org/index.php/Ruleset_Vanilla_IDs_(OpenXcom)

Only use an existing index if you are deliberately overwriting an image used by the base game, otherwise use a fresh index above those numbers. (It really doesn't hurt to always use numbers above the base games values for the sake of compatibility with other mods.)

Also if you run out of free image index numbers you can increase the number assigned to your mod in your metadata.yml file with the reservedSpace: setting.

For example reservedSpace: 3 will allow your BigOb, FloorOb & HandOb values to range to 3000 instead of the default 1000.

Ruleset Reference - metadata.yml:
https://www.ufopaedia.org/index.php/Ruleset_Reference_Nightly_(OpenXcom)#metadata.yml
« Last Edit: February 15, 2023, 01:46:38 am by The Martian »

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Incendiary mod
« Reply #9 on: February 15, 2023, 06:20:06 pm »
What would happen if I accidently gave my sprites the same index number of someone else's mod, and someone installs both mods? Would it cause errors?

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11452
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Incendiary mod
« Reply #10 on: February 15, 2023, 06:56:58 pm »
What would happen if I accidently gave my sprites the same index number of someone else's mod, and someone installs both mods? Would it cause errors?

This by itself will not cause errors. Each mod is indexed separately and all IDs are tallied together at the end. This means that even if you and some other modder use a bigob number 200, they will not conflict (most likely one of them will have an internal ID of 1200 and the other 2200, or something similar.)

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Incendiary mod
« Reply #11 on: February 15, 2023, 08:36:36 pm »
Awesome. Thanks, guys!

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Incendiary mod
« Reply #12 on: February 27, 2023, 12:55:32 am »
Hi everybody,
Is there a mod that gives incendiary rounds more direct hit damage? Kind of silly taking a rocket in the face doesn't cause massive damage on impact. Another thing that would make it more realistic is getting caught on fire should cause panic.

My own Harmony mod has exactly this. Take a look. You can easily copy the script right from the entries in items.rul, however it requires OXCE to work.
https://mod.io/g/openxcom/m/reavers-harmony-megamod
Sorry for the late response.

Offline Zeta Reticulan

  • Captain
  • ***
  • Posts: 65
    • View Profile
Re: Incendiary mod
« Reply #13 on: February 27, 2023, 02:00:27 am »
Thanks, Reaver. I created an incendiary mod shortly after I made this thread .

Offline The Reaver of Darkness

  • Commander
  • *****
  • Posts: 1510
    • View Profile
Re: Incendiary mod
« Reply #14 on: March 13, 2023, 10:04:08 am »
Thanks, Reaver. I created an incendiary mod shortly after I made this thread .
I know, but I thought you might want to take a look and see if my version has any ideas you'd like to steal for your own mod. =)