Skip to content

Commit

Permalink
Game event update (#1030)
Browse files Browse the repository at this point in the history
* game_event updated

Added Back to World

Fixed Headers

Added Re-directs to proper pages

Added values to annouce with description

Added Database values

* game_event_quest updated

Fixed the headers

* Updated game_event_conditions

Corrected headers

Fixed re-directs

* Removed the database information
  • Loading branch information
TheSCREWEDSoftware authored Nov 28, 2024
1 parent 1b3dafd commit 56951de
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 69 deletions.
61 changes: 32 additions & 29 deletions docs/game_event.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,69 @@
# game\_event
# game_event

[<-Back-to:World](database-world)

**The \`game_event\` table**

**Table Structure**

This table holds definitions for all game events that are activated or deactivated automatically by the Game Event System in the core.

| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
| ----------------- | ------------ | ---------- | --- | ---- | ------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| [eventEntry][1] | TINYINT | UNSIGNED | PRI | NO | | Unique | Entry of the game event |
| [start_time][2] | TIMESTAMP | | | YES | NULL | | Absolute start date, the event will never start before |
| [end_time][3] | TIMESTAMP | | | YES | NULL | | Absolute end date, the event will never start after; if NULL it will be implicitly set to 2 years in the future on each server start |
| [occurrence][4] | BIGINT | UNSIGNED | | NO | | | Delay in minutes between occurrences of the event |
| [length][5] | BIGINT | UNSIGNED | | NO | | | Length in minutes of the event |
| [holiday][6] | MEDIUMINT | UNSIGNED | | NO | | | Client side holiday id (from dbc) |
| [holidayStage][7] | TINYINT | UNSIGNED | | NO | | | |
| [description][8] | VARCHAR(255) | SIGNED | | YES | NULL | | Description of the event displayed in console |
| [world_event][9] | TINYINT | UNSIGNED | | NO | | | 0 if normal event, 1 if world event |
| [announce][10] | TINYINT | UNSIGNED | | YES | 2 | | 0 dont announce, 1 announce, 2 value from config |

[1]: #evententry
[2]: #start_time
[3]: #end_time
[4]: #occurrence
[5]: #length
[6]: #holiday
[7]: #holidaystage
[8]: #description
[9]: #world_event
[10]: #announce
| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
| ---------------------------- | ------------ | ---------- | --- | ---- | ------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| [eventEntry](#evententry) | TINYINT | UNSIGNED | PRI | NO | | Unique | Entry of the game event |
| [start_time](#starttime) | TIMESTAMP | | | YES | NULL | | Absolute start date, the event will never start before |
| [end_time](#endtime) | TIMESTAMP | | | YES | NULL | | Absolute end date, the event will never start after; if NULL it will be implicitly set to 2 years in the future on each server start |
| [occurrence](#occurrence) | BIGINT | UNSIGNED | | NO | | | Delay in minutes between occurrences of the event |
| [length](#length) | BIGINT | UNSIGNED | | NO | | | Length in minutes of the event |
| [holiday](#holiday) | MEDIUMINT | UNSIGNED | | NO | | | Client side holiday id (from dbc) |
| [holidayStage](holidaystage) | TINYINT | UNSIGNED | | NO | | | |
| [description](#description) | VARCHAR(255) | SIGNED | | YES | NULL | | Description of the event displayed in console |
| [world_event](#worldevent) | TINYINT | UNSIGNED | | NO | | | 0 if normal event, 1 if world event |
| [announce](#announce) | TINYINT | UNSIGNED | | YES | 2 | | 0 dont announce, 1 announce, 2 value from config |

**Field Descriptions**

### eventEntry

Entry of the event. Keep it as low as possible and prevent making holes in the list. Higher the max id is, the more memory will be used to store the event data.

### start\_time
### start_time

Absolute start date of the event. The event will start occurring only if the local time at the server is after the one set here.

### end\_time
### end_time

Absolute end date of the event. The event will stop occurring if the local time at the server is after the one set here.

### occurrence

Number of minutes between 2 occurrences of the event. (2880 = 2 days, 1440 = 1 day, etc)

{% include warning.html content="Value can't be 0 or the server will crash." %}

### length

Number of minutes the event will last after the start of the occurrence. (2880 = 2 days, 1440 = 1 day, etc)
This value must be lower than occurrence one or the event will never stop.


### holiday

Holiday ID from  [Holidays DBC file](Holidays). This is sent to the client to update the calender.
Holiday ID from  [Holidays DBC file](holidays). This is sent to the client to update the calender.

### description

String containing the name of the event displayed in console each time it starts or stops.

### world\_event
### world_event

This is a boolean field that determines if this game event is a world event or not. 0 = normal event, 1 = world event. For the world event to work, you need to at a minimum, populate game\_event\_condition and game\_event\_quest\_condition.
This is a boolean field that determines if this game event is a world event or not. 0 = normal event, 1 = world event. For the world event to work, you need to at a minimum, populate [game_event_condition](game_event_condition) and [game_event_quest_condition](game_event_quest_condition).

### announce

| Value | Description |
| ----- | -------------------------------------------------- |
| 0 | Don't announce the Event |
| 1 | Announce the description of the Event to the world |
| 2 | Use the `event.announce` settings from the config |

45 changes: 19 additions & 26 deletions docs/game_event_condition.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,43 @@
# game\_event\_condition
# game_event_condition

[<-Back-to:World](database-world)

**The \`game\_event\_condition\` table**
**The \`game_event_condition\` table**

This table contains conditions to meet for the specified game event to be completed. Also contains the world state fields used for reporting the given conditions progress and/or max required value. This table will do absolutely nothing if you have not set the event to be a world event.

**Table Structure**

| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
| --------------------------- | ----------- | ---------- | --- | ---- | ------- | ----- | ----------------------- |
| [eventEntry][1] | TINYINT | UNSIGNED | PRI | NO | | | Entry of the game event |
| [condition_id][2] | MEDIUMINT | UNSIGNED | PRI | NO | | | |
| [req_num][3] | FLOAT | SIGNED | | YES | 0 | | |
| [max_world_state_field][4] | SMALLINT | UNSIGNED | | NO | | | |
| [done_world_state_field][5] | SMALLINT | UNSIGNED | | NO | | | |
| [description][6] | VARCHAR(25) | SIGNED | | NO | | | |

[1]: #evententry
[2]: #condition_id
[3]: #req_num
[4]: #max_world_state_field
[5]: #done_world_state_field
[6]: #description
| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
| ---------------------------------------------- | ----------- | ---------- | --- | ---- | ------- | ----- | ----------------------- |
| [eventEntry](#evententry) | TINYINT | UNSIGNED | PRI | NO | | | Entry of the game event |
| [condition_id](#conditionid) | MEDIUMINT | UNSIGNED | PRI | NO | | | |
| [req_num](#reqnum) | FLOAT | SIGNED | | YES | 0 | | |
| [max_world_state_field](#maxworldstatefield) | SMALLINT | UNSIGNED | | NO | | | |
| [done_world_state_field](#doneworldstatefield) | SMALLINT | UNSIGNED | | NO | | | |
| [description](#description) | VARCHAR(25) | SIGNED | | NO | | | |

**Description of the fields**

### eventEntry

This is a link to the event entry in the game\_event table.
This is a link to the event entry in the [game_event](#game_event#evententry) table.

### condition\_id
### condition_id

This is the condition ID for this particular world event condition. It is an arbitrary number, and you can have multiple conditions for each world event. It links to the condition\_id field of the game\_event\_quest\_condition table.
This is the condition ID for this particular world event condition. It is an arbitrary number, and you can have multiple conditions for each world event. It links to the condition_id field of the [game_event_quest_condition](#conditionid) table.

### req\_num
### req_num

This is an arbitrary value that determines when this condition is met. For example, if you set this value to 1000, and there is only one quest in game\_event\_quest\_condition that will fulfill this condition, and it increases this condition by 100 (by setting the num field to 100), then you would need to have your players complete 10 of that quest to fulfill this condition.
This is an arbitrary value that determines when this condition is met. For example, if you set this value to 1000, and there is only one quest in [game_event_quest_condition](#conditionid) that will fulfill this condition, and it increases this condition by 100 (by setting the num field to 100), then you would need to have your players complete 10 of that quest to fulfill this condition.

### max\_world\_state\_field
### max_world_state_field

This is the world state update field number sent to the client that is used to report the maximum number of needed points in order to satisfy this condition. It can be found in gossip texts referenced with $XXXXw where XXXX is the world state number that will be sent when that gossip is displayed. If you are doing a custom event, you can pick any number you want that isn't in use, it just needs to match the custom text that you put into the npc\_text table.
This is the world state update field number sent to the client that is used to report the maximum number of needed points in order to satisfy this condition. It can be found in gossip texts referenced with $XXXXw where XXXX is the world state number that will be sent when that gossip is displayed. If you are doing a custom event, you can pick any number you want that isn't in use, it just needs to match the custom text that you put into the [npc_text](npc_text) table.

### done\_world\_state\_field
### done_world_state_field

This is the world state update field number sent to the client that is used to report the number of accumulated points so far for this condition. It can be found in gossip texts referenced with $XXXXw where XXXX is the world state number that will be sent when that gossip is displayed. If you are doing a custom event, you can pick any number you want that isn't in use, it just needs to match the custom text that you put into the npc\_text table.
This is the world state update field number sent to the client that is used to report the number of accumulated points so far for this condition. It can be found in gossip texts referenced with $XXXXw where XXXX is the world state number that will be sent when that gossip is displayed. If you are doing a custom event, you can pick any number you want that isn't in use, it just needs to match the custom text that you put into the [npc_text](npc_text) table.

### description

Expand Down
23 changes: 9 additions & 14 deletions docs/game_event_quest_condition.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
# game\_event\_quest\_condition
# game_event_quest_condition

[<-Back-to:World](database-world)

**The \`game\_event\_quest\_condition\` table**
**The \`game_event_quest_condition\` table**

This table contains the mapping of a quest in a world event to the condition that it will fulfill. It also contains how much a given quest will add to a condition once that quest is completed by a player.

**Table Structure**

| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
| ----------------- | --------- | ---------- | --- | ---- | ------- | ----- | ------- |
| [eventEntry][1] | TINYINT | UNSIGNED | | NO | | | |
| [quest][2] | MEDIUMINT | UNSIGNED | PRI | NO | 0 | | |
| [condition_id][3] | MEDIUMINT | UNSIGNED | | NO | 0 | | |
| [num][4] | FLOAT | SIGNED | | YES | 0 | | |

[1]: #evententry
[2]: #quest
[3]: #condition_id
[4]: #num
| Field | Type | Attributes | Key | Null | Default | Extra | Comment |
| ---------------------------- | --------- | ---------- | --- | ---- | ------- | ----- | ------- |
| [eventEntry](#evententry) | TINYINT | UNSIGNED | | NO | | | |
| [quest](#quest) | MEDIUMINT | UNSIGNED | PRI | NO | 0 | | |
| [condition_id](#conditionid) | MEDIUMINT | UNSIGNED | | NO | 0 | | |
| [num](#num) | FLOAT | SIGNED | | YES | 0 | | |

**Description of the fields**

Expand All @@ -30,7 +25,7 @@ The event that is associated with this quest and condition.

The quest that will trigger this condition.

### condition\_id
### condition_id

The condition that will be triggered on quest complete.

Expand Down

0 comments on commit 56951de

Please sign in to comment.