Author Topic: multi-hit lightsaber discussion and testing...  (Read 3381 times)

Offline HokieBT

  • Moderator
  • *****
  • Posts: 514
    • View Profile
multi-hit lightsaber discussion and testing...
« on: February 08, 2010, 12:53:28 PM »
I was testing with coding a lightsaber that could kill multiple people at once.  Its possible, see screenshots below, but there are some issues with it.   I don't think this could ever be given to all troops and replace the current lightsabers in the game, but it might be fun to have these as optional lightsabers the player can use, etc.

1) in order for the code to work, and so that the swing animation doesn't stop when you hit somebody, I had to combine some flags to make it a 'thrown' weapon with some attributes of a regular sword.  So originally I could attack/defend, but it wouldn't hurt anybody if I swung at them, it doesn't throw anything at them either, and you see the number 1 and icon in the bottom right, etc.

2) So in order to make enemies take damage, I have to code you hurting them.   What I'm currently doing is killing anybody who is in front of the player and less then X cm away (we can adjust the distance as needed).  This works ok, but has limitations such as:
     a) currently the attack is un-blockable by enemies.  I could potentially code in a random chance of you missing, or them blocking if they had a certain weapon (ie lightsaber, etc).
     b) currently I kill them, but I could also have it do a random amount of damage (ie. 25-75 hit points, etc).  Also, their armor doesn't reduce the damage, so maybe this range should really be 10-40 hp or something like that....
     c) Your skills, stats, weapon proficiencies, etc, don't affect damage unless I added that to the code for damage.
     d) it currently hurts anybody in a 180 degree radius in front of you, so even if you do a thrust animation between two enemies and miss them, you would end up killing both of them since they were close and in front of you.  So I might remove thrust/overhand chop animations from these lightsabers and only allow you to slash left/right since it might look a little more realistic.
     e) like the heavy weapons, can drastically imbalance gameplay, so we may not want it to be instant-kill, etc.

I want to use this thread to discussion this concept, and hopefully post code you guys can test out and give feedback.

         
« Last Edit: February 08, 2010, 12:58:15 PM by HokieBT »

Offline HokieBT

  • Moderator
  • *****
  • Posts: 514
    • View Profile
Re: multi-hit lightsaber discussion and testing...
« Reply #1 on: February 08, 2010, 12:56:03 PM »

multi-hit lightsaber test #1

If people want to test this concept, I THINK this should work....

1) backup your item_kinds1.txt and then open it in notepad
2) replace this code
Code: [Select]
itm_lightsaber_red Lightsaber Lightsaber 2  lightsaber_red 0  lightsaber_redoff 3458764513820540928  71761923 9223635920677241343 907 286740 0.500000 60 0 0 0 12 11264 120 0 115 0 331 331
0

3) with this code
Code: [Select]
itm_lightsaber_red Lightsaber_(testing_multi-kill_concept) Lightsaber_(testing_multi-kill_concept) 2  lightsaber_red 0  lightsaber_redoff 3458764513820540928  71700490 9223635920677241343 3000 0 0.500000 100 0 0 0 0 11264 120 1 115 1 331 331
1
-51.000000  16 1700 1 1224979098644774912 1710 2 1 1224979098644774912 12 1 1224979098644774913 1702 1 1224979098644774913 2147485354 1 1224979098644774913 1710 2 2 1224979098644774913 2147484361 2 2 1 710 3 1224979098644774914 1 2 2147483678 2 1224979098644774914 225 1720 3 1224979098644774915 1224979098644774913 1 2136 3 1224979098644774916 10 50 2106 2 1224979098644774915 1224979098644774916 1721 3 1224979098644774913 1224979098644774915 1 1722 2 1224979098644774912 1224979098644774913 1750 2 1224979098644774913 1152921504606847094 3 0

I believe this will allow the normal red lightsaber to hurt multiple people at once.  Damage will be randomly chosen between 10-40 and right now this code only works for the player.
« Last Edit: February 08, 2010, 12:58:39 PM by HokieBT »

Arzeal

  • Guest
Re: multi-hit lightsaber discussion and testing...
« Reply #2 on: February 14, 2010, 09:39:11 PM »
nice concept, how about Force Push which push down every enemies on the ground?

Peralta

  • Guest
Re: multi-hit lightsaber discussion and testing...
« Reply #3 on: February 15, 2010, 07:13:40 AM »
nice concept, how about Force Push which push down every enemies on the ground?

Ehm, is it just me or does this have very little to do with the subject of this topic?  ::)

Offline Swyter

  • Administrator
  • *****
  • Posts: 413
  • �Star Wars Conquest Dev Team Coordinator
    • View Profile
    • [my tiny homepage]
Re: multi-hit lightsaber discussion and testing...
« Reply #4 on: February 15, 2010, 09:47:03 AM »
My Mount&Blade Tools: � Iron Launcher for Warband � Iron Launcher � Font Customiser � WarKit

Offline HokieBT

  • Moderator
  • *****
  • Posts: 514
    • View Profile
Re: multi-hit lightsaber discussion and testing...
« Reply #5 on: February 15, 2010, 10:52:03 AM »
we're going to try and make better force powers, but its probably a lower priority.

Anyway, in terms of this multi-hit lightsaber, the on_weapon_attack trigger doesn't work for melee weapons....  :(     So I either have two options:

1) make it a throwing weapon with sword attacks/blocks like I currently did, and this is a little easier to code and implement, better performance, etc.

2) make it a regular sword, and have a trigger running over 0.1 seconds that checks if you swing and then applies some additional code.  This is more difficult and may hurt performance worse since every X seconds you'd have to check if every agent on the battlefield had one of these weapons and was swing it, etc.   There are potentially other problems with this concept because the weapon would stop on the first person you hit, although I could probably make the weapon reach zero, but I'm not sure if they would cause the blocking not to work anymore?

Anyway, this concept was more because I was bored, and though it would be fun to add another 'fun' item to the game.   But I doubt we'll ever be able to get this working well enough that we'd replace all lightsabers with these, etc.
« Last Edit: February 15, 2010, 10:54:26 AM by HokieBT »

Revan Shan

  • Guest
Re: multi-hit lightsaber discussion and testing...
« Reply #6 on: February 15, 2010, 04:51:00 PM »
we're going to try and make better force powers, but its probably a lower priority.

Anyway, in terms of this multi-hit lightsaber, the on_weapon_attack trigger doesn't work for melee weapons....  :(     So I either have two options:

1) make it a throwing weapon with sword attacks/blocks like I currently did, and this is a little easier to code and implement, better performance, etc.

2) make it a regular sword, and have a trigger running over 0.1 seconds that checks if you swing and then applies some additional code.  This is more difficult and may hurt performance worse since every X seconds you'd have to check if every agent on the battlefield had one of these weapons and was swing it, etc.   There are potentially other problems with this concept because the weapon would stop on the first person you hit, although I could probably make the weapon reach zero, but I'm not sure if they would cause the blocking not to work anymore?

Anyway, this concept was more because I was bored, and though it would be fun to add another 'fun' item to the game.   But I doubt we'll ever be able to get this working well enough that we'd replace all lightsabers with these, etc.

Personally I think the mele lightsabers were ok. I see no need of changing them. Only the lightsaber throw, and it's gone so... perfect.