Combat event - king of the hill?

General Chat, Comments
Post Reply
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Combat event - king of the hill?

Post by cbsarge »

I'd like to develop an event type using the combat module (or another copy of it) as a jumping off point. The player listing is the part I need to figure out. IT should only list players who have joined the event and the list should be such that when you enter you are placed in the next available position in the list in descending order. During the event, when you defeat someone, you take their place in the list and they drop to yours.

Anyone think this is possible? We used to have events like this in another game and they were one of the most exciting pieces. Players REALLY got into these events. :D
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Combat event - king of the hill?

Post by KyleMassacre »

It's possible but I'm not entirely sure how to do it. I will be honest haha. I know you wouldn't need to remake the combat module and you can take a look at my bounty mod or mugging mod to see how to start a player combat with custom outcomes.

Back to the topic, like I said I wouldn't know how to get them to swap places like that and can't really think of what this would accomplish logically, maybe because I don't fully understand. By maybe I would propose a royal rumble type thing with an elimination where if a player gets beat they are off the ladder and last man standing wins the event. For me, that is much easier to create and I can see the outcome of it.

Actually after I typed all this out I think I thought of a way to do this:
1. When a player joins you have the LastId() method available so you can use that to insert into the table of their join order. For example: id, userid, joined_id. When they join you enter the userid of the player then in a seperate query update the joined_id as the last id so you may want joined_id to be null at first.

2. When they fight and someone wins you query their joined_id and the opponents joined_id and store them so you can easily switch them when someone wins.

There you go! Easy and effective. Also you may be able to use a trigger in your table to set the joined_id to the id on insert
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Re: Combat event - king of the hill?

Post by cbsarge »

Lol - let me know when it's done and I'll have my credits ready! :D
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Combat event - king of the hill?

Post by KyleMassacre »

For this one I probably woulndt upload it
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Re: Combat event - king of the hill?

Post by cbsarge »

For this type of event we would have the opening time published and at that time you would be able to enter. When you entered the event you would be placed on the lowest rung of the ladder. The only way to rise to a higher spot on the ladder would be to beat the person above you. At the end of the event the person at the top would receive a prize and sometimes lower places would too.

It led to a very exciting type of event with some players joining in the last few minutes and trying to race up the ladder. Others would join early and hope to hang on to their spot until the end.

I'd love if we could create something like this for this engine as it would add a real layer of excitement and on the business side it would offer the opportunity to monetize things like short term consumables that might make the difference in an event.
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: Combat event - king of the hill?

Post by KaL »

Well looks like Kyle is creating the ladder combat tournament module for you. I just finish the Timer Event module. This will allow you to set timer to any module you want:

Example: combat event= Ends in 40hours 30mins
When the time count down is = 0 it will close the combat event saying: "Event is Close"

And for the reward system, maybe Kyle can modify his module to fit your needs
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Combat event - king of the hill?

Post by KyleMassacre »

The thing here about awarding players is that it is very hard. There is the wizard actions but they are only set up for the current logged in user. The only way to get that to work is to assign each player to the $userId variable in the loop. My main concern with that is, since its a global, very important variable it may trick the system into who ever triggers the action that they are the current $userId in the loop.

I have done ALMOST everything in your list actually accept for the timing of the module and the rewards. What I did do is:
  • On/Off feature
    1. When you turn it off, if there are people in the event it will send you a notification of who the top 3 contenders were with their name, userid and their current place in the ladder
  • Battles
    1. They can battle right from the module and if they win they will take the place of the person they battled
    2. If they lose to someone lower than them on the ladder, it counts as if the other person battled them so they will take their place
  • Graphical Leader Board Change
    1. It will show the change that they went through based off their start position and their current position with some fancy up/down arrows
Screen Shots

By the way I just submitted this module. Once its accepted i will list it on the marketplace
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Re: Combat event - king of the hill?

Post by cbsarge »

Will this be an update to your existing Timer module or a new one?
KaL wrote:Well looks like Kyle is creating the ladder combat tournament module for you. I just finish the Timer Event module. This will allow you to set timer to any module you want:

Example: combat event= Ends in 40hours 30mins
When the time count down is = 0 it will close the combat event saying: "Event is Close"

And for the reward system, maybe Kyle can modify his module to fit your needs
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Combat event - king of the hill?

Post by KyleMassacre »

Gmoore, if you read this dont approve yet hahaha
User avatar
cbsarge
Posts: 195
Joined: Mon Sep 14, 2015 3:20 pm

Re: Combat event - king of the hill?

Post by cbsarge »

This sounds great! If one of the Admin has to do the prizes manually that's fine (maybe preferable). I look forward to seeing the module in action! :D
KyleMassacre wrote:The thing here about awarding players is that it is very hard. There is the wizard actions but they are only set up for the current logged in user. The only way to get that to work is to assign each player to the $userId variable in the loop. My main concern with that is, since its a global, very important variable it may trick the system into who ever triggers the action that they are the current $userId in the loop.

I have done ALMOST everything in your list actually accept for the timing of the module and the rewards. What I did do is:
  • On/Off feature
    1. When you turn it off, if there are people in the event it will send you a notification of who the top 3 contenders were with their name, userid and their current place in the ladder
  • Battles
    1. They can battle right from the module and if they win they will take the place of the person they battled
    2. If they lose to someone lower than them on the ladder, it counts as if the other person battled them so they will take their place
  • Graphical Leader Board Change
    1. It will show the change that they went through based off their start position and their current position with some fancy up/down arrows
Screen Shots

By the way I just submitted this module. Once its accepted i will list it on the marketplace
Post Reply

Return to “General”