Initial Commit, Score and Upgrades

This commit is contained in:
2024-05-31 09:43:10 -04:00
parent 2566d0af58
commit 480ac45218
62 changed files with 1822 additions and 0 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Godot 4+ specific ignores
.godot/
.import
.db:encryptable

46
Gam3D29.tmp Normal file
View File

@@ -0,0 +1,46 @@
[gd_scene load_steps=2 format=3 uid="uid://xh0p6v5ir05f"]
[ext_resource type="Script" path="res://Game.gd" id="1_p1u1m"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_p1u1m")
[node name="Score" type="Label" parent="."]
layout_mode = 0
offset_left = 551.0
offset_top = 1.0
offset_right = 605.0
offset_bottom = 24.0
text = "0"
[node name="Click" type="Button" parent="."]
layout_mode = 0
offset_right = 8.0
offset_bottom = 8.0
shortcut_in_tooltip = false
[node name="ScoreLabel" type="Label" parent="."]
layout_mode = 0
offset_left = 503.0
offset_right = 551.0
offset_bottom = 23.0
text = "Score:"
[node name="Timer" type="Timer" parent="."]
[node name="MenuButton" type="MenuButton" parent="."]
layout_mode = 0
offset_left = 3.0
offset_top = 108.0
offset_right = 50.0
offset_bottom = 139.0
text = "Shop"
item_count = 1
popup/item_0/text = "test"
popup/item_0/id = 0

61
GamDE3B.tmp Normal file
View File

@@ -0,0 +1,61 @@
[gd_scene load_steps=2 format=3 uid="uid://xh0p6v5ir05f"]
[ext_resource type="Script" path="res://Game.gd" id="1_p1u1m"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_p1u1m")
[node name="Score" type="Label" parent="."]
layout_mode = 0
offset_left = 551.0
offset_top = 1.0
offset_right = 605.0
offset_bottom = 24.0
text = "0"
[node name="Click" type="Button" parent="."]
layout_mode = 0
offset_right = 8.0
offset_bottom = 8.0
shortcut_in_tooltip = false
[node name="ScoreLabel" type="Label" parent="."]
layout_mode = 0
offset_left = 503.0
offset_right = 551.0
offset_bottom = 23.0
text = "Score:"
[node name="Timer" type="Timer" parent="."]
[node name="ClickUpgrades" type="MenuButton" parent="."]
layout_mode = 0
offset_left = 3.0
offset_top = 108.0
offset_right = 50.0
offset_bottom = 139.0
text = "Click Upgrade"
[node name="Plus1" type="TextureButton" parent="ClickUpgrades"]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="PassiveUpgrades" type="MenuButton" parent="."]
layout_mode = 0
offset_left = 3.0
offset_top = 139.0
offset_right = 147.0
offset_bottom = 170.0
text = "Passive Upgrades"
item_count = 2
popup/item_0/text = "+1/s"
popup/item_0/id = 0
popup/item_1/text = "+5/s"
popup/item_1/id = 1

248
Game.gd Normal file
View File

@@ -0,0 +1,248 @@
extends Control
var score = 0
var clickAdd = 1
var scorePerSec = 1
var scoreMultiplier = 1
#Click Upgrades Costs
var clickUpgradeReq1 = 10
var clickUpgradeReq10 = 100
var clickUpgradeReq20 = 1000
var clickUpgradeReq40 = 10000
var clickUpgradeReq60 = 100000
var clickUpgradeReq80 = 1000000
var clickUpgradeReq100 = 10000000
var clickUpgradeReq200 = 100000000
var clickUpgradeReq400 = 1000000000
# Click Upgrades Amount
var clickUpgradeAmt1 = 1
var clickUpgradeAmt10 = 10
var clickUpgradeAmt20 = 20
var clickUpgradeAmt40 = 40
var clickUpgradeAmt60 = 60
var clickUpgradeAmt80 = 80
var clickUpgradeAmt100 = 100
var clickUpgradeAmt200 = 200
var clickUpgradeAmt400 = 400
# Passive Upgrades Costs
var passiveUpgradeReq2 = 100
var passiveUpgradeReq10 = 1000
var passiveUpgradeReq20 = 10000
var passiveUpgradeReq50 = 100000
var passiveUpgradeReq100 = 1000000
var passiveUpgradeReq200 = 10000000
var passiveUpgradeReq500 = 100000000
var passiveUpgradeReq1000 = 1000000000
var passiveUpgradeReq10000 = 10000000000
# Passive Upgrades Amount
var passiveUpgradeAmt2 = 2
var passiveUpgradeAmt10 = 10
var passiveUpgradeAmt20 = 20
var passiveUpgradeAmt50 = 50
var passiveUpgradeAmt100 = 100
var passiveUpgradeAmt200 = 200
var passiveUpgradeAmt500 = 500
var passiveUpgradeAmt1000 = 1000
var passiveUpgradeAmt10000 = 10000
# Called when the node enters the scene tree for the first time.
func _ready():
$ClickUpgrades.get_popup().connect("id_pressed",clickUpgrade)
$PassiveUpgrades.get_popup().connect("id_pressed",passiveUpgrade)
$Timer.connect("timeout", _on_Timer_timeout)
#Code for the Click Me Button (deprecated)
#$Click.pressed.connect(self._on_button_pressed)
#Prints all input events, only for debugging
#func _input(event):
#print(event.as_text())
func _on_Timer_timeout():
score += scorePerSec * scoreMultiplier
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
#Displays normal numbers until commas are needed
if score > 999:
$Score.text = str(scoreFormat(score))
else:
$Score.text = str(score) #Changes the score number
#This checks any input that comes in
func _input(event):
#Function to record every left click as a "Click" to add to the score
if event.is_action_pressed("left_mouse"):
_on_button_pressed()
#Formats the score string so commas are inserted
func scoreFormat(score):
# Convert value to string.
var str_value: String = str(score)
# Loop backward starting at the last 3 digits,
# add comma then, repeat every 3rd step.
for i in range(str_value.length()-3, 0, -3):
str_value = str_value.insert(i, ",")
score = str_value
return score
func _on_button_pressed():
score += clickAdd * scoreMultiplier
func clickUpgrade(id):
match id:
0:
if score >= clickUpgradeReq1:
print ("Score sufficient")
score -=clickUpgradeReq1
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt1
else:
print("not enough score")
1:
if score >= clickUpgradeReq10:
print ("Score sufficient")
score -=clickUpgradeReq10
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt10
else:
print("not enough score")
2:
if score >= clickUpgradeReq20:
print ("Score sufficient")
score -=clickUpgradeReq20
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt20
else:
print("not enough score")
3:
if score >= clickUpgradeReq40:
print ("Score sufficient")
score -=clickUpgradeReq40
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt40
else:
print("not enough score")
4:
if score >= clickUpgradeReq60:
print ("Score sufficient")
score -=clickUpgradeReq60
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt60
else:
print("not enough score")
5:
if score >= clickUpgradeReq80:
print ("Score sufficient")
score -=clickUpgradeReq80
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt80
else:
print("not enough score")
6:
if score >= clickUpgradeReq100:
print ("Score sufficient")
score -=clickUpgradeReq100
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt100
else:
print("not enough score")
7:
if score >= clickUpgradeReq200:
print ("Score sufficient")
score -=clickUpgradeReq200
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt200
else:
print("not enough score")
8:
if score >= clickUpgradeReq400:
print ("Score sufficient")
score -=clickUpgradeReq400
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt400
else:
print("not enough score")
func passiveUpgrade(id):
match id:
0:
if score >= passiveUpgradeReq2:
print ("Score sufficient")
score -=passiveUpgradeReq2
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt2
else:
print("not enough score")
1:
if score >= passiveUpgradeReq10:
print ("Score sufficient")
score -=passiveUpgradeReq10
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt10
else:
print("not enough score")
2:
if score >= passiveUpgradeReq20:
print ("Score sufficient")
score -=passiveUpgradeReq20
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt20
else:
print("not enough score")
3:
if score >= passiveUpgradeReq50:
print ("Score sufficient")
score -=passiveUpgradeReq50
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt50
else:
print("not enough score")
4:
if score >= passiveUpgradeReq100:
print ("Score sufficient")
score -=passiveUpgradeReq100
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt100
else:
print("not enough score")
5:
if score >= passiveUpgradeReq200:
print ("Score sufficient")
score -=passiveUpgradeReq200
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt200
else:
print("not enough score")
6:
if score >= passiveUpgradeReq500:
print ("Score sufficient")
score -=passiveUpgradeReq500
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt500
else:
print("not enough score")
7:
if score >= passiveUpgradeReq1000:
print ("Score sufficient")
score -=passiveUpgradeReq1000
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt1000
else:
print("not enough score")
8:
if score >= passiveUpgradeReq10000:
print ("Score sufficient")
score -=passiveUpgradeReq10000
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt10000
else:
print("not enough score")

182
Game.tscn Normal file
View File

@@ -0,0 +1,182 @@
[gd_scene load_steps=3 format=3 uid="uid://xh0p6v5ir05f"]
[ext_resource type="Script" path="res://Root.gd" id="1_fof5y"]
[ext_resource type="Script" path="res://UI.gd" id="1_rdmp6"]
[node name="Root" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_fof5y")
[node name="Header" type="CanvasLayer" parent="."]
[node name="UI" type="Control" parent="Header"]
layout_mode = 3
anchors_preset = 0
offset_right = 1152.0
offset_bottom = 40.0
[node name="PanelContainer" type="GridContainer" parent="Header/UI"]
layout_mode = 0
offset_right = 1152.0
offset_bottom = 40.0
columns = 5
script = ExtResource("1_rdmp6")
[node name="ScoreLabel" type="Label" parent="Header/UI/PanelContainer"]
layout_mode = 2
text = "Score:"
[node name="Score" type="Label" parent="Header/UI/PanelContainer"]
layout_mode = 2
text = "0"
[node name="Click" type="Button" parent="Header/UI/PanelContainer"]
visible = false
layout_mode = 2
shortcut_in_tooltip = false
text = "Click Me"
flat = true
[node name="Timer" type="Timer" parent="Header/UI/PanelContainer"]
autostart = true
[node name="ClickUpgrades" type="MenuButton" parent="Header/UI/PanelContainer"]
layout_mode = 2
text = "Click Upgrades"
item_count = 9
popup/item_0/text = "+1 Cost:10"
popup/item_0/id = 0
popup/item_1/text = "+10 Cost: 100"
popup/item_1/id = 1
popup/item_2/text = "+20 Cost:1,000"
popup/item_2/id = 2
popup/item_3/text = "+40 Cost: 10,000"
popup/item_3/id = 3
popup/item_4/text = "+60 Cost: 100,000"
popup/item_4/id = 4
popup/item_5/text = "+80 Cost: 1,000,000"
popup/item_5/id = 5
popup/item_6/text = "+100 Cost: 10,000,000"
popup/item_6/id = 6
popup/item_7/text = "+200 Cost: 100,000,000"
popup/item_7/id = 7
popup/item_8/text = "+400 Cost: 1,000,000,000"
popup/item_8/id = 8
[node name="PassiveUpgrades" type="MenuButton" parent="Header/UI/PanelContainer"]
layout_mode = 2
text = "Passive Upgrades"
item_count = 9
popup/item_0/text = "2/s Cost: 100"
popup/item_0/id = 0
popup/item_1/text = "10/s Cost: 1,000"
popup/item_1/id = 1
popup/item_2/text = "20/s Cost: 10,000"
popup/item_2/id = 2
popup/item_3/text = "50/s Cost: 100,000"
popup/item_3/id = 3
popup/item_4/text = "100/s Cost:1,000,000"
popup/item_4/id = 4
popup/item_5/text = "200/s Cost: 10,000,000"
popup/item_5/id = 5
popup/item_6/text = "500/s Cost: 100,000,000"
popup/item_6/id = 6
popup/item_7/text = "1,000/s Cost: 1,000,000,000"
popup/item_7/id = 7
popup/item_8/text = "10,000/s Cost: 10,000,000,000"
popup/item_8/id = 8
[node name="TeamButton" type="Button" parent="Header/UI/PanelContainer"]
layout_mode = 2
text = "Team"
flat = true
alignment = 0
[node name="Team" type="Panel" parent="."]
layout_mode = 0
offset_left = 2.0
offset_top = 40.0
offset_right = 1152.0
offset_bottom = 648.0
[node name="GridContainer" type="GridContainer" parent="Team"]
layout_mode = 0
offset_left = 63.0
offset_top = 109.0
offset_right = 1150.0
offset_bottom = 609.0
columns = 5
[node name="TeamMember1" type="Button" parent="Team/GridContainer"]
layout_mode = 2
text = "
Add Team Here++++++
"
[node name="TeamMember2" type="Button" parent="Team/GridContainer"]
layout_mode = 2
text = "Add Team Here++++++"
[node name="TeamMember3" type="Button" parent="Team/GridContainer"]
layout_mode = 2
text = "Add Team Here++++++"
[node name="TeamMember4" type="Button" parent="Team/GridContainer"]
layout_mode = 2
text = "Add Team Here++++++"
[node name="TeamMember5" type="Button" parent="Team/GridContainer"]
layout_mode = 2
text = "Add Team Here++++++"
[node name="MemberInventory" type="ColorRect" parent="."]
layout_mode = 0
offset_left = 2.0
offset_top = 40.0
offset_right = 1152.0
offset_bottom = 649.0
color = Color(0.219501, 0.219501, 0.219501, 1)
[node name="CenterContainer" type="CenterContainer" parent="MemberInventory"]
layout_mode = 0
offset_right = 1150.0
offset_bottom = 608.0
[node name="user Int" type="CanvasLayer" parent="."]
[node name="MemberInterface" type="Control" parent="user Int"]
layout_mode = 3
anchors_preset = 0
offset_left = 21.2617
offset_top = 125.673
offset_right = 61.2617
offset_bottom = 165.673
[node name="MemberInventory" type="PanelContainer" parent="user Int/MemberInterface"]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dl2xq61hhlnuy"
path="res://.godot/imported/Main_Screen_Rough.png-b77e19ec94deaa7dc14fcb8ef7e65a18.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Main_Screen_Rough.png"
dest_files=["res://.godot/imported/Main_Screen_Rough.png-b77e19ec94deaa7dc14fcb8ef7e65a18.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bsre11fachlji"
path="res://.godot/imported/#1 - Transparent Icons.png-4e4854052722cb891e22632f9d80f031.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/#1 - Transparent Icons.png"
dest_files=["res://.godot/imported/#1 - Transparent Icons.png-4e4854052722cb891e22632f9d80f031.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://w2sgp1msb42p"
path="res://.godot/imported/#2 - Transparent Icons & Drop Shadow.png-65be597f6c1760a4e5da594073ff32d8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/#2 - Transparent Icons & Drop Shadow.png"
dest_files=["res://.godot/imported/#2 - Transparent Icons & Drop Shadow.png-65be597f6c1760a4e5da594073ff32d8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ccpgxjq3mfja5"
path="res://.godot/imported/BG 10.png-1f124eed63bb857ba600b53e17d244e8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 10.png"
dest_files=["res://.godot/imported/BG 10.png-1f124eed63bb857ba600b53e17d244e8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://7uwyp5k4p5tj"
path="res://.godot/imported/BG 11.png-2a24af8ec64435e793681d1205b095a0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 11.png"
dest_files=["res://.godot/imported/BG 11.png-2a24af8ec64435e793681d1205b095a0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bkm1kayk1wnr6"
path="res://.godot/imported/BG 3a.png-e6dda39dee6e4797d61b14a96f72ae75.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 3a.png"
dest_files=["res://.godot/imported/BG 3a.png-e6dda39dee6e4797d61b14a96f72ae75.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bedv4qhh0ehq8"
path="res://.godot/imported/BG 3b.png-f6d5129a0fafc8ff755387b28cc2f232.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 3b.png"
dest_files=["res://.godot/imported/BG 3b.png-f6d5129a0fafc8ff755387b28cc2f232.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://hl46vnpvuoum"
path="res://.godot/imported/BG 3c.png-7b974a0c79948e77b74d5f80bbd61022.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 3c.png"
dest_files=["res://.godot/imported/BG 3c.png-7b974a0c79948e77b74d5f80bbd61022.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fbnvbjmbf4yf"
path="res://.godot/imported/BG 4a.png-d0791f43712b0a5673e719be898c5252.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 4a.png"
dest_files=["res://.godot/imported/BG 4a.png-d0791f43712b0a5673e719be898c5252.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://3oiaku0qqnk8"
path="res://.godot/imported/BG 4b.png-a0c76692db223e4a5a339f48dd134470.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 4b.png"
dest_files=["res://.godot/imported/BG 4b.png-a0c76692db223e4a5a339f48dd134470.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b46bfg8xfkj7f"
path="res://.godot/imported/BG 5.png-929f3666094a059427a9a8923fa7f281.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 5.png"
dest_files=["res://.godot/imported/BG 5.png-929f3666094a059427a9a8923fa7f281.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d4ie6wpahgp7m"
path="res://.godot/imported/BG 6.png-c7e94535917023ddcd3f763a85dba4b0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 6.png"
dest_files=["res://.godot/imported/BG 6.png-c7e94535917023ddcd3f763a85dba4b0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d5gidub5yxm"
path="res://.godot/imported/BG 7.png-0436f7f5d2b7c08fc9ee92275b2a073f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 7.png"
dest_files=["res://.godot/imported/BG 7.png-0436f7f5d2b7c08fc9ee92275b2a073f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://keohc5ba52mc"
path="res://.godot/imported/BG 8.png-add12aba3adc053654c9a7aa201621e0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 8.png"
dest_files=["res://.godot/imported/BG 8.png-add12aba3adc053654c9a7aa201621e0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dp2b5jxlnb5fn"
path="res://.godot/imported/BG 9.png-723f4fd7d84daa91faf8bce2bc2dff56.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/BG 9.png"
dest_files=["res://.godot/imported/BG 9.png-723f4fd7d84daa91faf8bce2bc2dff56.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://1htjp7q82q6d"
path="res://.godot/imported/Background 1a.png-d1037576600c40247ab02ece98bd43ec.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/Background 1a.png"
dest_files=["res://.godot/imported/Background 1a.png-d1037576600c40247ab02ece98bd43ec.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c62g4ncs7r6oy"
path="res://.godot/imported/Background 1b.png-561224e0a203a8ec46e0c5ba0d424a4a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/Background 1b.png"
dest_files=["res://.godot/imported/Background 1b.png-561224e0a203a8ec46e0c5ba0d424a4a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d1wusdx542xuh"
path="res://.godot/imported/Background 2.png-ca1ceced087a8648b3b247b3b8664c5b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Images/Shikashi's Fantasy Icons Pack v2/Background 2.png"
dest_files=["res://.godot/imported/Background 2.png-ca1ceced087a8648b3b247b3b8664c5b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,40 @@
V.2: 19th April 2020 Update
Best of luck with your game or project!
~~~
This is an icon pack with 209 unique icons and 36 recolours, with 245 icons in total. The spritesheet and 32x32 icon size were designed with RPG Maker MV in mind, but these icons can be used for any project that can use 32x32 sprites. There are several icon backgrounds to choose from, along with the original transparent option.
You can use and remix these icons for commercial games and projects. Many of these icons were based on the designs over at game-icons.net which are CC BY 3.0.
Here are all of the icons in the pack listed, in order:
11 STATUS EFFECTS. Skull and bones, poison, sleeping eye, silenced, cursed, dizzy, charmed, sleeping, paralysis, burned, sweat-drop.
5 BODY ICONS. Heart, lungs, stomach, brain, strong arm.
7 BUFFS & DEBUFFS. x3 buff arrows, x3 debuff arrows, repeat arrow.
16 SPECIAL MOVES. Dripping blade, saber slash, lightning attack, headshot, raining arrows, healing, heal injury, battle gear, guard, ring of fire, disintegrate, fist hit, gust of air, tremor, psychic waves, sunrays.
9 NON COMBAT ACTIONS. Square speech bubble, round speech bubble, campfire, camping tent, blacksmith/forging, mining, woodcutting, spellbook, steal.
28 WEAPONS. Wooden waster, longsword, enchanted sword, katana, gladius, saber, dagger, broad dagger, sai, crossed/dual swords, war axe, battle axe, flail, spiked club, whip, fist, buckler shield, wooden shield, checkered shield, bow & arrow, crossbow, slingshot, boomerang, wizard staff, x4 magic gem staffs.
26 CLOTHING & ARMOUR. Robin hood hat, barbute helm, leather helm, cross helm, iron armour, steel armour, leather armour, layered plate armour, blue tunic, green tunic, trousers, shorts, heart boxers, dress, cloak, belt, leather gauntlet, metal gauntlet, leather boots, steeltoe boots, ring, diamond ring, gold necklace, prayer beads, tribal necklace, leather pouch.
16 HEALING ITEMS. X4 Normal potions, x4 upgraded potions, x4 rare potions, x3 special brew potions, bandage.
64 GENERAL ITEMS. Knapsack, axe, pickaxe, shovel, hammer, grappling hook, hookshot, telescope, magnifying glass, lantern, torch, candle, bomb, rope, bear trap, hourglass. Runestone, mirror, shackles, lyre, violin, ocarina, flute, panpipes, hunting/war horn, brass key, silver keyring, treasure chest, mortar and pestle, herb1, herb2, herb. Mushrooms, flower bulb, root tip, plant-pot seedling, plant-pot growing, plant-pot fully grown, money purse, crown coin, bronze coin stack, silver coin stack, gold coin stack, large gold coin stack, receive money, pay money, gems, rupee. x8 books, open book, letter, tied scroll, open scroll, old map, dice, card, bottle of wine.
31 FOOD. Apple, banana, pear, lemon, strawberry, grapes, carrot, sweetcorn, garlic, tomato, eggplant/aubergine, red chili, mushroom, loaf of bread, baguette, whole chicken. Chicken leg, sirloin steak, ham, morsel, cooked fish, eggs, big egg, cheese, milk, honey, salt, spices, candy, cake, drink.
15 FISHING ITEMS. Fishing rod, fishing hook, worm bait, lake trout, brown trout, eel, tropical fish, clownfish, jellyfish, octopus, turtle, fish-bone, old boot, fossil, sunken chest.
11 RESOURCES. Wood, stone, ore, gold, gems, cotton, yarn, cloth, pelts, monster claw, feathers.
6 ORBS. x6 Orbs of different colours.
39 NEW ICONS. x4 empty flask variants, x4 full flask variants, cauldron on fire, cauldron, horse, wooden beam, wicker basket, x12 powder variants, hand casting magic, x6 magic scrolls, sunrise, sun, sunset, moon, snowflake, hot temperature, cold temperature.

BIN
Images/Thumbs.db Normal file

Binary file not shown.

20
Inventory.tres Normal file
View File

@@ -0,0 +1,20 @@
[gd_resource type="Resource" script_class="InventoryData" load_steps=7 format=3 uid="uid://cvuvn1voknqbj"]
[ext_resource type="Script" path="res://MemberInventory/Inventory_Data.gd" id="1_pvibr"]
[ext_resource type="Resource" uid="uid://bukp0dt41xws2" path="res://Member/Members/apple.tres" id="2_aboym"]
[ext_resource type="Script" path="res://MemberInventory/Slot_Data.gd" id="3_22rk4"]
[ext_resource type="Resource" uid="uid://pjychvu7chd7" path="res://Member/Members/blue_book.tres" id="4_fg6vr"]
[sub_resource type="Resource" id="Resource_vnpe5"]
script = ExtResource("3_22rk4")
memberData = ExtResource("2_aboym")
quantity = 11
[sub_resource type="Resource" id="Resource_cm5vi"]
script = ExtResource("3_22rk4")
memberData = ExtResource("4_fg6vr")
quantity = 5
[resource]
script = ExtResource("1_pvibr")
slot_datas = Array[ExtResource("3_22rk4")]([null, null, SubResource("Resource_vnpe5"), null, null, null, SubResource("Resource_cm5vi"), null, null, null])

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b1kl4huy0vnin"
path="res://.godot/imported/#1 - Transparent Icons.png-075c51137bc59a17da3b30778a360723.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Member/#1 - Transparent Icons.png"
dest_files=["res://.godot/imported/#1 - Transparent Icons.png-075c51137bc59a17da3b30778a360723.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

10
Member/Member_Data.gd Normal file
View File

@@ -0,0 +1,10 @@
extends Resource
class_name Member_Data
@export var name: String = ""
@export_multiline var description: String = ""
@export var memberPerSec: int = 0
@export var memberClickAdd: int = 0
@export var memberMultiplier: int = 1
@export var texture: AtlasTexture
@export var stackable: bool = true

18
Member/Members/apple.tres Normal file
View File

@@ -0,0 +1,18 @@
[gd_resource type="Resource" script_class="Member_Data" load_steps=4 format=3 uid="uid://bukp0dt41xws2"]
[ext_resource type="Script" path="res://Member/Member_Data.gd" id="1_vw6lk"]
[ext_resource type="Texture2D" uid="uid://b1kl4huy0vnin" path="res://Member/#1 - Transparent Icons.png" id="2_xkfej"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ul5um"]
atlas = ExtResource("2_xkfej")
region = Rect2(0, 448, 32, 32)
[resource]
script = ExtResource("1_vw6lk")
name = "Apple"
description = "Your average apple"
memberPerSec = 0
memberClickAdd = 0
memberMultiplier = 1
texture = SubResource("AtlasTexture_ul5um")
stackable = true

View File

@@ -0,0 +1,18 @@
[gd_resource type="Resource" script_class="Member_Data" load_steps=4 format=3 uid="uid://pjychvu7chd7"]
[ext_resource type="Script" path="res://Member/Member_Data.gd" id="1_v4fy4"]
[ext_resource type="Texture2D" uid="uid://b1kl4huy0vnin" path="res://Member/#1 - Transparent Icons.png" id="2_vbek6"]
[sub_resource type="AtlasTexture" id="AtlasTexture_qsdc3"]
atlas = ExtResource("2_vbek6")
region = Rect2(0, 416, 32, 32)
[resource]
script = ExtResource("1_v4fy4")
name = "Blue Book"
description = "A book that is blue"
memberPerSec = 5
memberClickAdd = 10
memberMultiplier = 1
texture = SubResource("AtlasTexture_qsdc3")
stackable = true

7
Member/member_atlas.tres Normal file
View File

@@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bxxw5pqeace2y"]
[ext_resource type="Texture2D" uid="uid://b1kl4huy0vnin" path="res://Member/#1 - Transparent Icons.png" id="1_t5da6"]
[resource]
atlas = ExtResource("1_t5da6")
region = Rect2(0, 0, 32, 32)

View File

@@ -0,0 +1,5 @@
extends Resource
class_name InventoryData
@export var slot_datas: Array[Slot_Data]

View File

@@ -0,0 +1,7 @@
extends Resource
class_name Slot_Data
const MAX_STACK_SIZE: int = 99
@export var memberData: Member_Data
@export_range(1, MAX_STACK_SIZE) var quantity: int = 1

View File

@@ -0,0 +1,5 @@
A clicker game with gacha inspired mechanics
made in godot
build a team for better earnings

17
Root.gd Normal file
View File

@@ -0,0 +1,17 @@
extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
#$UI/TeamButton.pressed.connect(self.openTeamWindow) # Replace with function body.
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
#func openTeamWindow():
#print("button pressed")
#$UI/Team.visible = !$UI/Team.visible

260
UI.gd Normal file
View File

@@ -0,0 +1,260 @@
extends Control
#https://www.youtube.com/watch?v=V79YabQZC1s
#13:03
var score = 0
var clickAdd = 1
var scorePerSec = 1
var scoreMultiplier = 1
#Click Upgrades Costs
var clickUpgradeReq1 = 10
var clickUpgradeReq10 = 100
var clickUpgradeReq20 = 1000
var clickUpgradeReq40 = 10000
var clickUpgradeReq60 = 100000
var clickUpgradeReq80 = 1000000
var clickUpgradeReq100 = 10000000
var clickUpgradeReq200 = 100000000
var clickUpgradeReq400 = 1000000000
# Click Upgrades Amount
var clickUpgradeAmt1 = 1
var clickUpgradeAmt10 = 10
var clickUpgradeAmt20 = 20
var clickUpgradeAmt40 = 40
var clickUpgradeAmt60 = 60
var clickUpgradeAmt80 = 80
var clickUpgradeAmt100 = 100
var clickUpgradeAmt200 = 200
var clickUpgradeAmt400 = 400
# Passive Upgrades Costs
var passiveUpgradeReq2 = 100
var passiveUpgradeReq10 = 1000
var passiveUpgradeReq20 = 10000
var passiveUpgradeReq50 = 100000
var passiveUpgradeReq100 = 1000000
var passiveUpgradeReq200 = 10000000
var passiveUpgradeReq500 = 100000000
var passiveUpgradeReq1000 = 1000000000
var passiveUpgradeReq10000 = 10000000000
# Passive Upgrades Amount
var passiveUpgradeAmt2 = 2
var passiveUpgradeAmt10 = 10
var passiveUpgradeAmt20 = 20
var passiveUpgradeAmt50 = 50
var passiveUpgradeAmt100 = 100
var passiveUpgradeAmt200 = 200
var passiveUpgradeAmt500 = 500
var passiveUpgradeAmt1000 = 1000
var passiveUpgradeAmt10000 = 10000
# Called when the node enters the scene tree for the first time.
func _ready():
$ClickUpgrades.get_popup().connect("id_pressed",clickUpgrade)
$PassiveUpgrades.get_popup().connect("id_pressed",passiveUpgrade)
$Timer.connect("timeout", _on_Timer_timeout)
$TeamButton.pressed.connect(self.openTeamWindow)
#Code for the Click Me Button (deprecated)
#$Click.pressed.connect(self._on_button_pressed)
#Prints all input events, only for debugging
#func _input(event):
#print(event.as_text())
func _on_Timer_timeout():
score += scorePerSec * scoreMultiplier
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
#Displays normal numbers until commas are needed
if score > 999:
$Score.text = str(scoreFormat(score))
else:
$Score.text = str(score) #Changes the score number
#This checks any input that comes in
func _input(event):
#Function to record every left click as a "Click" to add to the score
if event.is_action_pressed("left_mouse"):
leftClick()
#_on_button_pressed()
func openTeamWindow():
print("button pressed")
#Useful for getting children from other nodes
get_owner().get_node("Team").show()
#$Team.visible = !$Team.visible
#Formats the score string so commas are inserted
func scoreFormat(score):
# Convert value to string.
var str_value: String = str(score)
# Loop backward starting at the last 3 digits,
# add comma then, repeat every 3rd step.
for i in range(str_value.length()-3, 0, -3):
str_value = str_value.insert(i, ",")
score = str_value
return score
func leftClick():
score += clickAdd * scoreMultiplier
func clickUpgrade(id):
match id:
0:
if score >= clickUpgradeReq1:
print ("Score sufficient")
score -=clickUpgradeReq1
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt1
else:
print("not enough score")
1:
if score >= clickUpgradeReq10:
print ("Score sufficient")
score -=clickUpgradeReq10
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt10
else:
print("not enough score")
2:
if score >= clickUpgradeReq20:
print ("Score sufficient")
score -=clickUpgradeReq20
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt20
else:
print("not enough score")
3:
if score >= clickUpgradeReq40:
print ("Score sufficient")
score -=clickUpgradeReq40
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt40
else:
print("not enough score")
4:
if score >= clickUpgradeReq60:
print ("Score sufficient")
score -=clickUpgradeReq60
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt60
else:
print("not enough score")
5:
if score >= clickUpgradeReq80:
print ("Score sufficient")
score -=clickUpgradeReq80
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt80
else:
print("not enough score")
6:
if score >= clickUpgradeReq100:
print ("Score sufficient")
score -=clickUpgradeReq100
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt100
else:
print("not enough score")
7:
if score >= clickUpgradeReq200:
print ("Score sufficient")
score -=clickUpgradeReq200
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt200
else:
print("not enough score")
8:
if score >= clickUpgradeReq400:
print ("Score sufficient")
score -=clickUpgradeReq400
$ClickUpgrades.get_popup().set_item_disabled(id, true)
clickAdd += clickUpgradeAmt400
else:
print("not enough score")
func passiveUpgrade(id):
match id:
0:
if score >= passiveUpgradeReq2:
print ("Score sufficient")
score -=passiveUpgradeReq2
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt2
else:
print("not enough score")
1:
if score >= passiveUpgradeReq10:
print ("Score sufficient")
score -=passiveUpgradeReq10
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt10
else:
print("not enough score")
2:
if score >= passiveUpgradeReq20:
print ("Score sufficient")
score -=passiveUpgradeReq20
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt20
else:
print("not enough score")
3:
if score >= passiveUpgradeReq50:
print ("Score sufficient")
score -=passiveUpgradeReq50
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt50
else:
print("not enough score")
4:
if score >= passiveUpgradeReq100:
print ("Score sufficient")
score -=passiveUpgradeReq100
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt100
else:
print("not enough score")
5:
if score >= passiveUpgradeReq200:
print ("Score sufficient")
score -=passiveUpgradeReq200
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt200
else:
print("not enough score")
6:
if score >= passiveUpgradeReq500:
print ("Score sufficient")
score -=passiveUpgradeReq500
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt500
else:
print("not enough score")
7:
if score >= passiveUpgradeReq1000:
print ("Score sufficient")
score -=passiveUpgradeReq1000
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt1000
else:
print("not enough score")
8:
if score >= passiveUpgradeReq10000:
print ("Score sufficient")
score -=passiveUpgradeReq10000
$PassiveUpgrades.get_popup().set_item_disabled(id, true)
scorePerSec = passiveUpgradeAmt10000
else:
print("not enough score")

1
icon.svg Normal file
View File

@@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z" fill="#478cbf"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>

After

Width:  |  Height:  |  Size: 949 B

37
icon.svg.import Normal file
View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ci8cvsquh7pc"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

16
inventory.tscn Normal file
View File

@@ -0,0 +1,16 @@
[gd_scene format=3 uid="uid://dkxvvj3ujay5"]
[node name="Inventory" type="PanelContainer"]
offset_right = 40.0
offset_bottom = 40.0
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 8
[node name="MemberGrid" type="GridContainer" parent="MarginContainer"]
layout_mode = 2
columns = 6

32
project.godot Normal file
View File

@@ -0,0 +1,32 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="ClickerGacha"
config/features=PackedStringArray("4.2", "Mobile")
config/icon="res://icon.svg"
[display]
window/size/viewport_width=1920
window/size/viewport_height=1080
[input]
left_mouse={
"deadzone": 0.5,
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
]
}
[rendering]
renderer/rendering_method="mobile"

29
slot.tscn Normal file
View File

@@ -0,0 +1,29 @@
[gd_scene load_steps=2 format=3 uid="uid://clfibh4syeuqk"]
[ext_resource type="Texture2D" uid="uid://ci8cvsquh7pc" path="res://icon.svg" id="1_uu5rg"]
[node name="Slot" type="PanelContainer"]
custom_minimum_size = Vector2(64, 64)
offset_right = 40.0
offset_bottom = 40.0
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 2
theme_override_constants/margin_left = 4
theme_override_constants/margin_top = 4
theme_override_constants/margin_right = 4
theme_override_constants/margin_bottom = 4
[node name="TextureRect" type="TextureRect" parent="MarginContainer"]
layout_mode = 2
texture = ExtResource("1_uu5rg")
expand_mode = 1
stretch_mode = 5
[node name="Quantity Label" type="Label" parent="."]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
theme_override_constants/outline_size = 3
text = "x99"

111
team.tscn Normal file
View File

@@ -0,0 +1,111 @@
[gd_scene load_steps=2 format=3 uid="uid://blwuy4v4qqyna"]
[ext_resource type="Script" path="res://UI.gd" id="1_4f1r8"]
[node name="Root" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="UI" type="Control" parent="."]
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("1_4f1r8")
[node name="Score" type="Label" parent="UI"]
layout_mode = 0
offset_left = 50.0
offset_top = 2.0
offset_right = 104.0
offset_bottom = 25.0
text = "0"
[node name="Click" type="Button" parent="UI"]
visible = false
layout_mode = 0
offset_left = 461.0
offset_top = 22.0
offset_right = 608.0
offset_bottom = 116.0
shortcut_in_tooltip = false
text = "Click Me"
flat = true
[node name="ScoreLabel" type="Label" parent="UI"]
layout_mode = 0
offset_left = 2.0
offset_top = 1.0
offset_right = 50.0
offset_bottom = 24.0
text = "Score:"
[node name="Timer" type="Timer" parent="UI"]
autostart = true
[node name="ClickUpgrades" type="MenuButton" parent="UI"]
layout_mode = 0
offset_left = 3.0
offset_top = 108.0
offset_right = 126.0
offset_bottom = 139.0
text = "Click Upgrades"
item_count = 9
popup/item_0/text = "+1 Cost:10"
popup/item_0/id = 0
popup/item_1/text = "+10 Cost: 100"
popup/item_1/id = 1
popup/item_2/text = "+20 Cost:1,000"
popup/item_2/id = 2
popup/item_3/text = "+40 Cost: 10,000"
popup/item_3/id = 3
popup/item_4/text = "+60 Cost: 100,000"
popup/item_4/id = 4
popup/item_5/text = "+80 Cost: 1,000,000"
popup/item_5/id = 5
popup/item_6/text = "+100 Cost: 10,000,000"
popup/item_6/id = 6
popup/item_7/text = "+200 Cost: 100,000,000"
popup/item_7/id = 7
popup/item_8/text = "+400 Cost: 1,000,000,000"
popup/item_8/id = 8
[node name="PassiveUpgrades" type="MenuButton" parent="UI"]
layout_mode = 0
offset_left = 3.0
offset_top = 139.0
offset_right = 147.0
offset_bottom = 170.0
text = "Passive Upgrades"
item_count = 9
popup/item_0/text = "2/s Cost: 100"
popup/item_0/id = 0
popup/item_1/text = "10/s Cost: 1,000"
popup/item_1/id = 1
popup/item_2/text = "20/s Cost: 10,000"
popup/item_2/id = 2
popup/item_3/text = "50/s Cost: 100,000"
popup/item_3/id = 3
popup/item_4/text = "100/s Cost:1,000,000"
popup/item_4/id = 4
popup/item_5/text = "200/s Cost: 10,000,000"
popup/item_5/id = 5
popup/item_6/text = "500/s Cost: 100,000,000"
popup/item_6/id = 6
popup/item_7/text = "1,000/s Cost: 1,000,000,000"
popup/item_7/id = 7
popup/item_8/text = "10,000/s Cost: 10,000,000,000"
popup/item_8/id = 8
[node name="ItemList" type="ItemList" parent="."]
layout_mode = 0
offset_left = 529.0
offset_top = 179.0
offset_right = 671.0
offset_bottom = 370.0
item_count = 2
item_0/text = "Item 1"
item_1/text = "Item 2"