Pizza Tower

Pizza Tower

View Stats:
Logiepro Feb 15, 2023 @ 2:45pm
Dumb Question For Nerds. - Sprite Calls for the Noise
So I've seen some mods that re-add the Noise and stuff, and that's cool, in the files there's even sprites labeled for playable Noise, however, does anyone know how the game calls sprites, I just wanted to try and repurposed some of the Noise boss sprites like the spin dive, so that when he goes into moch roll, he actually rolls instead of turning into Peppino, I know this game is relatively new, just wondered if it's possible to set animations, and or edit the scripts to call these new animations.
< >
Showing 1-15 of 17 comments
Colind8 Feb 15, 2023 @ 3:35pm 
From what I can see, the script scr_characterspr is what houses all the sprite states. Noises sprites start on line 236. For whatever reason, UndertaleModTool converts all the sprite names to their IDs. So this makes it harder to tell which is a noise sprite and which is a peppino sprite.

Once you find a sprite you want to replace, simply replace the number with it's sprite name:
spr_move = 1379
spr_move = spr_playerN_move

Once you save, UndertaleModTool will convert it to the name to the numbered ID.
Last edited by Colind8; Feb 15, 2023 @ 3:36pm
Logiepro Feb 15, 2023 @ 3:40pm 
Cool, is there a way to define a new sprite state for all the animations that Noise doesn't have yet?
Logiepro Feb 15, 2023 @ 3:52pm 
Okay, tested it out, I guess let me be more clear, Is it possible to say, add a sprite to Noise's sheet, name that Sprite, and then have it called under the ChacterSpr Script

Like
Spr_MachRoll = Spr_PlayerN_Breakdance
and it'll use Breakdance from the spritesheet of Noise for mach roll?
Colind8 Feb 15, 2023 @ 3:56pm 
Originally posted by Logiepro:
Okay, tested it out, I guess let me be more clear, Is it possible to say, add a sprite to Noise's sheet, name that Sprite, and then have it called under the ChacterSpr Script

Like
Spr_MachRoll = Spr_PlayerN_Breakdance
and it'll use Breakdance from the spritesheet of Noise for mach roll?
Yeah it should be
Logiepro Feb 15, 2023 @ 4:02pm 
Aight uhh last one, what's the dive-canceled groudpund
the roll state when Noise jumps after mach
and the slide sprites called
Logiepro Feb 15, 2023 @ 4:20pm 
Ok I set the longjump sprite in the thing to a sprite that I added to the spreadsheet and it didn't work so I think I have to script this ♥♥♥♥ :(
Edit: Dear god I just wanna find the long jump script it's not in grab nor jump, and there's no specific script for it but there is a sprite call for it ughhhhhh
Last edited by Logiepro; Feb 15, 2023 @ 4:26pm
Colind8 Feb 15, 2023 @ 4:25pm 
Originally posted by Logiepro:
Aight uhh last one, what's the dive-canceled groudpund
the roll state when Noise jumps after mach
and the slide sprites called
I think the dive cancel (spr_player_poundcancel1) is coded outside of the characterspr script somewhere.
Colind8 Feb 15, 2023 @ 4:44pm 
Originally posted by Colind8:
Originally posted by Logiepro:
Aight uhh last one, what's the dive-canceled groudpund
the roll state when Noise jumps after mach
and the slide sprites called
I think the dive cancel (spr_player_poundcancel1) is coded outside of the characterspr script somewhere.
Ok I found it. The dive cancel is indeed hardcoded in the script scr_player_freefall. It's located on lines 71, 106, and 107. I guess to fix this you can replace them with a sprite variable defined in scr_characterspr.
Logiepro Feb 15, 2023 @ 5:00pm 
Originally posted by Colind8:
Originally posted by Colind8:
I think the dive cancel (spr_player_poundcancel1) is coded outside of the characterspr script somewhere.
Ok I found it. The dive cancel is indeed hardcoded in the script scr_player_freefall. It's located on lines 71, 106, and 107. I guess to fix this you can replace them with a sprite variable defined in scr_characterspr.

alright cool, it doesn't work if you just set the ID in scr_charcterspr, I think you have to call a sprite index??

Follow up, so like theres sprites for the Noise, but I still have no idea how the came truly calls for them, cause like the scr_characterspr has calls for every sprite, but even when I put a sprite in the spritesheet and try to call that within the game, it still defaults to peppino leading me to believe there is another part to this puzzle oh god
My best estimate of what the game does is call sprite index > searches through scr_characterspr and pulls the ID for that sprite > ???? > Sprite draws?
It's not like just adding a sprite that's missing from the Noise and giving it a sprite id makes it work??

So I wrote this:
fmod_event_one_shot_3d("event:/sfx/pep/groundpound", x, y)
if (sprite_index == spr_poundcancel1)
sprite_index = spr_player_poundcancel2

and made two sprites in the cahacterspr page that were called spr_poundcancel, which should make it two individual, but it didn't maybe I need to declare it as a variable? I don't know.
Last edited by Logiepro; Feb 15, 2023 @ 6:16pm
Colind8 Feb 15, 2023 @ 6:23pm 
Originally posted by Logiepro:
Originally posted by Colind8:
Ok I found it. The dive cancel is indeed hardcoded in the script scr_player_freefall. It's located on lines 71, 106, and 107. I guess to fix this you can replace them with a sprite variable defined in scr_characterspr.

alright cool, it doesn't work if you just set the ID in scr_charcterspr, I think you have to call a sprite index??

Follow up, so like theres sprites for the Noise, but I still have no idea how the came truly calls for them, cause like the scr_characterspr has calls for every sprite, but even when I put a sprite in the spritesheet and try to call that within the game, it still defaults to peppino leading me to believe there is another part to this puzzle oh god
My best estimate of what the game does is call sprite index > searches through scr_characterspr and pulls the ID for that sprite > ???? > Sprite draws?
It's not like just adding a sprite that's missing from the Noise and giving it a sprite id makes it work??
I think for every sprite that isn't in scr_charcterspr, it's hardcoded in a state function. Like how there wasn't a sprite defined for the dive cancel in scr_characterspr, you can find it hardcoded in scr_player_freefall.

All the sprites defined in scr_charcterspr are variables like 'state' or 'combo'. Each of these variables has a number that corresponds to the sprite index. This is weird because the variables are written the same you would a regular sprite, spr_idle.

Sprites that are hardcoded directly refer to their sprite like spr_player_idle. This is what the actual sprite is named and you can tell it's a sprite reference because the text will be colored red like objects and other assets instead of light blue like all variables.

So what I think happened is that the dev for some reason just stopped using scr_characterspr to define sprite variables and started using just the regular sprite references. To fix it, I believe you'll have to manually find every sprite reference and replace them with a sprite variable that was defined in scr_characterspr.

So like for the dive cancel. You need to make a variable in scr_charcterspr under Peppino's sprites called something like spr_divecancel1 and set it to spr_player_poundcancel1:
spr_divecancel1 = spr_player_poundcancel1 spr_divecancel2 = spr_player_poundcancel2
Note: The variable can not have the exact same name as a sprite

Then you go to wherever its hardcoded, in this case in scr_player_freefall and replace all the sprite references with the new variables spr_divecancel1 and spr_divecancel2.

Now for Noise, you won't have to touch scr_player_freefall again. You can just go to scr_charcterspr under Noise's sprites and create the variables for his sprites:
spr_divecancel1 = [insert noise sprite here] spr_divecancel2 = [insert noise sprite here]

If you're wondering where you can find all the state functions, they're located in obj_player's step event script. There's a lot of them.
Last edited by Colind8; Feb 15, 2023 @ 6:27pm
Logiepro Feb 15, 2023 @ 6:26pm 
WHOOOOOOOOOO I LOVE LINAR PROGRAMING!!!!!
OBJECTS WHO VOID WHAT I AM GOING INSANE, THANK YOU THOUGH, YOU SHOULD HONESTLY PUT OUT A MODDING GUIDE BECAUSE YOU ARE FAR BETTER THAN ANYTHING I COULD FIND
Colind8 Feb 15, 2023 @ 6:27pm 
Originally posted by Logiepro:
WHOOOOOOOOOO I LOVE LINAR PROGRAMING!!!!!
OBJECTS WHO VOID WHAT I AM GOING INSANE, THANK YOU THOUGH, YOU SHOULD HONESTLY PUT OUT A MODDING GUIDE BECAUSE YOU ARE FAR BETTER THAN ANYTHING I COULD FIND
lol I might.
Logiepro Feb 15, 2023 @ 6:31pm 
If you're wondering where you can find all the state functions, they're located in obj_player's step event script. There's a lot of them. [/quote]
This one? gml_Object_obj_player_Step_0
Also still confused why this code
fmod_event_one_shot_3d("event:/sfx/pep/groundpound", x, y)
if (sprite_index == spr_poundcancel1)
sprite_index = spr_player_poundcancel2 didn't work therotically
Colind8 Feb 15, 2023 @ 6:39pm 
Originally posted by Logiepro:
If you're wondering where you can find all the state functions, they're located in obj_player's step event script. There's a lot of them.
This one? gml_Object_obj_player_Step_0
Also still confused why this code
fmod_event_one_shot_3d("event:/sfx/pep/groundpound", x, y)
if (sprite_index == spr_poundcancel1)
sprite_index = spr_player_poundcancel2 didn't work therotically
Yes that one

Also for the code I'm not sure other than the missing brackets... maybe:
fmod_event_one_shot_3d("event:/sfx/pep/groundpound", x, y) if (sprite_index == spr_poundcancel1) { sprite_index = spr_player_poundcancel2 }
Last edited by Colind8; Feb 15, 2023 @ 6:40pm
Logiepro Feb 15, 2023 @ 6:40pm 
Originally posted by Colind8:
scr_characterspr to define sprite variables and started using just the regular sprite references. To fix it, I believe you'll have to manually find every sprite reference and replace them with a sprite variable that was defined in scr_characterspr.

So like for the dive cancel. You need to make a variable in scr_charcterspr under Peppino's sprites called something like spr_divecancel1 and set it to spr_player_poundcancel1:
spr_divecancel1 = spr_player_poundcancel1 spr_divecancel2 = spr_player_poundcancel2
Note: The variable can not have the exact same name as a sprite

Then you go to wherever its hardcoded, in this case in scr_player_freefall and replace all the sprite references with the new variables spr_divecancel1 and spr_divecancel2.

Now for Noise, you won't have to touch scr_player_freefall again. You can just go to scr_charcterspr under Noise's sprites and create the variables for his sprites:
spr_divecancel1 = [insert noise sprite here] spr_divecancel2 = [insert noise sprite here]

If you're wondering where you can find all the state functions, they're located in obj_player's step event script. There's a lot of them.

Well I did that and uhh didn't work for whatever reason, I think it might have something to do with the code that calls the function idk. Also the curly braces didn't seem to matter as that's how it was formatted in the base code
Last edited by Logiepro; Feb 17, 2023 @ 11:17am
< >
Showing 1-15 of 17 comments
Per page: 1530 50

Date Posted: Feb 15, 2023 @ 2:45pm
Posts: 17