#looking for some advice

1 messages · Page 1 of 1 (latest)

minor plank
#

i'm trying to make a mod that generates new randomly generated jokers when you open a special booster pack. i can't tell if the best approach would be to have a single joker whos name and ability are randomised whenever a copy of it is created, or to create a brand new joker every time necessary and randomise it's stuff during creation. i've ran into different issues trying both: for the single joker approach i can't figure out how to get the text or anything to change after the joker is created, and for the multiple joker approach i just can't get it to create a new joker within a function without it either crashing or not creating the joker. anyone have any ideas for how to get either approach to work? im using steamodded 1.0.0 if it matters

paper fjord
#

you can handle the sprites in set_sprites+load and the description/name by dynamically reconstructing the localization entry within loc_vars

#

if you need any help with figuring that stuff out, feel free to ask me, as I've already made a card that changes sprite/name/description per card instance before

minor plank
#

ooh thank u

#

do u have a mod posted anywhere that uses that? ill have a look at the code and see if i can figure it out

paper fjord
#

it's used in the items for archipelago randomizer, but idk how readable the code there would be

#

I feel like it would be better if I write a quick example joker with those properties

minor plank
#

that would be rly helpful thanks

paper fjord
#

really raw and flawed implementation but i think it demonstrates the code concepts enough

#

wanted to be more ambitious with it but its 2AM and this is not what i should be doing rn

minor plank
#

this is fantastic thank u so much

#

ill see what i can do with this

#

have a good rest haha

paper fjord
#

if I had to say one thing, don't do my mistake and scrap the whole multiple effect system I have in that thing

#

it's so much easier to do things when you have only one effect to worry about

paper fjord
#

no idea why the dynamic name doesn't work, but if you leave it unchanged then it should be fine I think

#

The random sprite effect picks from a specific area on the current atlas, so you can change it to an atlas of random custom jokers

minor plank
#

thats a good way to do it

#

i wont worry about multiple effects for now yeah

fast rose
#

Two notes here: another reference for this is RNJoker from Cryptid, but it doesn't have changing sprites. Reconstructing localization entries isn't necessary if all entries are known before hand and not generated on the fly, as you can just have loc_vars return a key property pointing to the relevant entry

#

dynamic names used to not work with this method, but it's been fixed in
steamodded for a good while now

minor plank
#

ooh i forgot about rnjoker ill look at that too