Charging the attack - Technical Code here

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
MathGeek
Novice
Novice
Posts: 52
Joined: 13 Nov 2004, 22:07
Location: Calgary AB. Canada

Charging the attack - Technical Code here

Post by MathGeek »

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
Founder
Founder
Posts: 2526
Joined: 13 Apr 2004, 19:11
Location: Italy
Contact:

Post by ElvenProgrammer »

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, 08:53

Post by T7g »

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

Post by ElvenProgrammer »

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, 21:28
Location: Sweden
Contact:

Post by SimEdw »

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
Founder
Founder
Posts: 2526
Joined: 13 Apr 2004, 19:11
Location: Italy
Contact:

Post by ElvenProgrammer »

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

Post by Rotonen »

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
Founder
Founder
Posts: 2526
Joined: 13 Apr 2004, 19:11
Location: Italy
Contact:

Post by ElvenProgrammer »

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, 19:48
Location: Bern, Switzerland

Post by Rotonen »

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
Founder
Founder
Posts: 2526
Joined: 13 Apr 2004, 19:11
Location: Italy
Contact:

Post by ElvenProgrammer »

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, 20:46

Post by Frankablu »

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
Knight
Knight
Posts: 507
Joined: 05 Dec 2004, 20:01
Location: Germany
Contact:

Post by maci »

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, 20:46

Post by Frankablu »

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
Warrior
Warrior
Posts: 323
Joined: 15 Feb 2005, 02:55
Location: USA, North Carolina
Contact:

Post by Kyokai »

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