#Sharpy's Modding Corner

1947 messages ยท Page 2 of 2 (latest)

next flume
#

maybe

#

(probably not)

#

let's see what we can do

#

@icy viper like this?

local newGlimmer = {
    id                      = ID,
    name                    = "$action_"..id,
    description             = "$actiondesc_"..id,
    sprite                  = image,
    ...
    author                  = author,
    origin                  = "Glimmers Expanded",
    glimmer                 = true, -- This lets other mods tell whether a spell is a glimmer or not.
}
#

glimmer = true?

#

HOO BOY

icy viper
next flume
#

I'm listening to my EDM playlist and I forgot how much of a VIBE this is

icy viper
#

this is what i check for, idm which we use

next flume
#

is_glimmer?

icy viper
#

thats what i currently use but i dont really have a preference

next flume
icy viper
#

oh i wonder if itd be worth passing the mat name into glimmer instead

#

that could be potentially used for smth interesting

next flume
#

hm

#

I'm not sure what I'd use it for

icy viper
#

same maybe use is_glimmer for now

next flume
#

It's not a bad idea, but I honestly don't wanna bloat the mod with unused hooks

icy viper
#

yeah

#

or just use glimmer

next flume
#

I'll add it if we need it

icy viper
#

and we can use glimmer_material if need be

#

ill pester you if i come up with an interesting thing i can use it for

next flume
#

imma rename mine to is_glimmer bc that's more readable

#

waiiiit

#

i wonder if the former would be easier

#

the name that modders give me isn't even used when creating the action, because I use the spell ID to create the translation that points to the name

#
local function loadGlimmers()
    for id, data in pairs(glimmer_list_revamped) do
        createTranslation(id, data)
        createGlimmerXML(id, data)
        createColourSpellLuaEntry(id, data)
    end
end
#

so, let's pseudocode

#

if we have a translation passed into our name, we need to:

  • NOT create a translation
  • let the spell's name be the name we passed in INSTEAD of a translation
next flume
#

Text - no translation for key '$action_glimmers_expanded_cc_colour__action_name_cc_glimmer_explodeplayer'

#

huh

#

that's weird

#

ah, I broke all my translations

#

fixed the translations! I see what's happening now

#

progress!~

#

hey @icy viper do you have a translation for any of your glimmers' descriptions?

icy viper
next flume
#

hum

icy viper
#

what is mod_prefix used for?

next flume
#

action_desc_action_name_cc_glimmer_dormant_crystal

#

this is in the error

#

wait

#

is it

icy viper
#

seems like a mistake

next flume
#

files: action_desc_cc_ge_glimmer_dormant_crystal
error: action_desc_action_name_cc_glimmer_dormant_crystal

#

why is it

#

hm

icy viper
#

fixed on my end

next flume
#

cool

icy viper
#

made a mistake in the translation key ill push to main in a sec

next flume
#

ahhhhhh

#

the humble copypaste error

#

I think I have my own copypaste issue too, lol

next flume
#

"As advertised!"

#

"Just like on TV!"

next flume
#

GLIMMERS_EXPANDED_COLOUR_LAVA

wait why is this adding _GLIMMER to the end of the ID?

#

ah! bc I do some name parsing before id parsing

#

shoot

#

SHOOT

#

uuuuuuuuuugh

#

local id = mod_id..mod_prefix.."COLOUR_"..name:upper():gsub("%W","_")

#

nooooooooooooo

#

it does use the name in the id

#

aaaaaaaaaa

#

that's a pain....

#

how to get around this....

#

the easiest solution would be to ask the mod creator to provide some form of mod id

#

I wish I could grab the translation's value pre-init

#

cause the main issue is that I'm using the name value to construct the spell's id, but sometimes that name is a translation

#

the way I have it set up, this doesn't break it

#

but it makes the spell ID's of spells with translation names a pain to reference

#

you don't even need to see the entire tooltip to understand why that's an issue

#

I'd like every spell ID to start with GLIMMERS_EXPANDED_[MODNAME]_

#

whatever comes after the spell is up to the mod creator

#

I'd added an optional support for mod_id

#

I'm now calling this mod_suffix

#

no

#

id_suffix

#

spellid_suffix

icy viper
#

W

next flume
#

@icy viper

ERROR - LoadSpriteTo()... file doesn't exist: mods/Hydroxide/files/compelling_compatibility/GlimmersExpanded/icons/colour_anti-matter.png
#

also yayyyy!! i did it

next flume
#

ok now for the hard part

documentation

icy viper
#

the annoying part indeed

#

i left the documentation for Parallel Parity barebones, people can ask questions if they need to and i can clarify the documentation if it is shown to be insufficient

#

CC has barely any documentation for half the thing it support tho i kinda gotta remember to add that whenever im doing stuff

next flume
#

Ok!!

#

I have CC support made

#

let's push this and hope it works

next flume
# next flume

@icy viper if you want your spell IDs to be recognizable, specify a spellid_suffix for each glimmer in your glimmer appends. Otherwise, your spell IDs will be........ the above

icy viper
#

sure ill go do that now

#

so spellid_suffix = "CC"?

#

hmmm

#

@next flume is the mod supposed to spawn me at the glimmer pixel scene on spawn or is this a noita_dev.exe thing lmao

next flume
#

I realized that exactly as I hit "enter" to push to steam Haachama_Stare_Darc

next flume
icy viper
#

gotta go fix fix fix quick quick quick

next flume
#

spellid_suffix = "antimatter"

#

spellid_suffix = "slicing liquid"

icy viper
#

oooo got it

#

so what it no longer uses materials[]?

next flume
#

Hahaha

icy viper
next flume
#

No, it never did use materials in the id

#

It used name

icy viper
#

oh right yeah

next flume
#

materials is for the glimmer reactions

#

the first material in that list is chosen as the material that it looks like

#

but every material in that list will react with australium to create that glimmer

#

Ok, fixed

#

Let's make some patchnotes

icy viper
#

huh

#

also is the CC alchemy journal supposed to spawn here?

next flume
#

It's a different journal, I used the same exact code

#

trimmed it down to be what I needed

#

it has โœจ lore โœจ

icy viper
#

ahhhh i see

next flume
#

and also instructions on glimmer alchemy

icy viper
#

ah its fine the CC journal will have a completely revamped UI at some point anyway

#

i forgot about this but i imagine you probs asked me about this and then i probs directed you to ask evaisa since she made it lmao

#

hmmm okay

#

oh right hold on

next flume
#

hm

#

i saw that bug but it didn't seem to be breaking anything...

icy viper
#

concerning, yeah i had a separate issue too so maybe it works now

#

W they do (probably) all seem to work

#

should add some AA glimmers at some point

next flume
#

YOOOO

#

antimatter looks so coollll

icy viper
#

neat, the descs and whatnot all work too

next flume
#

is that still the one I made?

icy viper
#

yeah i believe so lmao

next flume
icy viper
#

ill probs look into new icons later now that these all work

next flume
#

lmk when that's pushed to main

hollow panther
#

cpand glimmer when

icy viper
#

doing so rn

icy viper
next flume
icy viper
#

actually i should add cpand specifically for the like digging bolt glitch or whatever

hollow panther
#

btw sharpy

icy viper
#

yeahhhhh

next flume
hollow panther
#

xml generation for every spell is probably not a great idea

icy viper
#

@next flume do they use is_glimmer or glimmer btw?

next flume
#

is_glimmer

icy viper
#

W thx

#

no change needed then on my end

hollow panther
#

you can just check if applying potion comp is enough, e.g. only one spritecomp, no verlets etc

#

that's cheap

next flume
#

huh?

#

potioncomp is for sprites

#

I'm making xml's for the trails

#

they have particleemittercomponents

hollow panther
#

funi

#

wonder why first shot always struggle if it's only one xml

next flume
#

I think I know why

next flume
#

wait

#

OH

icy viper
#

oh is GE not very performant in terms of XML stuff?

next flume
#

so

#

in order to color sprites, I'm making a copy of each xml sprite file and recoloring them

#

I thought I only did that for sprites that had more than one sprite, though

#

like worm

#

hm

#

i remember why

#

projectiles have explosion sprites, too, and those are NOT affected by potioncomponents

#

black hole was a great example of this, where its disappearing sprite would be regularly-colored

icy viper
#
<CellData
    name="aa_chaotic_pandorium"
    ui_name="$mat_aa_chaotic_pandorium"
    tags="[liquid],[magic_liquid],[water],[impure],[catastrophic]"
    burnable="0"
    density="1"
    cell_type="liquid"
    wang_color="8b3428a3"
    generates_smoke="0"
    liquid_gravity="0.8"
    liquid_sand="0"
    gfx_glow="150"
    on_fire="0"
    requires_oxygen="0"
    temperature_of_fire="95"
    autoignition_temperature="10"
    fire_hp="500"
    liquid_stains="1"

    >
    <ParticleEffect
        vel.y="-30"
        vel_random.min_y="-30.21"
        vel_random.max_y="-4.861"
        vel_random.min_x="-8.667"
        vel_random.max_x="8.667"
        lifetime.min="0.3238"
        lifetime.max="9.3238"
        gravity.y="-100"
        render_on_grid="1"
        airflow_force="10"
        airflow_scale="6.857"
        draw_as_long="0"
        friction="1.352"
        probability="0.0543"
    >
    </ParticleEffect>
    <Graphics
        color="44FF93EB"
        >
    </Graphics>
    <StatusEffects>
            <Ingestion>
            <StatusEffect type="AA_VOMIT_SPELLS_CHAOTIC" amount="0.10"/>
            </Ingestion>
    </StatusEffects>
</CellData> <!-- Chaotic Pandorium -->```
#

chaotic pandorium was what the errors were thrown by, idk about other materials since it skipped recurring errors after that

next flume
#

fair nuff

#

if I fix this it should fix the rest

#

squint

#

which projectile did you do this with

icy viper
#

spark bolt

next flume
#

???

#

set_additive should only matter for black hole and energy sphere. period.

#

no

#

energy orb*

#

the big one

#

I cant fix the mod rn bc Im at D&D foe the weekend, but I can look into it on Monday/Tuesday

icy viper
#

sure, it didnt seem to cause problems so you can work on it whenever

next flume
#

put lifetime on the spark bolt, shoot it, then mod restart while it's in midair

#

maybe add a decel

icy viper
#

sparkbolt already has lifetime, no?

next flume
#

Maybe

#

It might not have enough for it to be noticeable after the loading screen

#

The main challenge is getting it to stay in one place

icy viper
#

why do you need to do this btw?

next flume
#

the sprite will likely disappear

icy viper
#

if this is for checking data and whatnot cant you just pause the game when you are looking at it?

next flume
#

it's not

#

You should try it and see if it breaks

#

Just for the funny

#

It wont tell you much info, just that it is a niche issue

icy viper
#

sure, though it looked fine to me when i was casting it before

next flume
#

if it doesnt visually (noticeably) break, the console should scream at you

icy viper
#

how's this?

#

only one error btw

#

(removed the lifetime and kill conditions from this btw)

#

@next flume

next flume
#

You mod restarted?

icy viper
#

ah no ill do that rq

#

console is empty

next flume
#

hm!

icy viper
# icy viper how's this?

error only occurred once here btw so we already know its smth that happens when this runs when the projectile is initially fired

#

(happened a bunch with spark bolt cuz it was a spammy wand)

next flume
#

it doesnt do anything after it's fired

icy viper
#

unless theres some weird frame-one bs going on

#

which i know the gun system is prone to

next flume
#

the error would be a "sprite missing!" error bc it wouldnt have finished the script and therefore wouldnt have cached all the data to reconstruct the colored sprites with

#

this would happen every frame the projectile is alive for after mod restarting

icy viper
#

hmmm your luacomp also removes itself after it runs

#

didnt know that

#

wait no

#

nvm i cant find it its not on here

next flume
#

i add a luacomp?

icy viper
#

no you dont i assumed you did but that isnt the case

next flume
#

bwahahaha

#

everything happens the moment I fire the projectile

#

I have a few variablestoragecomponents I add to "cache" info

#

set_additive, iirc, deals with changing the boolean value in the vsc

next flume
#

Where did I even leave off...?

#

Im rereading all this, and I'm just as confused as I sounded in January

#

I'd need to boot up my laptop and take a look

#

I've got classes for a good bit of today, though

next flume
#

I have a starting point

next flume
#

Hm

#

this is only happening with the CC glimmers

#

And it's because my material_to_rgba() is returning nil

#

????????

#

a copypaste of what my colour_spell.lua ends up being shows that my glimmers are being parsed twice

#

why??

#

that's an issue for later, ig

#

I'm wondering how much of this code is running that doesn't need to run

#

hmm

#

materials = nxml.parse_file("data/materials.xml")

#

this is the data of all materials I pull from for my glimmers

#

hm

#

i gotta place some print statements

#

oh gosh

#

i forgot how complex my material compiling code was

#

this isn't readable at ALL

#

it does look like the modded materials aren't able to be detected

#

is it actually broken, though?

#

it's not breaking catastrophically because I was smart with the bulk of the code

#

I use potioncomps for the main bulk of coloring projectiles

#

it's the most obvious on Black Holes, though: their disappearing sprite isn't colored proper because that's where it's breaking

#

Void Glimmer vs Dark Matter Glimmer

#

You can see the void glimmer close proper, but the Dark Matter glimmer has the usual closing sprite (regular colored and transparent)

#

...this gif isn't a great example, but still

#

so if it's because I don't have access to modded materials

#

sigh

#

how do I get access to that

#

when is this running

#

wait

#

hm

#

ladkjhf thoughts are doing thought things

#

gears are turning

#

ok so yeah

#

normal glimmer stuff works because this still works

ComponentSetValue2( v, "emitted_material_name", particle )
ComponentSetValue2( v, "is_emitting", true )
#

Also potioncomps work a certain way

#

but like

#

so

#

the reason it works is because it looks up a material's string id via a table I provide

#

then uses that in whatever its magic does

#

however

#

the reason sprite editing breaks is because the way I do this is by looking up a material's data via materials.xml

#

and apparently, not every material is in materials.xml

#

ModMaterialsFileAdd( "mods/Hydroxide/files/chemical_curiosities/append/materials.xml" )

#

this is what appends materials

#

the wiki says it "Adds all the materials from a custom materials.xml file to the existing pool of materials"

#

not sure how accurate that is

#

but like

#

how do I gain access to this

#

I'm not even trying to modify the materials, I just wanna look at them

#

hm.

#

i have a list of every liquid's hex value

#

why am i not using that???

#

attempting to use this created more issues

#

i'm going to work on this more later

#

rahhh I wish I could do more rn

#

Classes tho ๐Ÿ˜”

#

I was digging through my code and realized I had a lot of missing nil checks

#

"why would this ever be nil?" famous last words, lol

next flume
#

If I'm not even using it, why did I decide to compile it?

#

Gosh I wanna take a closer look

next flume
#

I didn't type out an entire function

#

it works now?!

icy viper
next flume
#

i love noita modding and optimization

local function material_to_rgba(material)
    local hex
    print("material_to_rgba() RUNNING")
    -- for mat in materials:each_child() do
    --     if get_elem_data(mat,"name") == material then
    --         print("get_elem_data() worked")
    --         hex = lamas_stats_get_graphics_info(mat)
    --         if hex ~= nil then
    --             print("hex is NOT nil")
    --             return hex, hex_to_rgba(hex)
    --         end
    --     end
    -- end
    hex = liquids[material]
    return hex, hex_to_rgba(hex)
end
icy viper
#

yeah i was gonna ask if you know about ModMaterialsFilesGet or whatever its called

next flume
#

I forgot about that

icy viper
#

also sometimes it feels like it isnt applied immediately? like you need to add your materials and then apply post processing at a later step i think? its mentioned in the API doc and i noticed it myself

#

but idk if itll be relevant here

next flume
#

I think the reason I didn't use liquids for my colors was--nono, it wasn't because of the order the functions were developed, ig I just forgot I compiled a list of all materials used

#

oh hey, bonus effect that I'm proud of my past self for

#

this liquids table also includes any solids that are involved in glimmers

#

like sand

#

for my biome glimmer

#
for id,data in pairs(glimmer_list_revamped) do
    local materials = data.materials
    for id,material in ipairs(materials) do
        -- print("id: '"..id.."'", "material: '"..material.."'")
        if not liquids[material] then
            -- print("NOT HERE --------- '"..material.."'")
            local missingMaterial = all_materials[material]
            if missingMaterial == nil then
                -- print("it's nil?")
            end
            local hex = lamas_stats_get_graphics_info(missingMaterial)
            liquids[material] = hex
        end
    end
end
#

this is the part that does that

#

YOOO WAIT

#

IT EVEN CALLS THE LAMAS_STATS

#

Which is what I was doing originally

next flume
#

thank you past self

#

glittering liquid

next flume
#

It wasn't game-breaking, but eh

#

I removed about 200 lines of virtual filesystem

next flume
#

After a mod restart

#

We've got two dark matter glimmers on the left

#

a void glimmer on the right

#

Looks like my fixes worked!

next flume
#

before and after lightcomp modifications

#

hm

#

I haven't figured out how to turn the lightcomp off when invis glimmer is used, but I do know that the lightcomp shows up very noticeably when invis glimmer is used

#

made testing this really easy

#

lowkey tempted to not make the light turn off with invis glimmer

#

purely for this reason:

#

note for when I can pick this back up later: working on lightcomponernt, pretty sure it's nearly done

#

tbf

#

nah

#

I'm not gonna push this to main without more testing

#

Honestly, I'm really happy with how easy that was to implement

#

oh right

#

it's not done

next flume
#

very glad I decided against pushing to main

cerulean thicket
next flume
# cerulean thicket local โš ๏ธ

tbh maybe that one can be local, but the particular library it's in contains global functions

....waaaait, cant I return a table of local functions that I can use as a library? I feel like we've discussed this before

cerulean thicket
#

yes

#

thats how you are meant to do things

#

there isnt really a reason to ever use globals

#

noitas append system being kinda bad is the only one

#

you cant modify returns ๐Ÿ˜”

next flume
#

Gotcha

#

I'll clean up the code to accommodate for such later

icy viper
next flume
#

blink

#

I considered that, but didnt know how to do that off the top of my head

icy viper
#

_enabled is a value on like all components and SetComponentIsEnabled is just a func

next flume
#

plus, getting the actual feature to work was my first priority

#

I have a -- TODO: to get invis to work

icy viper
# next flume purely for this reason:

i think it makes sense if you have the light modifier but the natural like should be unaffected, if that makes sense? idk how youd detect that, maybe order dependent?

next flume
#

!

#

i forgor the light modifier existed

icy viper
#

โœ…

next flume
#

the way it's coded, invis would turn off Light

#

like

#

glimmers already turn off light, for whatever reason

icy viper
#

they do? thats annoying, makes sense tho

#

nolla didnt wanna code the blue flash to be overridden to be red so they just disable it

#

and itd look weird to have red projectile with the regular blue light

next flume
#

light blueglimmer spell_spark_bolt disables light spell
blueglimmer light spell_spark_bolt doesnt disable it, but prevents light from working in Dark Cave

#

im not sure what Light does tbh

#

ill look into it

#

oh hey- did that light mod get finished yet?

icy viper
#

oh you mean the shader mod?

next flume
#

with the cool raytraced lights?

#

yeh

icy viper
#

no but alex has been working on it again in #1449704095781883944

#

he comes back to it like every 4-5 weeks to do more work on it, just came back again a few days ago

next flume
#

much like me fr fr

#

Im curious to see how GE interacts with it once I get this lightcomp stuff working

icy viper
#

yeah GE and CC are going to be very interesting for it

#

alex said he'll make a beta when he figures out sub buffer stuff so we'll be able to test shit then

next flume
#

ok

#

where did i leave off

#

I was working on lightcomps, but I fear I got distracted

#

making invis work is a good idea later on

#

OH

#

I should get glimmers to interact better with light

#

this

#

I wanna fix up light stuff first, then work on the bug

#

lightcomps shouldn't take long to work on

next flume
#

I fixed it, but I am so so so tempted to keep the lights even while it's invisible

icy viper
#

Setting toggle?

next flume
#

mmmmmmmmmmmmmmmm

#

honestly

#

sure

#

I like this enough where I'd be willing to let players decide

#

they might like it

#

Plus, I'd love to see what sort of ambient lighting this enables

#

oh shoot!!

#

not only did i get the setting to work, but it works mid-run!

#

so this is an easily-togglable setting!

#

so many people are gonna be able to do so many things with this

next flume
#

huh. that doesn't look right.

#

what did i do...

#

oh wait

#

this is normal!

#

the Light spell removes fog of war

#

but Death Crosses somehow do not

#

interesting!!!

#

I'VE FOUND IT

#
comps = EntityGetComponent( entity_id, "SpriteComponent" )
if ( comps ~= nil ) then
    for i,v in ipairs( comps ) do
        ComponentSetValue2( v, "visible", false )
    end
end
#

the thing that makes glimmers disable light's fog of war clearing!!

#

light adds both a LightComponent that emits light, and a SpriteComponent that punches a hole in the fog of war

<Entity>
  
    <LightComponent 
        _enabled="1"
        radius="200" >
    </LightComponent>
    
    <_Transform
        scale.x="5" scale.y="5" >
    </_Transform>

    <SpriteComponent 
        alpha="0.55"
        image_file="data/particles/fog_of_war_hole_128.xml"
        smooth_filtering="1"
        fog_of_war_hole="1" >
    </SpriteComponent>
  
</Entity>
next flume
#

ok

#

let's see where this CC bug is at

#

area_indicator_064_blue.png

#

this is in homing_area.xml and only homing_area.xml

#

as a spritecomp

#

which is what I expected

#

,,,

icy viper
#

Feel free to throw on CC and enable logging in random_spell_chaotic.lua or whatever itโ€™s called

next flume
#

this file isn't used in anything?????????

#

ah, jk, i had a filter on

icy viper
#

Lmao

next flume
#

it's also in wraith_storm.xml as a sprite for a creature

#

i could care less about that hto

#

HOMING_AREA

#

is this

icy viper
#

Thatโ€™d make sense

#

Love me my projectile area teleport

next flume
#

yep, that's it!

#

interesting!

#

why is a modifier

#

hm

#

this is the first ever case of a modifier being involved in this

#

let's see what happens

#

huh

#

the bug doesn't happen with death crosses, but does happen with spitter bolts

next flume
#

That's cool that that enemy and projectile area teleport use the same sprite

#
Lua error - ModTextFileGetContent( filename:string )
  file cannot be read: data/particles/area_indicator_064_blue.png
  Stack traceback:
          [string "data/scripts/projectiles/colour_spell.lua"]:21: in function 'create_dummy_entry'
          [string "data/scripts/projectiles/colour_spell.lua"]:59: in function 'create_all_dummy_variations'
          [string "data/scripts/projectiles/colour_spell.lua"]:404: in main chunk
#

file cannot be read

#

why?

#

image_file="data/particles/area_indicator_064_blue.png"

#

data/particles/area_indicator_064_blue.png

#

data/particles/area_indicator_064_blue.png

#

they're the same

#

hm

#

ModTextFileGetContent(spritefilepath)

#

AH

#

it's trying to read the text in a png, not an xml

#

,,,

#

didn't i fix png issues?

#

no...

#

png issues happened with tentacle

#

interesting

#

death crosses aren't making variablestoragecomps of the area indicator, but spitter bolts are

#

why?

#

the only difference between the two projectiles is that death crosses have a disabled spritecomp, where spitter bolts do not

#

but the area teleport adds one

#

I think it would be easier here to try and figure out a way to color .png sprites

#

cause that's the root cause

#

it's creating a hexglobal for spitter bolts

#

even tho, I don't think it needs to?

#

OH

#

IT'S BC IT'S A MULTISPRITE NOW

#

AAAAAAAAAAAAAAA

#

projectile area teleport adds another spritecomp, which now means PotionComps can't do the job for the entire projectile

#

Death Crosses were a bad test for this bc they don't have a sprite

#

so, bc it saw just the area indicator as the only sprite on a death cross, it treated it as a single-sprite projectile and added a potioncomponent to it

#

ugh

#

i either need to:

  • ignore .png sprites, or
  • find a way to color .png sprites
#

aaaaaaaaaaaaaaaaaaa I can't believe this came to bite me in the butt once again

#

I thought I was done with multisprite projectiles

#

it was jank but worked for the few multisprite projectiles that existed

#

but now every single projectile can be multisprite

#

blink

#

wait

#

...

#

no, light doesn't bug

#

ah! bc its sprite comp is an xml

#

oh

#

ohhhhhhhhhh

#

ohhhhhhhhhhhhhhhhhhhhh

#

every projectile can be multisprite if a modifier adds a sprite to it

#

inhale
exhale

#

alright

#

let's make another bugfix branch

#
for i,v in ipairs( comps ) do
    ComponentSetValue2( v, "visible", true )

    local spritefilepath, additive = create_vsc(entity_id, v, i, "image_file", "additive", "spriteoriginal")
    set_additive(r,g,b,v,"additive",additive)

    if #comps <= 1 then
        EntityRefreshSprite( entity_id, v )
        break
    end

    dummyfilepath = create_all_dummy_variations(spritefilepath, particle, pcolor, hex,r,g,b,a)
    ComponentSetValue2( v, "image_file", dummyfilepath )

    EntityRefreshSprite( entity_id, v )
end
#

right here

#

notably

if #comps <= 1 then
    EntityRefreshSprite( entity_id, v )
    break
end
#

this is what stops it from creating dummyfilepaths and adding bloat data

#

personally, i really really want the actual thing that can be modified by the potioncomp to not be dummyfiled

#

i'm happy that this works with xml sprites that modifiers add, but light should not be causing single-sprite projectiles to add bloat data

#

first step is to remove this bloat. how do I check if the sprite I'm looking at matches the projectile's?

#

i wonder if I can count on the first sprite added to have priority in a list?

#

there's no way

#

i think i can?

#

maybe?

#
local firstspritefilepath;
for i,v in ipairs( comps ) do
    ComponentSetValue2( v, "visible", true )
    local spritefilepath, additive = create_vsc(entity_id, v, i, "image_file", "additive", "spriteoriginal")
    set_additive(r,g,b,v,"additive",additive)
    print("spritefilepath"..i..":\t"..spritefilepath)
    -- Check for if the sprite we're looking at is the same as the one modified by the potioncomp
    -- I'm banking on the projectile's original sprite taking highest priority in the loop
    if (not firstspritefilepath) then
        firstspritefilepath = spritefilepath;
    end
    
    if (spritefilepath ~= firstspritefilepath) then
        dummyfilepath = create_all_dummy_variations(spritefilepath, particle, pcolor, hex,r,g,b,a)
        ComponentSetValue2( v, "image_file", dummyfilepath )
    end
    EntityRefreshSprite( entity_id, v )
end
#

banking on this working

#

YAY

#

it works

#

uhh lemme test with worm

#

it works with Light tho

#

it works!

#

this is
very unconventional, though

#

feels like it's held together by duct tape and zip ties

#

ok, i've gotten rid of some possible bloat data

#

happy about that

#

Now I've gotta figure out what to do with .pngs

#

This is what is editing the dummy sprites to be colored

local function edit_dummy_sprite(dummyfilepath, r, g, b, a)
    for xml in nxml.edit_file(dummyfilepath) do
        if xml ~= nil then
            xml:set("color_r",r)
            xml:set("color_g",g)
            xml:set("color_b",b)
            xml:set("color_a",a)
        end
    end
end
#

I can't edit png's with nxml, though

#

this here edits a <Sprite> xml file and changes the rgba values of it

#

cause <Sprite>s conveniently have those

#

however, <SpriteComponent>s do not. They have an image_file attribute that points to an xml containing a <Sprite>

#

points to either an xml containing a <Sprite>, or a .png

#

the first error i'm having is "can't read text inside a non-text file", which points to the core issue i'm having:

#

I need to find another way to change the color of these .png files.

next flume
#

Alrighty, bandaid fix works

#

I also optimized the loop by a LOT

#
local firstspritefilepath;
for i,v in ipairs( comps ) do
    ComponentSetValue2( v, "visible", true )
    local spritefilepath = ComponentGetValue2(v, "image_file");
    -- Check for if the sprite we're looking at is the same as the one modified by the potioncomp
    -- I'm banking on the projectile's original sprite taking highest priority in the loop
    -- TODO: Make this less jank.
    if (not firstspritefilepath) then
        firstspritefilepath = spritefilepath;
    elseif (spritefilepath ~= firstspritefilepath and not string.find(spritefilepath, "%.png")) then -- Bandaid fix. Remove when you can color png's.
        local spritefilepath, additive = create_vsc(entity_id, v, i, "image_file", "additive", "spriteoriginal")
        set_additive(r,g,b,v,"additive",additive)
        dummyfilepath = create_all_dummy_variations(spritefilepath, particle, pcolor, hex,r,g,b,a)
        ComponentSetValue2( v, "image_file", dummyfilepath )
    end
    EntityRefreshSprite( entity_id, v )
end
#

i could prolly turn firstspritefilepath into a boolean

#

but like

#

eh

#

yeah, i think this works well enough.........

next flume
#

good GOSH

#

I've managed to create fake xml <Sprite>s of png sprites

#

so now

#

projectileareateleport works

#

BUT

#

I can now glimmer tentacles

#

oh

#

the "first sprite is the potioncomp'd sprite" thing is biting me in the butt

#

cause guess what has no sprite

#

adskjhfsdaf

next flume
#

so

trying to modify the SpriteComponents in a tentacle's child directly causes a crash

#

specifically, replacing the png's with xml's

#

or

#

wait

#

no

#

it doesn't crash!

#

looks like the verlet chain doesn't play nice with xml's

#

however:

<Entity name="$projectile_default">
    <VerletPhysicsComponent
        num_points="16"
        stiffness="0.99"
        resting_distance="4.0" 
        pixelate_sprite_transforms="1"
        simulate_wind="0"
        constrain_stretching="0"
        simulate_gravity="0" >
    </VerletPhysicsComponent>
    <Base file="data/entities/projectiles/tentacle/tentacle_0.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_2.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_2.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_2.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_2.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_2b.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_3.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_3.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_3.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_3.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_3.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_3b.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_4.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_4.xml" />
    <Base file="data/entities/projectiles/tentacle/tentacle_4.xml" />
</Entity>
#

this exists

#

oh

#

wait

#
<Entity >
   
  <SpriteComponent 
    image_file="data/entities/projectiles/tentacle/tentacle_0.png" 
    offset_x="0"
    offset_y="4.5"
    update_transform="0"
    update_transform_rotation="0" >
  </SpriteComponent>
  
</Entity>
#

that's kinda annoying

#

creating a fake xml doesn't seem to work

#

verlet chains don't play well with xml's, ig

#
Assert failed: (sprite->mSprite->GetRect().w > 0) in d:\projects\nollagames\fallingeverything\build\vc12\..\..\source\component_updators\verletphysics_system.cpp at line 923
#

OH WAIT

#

that's an engine-side error

#

i have no idea why the first one isn't bugged

#

HEH

#

it's bc the potioncomp is doing its good work

#

love to see it

#

this is with just the potioncomp affecting the tentacle

#

sigh

#

nolla pls fix tentacle to allow us to change the color of the tentacle

#

:<

tall abyss
#

are you ok sharpy? lol I just got out of work watching this all go down

next flume
#

Yeah, I'm ok!

#

I'm just tryina figure out how to change tentacle's color

#

I've been knocking out bug after bug after bug

#

So I'm feelin good

tall abyss
#

ayyy

#

we love smarty sharpy

next flume
#

Tentacle is such a unique spell that the way it works is hard-coded engine-side

#

I have one more idea in mind, but I don't feel like doing it

#

not rn, anyway

tall abyss
#

it's so funny how much jank tentacle has, just for behavior that you could probably recreate with a LuaComponent and some effort

next flume
#

whar

why is ModImageMakeEditable and co not on the wiki

tall abyss
#

but the jank is like half of its identity so honestly I guess it was the right approach

next flume
#

huff

tall abyss
next flume
#

luckily, it is in the

#

uhh

#

what's it called

#

this thing

tall abyss
#

lua API definitions

next flume
#

yes!

#

so

#

it looks like I can indeed use this to edit each image

#

however

#

i have zero idea how efficient this is

next flume
#

i'm tabling this for tomorrow

tall abyss
#

wallpaper

next flume
#

Bwahahaha

#

how did you do that??

queen bloom
#

I am contractually obligated to mention my wallpaper yet again

cerulean thicket
#

my wallpaper is the best

tall abyss
tall abyss
next flume
#

huh!!!!!

#

That's cool!!

next flume
#

#wand-research message

#

Tomorrow's goal: "Notes Expanded" mod

zenith turret
next flume
#

ok so

#

the question is

#

what note range do I want to provide

#

I kinda wanna start at C1 and go through to C2

#

but ocarina goes from A1 to A2

#

Kind of a pain...

#

I'm prolly gonna start with the kantele from C1 to C2

next flume
#

hm.

#

so

#

I'm realizing, because every note spell is nearly the same

#

I could generate them procedurally in the same way I generate Glimmers

#

i don't need to, bc I don't intend on letting other mods add microtones

#

but I could

#

if it works, it would also save me a ton of time with copypasting stuff

icy viper
#

im curious what you're doing for this

#

cuz my mod is goint to have actual sounds pertaining to every note pitch (with modifiers that can allow for microtonality pitching of the existing notes)

next flume
#

we only have a handful of kantele notes, and are missing several accidentals in the ocarina notes

#

I want all 12 notes for both intstruments

icy viper
#

i see

#

but like, how are you planning on doing it lmao

#

are you going to recreate the sounds or are you gonna pitch sounds that are close to them?

next flume
#

ยฏ_(ใƒ„)_/ยฏ

#

No idea

#

I figured I'd modify the pitch of the existing sounds

#

not sure how I'm gonna do that

#

but I'll figure it out

#

. . .

#

laptop blue screened attempting to open obs

icy viper
#

lmao

hollow panther
#

are we getting microtonal music in noita before gta6?

next flume
#

why would yall even want that? that sounds awful to manage as a player

hollow panther
#

for memes

next flume
#

i already have april fools plans for this mod

hollow panther
#

it's april 9th, mate

next flume
#

I know

#

For the next april fools

#

what I'm saying is i could add more april fools plans

#

like quarter steps

#

C half-sharp

hollow panther
#

honestly we need more microtonal music makers

#

there's so rare

next flume
#

oh gosh this actually exists

#

A common notation for quarter tones. From left to right, half-flat, flat-and-a-half, half-sharp, sharp-and-a-half.

hollow panther
#

sure, just find an instrument you can play it with

next flume
#

violin

hollow panther
#

right, fretless things

next flume
#

also guitar if you're good

#

also vocals!

#

This is prolly gonna happen eventually

hollow panther
#

here's some example of good incorporation of microtones
https://www.youtube.com/watch?v=8uBJzibp-XI

Varijashree Venugopal - Chasing the Horizon ft. Hamilton de Holanda & Victor Wooten
From the album 'Vari' - Available now
Stream/buy here: https://orcd.co/vari

"An energetic ride through the twists and turns of Carnatic Raga Vakulabharana dressed up as a party vibe. Adding to the thrill is the camaraderie between the Bandolim, Bass, Mridangam a...

โ–ถ Play video
next flume
#

if I wanna double the amount of spells i'm making, tho, i'm prolly gonna end up making them procedurally instead of having ~48 XML files worth of notes

#

maybe

hollow panther
#

we sure do love increasing loading time for the sake of fake optimizations

next flume
#

hm

#

you make a valid point

#

making them procedurally works for GE bc of how mod compat works

#

but this mod rly doesn't need it

hollow panther
#

eh
would be easier to tweak/add/remove stuff

#

also more fun than monotonically making xmls

next flume
#

that's my thought

#

also

#

the only reason I'm considering it is bc every note spell is nearly the same

#

the only differences between them are:

  • the name (gun_actions)
  • the spell ID (gun_actions)
  • the spell icon (gun_actions)
  • the sound used (XML)
  • the R, G, or B value of the note sprite spawned (XML)
  • the vsc saying what note was played (XML)
#

and all of them use the same format: kantele_c or ocarina_d

#

it's REALLY easy to condense the 48 XML's into ~100 lines of lua

next flume
#

making a thing

icy viper
#

i know at least in FL studio its kinda awkward to do

next flume
#

it's beautiful

next flume
#

we have sprites

icy viper
#

ah, was gonna share my note designs but you appear to have it all figured out ๐Ÿ‘

next flume
#

I have every sprite sprited now

cerulean thicket
next flume
#

generator?

cerulean thicket
#

to make the sprites

next flume
#

I have assets of every single piece

cerulean thicket
#

are they automatically assembled

icy viper
#

he is suggesting auto-generating them i believe

next flume
#

I pieced them together myself in photoshop

icy viper
#

based off of parts and assigned colours

next flume
#

but a generator could be cool

cerulean thicket
#

it could be generated, and it would be fun to generate

next flume
#

i dunno what program i'd use to generate them

cerulean thicket
#

then you can have C# but 5 octaves higher or whatever

cerulean thicket
next flume
#

I know even less about how to do that

cerulean thicket
#

learn

#

its healthy

next flume
#

first i gotta get this mod working

#

then maybe i can learn

cerulean thicket
next flume
#

i assumed that you knew how to do it when you suggested it '>.>

cerulean thicket
#

well im sure i could write a program to generate them

#

it cant be that hard

icy viper
#

i was planning on having the game collage mine in-game since i have the numbers, letters and # all as separate components alongside the note and the colour, but it would probs be best to pre-generate them

next flume
#

ignore that A2 isn't here, i'm ignoring A2 and pretending it doesn't exist

next flume
#

ok

#

time to figure out how to use fmod again

#

i do not see a Fmod Bank Tools.exe file

#

waaait

#

figured it out!

next flume
#

I have discovered how to modify pitch in fmod!

#

however

#

I have realized that not every kantele/ocarina note has the same timbre

#

I wish I could export this sound directly

#

hmm

#

FMOD Studio is designed to create audio behavior that is built banks that are then loaded into the FMOD Engine to be played in real time - it is not a DAW, and as a result cannot be used to export audio. If you do need to make modifications to or export audio, I would recommend using your DAW of choice to do so.

#

In that case, your best options are to record audio through an external program (screen/audio capture software like OBS, loopback drivers, etc.), or to use one of the WAVWRITER outputs when initializing your system at runtime, which will write the system output to file.

#

obs, do not crash my laptop again

#

I think i'm gonna have to pick an existing sound that's closest to the pitch I wanna use

#

then up/down pitch it

#

ah!!

#

i know why there's a difference in intensity

#

the kantele is a string instrument, and string instruments often have different thicknesses for strings

next flume
#

so, this is the incorrect way that these notes go

#

A and B are both lower than C

#

so instead of
C C# D D# E F F# G G# A A# B C2
it's
A A# B C C# D D# E F F# G G# A2 A#2 B2 C2

#

y'all remember why i didn't wanna deal with A2? this is why

#

ig we can, like
start at low A and move up
ig

next flume
#

tempted to make a glimmers expanded expansion pack for the pixel artists

#

they have requested brown and grey

#

and i dont think either color is gonna be pretty enough to be a part of the original mod

#

but poop/soil glimmer might be worth looking into if we want some brown, so

icy viper
next flume
#

no-

icy viper
#

but numbers still line up like that i believe

next flume
icy viper
#

am i misremembering

#

ig what i said is really confusing and doesnt reflect what i was thinking at all ignore that mb

next flume
#

bwahaha

icy viper
#

i thought that it was A1 B1 C1 ... G1 A2 B2 C2 ...

#

ig more that octave is centred/based around C

#

rather than C being the literal first note in an active

next flume
#

pianos are centered around C bc of convenience

icy viper
#

asked my sister, yeah the numbers start from A to G

next flume
#

you can center any octave around any note if you dont care about key signatures

icy viper
next flume
#

it does, I just wanted it to start on C and not A bc I like the key of C

icy viper
#

ahhh i c lmao

#

fair enough

next flume
#

but ig it's starting on A and ending on C2

icy viper
#

honestly my mod is going to entirely overwrite the existing spells cuz its not C1 and A2 but more like C3 and A4 or smth

#

my mod will display the actual octave of the notes relative to a piano or smth

next flume
#

true...

#

what mod are you making?

icy viper
#

you are not the first person to start making a notes expanded mod

#

just probs gonna be the first one to finish one lmao

next flume
#

Really?? I started yesterday

icy viper
#

my mod will expand the notes list for Ocarina and Kantele a few octaves, and then probs also add other instruments

icy viper
next flume
#

woaw

icy viper
#

i got the ocarina notes- hold on

next flume
#

i honestly wasn't sure how far I wanted to take the musical scale

icy viper
#

heres how my note spell icons will be formatted (colour defines instrument, octave in top left, and key on the right)
#mod-general message

next flume
#

OHHHHH

#

THAT'S GOOD

icy viper
#

and heres my first demo
#wand-art-gallery message

next flume
#

if mine is gonna become obsolete, idk if i even wanna continue making it

icy viper
#

bold of you to assume ill get this finished within a reasonable timespan lmao

#

i also plan to add other spells for better music structuring and add a "Spell Machine" that combined let you arrange actual music in Noita

next flume
next flume
#

and i dont wanna steal your assets and flip them

icy viper
#

well its up to you, tbh though the main reason i didnt make a useable ver of the mod until now is we dont have a source on the kantele

#

Nolla very kindly credited the actual source for the Ocarina, so i managed to find the soundpack, and tune it to sound like the in-game Ocarina and managed to make sound files for each note manually

#

but theres no mention of the Kantele

next flume
#

woah

icy viper
#

and after years of asking nolla for a source im thinking its time to pack it in and just recreate it from scratch

#

another barrier though

next flume
#

mannnnnn

icy viper
#

is how the fuck you control note length

#

i dont know how i could either technically control note length naturally nor a good way to define it in wand-building- maybe Lifetime?

next flume
#

instruments?

icy viper
#

yeah for instruments

next flume
#

maybe certian instruments are designed to have held pitches when you cast the same note spell one after another

#

others are designed as more staccato

icy viper
#

elaborate?

next flume
#

like

#

for a flute-type thing, you create a sound that is very easily loopable

icy viper
#

ehhh would be difficult, how would i do that for Piano?

next flume
#

so that [flute][flute][flute] sounds like a sustained sound

next flume
#

ยฏ_(ใƒ„)_/ยฏ

icy viper
#

piano imo is defined very well by how it sounds when you press it vs how you hold it, the sound when you initially play a piano note vs the held tone are very different

next flume
#

ok

#

hold

#

idea

icy viper
#

i hope i can do some stuff with events

next flume
#

luacomp

#

like how magical secrets are detected

#

instead of triggering a magical secret

#

the entire sound system is done through that lua script

icy viper
#

well obv with a diff lua script but yeah you're proposing handling the entire sound system as a unified script rather than individual sounds?

next flume
#

you can detect what notes were recently played, so if you played a piano note recently, you can see that and play a sustain sound afterward

icy viper
#

mmmm perchance

#

so the data would be on the spell and pass itself to the script

#

and the script would decide which sound to play

next flume
#

Yep!

#

no audiocomps

icy viper
#

not bad, though i do think i can find a way to just do it with FMOD

next flume
#

just lua

#

?

#

wdym

icy viper
#

just have a long-sound and then have an event that fades it out in the correct manner

next flume
#

how so?

#

wont you run into the issue of the loud piano-hammer-striking sound at the start of a new cast?

icy viper
#

hm? wdym?

next flume
#

...

icy viper
#

when you play a piano note, surely it should play the sound of a piano hamemr striking the thing

next flume
#

yes

icy viper
#

yeah my main point is the different between a short note and a long note

next flume
#

yes

#

how are you planning on telling the difference between when you play a short vs long note?

icy viper
#

ohh you arent talking about the technical side? mb

next flume
#

Yeh

icy viper
#

i was thinking of having it be defined by note lifetime

next flume
#

lifetime? hm

#

that's actually not bad

icy viper
#

yeah, its an existing thing and is somewhat intuitive imo

next flume
#

brain is slow, idk why i didnt think of that

#

i was thinking, you just cast the same spell over and over again for a sustained note

icy viper
#

another thing is i wanna add Spell Grouping, basically add open and close paranthesis spells, and modifiers before the open paranthesis are applied to all spells in the group

#

that would be great for composing if you wanna apply a thing to all the notes in the group

#

rather than a modifier (or multiple) per note

next flume
#

holup

#

i could totally generate sprites in init.lua

#

WAAAIT

icy viper
#

welp i finished eating, gtg o/

next flume
#

there's no way i can end up making the entire thing out of lua

#

ok!

#

thanks for the tips :D

cerulean thicket
next flume
# cerulean thicket rip load times

Honestly, I might attempt it regardless, just to see if I can. That feature may or may not make it into the final version, but I wanna try

hollow panther
#

i generate like 700 8x8 pngs in lamas stats i believe
even worse for CC

#

is quite fast

next flume
#

YOOOO i managed to construct the sprites systematically in the code

#

they uh

#

don't show up in the spell, for some reason

#

The filepaths are the same

#

hm

#

i wonder if it's bc i'm running this during OnModPreInit()

#

actions.lua get appended after the images are created

#

it- it runs an absurd amount

#

i didn't do it right, somehow

next flume
#

figured out why it wasn't generating correct

#

fixed that

#

however

#

despite filenames lining up, this doesn't seem to be working

#

not entirely sure why

#

You Literally Exist

#

Why Don't You Think You Exist

#

replacing it with a vanilla sprite works

#

now let's make translations

next flume
next flume
#

ok, i have all the spells in order

#

now

#

where to put them

next flume
#

hm

#

gosh

#

I really don't wanna make another pixel scene and end up putting every note spell in it

#

there are 49 new note spells, 20 of which are kantele and 29 of which are ocarina

#

kinda just wanna suggest Spell Lab Shugged if you wanna play with this mod

#

blahhhhhhh

next flume
icy viper
#

yeah my approach will end up overwriting all the vanilla spells, also thinking of making it so each instrument is a spell and then from there all the notes are variations of the spell, to avoid some bloat with the bajillion spells im adding, also totally need to think of a way to transmute notes into other notes

#

i do find it really funny seeins so many notes shoved in there lmao

next flume
#

it is funny

next flume
icy viper
#

saw it, it is certainly peak

next flume
#

oops, I accidentally forwarded it here

icy viper
#

oh lmao

next flume
#

I was forwarding it to a friend

icy viper
#

ahhh i see

#

well we're all friends here ๐Ÿ˜„

next flume
#

true!!

half parcel
next flume
#

EYYYYYY

#

IS ME

tall abyss
cerulean thicket
#

hell?

next flume
#

i know what im about to mention isn't noita-related, but it's MY thread so i get to use it how I want

#

I used this chart to test how many colors i have access to and where we've defined them to be for a class project

#

that rust-ish color, i feel like it should be orange