Skip to content

Commit f0dc30f

Browse files
committed
Features:
- Added and changed sound for firework - Regular Rocket & Explosive rockets can fire some yellow theme fireworks. Off by default. - Firework may create fire hazard. It may burn forest and your factory. Off by default. - Added Small / Large / Flare type firework rockets. - Added 3 Achievements. Changes: - Changed firework scream sound. - Fixed light radius on some large firework
1 parent 5b1472b commit f0dc30f

16 files changed

+679
-85
lines changed

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@ You can shoot them with regular rocket launcher, in spidertron or build a mortar
66
Youtube: https://www.youtube.com/watch?v=UCgh898YUvA
77

88
There are 4 types of firework rocket.
9-
- Warm / shoot warm color firework
10-
- Cool / shoot cool color firework
9+
- Warm / shoot warm colors firework
10+
- Cool / shoot cool colors firework
1111
- Colorful / shoots multi-colors firework, Type 4 & 9
1212
- Random / shoots all of above (using warm, cool, colorful variants)
13+
- Small / shoot type 1, 2, 3
14+
- Large / shoot type 5, 6, 7, 10
15+
- Flare / Shoot type 8
1316

1417
A mortar crate which you can load firework rockets to auto fire.
1518

1619
#### TO DO
17-
- Improve sound effects
18-
- Add more types of rockets to fine tune your firework for auto deployment.
19-
- Small firework, Type 1, 2, 3
20-
- Round firework, Type 5, 6, 7, 10
21-
- Flare - Type 8
2220
- Other tweaks and user requests.
2321

2422

@@ -29,5 +27,6 @@ https://graphicriver.net/item/fireworks-effect-sprites/21893898
2927
Royalty free sound effects from:
3028
https://www.zapsplat.com/sound-effect-category/fireworks/
3129

32-
30+
Sampled from ChannelAGG's Japan Firework Videos:
31+
https://www.youtube.com/c/ChannelAGG
3332

changelog.txt

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
---------------------------------------------------------------------------------------------------
2+
Version: 1.0.0
3+
Date: 2022-09-05
4+
5+
Features:
6+
- Added new sound for large firework and flare firework(type 8)
7+
- Regular Rocket & Explosive rockets can fire some yellow theme fireworks. Off by default.
8+
- Firework may create fire hazard. It may burn forest and your factory. Off by default.
9+
- Added Small / Large / Flare type firework rockets.
10+
- Added 3 Achievements.
11+
12+
Changes:
13+
- Changed firework scream sound.
14+
- Fixed light radius on some large firework
15+
16+
117
---------------------------------------------------------------------------------------------------
218
Version: 0.2.0
319
Date: 2022-08-31

constant.lua

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
--- DateTime: 8/29/2022 9:01 PM
55
---
66

7-
WARM_ROCKET_EFFECT_ID = 'fw-warm'
8-
COOL_ROCKET_EFFECT_ID = 'fw-cool'
7+
WARM_ROCKET_EFFECT_ID = 'fw-wrm'
8+
COOL_ROCKET_EFFECT_ID = 'fw-col'
99
COLORFUL_ROCKET_EFFECT_ID = 'fw-mix'
10-
RANDOM_ROCKET_EFFECT_ID = 'fw-rdm'
10+
RANDOM_ROCKET_EFFECT_ID = 'fw-rdm'
11+
REGULAR_ROCKET_EFFECT_ID = 'fw-rrf'
12+
SMALL_ROCKET_EFFECT_ID = 'fw-sml'
13+
LARGE_ROCKET_EFFECT_ID = 'fw-lrg'
14+
FLARE_ROCKET_EFFECT_ID = 'fw-flr'

data-updates.lua

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
--- Generated by EmmyLua(https://github.com/EmmyLua)
3+
--- Created by heyqule.
4+
--- DateTime: 8/29/2022 7:51 PM
5+
---
6+
require 'constant'
7+
-- Add script to regular rockets
8+
9+
if settings.startup['firework-rocket-add-firework-regular-rocket'].value then
10+
table.insert(data.raw['projectile']['explosive-rocket']['action']['action_delivery']['target_effects'], {
11+
type='script',
12+
effect_id=REGULAR_ROCKET_EFFECT_ID
13+
})
14+
table.insert(data.raw['projectile']['rocket']['action']['action_delivery']['target_effects'], {
15+
type='script',
16+
effect_id=REGULAR_ROCKET_EFFECT_ID
17+
})
18+
end
19+
20+
if settings.startup['firework-rocket-fire-hazard'].value then
21+
local target_probability = settings.startup['firework-rocket-fire-hazard-chance'].value / 100
22+
for key, explosion in pairs(data.raw['explosion']) do
23+
if string.find(key, "firework-") then
24+
explosion['created_effect'] = {
25+
{
26+
type = "direct",
27+
probability = target_probability,
28+
action_delivery =
29+
{
30+
type = "instant",
31+
target_effects =
32+
{
33+
{
34+
type = "create-fire",
35+
entity_name = "fire-flame",
36+
initial_ground_flame_count = 40,
37+
offset_deviation = {{-5,-5}, {5, 5}}
38+
}
39+
},
40+
}
41+
}
42+
}
43+
end
44+
end
45+
end

data.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ require 'prototypes/projectile_rockets'
1818
require 'prototypes/mortar_crate'
1919
require 'prototypes/items'
2020
require 'prototypes/recipes'
21-
require 'prototypes/technology'
21+
require 'prototypes/technology'
22+
require 'prototypes/achievement'

info.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firework_rockets",
3-
"version": "0.2.0",
3+
"version": "1.0.0",
44
"date": "2022-08-29",
55
"title": "Firework Rockets",
66
"author": "heyqule",

locale/en/string.cfg

+21-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ firework_rocket=Let you shoot firework with your rocket launcher and spidertron.
77
[mod-setting-name]
88
firework-rocket-mortar-process-interval=Mortar Process Interval
99
firework-rocket-travel-range=Firework Travel Range
10+
firework-rocket-add-firework-regular-rocket=Spawn on regular rockets
11+
firework-rocket-add-firework-regular-rocket-chance=Spawn chance
12+
firework-rocket-fire-hazard=Fire Hazard
13+
firework-rocket-fire-hazard-chance=Fire Hazard Chance
1014
[mod-setting-description]
1115
firework-rocket-mortar-process-interval=How often the mortar crates process in ticks. Lower value may have performance implication.
1216
firework-rocket-travel-range=How far, in tiles, the firework trail travels before it explode.
@@ -20,13 +24,29 @@ firework/colorful-rocket=Colorful Firework Rocket
2024
firework/cool-rocket=Cool Firework Rocket
2125
firework/warm-rocket=Warm Firework Rocket
2226
firework/mortar-crate=Firework Mortar Crate
27+
firework/small-rocket=Small Firework Rocket
28+
firework/large-rocket=Large Firework Rocket
29+
firework/flare-crate=Flare Firework Rocket
2330

2431
[item-name]
2532
firework/random-rocket=Random Firework Rocket
2633
firework/colorful-rocket=Colorful Firework Rocket
2734
firework/cool-rocket=Cool Firework Rocket
2835
firework/warm-rocket=Warm Firework Rocket
2936
firework/mortar-crate=Firework Mortar Crate
37+
firework/small-rocket=Small Firework Rocket
38+
firework/large-rocket=Large Firework Rocket
39+
firework/flare-crate=Flare Firework Rocket
3040

3141
[technology-name]
32-
firework/techs=Firework Rockets
42+
firework/techs=Firework Rockets
43+
44+
[achievement-name]
45+
firework_rockets/party_automation=Firework Party Automation
46+
firework_rockets/party_starter=Firework Party Starter
47+
firework_rockets/eternal_party=Firework Eternal Party
48+
49+
[achievement-description]
50+
firework_rockets/party_automation=Build 50 Mortar Crate to keep the party going!
51+
firework_rockets/party_starter=Produce 1000 random firework rocket to start the party!
52+
firework_rockets/eternal_party=Produce 1000000 random firework rocket to keep the party going!

prototypes/achievement.lua

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
--- Generated by EmmyLua(https://github.com/EmmyLua)
3+
--- Created by heyqule.
4+
--- DateTime: 9/4/2022 9:22 PM
5+
---
6+
7+
data:extend({
8+
{
9+
type = "build-entity-achievement",
10+
name = "firework_rockets/party_automation",
11+
to_build = 'firework/mortar-crate',
12+
amount = 50,
13+
icon = "__firework_rockets__/graphics/achievement/icon.png",
14+
icon_size = 128,
15+
limited_to_one_game = true,
16+
order = 'z[firework]-01-party-automation'
17+
},
18+
{
19+
type = "produce-achievement",
20+
name = "firework_rockets/party_starter",
21+
item_product = 'firework/random-rocket',
22+
amount = 1000,
23+
icon = "__firework_rockets__/graphics/achievement/icon.png",
24+
icon_size = 128,
25+
limited_to_one_game = true,
26+
order = 'z[firework]-02-party-starter'
27+
},
28+
{
29+
type = "produce-achievement",
30+
name = "firework_rockets/eternal_party",
31+
item_product = 'firework/random-rocket',
32+
amount = 1000000,
33+
icon = "__firework_rockets__/graphics/achievement/icon.png",
34+
icon_size = 128,
35+
limited_to_one_game = true,
36+
order = 'z[firework]-03-eternal-party'
37+
}
38+
})

0 commit comments

Comments
 (0)