OpenXcom Forum

Modding => Work In Progress => Topic started by: moriarty on July 08, 2014, 05:55:41 pm

Title: [craft weapon] MoriartyPlasmaCannon (please test for balancing!)
Post by: moriarty on July 08, 2014, 05:55:41 pm
this is WIP, but I thought I'd share it with you. my general aim is to craft a ruleset (or rather several rulesets that combine into one mod) that nerfs plasma weapons in a believable way. this mod modifies the craft plasma weapon:

I never understood why the craft plasma weapon was a beam weapon, while all handheld weapons shoot green globs. also, the taken-from-the-original-files-but-never-used-in-the-original-game UFOpedia text doesn't fit the description of a plasma weapon, instead talking about an imploding gravity field... whatever.

this mod is based on the following assumptions:
- the craft plasma weapon is based on the same technology the handheld plasma weapons use
- it shoots (big) green globs
- the weapon uses elerium for operation, but is made from alien alloys
- plasma dissipates when traveling through the atmosphere, limiting its range

what do you get from this ruleset file?

Plasma Beam is replaced by Plasma Cannon
Plasma Cannon has a range between stingray and avalanche missiles
Plasma Cannon has 30 shots; for each 10 shots, 1 unit of Elerium is needed to recharge
the projectile travels at a high speed (2,5 times the standard speed of a missile or cannon shot)
you need to research elerium and alien alloys before you can build a Plasma Cannon
building a Plasma Cannon doesn't use Elerium, but does use Alien Alloys (15 units)
UFOpedia text is changed accordingly

work to be done:
- new sounds?
(don't know about that, it actually doesn't sound that bad right now)

EDIT: new version is up
EDIT: icons finished! yay! try it out!
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: Chiko on July 08, 2014, 11:05:24 pm
Nice. I used to wonder the same. Also, I tried adding a new craft sound but would either not load it or crash the game, I was probably doing something wrong, though. And I haven't made a craft weapon icon yet but from what I read somewhere in the mod wiki, you need to add two images for the weapon. One for BASEBITS.PCK and one for the INTICON.PCK file. I think you can even load the same sprite for both.
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: moriarty on July 09, 2014, 01:53:55 am
ah, I see... I almost got it, see attached .zip file. Unfortunately, the icon for "BASEBITS.PCK" is not exactly the same, but I'm tired right now, and it doesn't look too bad, so I'm posting it even though it's still not quite finished :P
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: Mackus on July 10, 2014, 08:13:36 pm
Nice. Pretty sensible modification. Is it possible to make UFOs use new projectile instead of beam too?

I wonder is there any consistent reason for Laser Beam to have smaller range and accuracy than Plasma Cannon.
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: Solarius Scorch on July 11, 2014, 12:05:30 am
Nice. Pretty sensible modification. Is it possible to make UFOs use new projectile instead of beam too?

+1!
For consistency, and besides I think it'd suit the aliens better.

I wonder is there any consistent reason for Laser Beam to have smaller range and accuracy than Plasma Cannon.

All lasers in the game have smaller accuracy than other weapon types, so it sort of works... (Whether it makes sense or not is another thing.)
As for the range, lasers dissipate quickly in the atmosphere. This is a real life problem.
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: moriarty on July 11, 2014, 05:39:52 pm
All lasers in the game have smaller accuracy than other weapon types, so it sort of works... (Whether it makes sense or not is another thing.)
As for the range, lasers dissipate quickly in the atmosphere. This is a real life problem.

actually, if I'm right, lasers don't dissipate, they are diffused and absorbed, as well as suffering from refractive effects. that is a problem, true, but I think the dissipation that plasma "bolts" (in real-life physics, that should be a "magnetically self-constricting thermal plasma") suffer from is considerably higher.

so, Mackus, you have a valid point, and I completely agree. I'm trying to create a set of mods to make some in-game choices more relevant, and one of them will change the craft laser cannon to a very-high-range, very-high-accuracy weapon. it will still have rather low damage output, and I'm thinking about increasing the reload times, so you can't use it to snipe down any UFO from far away without any danger.


as for changing the UFO weapon behaviour, I honestly don't know if that is externalized (=changeable in the ruleset). if it's hardcoded, it can't be changed easily.
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: Solarius Scorch on July 11, 2014, 05:47:20 pm
actually, if I'm right, lasers don't dissipate, they are diffused and absorbed, as well as suffering from refractive effects. that is a problem, true, but I think the dissipation that plasma "bolts" (in real-life physics, that should be a "magnetically self-constricting thermal plasma") suffer from is considerably higher.

Okay, my English vocabulary is failing me when it comes to applied physics. :P But yes, that's what I meant.

Regarding plasma, it behaves strangely in many regards. Since it's mostly pseudoscience (plasma weaponry, not plasma itself), I think we can happily ignore it... Laser weapons on the other hand are pretty well understood.

Finally, would you mind if I add the mod to the FMP?
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: moriarty on July 11, 2014, 08:45:55 pm
Finally, would you mind if I add the mod to the FMP?

by all means, go ahead, add it :)

as for the physics terms (that was almost a dictionary flame, sorry about that), what I meant is that unlike plasma, which truly dissipates because it has particles interacting with the atmosphere, high-power lasers would probably have less trouble passing through atmosphere.
(apparently there are some weird effects with high-power lasers where the transition line between super-heated air and cold air acts like a lens, which diffuses the beam even more, but still, lasers being light beams, they pass through a whole lot of atmosphere with few problems.)

and because they travel at the speed of light, hitting a target should be way easier than with plasma globs (which is probably the most limiting factor for a weapon's useful range - the range at which it can reliably hit a target).
so a "reasonable" laser weapon would have a high range and high accuracy (which must then be balanced by for example low damage or low firing rate or limited ammo for game balance reasons). seeing as we already have a high-range/high-accuracy/high-damage/limited-ammo weapon (the fusion ball), I'd say the craft laser cannon should be low-damage and medium-low-firing-rate. something to soften up the UFO before finishing it with a missile (or plasma cannon), all the while hoping that it doesn't escape because you waited too long. that should make air combat a bit more interesting.


I'm still trying to add the icons for the craft weapons, but I'm running into palette problems again and again. probably because I'm still using The GIMP :P I was unable to extract the craft weapon icons from BASEBITS.PCK and INTICON.PCK, because my version of pckview doesn't display all of the contained icons... and the pictures from https://ufopaedia.org don't use the correct palette. can anybody help me?

I've attached my files, which do show up in the (also attached) mod ruleset, but the colors aren't perfect in-game, even though I've matched them with the corresponding palettes... help is always appreciated :)
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: redv on July 11, 2014, 09:05:37 pm
What about plasma hovertank?
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: moriarty on July 11, 2014, 09:15:32 pm
yeah, I figured as much, but I'm currently too stupid to make it right. what's the best image editor to use? The GIMP is obviously not good.
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: Falko on July 11, 2014, 09:18:04 pm
i use https://www.aseprite.org/ but i am not an accomplished "image maker"
Title: Re: [craft weapon change] MoriartyPlasmaCannon
Post by: moriarty on July 11, 2014, 09:22:28 pm
What about plasma hovertank?

what about it? it already uses the standard "green glob of plasma". do you mean using elerium as ammunition? if so, I guess you have a point there... I'll go right ahead and make a ruleset for it (but it's going to be a separate one, I think)
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: Solarius Scorch on July 11, 2014, 10:04:02 pm
Thanks for the green light!

and because they travel at the speed of light, hitting a target should be way easier than with plasma globs (which is probably the most limiting factor for a weapon's useful range - the range at which it can reliably hit a target).

I think these globs have to travel really, really fast, effectively also being quite accurate. The reason is, they're not very small, yet they have extremely low density (plasma!), so they'd skyrocket into the stratosphere right after leaving the barrel.

so a "reasonable" laser weapon would have a high range and high accuracy (which must then be balanced by for example low damage or low firing rate or limited ammo for game balance reasons). seeing as we already have a high-range/high-accuracy/high-damage/limited-ammo weapon (the fusion ball), I'd say the craft laser cannon should be low-damage and medium-low-firing-rate. something to soften up the UFO before finishing it with a missile (or plasma cannon), all the while hoping that it doesn't escape because you waited too long. that should make air combat a bit more interesting.

I think it's not far from this already.

I'm still trying to add the icons for the craft weapons, but I'm running into palette problems again and again. probably because I'm still using The GIMP :P I was unable to extract the craft weapon icons from BASEBITS.PCK and INTICON.PCK, because my version of pckview doesn't display all of the contained icons... and the pictures from https://ufopaedia.org don't use the correct palette. can anybody help me?

I've attached my files, which do show up in the (also attached) mod ruleset, but the colors aren't perfect in-game, even though I've matched them with the corresponding palettes... help is always appreciated :)

Sure, I'll give it a go. Give me a few minutes.

[/quote]
yeah, I figured as much, but I'm currently too stupid to make it right. what's the best image editor to use? The GIMP is obviously not good.

Photoshop, duh. :P
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: moriarty on July 11, 2014, 10:20:40 pm
I think these globs have to travel really, really fast, effectively also being quite accurate. The reason is, they're not very small, yet they have extremely low density (plasma!), so they'd skyrocket into the stratosphere right after leaving the barrel.

you mean from buoyancy? no way. plasma isn't necessarily low density. the high-energy plasma we're talking about here is probably sufficiently compressed to maintain a fusion reaction, otherwise it would cool down in milliseconds (also, if it doesn't have sufficient mass, it wouldn't travel very far (because high drag vs. low momentum). also, the buoyancy effect is probably less than the pull of gravity on a conventional bullet.

if you could fix the sprites, that would be really really cool. :)
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: Solarius Scorch on July 11, 2014, 10:35:20 pm
If the plasma was so dense, it'd also be really heavy... Or whatever, I don't even care that much, we're not writing an RPG game here.

I attached the sprites to the previous post. They're gifs, because that's what worked for me, but I can save them as png too - I'm just unsure it'll be fine.
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: moriarty on July 11, 2014, 11:02:01 pm
hmmm... something is still wrong with the colors. probably a color index problem:
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: Falko on July 11, 2014, 11:41:26 pm
he did not fix the palette
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: Solarius Scorch on July 12, 2014, 01:57:44 am
He used another file which used to work. :P

But there were some palette shenanigans, so I'll do it again... But I need to study it for a bit.

EDIT:

Try these versions. They're untested, since I can't access the game now, but the palettes should be fine (probably).

I'm not perfectly happy with inticon, but the palette has its limits, and so does my skill.
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: moriarty on July 12, 2014, 02:00:41 am
nope, still the same... :(
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: Falko on July 12, 2014, 02:23:43 am
use these
Edit: the palette here is also not original but varies only by less than 1% in its color values from the original (was i quick/ugly fix)
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: Solarius Scorch on July 12, 2014, 02:50:16 am
nope, still the same... :(

I have no explanation for this.

Let me upload my palettes, can someone tell me if they're wrong?
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: moriarty on July 12, 2014, 09:32:18 pm
use these
Edit: the palette here is also not original but varies only by less than 1% in its color values from the original (was i quick/ugly fix)

close, but no cigar... (see attached screenshots).

does anybody have real extracted basebits and inticon sprites? that would really be helpful...
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: Falko on July 12, 2014, 09:57:50 pm
here 2 examples with geo and basescape palette
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: moriarty on July 12, 2014, 10:55:39 pm
ah, sorry, I should have been more specific: does anybody have real basebits / inticon craft weapon sprites? (with the right in-game palette, of course)

that would make it way easier to create new weapon sprites, because you can simply modify them, directly picking the right colors from within the sprite. :)
Title: Re: [craft weapon change] MoriartyPlasmaCannon (sprite help needed)
Post by: moriarty on July 21, 2014, 02:03:10 pm
okay, update: thanks to Falko's help in the PCKview thread (https://openxcom.org/forum/index.php?topic=2426.msg27106#msg27106) I've now made fully working sprites for the new plasma cannon!

at least, I hope they're working. can anybody test them, please? and if you do, while you're at it: is the weapon okay like this? balancing issues? elerium use too high?

EDIT: another updated version...
EDIT2: aaaand another one... the inticon palette is still screwed.
Title: Re: [craft weapon] MoriartyPlasmaCannon (finished? please test!)
Post by: Roxis231 on July 23, 2014, 11:31:56 pm
Ok - I've instaled the current version - I'll try it tonight and see what happens.
Title: Re: [craft weapon] MoriartyPlasmaCannon (finished? please test!)
Post by: Falko on July 23, 2014, 11:42:26 pm
see image your image editor screws the palette .. again
it deletes the first color (0) and shifts all colors by one and creates the last color (255) as black and transparent?
Title: Re: [craft weapon] MoriartyPlasmaCannon (finished? please test!)
Post by: moriarty on July 24, 2014, 11:30:45 pm
my fault... again. I apologize for all the trouble, I was using the GIMP again because it's one of the few graphics editors I could run on our (semi-intentionally) crippled computers at work... but now I discovered IcoFX (https://portableapps.com/de/apps/graphics_pictures/icofx_portable)! it's lightweight, portable, obeys palettes (and loads them from .pal files) and has everything I need for pixel editing.


so here's the (hopefully) final version of my mod, with actual working icons. at last. ;)
Title: Re: [craft weapon] MoriartyPlasmaCannon (please test for balancing!)
Post by: LeBashar on July 25, 2014, 01:33:36 pm
Hello, is anyone know how can I use these icon not for replacing but in addition ? I want to make two plasma weapons :
- the cannon, like this one
- the beam, which could use older icons, with very short range and more power/accuracy (like if the plasma was channeled to shot directly and not shape in a ball).
Title: Re: [craft weapon] MoriartyPlasmaCannon (please test for balancing!)
Post by: moriarty on July 27, 2014, 06:01:47 pm
Hello, is anyone know how can I use these icon not for replacing but in addition ? I want to make two plasma weapons :
- the cannon, like this one
- the beam, which could use older icons, with very short range and more power/accuracy (like if the plasma was channeled to shot directly and not shape in a ball).

if the plasma cannon is supposed to be additional, all you need to do is change the "sprite" part at the top and the "extraSprites" sections, for example:
Code: [Select]
sprite: 15
extraSprites:
  - type: INTICON.PCK
    files:
      20: Resources/MoriartyPlasmaCannon/MoriartyPlasmaCannonInticon.png
  - type: BASEBITS.PCK
    files:
      63: Resources/MoriartyPlasmaCannon/MoriartyPlasmaCannonBasebits.png

the "sprite" part tells the game to use the icon at index "sprite + 5" in INTICON.PCK for the interception screen and the icon at index "sprite + 48" in BASEBITS.PCK for the basescape craft equip screen. of course, you need to change all the names in the ruleset to avoid overwriting other stuff (OR create the other plasma weapon as a different name, like PlasmaBeamWeapon), but I guess you know that part.
Title: Re: [craft weapon] MoriartyPlasmaCannon (please test for balancing!)
Post by: LeBashar on July 27, 2014, 07:04:07 pm
Yes, thanks. I have succes to make a new cannon. My fear was to erase a sprite by choose another number which could be wrong but it seem works.