#Quality asteroids

1 messages ยท Page 1 of 1 (latest)

old island
#

Would the quality asteroids give you quality asteroid chunks?

plucky brook
#

I looked into it but doesn't seem like I can do that

#

Asteroid Chunks are implemented in a very odd way that they aren't even Entities

#

this implementation in the first place is jank anyways

#

The game doesn't out of the box have a way to have asteroid spawns be of quality so I have to spawn dummy asteroids to be replaced with quality versions

night raft
#

why not just keep the dummy asteroids, which can drop dummy quality asteroid chunks, which insta-spoil into normal asteroid chunks of the correct quality?

old island
plucky brook
#

Asteroid chunks are not entities

#

they're done some optimisation or something to them

#

also it'd be either just too busted or too obnoxious if they did drop in quality

#

If an easier way to do this arises in a future update I'll still add it as an option

plucky brook
#

though you mention spoiling which actually yeah that just might work

#

but it'd need to go to scripting

#

because items can only spoil to the same quality

hexed helm
#

@plucky brook I was just looking at your code and implementing quality chunk handling

#

ping me when you have some time on your hand, I'll show you how

#

I made a small POC on my side

plucky brook
#

hm

#

oh right you made that spoilage library

hexed helm
#

yep

#

Couple hours ago, I thought of your mod and decided to check if you had solved the problem, and looked at what was possible

plucky brook
#

ideally I want to burn my mod and build it up from scratch because man is it jank as shit

hexed helm
#

it... looks a bit janky ๐Ÿ˜„ but I wouldn't allow myself to comment what I couldn't have done ahah. Honestly, I haven't dug to see if there is a better solution than what you are doing

plucky brook
#

perhaps it'd have made more sense for the quality dummies to all just be done during the prototype stage

#

like for each quality

#

instead of being done during runtime

hexed helm
#

bingo

#

๐Ÿ™‚

plucky brook
#

not that huge of a difference though really but probably something I'd fix when I get time

hexed helm
#

BUt I'm not sure you can force a REAL quality on prototypes at data stage

plucky brook
#

it'd still have to be swapped out during runtime anyways I'm pretty sure

hexed helm
#

But for chunks, yeah, my idea involves having 1 dummy per quality

#

I was looking into your mod because I was thinking of improving RSL to handle quality better ('atm its not configurable, it just keeps the quality of the source item)

#

and I was effectively looking at use cases where a modder using RSL would want to force certain qualities

#

and I remember your mod and your limitation

#

I saw that in your code, you hotswap each asteroid with quality dummies BUT the chunks

#

if you also have dummies for the chunk, I can give you quality items based the the name of the chunk ๐Ÿ™‚

plucky brook
#

the dummies notably are during the asteroid spawning

hexed helm
#

And I mean, real item with real quality that depends on the chunk

plucky brook
#

when it breaks into smaller ones it just automatically inherits the quality

#

except for the chunks

#

they don't inherit it

hexed helm
#

Because chunks don't have a quality, got it.

#

hum

plucky brook
#

so I'd need to make dummy chunks that turn into dummy items

hexed helm
#

can you also use your script to replace the chunks ?

plucky brook
#

with a bit of modification yeah

hexed helm
#

cuz I think each step of asteroid breaking is handled by script anyways

plucky brook
#

currently I'm just filtering out the chunks

hexed helm
#

this modification ? ๐Ÿ˜„

plucky brook
#

well probably a little bit more

hexed helm
#

probably yes :p

plucky brook
#

first gotta actually make the quality chunk dummies

hexed helm
#

I made a loop for that too

plucky brook
#

one concern is whether the item is created when its grabbed or when it enters the machine

#

it'd be quite unfortunate for it to be the former

hexed helm
#

when it's grabbed

#

but it doesn't matter

plucky brook
#

oh that's fine ok

hexed helm
#

My poc works with 1 variant

#

if it does, it will work with N variants

#

I just need to check that I can interact with the arm of the collector

#

which I'm guessing is an entity that holds an "itemstack"

#

I can check that

#

gimme just a sec

plucky brook
#

also something that I didn't quite understand was with quality chances, I've roughly implemented how it works in this image but it just seems all really wrong

#

unless it means that qualtiy or greater

#

which then actually that just makes sense huh

#

a proper rewrite I'd have to do tomorrow when I have more time

hexed helm
#

hum...

#

the source entity of the spoil effect is "asteroid-collector"

#

I don't know how to access the arm

plucky brook
#

is there like a second inventory on the asteroid collectors?

hexed helm
#

first thing I checked :/

plucky brook
#

oh also just had a thought, even normal quality asteroids would need to drop these dummies since we can't have duplicate asteroids as it would mess up asteroid targetting priorities

#

so would need to just overwrite in this case

hexed helm
#

Hum....

#

If I can't access the arms, I can't hotswap the item

#

Maybe I was a bit too optimistic

#

I need to investigate that further.
I know that I can detect which collector collects what, and therefore, swap the item inside the collector

#

but our goal would be to replace it in the arm directly

plucky brook
#

how would filters work with this?

hexed helm
#

that's a great question

#

I would assume each chunk dummy is distinct

#

unfortunately

plucky brook
#

Ok was trying to implement support for modded qualities and I dig this up

#

that is very bizarrely implemented

#

I don't know if I really want to implement it that way for this

#

and on second thoughts maybe supporting modded qualities isn't a good idea

#

might not be very cool to see unkillable tier 20 asteroids just for having that mod

hexed helm
#

ahahah

#

you could give out an option to allow or disallow it

#

And yeah the filter thing can be an issue...

#

and... would it... ? To allow people to filter out certain qualities ?

#

idk

#

there we go

plucky brook
#

I guess the main concerns are the UI being cluttered and not being able to use quality signals to get the quality chunks

#

but gotta make compromises

hexed helm
#

arf... I think on space platform mined entity is just about removing buildings / things from the platform

#

nothing related to "mining" the chunks

plucky brook
#

also how would you know what quality the chunk should convert into?

#

wait nvm

hexed helm
#

you just give a specific name to each chunk

#

atm, we could make it work, but RSL would "teleport" the items directly from the arms into the collector

#

I haven't tried it yet but that's what would happen in theory

plucky brook
#

wait actually yes mind

#

how do you have the small asteroids break into the correct chunks

hexed helm
#

It's handled by script, I believe

plucky brook
#

currently the quality asteroids are just actually the correct ones with quality

#

so that turret targetting just works

#

so I guess yeah would need to be script

hexed helm
#

I want to see if there is an event either : when something is collected (mined) by the collector

#

or when an item is inserted into a collector

#

or if we can access the arm inventory

#

either one of these possibilities would allow a quality implementation

#

without that, it would be possible, but really clunky

plucky brook
#

do spoilables spoil while in the arm?

hexed helm
#

yep

plucky brook
#

damn

hexed helm
#

I already thought about that ahahah

plucky brook
#

it really just is quite unfortunate

hexed helm
#

it if only spoiled while inside the collector's inventory, that would be a no brainer

#

RSL would handle it natively

#

Oh !

#

maybe I got an idea

hexed helm
#

alright it works

#

May not be the best performance wise

#

but it works lol

#

I had an option in RSL to retry in case a scripted spoiling event failed

#

I activated it

#

It cannot succeed as long as the item in inside the arm, but it retries every 3 ticks

#

when it enters the collector, it's transformed

plucky brook