Charging the attack - Technical Code here

Content and general development discussion, including maps, quests, and server code from the development team.
Post Reply
MathGeek
Peon
Peon
Posts: 52
Joined: 13 Nov 2004, 23:07
Location: Calgary AB. Canada

Charging the attack - Technical Code here

Post by MathGeek » 04 Dec 2004, 22:47

Came up with an idea for charging up the attack like in SOM.

Here's the code:

//player->attack_power starts as an integer at 0

if(key[KEY_LCONTROL]) {
if ( attack power == 0 )
attack( 0 );
player->attack_power++;
}
else{
if ( player->attack_power > 1 ){
attack(player->attack_power);
}
player->attack_power = 0;
}

So I think that would allow for minimal alteration to the game. The attack function is not the one used in the game, but can be changed easy enough. Hope that this can be done.
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Post by ElvenProgrammer » 05 Dec 2004, 10:41

I understand your idea, but the code should be improved a bit, it's not that hard. The problem is the time else I would have done it...if you can manage to create some working code give it to me and I'll add it. :D
T7g
Peon
Peon
Posts: 7
Joined: 17 Nov 2004, 09:53

Post by T7g » 07 Dec 2004, 18:44

yeah, and don't forget, SoM's battle system penalized you for attacking at low charge levels
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Post by ElvenProgrammer » 07 Dec 2004, 21:34

Mmm this is a bit harder they only thing I can promise is that if you attack while charging you won't do any damage.
User avatar
SimEdw
Peon
Peon
Posts: 12
Joined: 28 Aug 2004, 22:28
Location: Sweden
Contact:

Post by SimEdw » 09 Dec 2004, 21:32

One way to do it is to send a package for every sec of charging. Then when the cilent sends the attack to the server the server can check if the charging was high enough and what damge that should be caused.

This is the only way to prentend evil hackers from making there own client where they always gets a giant charge in no time.
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Post by ElvenProgrammer » 09 Dec 2004, 22:16

The problem is that athena doesn't support this fighting system. :(
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: 08 Sep 2004, 20:48
Location: Espoo, Finland

Post by Rotonen » 10 Dec 2004, 15:14

Aren't we developing our own server in any case, so why should we care about what Athena can and cannot do?
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Post by ElvenProgrammer » 10 Dec 2004, 15:52

Sure, but even if SimEdw is going along well with his server, it will take a while before it replaces eAthena, so it's better to consider all the alternatives. :roll:
User avatar
Rotonen
TMW Adviser
TMW Adviser
Posts: 3154
Joined: 08 Sep 2004, 20:48
Location: Espoo, Finland

Post by Rotonen » 12 Dec 2004, 00:46

But designing too much stuff for our "temporary" server and then moving it all into our own server could cause a lot of unnecessary work..?
User avatar
ElvenProgrammer
TMW Adviser
TMW Adviser
Posts: 2526
Joined: 13 Apr 2004, 20:11
Location: Italy
Contact:

Post by ElvenProgrammer » 12 Dec 2004, 10:35

Well surely we should think carefully about it, so we can migrate to our own server with not much trouble :D
Frankablu
Peon
Peon
Posts: 2
Joined: 14 Feb 2005, 21:46

Post by Frankablu » 14 Feb 2005, 21:49

Why not have the attack charge code client side and then when the attack is finished charging send the attack command to the server with the target?

(Yes I know you could cheat with a hacked client but you can enforce it later with your own server)
User avatar
maci
Warrior
Warrior
Posts: 507
Joined: 05 Dec 2004, 21:01
Location: Germany
Contact:

Post by maci » 14 Feb 2005, 22:08

but you can enforce it later with your own server
hmm this wouldnt be THAT easy
ElvenProgrammer wrote:Maci: don't be rude, we're here to help people ;)
Frankablu
Peon
Peon
Posts: 2
Joined: 14 Feb 2005, 21:46

Post by Frankablu » 14 Feb 2005, 22:37

I am talking about a temperately hack to get the feature implemented not a permanent solution the charging would have to be moved to the server eventually.
User avatar
Kyokai
Novice
Novice
Posts: 323
Joined: 15 Feb 2005, 03:55
Location: USA, North Carolina
Contact:

Post by Kyokai » 17 Feb 2005, 00:16

If I remember right, in SoM, you either had an attack at full power (100% charge) or at a tenth of its strength for anything lower.

Don't forget that we'll need to put in over-charged attacks like SoM had (200%, 300%, etc.) This works in conjuntion with the weapon skills system.
The Mana World System Coordinator.
View the Systems
So what does the systems coordinator actually do? My job is to take your ideas for TMW and build them into working aspects of gameplay that can be implemented by the artists and programmers. If there's anything you think we can do better or differently, let me know.
Post Reply