Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New ammo type: cryo ammo
New ammo type: cryo ammo[message #343842] Sun, 24 January 2016 20:51 Go to next message
Flugente

 
Messages:3506
Registered:April 2009
Location: Germany
Sometimes, I don't feel like coding realistic stuff. I want stuff to blow up! Sound effects! Something cool!

So I coded this:

If you've ever played Crusader, Mass Effect or a few other games, you'll know how this works. Cryo ammo

  • is an ammotype, just like AP, HP, Tracer etc..
  • is obviously meant for scifi.
  • freezes any person it hits for 2 turns. This can be stacked up to 2147483648 times. I figure this will be enough.
  • does no damage on its own.
  • requires <ammoflag>1</ammoflag> in AmmoTypes.xml
  • However, frozen people take a lot more damage from any source - damage resistance is lowered by 1000%!
  • Frozen persons cannot move, talk, or do anything really. Because they are solid. Due to code limitations, animations are a bit wonky.
  • If a frozen person dies, they are shattered, which uses 2 new animations I added.
  • Vehicles cannot be frozen... but that's mostly because I don't want to do extra shatter animations for vehicles. Theoretically, anything could be shattered. But this requires new anims, an who is going to do those?
  • While frozen, soldiers do not take any gas damage at all. Because A. they cannot breath, because they cannot move B. I say so. Additionally, being affected by fire (molotov cocktail) speeds up the thawing of the soldier. As a result, you can survive standing in fire if someone else freezes you for the duration (thus we now have a very unconventional but working way of surviving being molotoved).
  • As of GameDir r2284, the rocket rifle now has cryo ammo (item #1738) as a scifi-only item. You can add this to any gun though - the new ammo can be found in Ammotypes.xml as ammo #33. I simply feel it makes most sense with the rocket rifle, as that thing needs a justification for being there.

This has been added to the trunk in r8034 & GameDir r2284. For obvious reasons, you need the GameDir data for this, as I've added new animations and sounds. Not doing so will cause your toothbrush to apply for joint custody.

Edit: For information, these are the currently existing ammo flags in AmmoTypes.xml for <ammoflag>:
// -------- added by Flugente: various ammo flags --------
// flags used for various ammo properties (easier than adding 32 differently named variables). DO NOT CHANGE THEM, UNLESS YOU KNOW WHAT YOU ARE DOING!!!
#define AMMO_CRYO				0x00000001	//1			// this ammo shock-freezes target
#define AMMO_BLIND				0x00000002	//2			// this ammo will blind if it hits the head
#define AMMO_ANTIMATERIEL		        0x00000004	//4			// this ammo is anti-materiel, bullets can destroy structures

[Updated on: Tue, 26 January 2016 01:06]




I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New ammo type: cryo ammo[message #343843 is a reply to message #343842] Sun, 24 January 2016 21:29 Go to previous messageGo to next message
silversurfer

 
Messages:2791
Registered:May 2009
Wtf? Certainly scifi! big grin



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
Re: New ammo type: cryo ammo[message #343845 is a reply to message #343842] Sun, 24 January 2016 22:14 Go to previous messageGo to next message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
Flugente wrote on Sun, 24 January 2016 19:51

[*] Vehicles cannot be frozen... but that's mostly because I don't want to do extra shatter animations for vehicles. Theoretically, anything could be shattered. But this requires new anims, an who is going to do those?


Depends. What do you have in mind for animations? AFAIK, the existing animated wrecks are just static pictures of the destroyed vehicles, in two orientations. Only the flames are animated, and that wouldn't be an issue here. The act of destruction itself isn't animated.

I think I could do shattered wrecks (lots of metal splinters and shards instead of bent metal, no blackening). jsd files for the heaps of scrap metal would be more of a problem. Is there a tutorial somewhere how to create jsds?



Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle

Report message to a moderator

Sergeant
Re: New ammo type: cryo ammo[message #343846 is a reply to message #343845] Sun, 24 January 2016 22:41 Go to previous messageGo to next message
Flugente

 
Messages:3506
Registered:April 2009
Location: Germany
While vehicle corpses normally have jsds, this wouldn't be a problem in this case, because... uh... the vehicle is shattered into tiny bits that then melt (Cryogenic ammunition does that, just take my word for it devil). In this case, one would only need an anim of a vehicle shattering.

I'm not exactly competent on how to create JSDs, but there is a tool for that: the JSDEditor_v1.2.1. In all likelyhood, you can find it on kermi's or Scheinworld's stashes of everything JA2-related. To my pleasant surprise, there is even a .avi video in there that explains how to create a jsds suprised. Slightly necessary, as parts of the editor are in russian, but it is very intuitive.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New ammo type: cryo ammo[message #343848 is a reply to message #343846] Mon, 25 January 2016 00:13 Go to previous messageGo to next message
wanne (aka RoWa21) is currently offline wanne (aka RoWa21)

 
Messages:1961
Registered:October 2005
Location: Austria
Nice. You should definitly add it to the trunk, of course SciFi only ;-)

[Updated on: Mon, 25 January 2016 00:14]

Report message to a moderator

Sergeant Major

Re: New ammo type: cryo ammo[message #343849 is a reply to message #343848] Mon, 25 January 2016 01:40 Go to previous messageGo to next message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
I'll look into the animations for vehicles. It might be necessary to have dedicated shattering anims for the different vehicle types. Normal vehicle destruction just overlays a generic fireball animation before switching to the specfic static wreck picture. I doubt that a generic shattering overlay will fit the same way.

Small rant: anims.slf is a mess. Naming conventions not followed, multiple *.sti copies stored in different dirctories, wrecks sometimes stored with their vehicles, sometimes in the seperate "corpses" folder, sometimes missing altogether. The same with .jsd files.
Digging through the animations really makes you wonder about Sirtech's project management and priorities. We get no animations for throwing from a crouched stance, but 312(!) frames for cows dying and even animations for bloating cow corpses (sic, and sick) ...

[Updated on: Mon, 25 January 2016 01:43]




Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle

Report message to a moderator

Sergeant
Re: New ammo type: cryo ammo[message #343850 is a reply to message #343849] Mon, 25 January 2016 09:55 Go to previous messageGo to next message
Parkan is currently offline Parkan

 
Messages:438
Registered:April 2010
Location: Russia,Sevastopol

I think it will be too much overpowered.What about enemy?Does it use such ammo too or not?Damage is too OP!


1.Serve the public trust
2.Protect the innocent
3.Uphold the law(c)Robocop

Report message to a moderator

Master Sergeant
Re: New ammo type: cryo ammo[message #343856 is a reply to message #343850] Mon, 25 January 2016 15:02 Go to previous messageGo to next message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
Slight correction to my last post, and a question for Flugente.
Normal vehicle destruction first switches to the static wreck picture and then overlays the explosion animation.

@Flugente: should a "frozen" vehicle turn white just like the soldiers in your video? If yes, do you take care of that somehow or do you need white versions of every vehicle frame?



Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle

Report message to a moderator

Sergeant
Re: New ammo type: cryo ammo[message #343858 is a reply to message #343856] Tue, 26 January 2016 01:03 Go to previous messageGo to next message
Flugente

 
Messages:3506
Registered:April 2009
Location: Germany
I am handling the white effect codewise, this works on any animation. I originally planned for soldiers to be totally frozen and not move at all, but due to the animation code being a rather silly place it doesn't always work that way.

http://i.imgur.com/jgmX76i.png
Anyway, for reference, here are the two animations I did purely in Paint. I have the artistic skills of a paraplegic squirrel, but thanks to everything being white, it does not look that bad.



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New ammo type: cryo ammo[message #343859 is a reply to message #343858] Tue, 26 January 2016 13:29 Go to previous messageGo to next message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
Ok, that saves a couple of frames. Still, we have 3 (Tank, Hummer, IC Truck) or 5 (if we include jeep and Eldorado) vehicles times 4 directions times 12 frames, 144 to 240 frames. With an additional 48 for every vehicle that may get added in the future.

And what about "eye candy" vehicles, those that are only tile set elements like the pickups at various farms or the planes at the airports? As a player I would expect that I can shatter them the same way...

Could you research cheeky this ammo a bit more?
Maybe if a hit on a frozen vehicle creates a blinding white flash before the shattering begins because of (insert techno babble), we could get away with using one generic cloud of shards and splinters.

Oh, and after seeing those animations: what happens if a prone chararcter is hit?

[Updated on: Tue, 26 January 2016 13:30]




Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle

Report message to a moderator

Sergeant
Re: New ammo type: cryo ammo[message #343860 is a reply to message #343859] Tue, 26 January 2016 14:14 Go to previous messageGo to next message
Flugente

 
Messages:3506
Registered:April 2009
Location: Germany
No need to overdo it (unless you really want happy ). A roughly vehicle-shaped block is enough (perhaps for each direction or so), provided it is shattered immediately. The thing will be purely white and if the block immediately breaks and flies everywhere, the player will barely have time to notice that we did a switcheroo ;)

Due to this (and me honestly being to lazy do do anims for all bodytypes and directions) we only have the above 2 anims. My Plan C was what you propose: a general purpose anim that fits everything. That would be really useful, as the above anims look silly for bugs and cows.

Eye candy vehicles, just like walls, trees, anything really, could be shattered as well. Some of the coding would be very awkward, but in theory I could colour them white just as well, and play a shattering animation upon destruction too.

Currently, prone characters use the crouched anim, simply because I'm a bit lazy devil



I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New ammo type: cryo ammo[message #343864 is a reply to message #343860] Tue, 26 January 2016 18:34 Go to previous message
CVB is currently offline CVB

 
Messages:129
Registered:September 2014
Location: Berlin
I'll try it out, but am still sceptical that one vehicle-shaped block will fit for the jeep as well as a tank. It will take a couple of days, maybe on the weekend.


Peace is a purely theoretical state of affairs whose existence we deduce because there have been intervals between wars.
J. Pournelle

Report message to a moderator

Sergeant
Previous Topic: New feature: Campaign History
Next Topic: New feature: move equipment via assignment
Goto Forum:
  


Current Time: Sun Mar 23 20:57:13 GMT+2 2025

Total time taken to generate the page: 0.00984 seconds