Jump to content

[Suggestion] Add a new skill property to skills_DB/skills.h


Gacrux

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  5
  • Reputation:   0
  • Joined:  08/09/12
  • Last Seen:  

So I was discussing the upcoming Rebellion class with a friend of mine, and the discussion eventually turned to how you almost never see any type of GS besides Shotgun users, and Pistol users.

Of course, we went over how OP Desperado is, especially with Kiel to reduce the 1-second delay.  At which point I mentioned that while after-cast delay can be reduced, cooldown can't. So I looked it up to see if Desperado had cooldown. It doesn't. But I noticed something else I had never seen on any Athena branch:

Desperado is supposed to deal between 0 and 10 hits. This is significantly more balanced, and much more of a gamble than it is now. Wherein it just deals 10 hits automagically to everything in a 7x7 area.

So, with my limited knowledge of VB (seeing as how it's the closest thing to C I know), I looked into the src, and noticed that the reason this happens on Athena branches, is because, as far as I know, there's no way to tell the server that the max number of hits is supposed to be randomized.

It doesn't seem awfully difficult to just add another skill property, maybe to multihit itself, that determines if it randomizes the number of hits or not. A simple 1/0 flag could do it.

Of course, I say it's "simple," but since I'm not overly familiar with C, or how the actual server handles skill calculations, it might also just be a massive headache. The src I'm looking at is also positively ancient, so for all I know, this might've even been fixed since my last repository checkout. If either of these is the case, just go ahead and shut this thread.

Otherwise, I think it may be at least worth a look to see if it can be done. If not, perhaps something in the way of at least jury-rigging Desperado to act as intended.

I'd be glad to try and at least give it a shot if someone could point me in the right direction, though!

EDIT:

I managed to stumble my way through the src and pinpointed that this should probably just be a skillcheck for Desperado in battle.c with a similar structure to the Ranger's check for Fearbreeze.

I'll take a stab at it myself. I can hazard a guess at how these functions are working, but I'm not really sure due to the fact that I program primarily in Java. Again, if someone wants to prod me in the right direction, I would appreciate it.

 

EDIT #2:
 

So, uh, I took a crack at it. Most likely chock full of errors, but I hope it at least kinda maybe tangentally touches on the base of how this works...

I added in some comments, if anyone wants to bother answering them, I'd appreciate it.

else if(sc && sc->data[SC_DESPERADO] && sd->weapontype1==W_REVOLVER
			&& (i = sd->equip_index[EQI_AMMO]) >= 0 && sd->inventory_data[i] && sd->status.inventory[i].amount >= 10) //I -think- I modifed this right... 
			//It should be doing a skillcheck (sc?) for Desperado, using the Revolver weapon type.
			//Then it checks if there's ammo equipped.
			//Then it checks if there's ENOUGH ammo equipped (>=10).
		{
			int chance = rnd()%11; //Between 0 and 10?
			//Can't find any documentation on how rnd() works in C, so I'm roughly basing it off of the Fearbreeze check below
			wd.type = 0x08;
			wd.div_ = chance; //If I understand right, wd.div handles the number of hits.
			wd.div_ = min(wd.div_,sd->status.inventory[i].amount); //Guessing this removes the right amount of ammo. 
			sc->data[SC_DESPERADO]->val4 = wd.div_-1; //Haven't the foggiest what this does... passes on the relevent info I guess?
		}
Edited by Gacrux
Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

That would go great to make it more balanced. And makes sense because you randomly shooting 10 shots towards an area. I give it a thumbs up!

 

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

About your db and skill propriety, that why I kinda introduce INF3 in skill_db to add some propriety in DB and remove some hardcoded.

Even tought I think we could add a field in col 6 (// 06 nk (skill damage properties))

0x100: randomize number of hit [0;x]

But if you look carefully you'll see we have 1 in number of hit for GS_DESPERADOS wich is kinda confusing :

516,0,8,4,-1,0x2,3,10,1,no,0,0,0,weapon,0,0x0,    GS_DESPERADO,Desperado

 

Anyway about the src you have edited, hmm you suppose DESPERADOS is a status, wich is ain't so taht wrong.

It's actually a hard one, were using an timered unit. => (skill_unit_cast_db).

A timered unit is a skill on floor that is trigger every x tick, wich is set to 100ms here :

516,0x86,    ,  3, 0, 100,enemy, 0x000    //GS_DESPERADO

Now that unit is staying on the floor for a x ms wich is defined as unit->limit,

Unit->limit when not specifyed in src is taken from (skill_cast_db.txt as duration 1)

516,0,1000,1000,1000,0,0,-1

So duration1 = 1s here

 

1s/100ms ok there is our 10 hits.

Now to randomize this we should reduce that duration between 1-10s (yeah 0 might be problematic)

so in skill.c:skill_unitsetting():

case GS_DESPERADO:

limit = 1+rnd()%10;

 

Now why we didn't set a row for limit in skill_unit_db, idk but I might do it cause this kinda suck atm.

NB : May I know where you found where the 10hit should be randomize so I can push a patch about it on repo ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...