From 788285fd1d22a492610eeed30cb6684b44123a6a Mon Sep 17 00:00:00 2001 From: Priskip <111097864+Priskip@users.noreply.github.com> Date: Mon, 19 Dec 2022 13:10:22 -0500 Subject: [PATCH] 19_dec_2022 --- change_log.txt | 11 + data/biome/desert.xml | 371 ++++++++++++++++++ data/entities/projectiles/deck/chainsaw.xml | 105 +++++ files/biome_impl/debug/biome_map_debug.png | Bin 432 -> 446 bytes files/debug_magic_numbers.xml | 4 +- files/enemies_gfx/mimic_cactus.png | Bin 0 -> 4986 bytes files/enemies_gfx/mimic_cactus.xml | 81 ++++ files/entities/animals/mimic_cactus.xml | 88 +++++ .../misc/custom_cards/grenade_anti.xml | 238 +++++++++++ .../misc/custom_cards/grenade_large.xml | 255 ++++++------ .../misc/custom_cards/grenade_tier_2.xml | 2 +- .../entities/misc/custom_cards/pipe_bomb.xml | 41 ++ .../custom_cards/pipe_bomb_death_trigger.xml | 41 ++ files/entities/misc/custom_cards/rocket.xml | 278 +++++++++++++ .../misc/custom_cards/rocket_tier_2.xml | 165 ++++++++ .../misc/custom_cards/rocket_tier_3.xml | 165 ++++++++ files/entities/misc/remove_gravity.xml | 10 + .../projectiles/deck/orb_expanding.xml | 3 +- files/items_gfx/in_hand/pipe_bomb_in_hand.png | Bin 0 -> 168 bytes files/potion_appends.lua | 202 ++++++---- files/scripts/gun/gun_actions.lua | 24 +- files/scripts/gun/gun_actions_list.lua | 1 + files/scripts/projectiles/remove_gravity.lua | 11 + files/set_seed.xml | 1 + files/translations/common.csv | 3 + files/ui_gfx/gun_actions/multiply_10.png | Bin 0 -> 243 bytes files/ui_gfx/gun_actions/multiply_2.png | Bin 0 -> 223 bytes files/ui_gfx/gun_actions/multiply_3.png | Bin 0 -> 236 bytes files/ui_gfx/gun_actions/multiply_4.png | Bin 0 -> 226 bytes files/ui_gfx/gun_actions/remove_gravity.png | Bin 0 -> 180 bytes init.lua | 41 +- mod.xml | 2 +- secrets.lua | 5 + settings.lua | 189 +++++---- 34 files changed, 2035 insertions(+), 302 deletions(-) create mode 100644 data/biome/desert.xml create mode 100644 data/entities/projectiles/deck/chainsaw.xml create mode 100644 files/enemies_gfx/mimic_cactus.png create mode 100644 files/enemies_gfx/mimic_cactus.xml create mode 100644 files/entities/animals/mimic_cactus.xml create mode 100644 files/entities/misc/custom_cards/grenade_anti.xml create mode 100644 files/entities/misc/custom_cards/pipe_bomb.xml create mode 100644 files/entities/misc/custom_cards/pipe_bomb_death_trigger.xml create mode 100644 files/entities/misc/custom_cards/rocket.xml create mode 100644 files/entities/misc/custom_cards/rocket_tier_2.xml create mode 100644 files/entities/misc/custom_cards/rocket_tier_3.xml create mode 100644 files/entities/misc/remove_gravity.xml create mode 100644 files/items_gfx/in_hand/pipe_bomb_in_hand.png create mode 100644 files/scripts/projectiles/remove_gravity.lua create mode 100644 files/set_seed.xml create mode 100644 files/ui_gfx/gun_actions/multiply_10.png create mode 100644 files/ui_gfx/gun_actions/multiply_2.png create mode 100644 files/ui_gfx/gun_actions/multiply_3.png create mode 100644 files/ui_gfx/gun_actions/multiply_4.png create mode 100644 files/ui_gfx/gun_actions/remove_gravity.png create mode 100644 secrets.lua diff --git a/change_log.txt b/change_log.txt index 526bab2..6a6d913 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,5 +1,16 @@ Change Log +Beta Build 19 Dec 2022 + - And then I said something about a cactus + - Fixed a bug with larpa not working on expanding sphere (thank you Human#6606 for posting about it in my discord <3) + - Potions drawn from the normal potion pool will now vary in the amount of liquid they contain + - Each material in the pool will spawn in with its own unique range of amount of material + - For Example: Water can spawn in 80-100% full while Ambrosia only spawns with 15-45% + - For a full list of material amounts, see "mods/purgatory/files/potion_appends.lua" + - Fixed a few bugs with firebolt particles not rendering when they were placed on wands + - Added a seed changer to the mod options menu + - New Spell: Remove Gravity (modifier) + Beta Build 12 Nov 2022 - Tweaked some secrets at Ylialkemisti's - Reduced the amount of shields Ylialkemisti can spam to improve performance during his fight diff --git a/data/biome/desert.xml b/data/biome/desert.xml new file mode 100644 index 0000000..46359bc --- /dev/null +++ b/data/biome/desert.xml @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/entities/projectiles/deck/chainsaw.xml b/data/entities/projectiles/deck/chainsaw.xml new file mode 100644 index 0000000..7534fda --- /dev/null +++ b/data/entities/projectiles/deck/chainsaw.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/biome_impl/debug/biome_map_debug.png b/files/biome_impl/debug/biome_map_debug.png index 823087a5e86f25063ddd5d0884c31cf25f46a099..bb7eddd9ea3995c645e763f59d544e84b025f08d 100644 GIT binary patch delta 277 zcmV+w0qXv+1HJ>0F#&jyGHXWw!u8U(gNbCDK8=B>Duud$`c*A4z$ASSgmGr33)KxD zu!J|a)0Rdi)7(q<1k>PbDri40)S_Zpe2 z#-Pf;@SlN!=@!E+G?f>MM5%83Xu=x`VAM-P0gQTSD1gyIe9(i@LVSpTVdy0~b<__Z zhIaUDZE4k+g#-G-F#&3kGHZW;Vdy35SGB}|Q`#>f4701^R5yIUVrg!tEsad3xtB_= zPKL8jYQ2E7lgkg&$VQqcydLdbINSW11cX70^acmmyi~vqWlZ==JBw)t7?C>{!vHWb zFpd`D!~ui8*T`Ho22}=z{|pRFw-|1rsk~4mN_E>u6W&k&qh1;cVAOw0LjjBy;)5QH z7UDw$3_~x`siS`QFto#GYfG!nEF91;mdt!r=wlK6ymV^w9r{=_4D-@3^b(zlhh3{z zF)%PPFfcYxnn-KAMq3X<0gQTSD1cEf4FxdjrJ(?ZqnCzLJqrO$ObmBuhwA*|+MIrA&5>Ws+(v z#VezE85v7nnMq@3*5^ATzU%t_`JU^Vd7e4v+`oG{_qp%iGx0X3k4dhRT?avsx2@v z_^vIz`TT~o4RaT7Ys|1p^CbV?i@sfTBYfOeg`|{wunA7jQXjDiDNTJLe#-_|hrI3| zXZ(FvgQ?7<_tO`8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xSpV7Z!0pdZs4 z6>mM7{>HlC&Rz23^!n8%2S%$=UB~3=7^C>7PF13olzvnP3lGRhIj7MB^m=V?GJutY z8ELaFPbAYXvKWQ7&O0Jgt<4?!QEV=#y!`FF<`_4q|75Eq@s=rN@7%dAMKF~vd~2;b z;`pHM-n{PZSg!MQmIR`1%F0?OS*=E3_4GKW(F>4`cMN&f)F|^2@i!8uN_;R8{ZCo7 zpcBpWB$}bB#Pk>ltO<*_?2CrT0+v|t4wS?Qa=}9+zXY@hvBchP?NI zJZU&_)#&*lpn*D{wFc#UO;CEX1Z<>48#9u?Xwz8j?|Qt5w5<=nrW}t(N*w@yrsNc2 z1k_BRJ%F9#VLUhYiYb}!zl4U}DAf#_?smz|)6_`xTf3E|OS>1sGNMb`_a=)bM-;6B zY-9t4;3aQ<##X&4=yJ;{8<|+Fh=CKj@;n6GalCo=^si*}VzLyVoR}u~V~G5!wq;f) z0ftc@T`z<81Oe;3jpp`mHVyVMSfLQGHV@DkNR*2TCF)767pf7wia{qVPMepRx<&mD D&*JZf literal 0 HcmV?d00001 diff --git a/files/enemies_gfx/mimic_cactus.xml b/files/enemies_gfx/mimic_cactus.xml new file mode 100644 index 0000000..9547a6c --- /dev/null +++ b/files/enemies_gfx/mimic_cactus.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/entities/animals/mimic_cactus.xml b/files/entities/animals/mimic_cactus.xml new file mode 100644 index 0000000..a8a0440 --- /dev/null +++ b/files/entities/animals/mimic_cactus.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/entities/misc/custom_cards/grenade_anti.xml b/files/entities/misc/custom_cards/grenade_anti.xml new file mode 100644 index 0000000..8a557e6 --- /dev/null +++ b/files/entities/misc/custom_cards/grenade_anti.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/entities/misc/custom_cards/grenade_large.xml b/files/entities/misc/custom_cards/grenade_large.xml index 278817a..8ed693d 100644 --- a/files/entities/misc/custom_cards/grenade_large.xml +++ b/files/entities/misc/custom_cards/grenade_large.xml @@ -1,23 +1,22 @@ - - - - - - - - - + + + + + - + action_id="GRENADE_LARGE" + > - + + - - - + + - - - + + - - - + + - + b="120" + > - - + b="255" + > - - - - + + - - - - - - - + offset.x="0" + offset.y="0" + x_pos_offset_min="-1" + x_pos_offset_max="1" + y_pos_offset_min="-1" + y_pos_offset_max="1" + x_vel_min="-2" + x_vel_max="2" + y_vel_min="-20" + y_vel_max="-10" + count_min="4" + count_max="6" + lifetime_min="0.3" + lifetime_max="0.4" + create_real_particles="1" + emit_cosmetic_particles="0" + emission_interval_min_frames="1" + emission_interval_max_frames="3" + > + + + + - + set_latest_event_position="1" + > - + play_on_component_enable="1" + > - - + > + \ No newline at end of file diff --git a/files/entities/misc/custom_cards/grenade_tier_2.xml b/files/entities/misc/custom_cards/grenade_tier_2.xml index 51a8810..13389d3 100644 --- a/files/entities/misc/custom_cards/grenade_tier_2.xml +++ b/files/entities/misc/custom_cards/grenade_tier_2.xml @@ -32,7 +32,7 @@ > + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/entities/misc/custom_cards/pipe_bomb_death_trigger.xml b/files/entities/misc/custom_cards/pipe_bomb_death_trigger.xml new file mode 100644 index 0000000..0f551c6 --- /dev/null +++ b/files/entities/misc/custom_cards/pipe_bomb_death_trigger.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/entities/misc/custom_cards/rocket.xml b/files/entities/misc/custom_cards/rocket.xml new file mode 100644 index 0000000..43cb3be --- /dev/null +++ b/files/entities/misc/custom_cards/rocket.xml @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/entities/misc/custom_cards/rocket_tier_2.xml b/files/entities/misc/custom_cards/rocket_tier_2.xml new file mode 100644 index 0000000..5dd6ee5 --- /dev/null +++ b/files/entities/misc/custom_cards/rocket_tier_2.xml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/entities/misc/custom_cards/rocket_tier_3.xml b/files/entities/misc/custom_cards/rocket_tier_3.xml new file mode 100644 index 0000000..6dad063 --- /dev/null +++ b/files/entities/misc/custom_cards/rocket_tier_3.xml @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/files/entities/misc/remove_gravity.xml b/files/entities/misc/remove_gravity.xml new file mode 100644 index 0000000..d73ad42 --- /dev/null +++ b/files/entities/misc/remove_gravity.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/files/entities/projectiles/deck/orb_expanding.xml b/files/entities/projectiles/deck/orb_expanding.xml index ba5614a..922ac2f 100644 --- a/files/entities/projectiles/deck/orb_expanding.xml +++ b/files/entities/projectiles/deck/orb_expanding.xml @@ -230,8 +230,7 @@ - diff --git a/files/items_gfx/in_hand/pipe_bomb_in_hand.png b/files/items_gfx/in_hand/pipe_bomb_in_hand.png new file mode 100644 index 0000000000000000000000000000000000000000..858642338d0c95ceff791ad3a22a962b19c7412c GIT binary patch literal 168 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&k#^NA%Cx&(BWL^R}NuDl_AsQ2t z6C_F+1g9VQ{ciXF#GHdcsXMIHYP#OfNlg{d2t1Vk6eOO0JN8e#)uW65LBM?*=V8yy zZ}tAACnO{oOb}}6p1E#{u KKbLh*2~7YyKS8(v literal 0 HcmV?d00001 diff --git a/files/potion_appends.lua b/files/potion_appends.lua index 076ebb7..57cab9d 100644 --- a/files/potion_appends.lua +++ b/files/potion_appends.lua @@ -1,157 +1,187 @@ --Standard potion materials -materials_standard = -{ +materials_standard = { { - material="lava", - cost=300, + material = "lava", + min_percent = 80, + max_percent = 100 }, { - material="water", - cost=200, + material = "water", + min_percent = 80, + max_percent = 100 }, { - material="blood", - cost=200, + material = "blood", + min_percent = 80, + max_percent = 100 }, { - material="alcohol", - cost=200, + material = "alcohol", + min_percent = 80, + max_percent = 100 }, { - material="oil", - cost=200, + material = "oil", + min_percent = 80, + max_percent = 100 }, { - material="slime", - cost=200, + material = "slime", + min_percent = 80, + max_percent = 100 }, { - material="acid", - cost=400, + material = "acid", + min_percent = 80, + max_percent = 100 }, { - material="radioactive_liquid", - cost=300, + material = "radioactive_liquid", + min_percent = 80, + max_percent = 100 }, { - material="gunpowder_unstable", - cost=400, + material = "gunpowder_unstable", + min_percent = 80, + max_percent = 100 }, { - material="liquid_fire", - cost=400, + material = "liquid_fire", + min_percent = 80, + max_percent = 100 }, { - material="poison", - cost=400, + material = "poison", + min_percent = 80, + max_percent = 100 }, { - material="glue", - cost=400, + material = "glue", + min_percent = 80, + max_percent = 100 }, { - material="urine", - cost=400, + material = "urine", + min_percent = 80, + max_percent = 100 } } -materials_magic = -{ +materials_magic = { { - material="magic_liquid_unstable_teleportation", - cost=500, + material = "magic_liquid_unstable_teleportation", + min_percent = 50, + max_percent = 70 }, { - material="magic_liquid_teleportation", - cost=500, + material = "magic_liquid_teleportation", + min_percent = 20, + max_percent = 40 }, { - material="magic_liquid_polymorph", - cost=500, + material = "magic_liquid_polymorph", + min_percent = 20, + max_percent = 60 }, { - material="magic_liquid_random_polymorph", - cost=500, + material = "magic_liquid_random_polymorph", + min_percent = 20, + max_percent = 60 }, { - material="magic_liquid_berserk", - cost=500, + material = "magic_liquid_berserk", + min_percent = 50, + max_percent = 100 }, { - material="magic_liquid_charm", - cost=800, + material = "magic_liquid_charm", + min_percent = 15, + max_percent = 35 }, { - material="magic_liquid_invisibility", - cost=800, + material = "magic_liquid_invisibility", + min_percent = 80, + max_percent = 100 }, { - material="material_confusion", - cost=800, + material = "material_confusion", + min_percent = 70, + max_percent = 90 }, { - material="magic_liquid_movement_faster", - cost=800, + material = "magic_liquid_movement_faster", + min_percent = 80, + max_percent = 100 }, { - material="magic_liquid_faster_levitation", - cost=800, + material = "magic_liquid_faster_levitation", + min_percent = 80, + max_percent = 100 }, { - material="magic_liquid_worm_attractor", - cost=800, + material = "magic_liquid_worm_attractor", + min_percent = 80, + max_percent = 100 }, { - material="magic_liquid_protection_all", - cost=800, + material = "magic_liquid_protection_all", + min_percent = 15, + max_percent = 45 }, { - material="magic_liquid_mana_regeneration", - cost=500, + material = "magic_liquid_mana_regeneration", + min_percent = 90, + max_percent = 100 }, { - material="material_rainbow", - cost=400, + material = "material_rainbow", + min_percent = 95, + max_percent = 100 }, { - material="magic_liquid_hp_regeneration", - cost=400, + material = "magic_liquid_hp_regeneration", + min_percent = 10, + max_percent = 25 }, { - material="material_darkness", - cost=400, + material = "material_darkness", + min_percent = 80, + max_percent = 100 }, { - material="blood_worm", - cost=400, + material = "blood_worm", + min_percent = 80, + max_percent = 100 } } -function init( entity_id ) - local x,y = EntityGetTransform( entity_id ) - SetRandomSeed( x, y ) -- so that all the potions will be the same in every position with the same seed +function init(entity_id) + local x, y = EntityGetTransform(entity_id) + SetRandomSeed(x, y) -- so that all the potions will be the same in every position with the same seed - local potion_material = "water" + --for if something specifically tells the entity what potion to be + local components = EntityGetComponent(entity_id, "VariableStorageComponent") + if (components ~= nil) then + for key, comp_id in pairs(components) do + local var_name = ComponentGetValue(comp_id, "name") + if (var_name == "potion_material") then + local potion_material = ComponentGetValue(comp_id, "value_string") + AddMaterialInventoryMaterial(entity_id, potion_material, 1000) + break + end + end + end + + --if not, then is a random potion + local potion = {} + local max_amount_of_material = 1000 --in case I bring back more potion capacity perk, which I doubt I will -priskip - if( Random( 0, 100 ) <= 50 ) then + if (Random(0, 100) <= 50) then -- 50% chance of magic_liquid_ - potion_material = random_from_array( materials_magic ) - potion_material = potion_material.material + potion = random_from_array(materials_magic) else - potion_material = random_from_array( materials_standard ) - potion_material = potion_material.material - end - - local components = EntityGetComponent( entity_id, "VariableStorageComponent" ) - - if( components ~= nil ) then - for key,comp_id in pairs(components) do - local var_name = ComponentGetValue( comp_id, "name" ) - if( var_name == "potion_material") then - potion_material = ComponentGetValue( comp_id, "value_string" ) - end - end + potion = random_from_array(materials_standard) end - AddMaterialInventoryMaterial( entity_id, potion_material, 1000 ) -end \ No newline at end of file + AddMaterialInventoryMaterial(entity_id, potion.material, max_amount_of_material * 0.01 * Random(potion.min_percent, potion.max_percent)) +end diff --git a/files/scripts/gun/gun_actions.lua b/files/scripts/gun/gun_actions.lua index 924340a..eb00918 100644 --- a/files/scripts/gun/gun_actions.lua +++ b/files/scripts/gun/gun_actions.lua @@ -204,9 +204,15 @@ modify_existing_spell("BALL_LIGHTNING", "custom_xml_file", "mods/purgatory/files modify_existing_spell("THUNDERBALL", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/thunderball.xml") --thundercharge modify_existing_spell("METEOR", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/meteor.xml") --meteor modify_existing_spell("GRENADE", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/grenade.xml") --firebolt +modify_existing_spell("GRENADE_ANTI", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/grenade_anti.xml") --odd firebolt modify_existing_spell("GRENADE_TRIGGER", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/grenade_trigger.xml") --firebolt w trigger modify_existing_spell("GRENADE_TIER_2", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/grenade_tier_2.xml") --firebolt large (green) modify_existing_spell("GRENADE_TIER_3", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/grenade_tier_3.xml") --firebolt giant (purple) +modify_existing_spell("ROCKET", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/rocket.xml") --magic missile +modify_existing_spell("ROCKET_TIER_2", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/rocket_tier_2.xml") --magic missile (green) +modify_existing_spell("ROCKET_TIER_3", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/rocket_tier_3.xml") --magic missile (purple) +modify_existing_spell("PIPE_BOMB", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/pipe_bomb.xml") --dormant crystal +modify_existing_spell("PIPE_BOMB_DEATH_TRIGGER", "custom_xml_file", "mods/purgatory/files/entities/misc/custom_cards/pipe_bomb_death_trigger.xml") --dormant crystal death trigger --balance changes modify_existing_spell("LIGHT_BULLET", "mana", 10) @@ -412,7 +418,6 @@ spells_to_add = { end, }, ]] - { id = "LIGHT_BULLET_DEATH_TRIGGER", name = "$action_light_bullet_death_trigger", @@ -1282,6 +1287,23 @@ spells_to_add = { c.extra_entities = c.extra_entities .. "mods/purgatory/files/entities/misc/blackhole_shot.xml," draw_actions(1, true) end + }, + { + id = "REMOVE_GRAVITY", + name = "$action_remove_gravity", + description = "$actiondesc_remove_gravity", + sprite = "mods/purgatory/files/ui_gfx/gun_actions/remove_gravity.png", + sprite_unidentified = "mods/purgatory/files/ui_gfx/gun_actions/unidentified.png", + related_extra_entities = {"mods/purgatory/files/entities/misc/remove_gravity.xml"}, + type = ACTION_TYPE_MODIFIER, + spawn_level = "2,3,4", -- REMOVE_GRAVITY + spawn_probability = "0.2,0.25,0.1", -- REMOVE_GRAVITY + price = 300, + mana = 2, + action = function() + c.extra_entities = c.extra_entities .. "mods/purgatory/files/entities/misc/remove_gravity.xml," + draw_actions(1, true) + end } } diff --git a/files/scripts/gun/gun_actions_list.lua b/files/scripts/gun/gun_actions_list.lua index 09a9b3f..39938ef 100644 --- a/files/scripts/gun/gun_actions_list.lua +++ b/files/scripts/gun/gun_actions_list.lua @@ -206,6 +206,7 @@ gun_actions_order = { "QUANTUM_SPLIT", "GRAVITY", "GRAVITY_ANTI", + "REMOVE_GRAVITY", --Moddede "SINEWAVE", "CHAOTIC_ARC", "PINGPONG_PATH", diff --git a/files/scripts/projectiles/remove_gravity.lua b/files/scripts/projectiles/remove_gravity.lua new file mode 100644 index 0000000..d8a65d5 --- /dev/null +++ b/files/scripts/projectiles/remove_gravity.lua @@ -0,0 +1,11 @@ +dofile_once("data/scripts/lib/utilities.lua") + +local entity_id = GetUpdatedEntityID() + +local velocity_comp = EntityGetFirstComponent(entity_id, "VelocityComponent") +if velocity_comp == nil then + return +else + ComponentSetValue2(velocity_comp, "gravity_x", 0) + ComponentSetValue2(velocity_comp, "gravity_y", 0) +end diff --git a/files/set_seed.xml b/files/set_seed.xml new file mode 100644 index 0000000..d9e7aa2 --- /dev/null +++ b/files/set_seed.xml @@ -0,0 +1 @@ +why are you looking here diff --git a/files/translations/common.csv b/files/translations/common.csv index 44ef466..98f32c3 100644 --- a/files/translations/common.csv +++ b/files/translations/common.csv @@ -147,4 +147,7 @@ actiondesc_blackhole_shot,"Attaches a small but powerful black hole to a project perkdesc_perks_lottery_start,"When you pick a perk, there's a 50% chance the others won't disappear. Does NOT affect perks found here at the start of the game.",,,,,,,,,,,, menu_mods_restart_tooltip,"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-=-=-=-=-=-=-=-=-=-=-=-=-=- USING MOD RESTART WILL BREAK PURGATORY - DO NOT USE -=-=-=-=-=-=-=-=-=-=-=-=-=-\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-",,,,,,,,,,,, biome_robobase_core,"Reactor Core",,,,,,,,,,,, +animal_mimic_cactus,"Piikikäs Kaktuksen Matkija",,,,,,,,,,,, +action_remove_gravity,"Remove Gravity",,,,,,,,,,,, +actiondesc_remove_gravity,"Removes gravity from a projectile",,,,,,,,,,,, ,"",,,,,,,,,,,, \ No newline at end of file diff --git a/files/ui_gfx/gun_actions/multiply_10.png b/files/ui_gfx/gun_actions/multiply_10.png new file mode 100644 index 0000000000000000000000000000000000000000..89abe9132e29848ab303d42caad4d97e9929eff1 GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|)_S@)hFJ98 zope^P$v~t`v~)HLtAA_IJ(8`%d}=}0*CeBlNsrE-w0r}lmt z)1Uon$uIXzn)Og->ZDmJmXfDWMp(5f9$nqAY1Q8Qx#l}!^6wpvD9fGvlrPxxtiJ&_ zL&S8+q&JKWNpA|R=1k5OV=$2U9=YSsjLB21bGGXolUwI!Oym>VziVStV`JmPdf#AGWmmnXk25EzCY;M& znf>3s`t7&>H+US_3-p0%8Q<-Bb&RX++AqFKbFT+o?=xL+VQzn@T%@s?tHD`|y>0qD z99hTMIWp4@sdezg#qBu&0uzLu9Bj}v6!h`n0fMz(WqBU`VsqIw^Bx03Wlrzzum9UY Pj%4t3^>bP0l+XkKwB}j9 literal 0 HcmV?d00001 diff --git a/files/ui_gfx/gun_actions/multiply_3.png b/files/ui_gfx/gun_actions/multiply_3.png new file mode 100644 index 0000000000000000000000000000000000000000..4c1ac68943f3275366bc09c893a527e6ded5900c GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|mU+53hFJ6_ zCrD%*@aS1|Gkg30_Km^Kww;%n7fDKPxw7@Y`?Pe$lmn-`#U-98d|WN9Edd1ouA78T zdL~pNesIsx79GaoIPcis^(pm_nG5vy?5SXUx98O{uC{Bx_;_Y>&bk(Kz0Y(32dhe3 zT1?vkgCdCodllB@AGi>8{~!bJ-T#k%v1y1Mcr^dU21mvh+mgRB=`nm3()%wwRU+!u it%q?+mYSDk7#J>hED<}BV5|ysF@vY8pUXO@geCy=yIwy4 literal 0 HcmV?d00001 diff --git a/files/ui_gfx/gun_actions/multiply_4.png b/files/ui_gfx/gun_actions/multiply_4.png new file mode 100644 index 0000000000000000000000000000000000000000..6a1b5560f59d78fc90bc912d6587373ff31fd1fd GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|=6Jd|hFJ7I z4ZO|UY#>mqU6#Nj!SBMli0L5TOvU?=i)9xF@31c|*)!{3$ln!9J$9bHX=Qz&J|RQ> z)~%lh7T=6D^6Yw2qu}ZFWscB^?oYY)To&?+US06}Q*zd4`tiSQ%hoeA_{Jx`d3LrS zD5Neo<5SK?zEbBn{*#mXYWu}LEjn`J?2ee%!VI@Q#O-bEU0g8v0-KOm-Q(~L(vQx6 aV0lu~`v1ndk3eTKFnGH9xvXWplJLYU(LUCm6SMCIxGjvi^;2 z;FDNhEj?Lemt^!g0}wd#!LU){fxe#4Bu42theh@dPAxXf7Z{b9fnaA_PR-A0f()nX WgVM~^a`ypkX7F_Nb6Mw<&;$V5EjKFw literal 0 HcmV?d00001 diff --git a/init.lua b/init.lua index 888f576..f7750b4 100644 --- a/init.lua +++ b/init.lua @@ -1,11 +1,5 @@ --Init file for Purgatory Game Mode ---Load Mod Settings -local start_with_edit = ModSettingGet("purgatory.start_with_edit") -local ascension_level = ModSettingGet("purgatory.ascension_level") -local reset_tree_achievements = ModSettingGet("purgatory.reset_tree_achievements") -local debug_mode = ModSettingGet("purgatory.debug_mode") - --Load Files dofile_once("mods/purgatory/files/scripts/utils.lua") dofile_once("mods/purgatory/files/translations/translations_utils.lua") @@ -15,6 +9,13 @@ dofile_once("mods/purgatory/files/materials/add_void_recipes.lua") --makes recip dofile_once("mods/purgatory/files/scripts/gun/initialize_starting_wands.lua") --temp dofile_once("mods/purgatory/files/scripts/debug_mode_init.lua") --for debugging +--Load Mod Settings +local ascension_level = ModSettingGet("purgatory.ascension_level") +local reset_tree_achievements = ModSettingGet("purgatory.reset_tree_achievements") +local debug_mode = ModSettingGet("purgatory.debug_mode") +local input_seed = ModSettingGet("purgatory.seed_changer") --used for detecting secret seeds +local seed_to_set = ModSettingGet("purgatory.seed_setter") + --Append and Modify Translations append_translations("mods/purgatory/files/translations/common.csv") --Adds all the descriptors for Purgatory @@ -32,6 +33,20 @@ else ModMagicNumbersFileAdd("mods/purgatory/files/debug_magic_numbers.xml") --Sets the biome map to debug mode end +--Custom Seed Parameters +local start_with_edit = true +if input_seed == "noedit" then + start_with_edit = false + seed_to_set = 0 +end + +--Set Custom Seed +if seed_to_set ~= 0 then + local set_seed_xml = '' + ModTextFileSetContent("mods/purgatory/files/set_seed.xml", set_seed_xml) + ModMagicNumbersFileAdd("mods/purgatory/files/set_seed.xml") +end + function OnModPreInit() print("Purgatory - OnModPreInit()") @@ -135,6 +150,7 @@ function OnPlayerSpawned(player_entity) --Give Player Edit Wands Everywhere if start_with_edit then + --addPerkToPlayer("ABILITY_ACTIONS_MATERIALIZED") addPerkToPlayer("EDIT_WANDS_EVERYWHERE") else GameAddFlagRun("purgatory_no_edit_run") @@ -228,7 +244,20 @@ function OnWorldPreUpdate() -- This is called every time the game is about to st local player_id = getPlayerEntity() local x, y = EntityGetTransform(player_id) + if GuiImageButton(gui, new_id(), 50, 0, "DB 1", "mods/purgatory/files/ui_gfx/perk_icons/roll_again.png") then + local string_to_convert = "ABCDE.FG" + local converted_string = "" + + for char in string_to_convert:gmatch "." do + converted_string = converted_string .. string.byte(char) + end + + --Seeds 1-4,294,967,295 + converted_string = tonumber(converted_string) % 4294967295 + + print(converted_string) + end end end diff --git a/mod.xml b/mod.xml index f7c1126..e848687 100644 --- a/mod.xml +++ b/mod.xml @@ -2,7 +2,7 @@ name="Purgatory" description="Damnation be apon thee." ui_newgame_name="Purgatory" - ui_newgame_description="Damnation be apon thee. Beta Build 12 Nov 2022" + ui_newgame_description="Damnation be apon thee. Beta Build 19 Dec 2022" ui_newgame_gfx_banner_bg="mods/purgatory/files/menu_banners/menu_banner_background.png" ui_newgame_gfx_banner_fg="mods/purgatory/files/menu_banners/menu_banner_overlay.png" request_no_api_restrictions="0" diff --git a/secrets.lua b/secrets.lua new file mode 100644 index 0000000..49f9567 --- /dev/null +++ b/secrets.lua @@ -0,0 +1,5 @@ +--spoilers here +--DUH! +secret_seeds = { + "noedit" +} diff --git a/settings.lua b/settings.lua index bc19d03..497f8ed 100644 --- a/settings.lua +++ b/settings.lua @@ -1,16 +1,5 @@ -dofile("data/scripts/lib/mod_settings.lua") -- see this file for documentation on some of the features. - --- This file can't access other files from this or other mods in all circumstances. --- Settings will be automatically saved. --- Settings don't have access unsafe lua APIs. - --- Use ModSettingGet() in the game to query settings. --- For some settings (for example those that affect world generation) you might want to retain the current value until a certain point, even --- if the player has changed the setting while playing. --- To make it easy to define settings like that, each setting has a "scope" (e.g. MOD_SETTING_SCOPE_NEW_GAME) that will define when the changes --- will actually become visible via ModSettingGet(). In the case of MOD_SETTING_SCOPE_NEW_GAME the value at the start of the run will be visible --- until the player starts a new game. --- ModSettingSetNextValue() will set the buffered value, that will later become visible via ModSettingGet(), unless the setting scope is MOD_SETTING_SCOPE_RUNTIME. +dofile("data/scripts/lib/mod_settings.lua") +dofile_once("mods/purgatory/secrets.lua") function mod_setting_bool_custom(mod_id, gui, in_main_menu, im_id, setting) local value = ModSettingGetNextValue(mod_setting_get_id(mod_id, setting)) @@ -38,21 +27,14 @@ for i = 1, 100, 1 do end end -local mod_id = "purgatory" -- This should match the name of your mod's folder. -mod_settings_version = 1 -- This is a magic global that can be used to migrate settings to new mod versions. call mod_settings_get_version() before mod_settings_update() to get the old value. +local mod_id = "purgatory" +mod_settings_version = 1 mod_settings = { { category_id = "mod_settings", ui_name = "Purgatory Settings", ui_description = "Settings for Purgatory Mod", settings = { - { - id = "start_with_edit", - ui_name = "Start with Edit Wands Everywhere", - ui_description = "Toggle whether to start the run with Edit Wands Everywhere or not.", - value_default = true, - scope = MOD_SETTING_SCOPE_RUNTIME - }, { id = "ascension_level", ui_name = "Ascendence Level", @@ -80,6 +62,104 @@ mod_settings = { } } }, + { + category_id = "set_seed_sub_folder", + ui_name = "Seed Changer", + ui_description = "A built in seed changer for Purgatory. May or may not contain secrets.", + foldable = true, + _folded = true, + settings = { + { + id = "seed_changer", + ui_name = "Seed Changer", + ui_description = "Input Seed - Leave as 0 or blank for random seed", + value_default = "0", + text_max_length = 20, + allowed_characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789", + scope = MOD_SETTING_SCOPE_NEW_GAME + }, + { + id = "seed_setter", + ui_name = "Seed Setter", + ui_description = "This actually sets the seed.", + value_default = 0, + value_min = 0, + value_max = 4294967295, + scope = MOD_SETTING_SCOPE_NEW_GAME, + hidden = true + }, + { + id = "seed_info_display", + ui_name = "seed_info_display", + ui_description = "if you see this ui description, priskip made a boo boo", + not_setting = true, + ui_fn = function(mod_id, gui, in_main_menu, im_id, setting) + local input_seed = ModSettingGetNextValue("purgatory.seed_changer") + local biggest_seed_possible = 4294967295 + local seed_to_set = 0 + local too_big = false + local is_secret_seed = false + + --Check for secret seed + for i, v in ipairs(secret_seeds) do + if input_seed == v then + GuiColorSetForNextWidget(gui, 1, 1, 0, 1) + GuiText(gui, mod_setting_group_x_offset, 0, "Secret Seed!") + input_seed = 0 + seed_to_set = 0 + is_secret_seed = true + break + end + end + + if not is_secret_seed then + --Check to see if inputted seed contains only numeric characters + local is_number = tonumber(input_seed) + if is_number == nil then + is_number = false + else + is_number = true + end + + --If inputted seed is not a number, then convert it to a number. + if is_number == false then + local conversion_number = 0 + + for char in input_seed:gmatch "." do + conversion_number = conversion_number + string.byte(char) + conversion_number = conversion_number * string.byte(char) ^ 2 + conversion_number = conversion_number % biggest_seed_possible + end + + seed_to_set = conversion_number + else + --Inputted seed is a number, check to see if it's too big before passing it to purgatory.seed_setter + seed_to_set = tonumber(input_seed) + + if math.floor(seed_to_set / biggest_seed_possible) > 0 then + --Seed is too big + too_big = true + seed_to_set = seed_to_set % biggest_seed_possible + end + end + + if seed_to_set == 0 then + GuiText(gui, mod_setting_group_x_offset, 0, "Seed will be random!") + else + GuiText(gui, mod_setting_group_x_offset, 0, 'Seed will be "' .. tostring(seed_to_set) .. '"') + end + + if too_big then + GuiColorSetForNextWidget(gui, 1, 1, 0, 1) + GuiText(gui, mod_setting_group_x_offset, 0, "Warning! Inputted seed number was too big!/n Seed has been changed to the value shown above.") + end + end + + ModSettingSetNextValue("purgatory.seed_setter", seed_to_set, false) + end + } + } + }, { id = "debug_mode", ui_name = "Debug Mode", @@ -91,23 +171,11 @@ mod_settings = { } } --- This function is called to ensure the correct setting values are visible to the game via ModSettingGet(). your mod's settings don't work if you don't have a function like this defined in settings.lua. --- This function is called: --- - when entering the mod settings menu (init_scope will be MOD_SETTINGS_SCOPE_ONLY_SET_DEFAULT) --- - before mod initialization when starting a new game (init_scope will be MOD_SETTING_SCOPE_NEW_GAME) --- - when entering the game after a restart (init_scope will be MOD_SETTING_SCOPE_RESTART) --- - at the end of an update when mod settings have been changed via ModSettingsSetNextValue() and the game is unpaused (init_scope will be MOD_SETTINGS_SCOPE_RUNTIME) function ModSettingsUpdate(init_scope) local old_version = mod_settings_get_version(mod_id) -- This can be used to migrate some settings between mod versions. mod_settings_update(mod_id, mod_settings, init_scope) end --- This function should return the number of visible setting UI elements. --- Your mod's settings wont be visible in the mod settings menu if this function isn't defined correctly. --- If your mod changes the displayed settings dynamically, you might need to implement custom logic. --- The value will be used to determine whether or not to display various UI elements that link to mod settings. --- At the moment it is fine to simply return 0 or 1 in a custom implementation, but we don't guarantee that will be the case in the future. --- This function is called every frame when in the settings menu. function ModSettingsGuiCount() return mod_settings_gui_count(mod_id, mod_settings) end @@ -116,46 +184,19 @@ end function ModSettingsGui(gui, in_main_menu) mod_settings_gui(mod_id, mod_settings, gui, in_main_menu) - --example usage: + local gui_id = 1 + local function new_gui_id() + gui_id = gui_id + 1 + return gui_id + end + --[[ - local im_id = 124662 -- NOTE: ids should not be reused like we do below - GuiLayoutBeginLayer( gui ) - - GuiLayoutBeginHorizontal( gui, 10, 50 ) - GuiImage( gui, im_id + 12312535, 0, 0, "data/particles/shine_07.xml", 1, 1, 1, 0, GUI_RECT_ANIMATION_PLAYBACK.PlayToEndAndPause ) - GuiImage( gui, im_id + 123125351, 0, 0, "data/particles/shine_04.xml", 1, 1, 1, 0, GUI_RECT_ANIMATION_PLAYBACK.PlayToEndAndPause ) - GuiLayoutEnd( gui ) - - GuiBeginAutoBox( gui ) - - GuiZSet( gui, 10 ) - GuiZSetForNextWidget( gui, 11 ) - GuiText( gui, 50, 50, "Gui*AutoBox*") - GuiImage( gui, im_id, 50, 60, "data/ui_gfx/game_over_menu/game_over.png", 1, 1, 0 ) - GuiZSetForNextWidget( gui, 13 ) - GuiImage( gui, im_id, 60, 150, "data/ui_gfx/game_over_menu/game_over.png", 1, 1, 0 ) - - GuiZSetForNextWidget( gui, 12 ) - GuiEndAutoBoxNinePiece( gui ) - - GuiZSetForNextWidget( gui, 11 ) - GuiImageNinePiece( gui, 12368912341, 10, 10, 80, 20 ) - GuiText( gui, 15, 15, "GuiImageNinePiece") - - GuiBeginScrollContainer( gui, 1233451, 500, 100, 100, 100 ) - GuiLayoutBeginVertical( gui, 0, 0 ) - GuiText( gui, 10, 0, "GuiScrollContainer") - GuiImage( gui, im_id, 10, 0, "data/ui_gfx/game_over_menu/game_over.png", 1, 1, 0 ) - GuiImage( gui, im_id, 10, 0, "data/ui_gfx/game_over_menu/game_over.png", 1, 1, 0 ) - GuiImage( gui, im_id, 10, 0, "data/ui_gfx/game_over_menu/game_over.png", 1, 1, 0 ) - GuiImage( gui, im_id, 10, 0, "data/ui_gfx/game_over_menu/game_over.png", 1, 1, 0 ) - GuiLayoutEnd( gui ) - GuiEndScrollContainer( gui ) - - local c,rc,hov,x,y,w,h = GuiGetPreviousWidgetInfo( gui ) - print( tostring(c) .. " " .. tostring(rc) .." " .. tostring(hov) .." " .. tostring(x) .." " .. tostring(y) .." " .. tostring(w) .." ".. tostring(h) ) - - GuiLayoutEndLayer( gui ) + if GuiImageButton(gui, new_gui_id(), 0, 0, "Toggle Start with Edit", "mods/purgatory/files/ui_gfx/perk_icons/roll_again.png") then + ModSettingSetNextValue("purgatory.start_with_edit", not ModSettingGetNextValue("purgatory.start_with_edit"), false) + end ]] - -- end + +--[[ + +]]