Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc #34

Merged
merged 5 commits into from
Dec 15, 2024
Merged

Doc #34

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 31 additions & 25 deletions l4d2_tank_draw/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# L4D2 Tank Draw

#### Other language

[简体中文](/l4d2_tank_draw/README_CN.md)


## Basic Function

This SourceMod plugin for Left 4 Dead 2 adds a "lucky draw" feature that triggers when a Tank is killed by a melee weapon. The player who delivers the final melee blow to the Tank gets a chance to win various prizes that affect gameplay.
Expand All @@ -8,28 +13,32 @@ This SourceMod plugin for Left 4 Dead 2 adds a "lucky draw" feature that trigger

The plugin includes the following possible prizes:

**The default configuration sets the probability of "no prize" to 10, while all other prizes are set to 0. Please configure them yourself.**
**The probability of a single prize is calculated as: (prize probability) / (sum of all prize probabilities)**

1. No prize
2. Lucky player gains random health
3. Average health among all survivors
4. Reset all survivors' health to 100 and reset their incapped times
5. Clear all survivors' health
6. Lucky player takes random damage
7. All survivors gain infinite ammo
8. All survivors gain infinite primary ammo
9. All survivors gain infinite melee range
10. Temporary moon gravity for all
11. Temporary moon gravity for the lucky player
12. Toggle moon gravity for all
13. Increase gravity for the lucky player
2. Lucky player gains random health (Survivor's total health cannot exceed the server's maximum health limit)
3. Average health among all survivors (Averages the actual health of all standing survivors and clears temporary health)
4. Reset all survivors' health to 100 and clear their incapped counts
5. Clear all standing survivors' health (Sets the actual health of all standing survivors to 1 and clears temporary health)
6. Lucky player takes random damage (If damage exceeds health, health is set to 1 instead of incapacitating)
7. All survivors gain infinite ammo (Global game parameter, repeated draws will reset to default; cannot coexist with infinite primary ammo)
8. All survivors gain infinite primary ammo (Global game parameter, repeated draws will reset to default; cannot coexist with infinite ammo)
9. All survivors gain infinite melee range (Global game parameter, repeated draws will reset to default)
10. Temporarily adjust world gravity to moon gravity (Global game parameter, climbing ladders does not remove the buff; repeated draws reset the timer)
11. Temporarily adjust the lucky player's gravity to moon gravity (Climbing ladders can remove the buff)
12. Toggle world gravity to moon gravity (Global game parameter, climbing ladders does not remove the buff; repeated draws will reset to default)
13. Increase gravity for the lucky player (Climbing ladders can remove the buff)
14. Kill the lucky player
15. Kill all survivors
16. Resurrect all dead survivors
17. Disarm the lucky player
18. Disarm all survivors
19. A lucky Tank
20. A lucky Witch
21. Turn the lucky player into a "timer bomb"
22. Turn the lucky player into a "freeze bomb"
17. Disarm the lucky player (Clears all item slots)
18. Disarm all survivors (Clears all item slots)
19. Spawn a lucky Tank
20. Spawn a lucky Witch
21. Turn the lucky player into a "timer bomb" (Repeated draws will cancel the timer)
22. Turn the lucky player into a "freeze bomb" (Repeated draws will cancel the timer)
23. Remove survivor outlines (Removes survivor glow outlines, but names above players remain visible; not recommended as many plugins modify outlines)

## Configuration

Expand All @@ -42,16 +51,13 @@ To customize the plugin, look for the `l4d2_tank_draw.cfg` file in your SourceMo
## Installation

1. Place the `l4d2_tank_draw.smx` file in your `addons/sourcemod/plugins/` directory.
2. Put l4d2_tank_draw/translations/l4d2_tank_draw.phrases.txt inside `addons/sourcemod/translations/` directory.
3. Restart your server or load the plugin using the `sm plugins load` command.
2. Put `l4d2_tank_draw.phrases.txt` inside `addons/sourcemod/translations/` directory.
3. Restart your server or load the plugin using the `sm plugins reload` command.
4. The plugin will automatically create its configuration file (`l4d2_tank_draw.cfg`) in the `addons/sourcemod/configs/` directory after first run.
5. Modify cfg then reload

Enjoy the excitement of random prizes after taking down a Tank with melee weapons!

#### NOTE

Since infinite ammo is also applied to molotov, so I added a mechanism to randomly disarm/kill/turn into a timer bomb player if the player throw molotov when infinite ammo is on.

#### Other language

[简体中文](/l4d2_tank_draw/README_CN.md)
Since infinite ammo is also applied to molotov, so I added a mechanism to randomly disarm/kill/turn into a timer bomb player if the player throw molotov when infinite ammo is on. If you don't need it you can set punishment chance to 0.
43 changes: 24 additions & 19 deletions l4d2_tank_draw/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@

该插件包含以下可能的奖项:

**默认生成的配置无奖品奖项概率为10,其他均为0,请自行设置**
**单个奖项概率计算方法为:(奖项概率)/(所有奖项概率之和)**

1. 无奖品
2. 幸运玩家增加随机生命值
3. 所有幸存者平均生命值
4. 重置所有幸存者血量为 100,并重置倒地次数
5. 清空所有幸存者的生命值
6. 幸运玩家受到随机伤害
7. 所有幸存者开启无限弹药
8. 所有幸存者开启主武器无限弹药
9. 所有幸存者开启无限近战范围
10. 限时将世界重力调整为月球重力
11. 幸运玩家限时调整为月球重力
12. 将世界重力切换为月球重力
13. 幸运玩家增加重力
2. 幸运玩家增加随机生命值(幸存者总血量无法突破服务器设置的最大生命值)
3. 所有幸存者平均生命值(平均所有站立状态幸存者的实际血量,清空临时血量)
4. 重置所有人血量(将所有人血量设置为100,清空倒地次数记数)
5. 清空所有幸存者的生命值(将所有站立状态幸存者实际血量变成1,清空临时血量)
6. 幸运玩家受到随机伤害(伤害超过血量时,清空血量而不是倒地)
7. 所有幸存者开启无限弹药(游戏全局参数,重复抽取会恢复默认,和主武器无限弹药只能同时有一个生效)
8. 所有幸存者开启主武器无限弹药(游戏全局参数,重复抽取会恢复默认,和无限弹药只能同时有一个生效)
9. 所有幸存者开启无限近战范围(游戏全局参数,重复抽取会恢复默认)
10. 限时将世界重力调整为月球重力(游戏全局参数,爬梯子不可解除buff,重复抽取重置计时器)
11. 幸运玩家限时调整为月球重力(爬梯子可以解除buff)
12. 将世界重力切换为月球重力(游戏全局参数,爬梯子不可解除buff,重复抽取会恢复默认值)
13. 幸运玩家增加重力(爬梯子可以解除buff)
14. 杀死幸运玩家
15. 杀死所有幸存者
16. 复活所有死亡幸存者
17. 缴械幸运玩家
18. 缴械所有幸存者
17. 缴械幸运玩家(清空所有槽位道具)
18. 缴械所有幸存者(清空所有槽位道具)
19. 一个幸运坦克
20. 一个幸运女巫
21. 将幸运玩家变成“定时炸弹”
22. 将幸运玩家变成“冰冻炸弹”
21. 将幸运玩家变成“定时炸弹”(重复抽取会取消计时)
22. 将幸运玩家变成“冰冻炸弹”(重复抽取会取消计时)
23. 取消人物光圈概率(取消人物轮廓光圈,人物头上的名字依然保留,不建议使用,很多插件会修改光圈)

## 配置

Expand All @@ -42,12 +46,13 @@
## 安装

1. 将 `l4d2_tank_draw.smx` 文件放入 `addons/sourcemod/plugins/` 目录。
2. 将 `l4d2_tank_draw/translations/l4d2_tank_draw.phrases.txt` 文件放入 `addons/sourcemod/translations/` 目录。
3. 重启您的服务器,或使用 `sm plugins load` 命令加载插件。
2. 将 `l4d2_tank_draw.phrases.txt` 文件放入 `addons/sourcemod/translations/` 目录。
3. 重启您的服务器,或使用 `sm plugins reload` 命令加载插件。
4. 插件在首次运行后会自动创建其配置文件 (`l4d2_tank_draw.cfg`),可在 `addons/sourcemod/configs/` 目录下找到。
5. 修改配置并再次加载插件

尽情享受近战击杀坦克后触发的随机奖品吧!

#### 注意

由于无限弹药也适用于燃烧弹,所以当玩家在无限弹药期间投掷燃烧弹时,我添加了一种机制以随机缴械/杀死/变成炸弹投掷燃烧弹的玩家。
由于无限弹药也适用于燃烧弹,所以当玩家在无限弹药期间投掷燃烧弹时,我添加了一种机制以随机缴械/杀死/变成炸弹投掷燃烧弹的玩家,如果不需要此功能,可以将惩罚概率设置为0
Loading
Loading