[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Wanting to change battle spam?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Wanting to change battle spam?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Tue 02 May 2006 11:04 AM (UTC)
Message
I have been thinking for sometime just how spammy battles are, you can have 5 or more attacks for each player, X number of mobs then add attack skills and in my mud mutli casted spells, its just a huge mess.

Now ok, what i was thinking was to nulify it all down to 1 line per char with an indicator as to how many hits landed, sort of like this:

[4] You slash wets the tree [250]

so you hit 4 times for a total of 250 damage. Now ok, i have looked and tryed to follow the smaug combat code and it seems to me to be a huge mess and pretty hard to follow, i would like to keep multi attacks but not have all the spam,(worse case i would make the game 1 attack per round and rebalance everything)

OK now getting to the point, any sugestions on my best plan of attack to do this, is it simple or something hard?

The last thing i would like to know is if someone could draw me a map of how the combat code works so i can follow it through and see if i can make sence of it, multi_hit calls one_hit for each successful hit but after that i cant work out what function the retcode goes back to.

Thanks heaps :)

Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Tue 02 May 2006 11:55 AM (UTC)
Message
As you say, the SMAUG combat code is really pretty messy, or at least, really not meant to do this kind of thing.

What you'll have to do is remove the damage message displaying from the one_hit kind of functions (it might actually call dam_msg in the damage function), and take care of displaying it elsewhere. Of course, then you'll have to be careful to display damage messages normally when they don't come from combat...

One solution that is very hacky and evil but should work would be this:
- a global flag whether or not to print damage messages. Disable printing when it's a round of hits.
- a global linked list of "hit results"; you will have to create this hit result structure.
- after a round of hits (i.e. after a multi-hit) you will iterate over this linked list and tally the damage & number of hits. Then you erase the list.
- when hitting, if the hit succeeds you add it to the linked list.

I hope that gives an idea of a solution; keep in mind that it is not very elegant at all and is the minimum I'm seeing at the moment to get it to "just work" with as few changes as possible.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #2 on Tue 02 May 2006 04:59 PM (UTC)
Message
Why not just keep some information in each mob struct to store combat data (albeit temporarily) and then recall it at the end of combat to print the combat strings? Its not a very efficient way to handle it, but it might be less of a headache than a large overhaul.

You would, of course, still need to modify the combat mechanics abit. Like mentioned before, you would need to remove the current diplay messages and update the system to display the stored information.

To be honest, I'm not sure you really want to go this route. There are many players who like seeing their crazy number of attacks. However, I think the best option would be to give players a choice. Put a toggle in the config on how you display the damage output or something. It would be a bit more complicated to code in, but its better to do things right since combat is a big part of SMAUG.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Robert Powell   Australia  (367 posts)  [Biography] bio
Date Reply #3 on Wed 03 May 2006 12:58 AM (UTC)
Message
It justs gets out of hand when you have 4 or more in combat in one room, you can have 50+ messages being displayed per round and thats just insane. There has to be a better way to do combat display so you can have more than 4 in combat and still be able to make sence of each round. I think condencing combat messages to 2 lines is a good way to go,
You hit X times for Y damage
You miss X times this round.

Having been playing a bit of WoW i came to like the more simple you get 1 attack for your main hand and 1 attack for your off hand per round of combat, and the more i think about it the more i might just remove all the extra attacks and go for something more simple. I dont have players, so what they want is not a concern.

I guess we just get used to having X amount of attacks per round and i know i wanted to preserve that as well, I have cheated somewhat and have basicly make 2nd attack and friends into a damage multiplier for the main hand, so first attack becomes off hand attack and 2nd->X attacks become damage multiplier for the main hand attack, so if you miss you miss with all X attacks on main hand.

I think extra attacks might become called powers or something, 2nd attack, becomes 2nd power


[0]You miss a black leather bat. [0]
[4]You =DISEMBOWEL= a black leather bat! [20]

<37hp 103m 110mv Enemy: [++++++    ]> 

[0]You miss a black leather bat. [0]
[5]You * EVISCERATE * a black leather bat! [35]



Just a guy having a bit of fun. Nothing more, nothing less, I do not need I WIN to feel validated.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


5,112 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]