Resource icon

[Reusable] Double Cherry Monitors [v2.1]

This thread contains content that may be reused, modified, or ported by anyone.

WellDoneSnake

Formerly "TSDude"
Hey all thought I'd show off a mini-side project that I was working on to figure out how I'd want to tackle recreating bot-like behaviour.

>>Updated to v2.1 see notes in "Important Stuff" section and changelog below<<

Introducing...

Double Cherry Power-Up

attachment.php


Yes I know on Discord I kept going back and forth over calling it Double Cherry lol

This power-up is my take on the double cherry power-up from Super Mario 3D World. This may not be a 100% accurate representation of the power-up from the original game.

By breaking one of the double cherry monitors, a clone of the player will be spawned.
This clone mimics most of the player's actions and is useful for destroying enemies and obstacles.

grqK8OM.gif
gHmAvs2.gif
H7LvKzS.gif



>>Important Info<<

1) Clones can have their positions rotated by tapping the custom 1, ring toss or ring toss normal buttons. If you press and hold these buttons then the clones will assume their default spawning positions.

2) This mod comes in two versions:

- "L_DoubleCherry(play)-v2.pk3" replaces all ring monitors with a double cherry monitor. This is for adding another fun experience to the standard vanilla campaign playthroughs.

- "L_DoubleCherry(editor)-v2.pk3" is for map creators who would like to take advantage of these clones in their own projects.
Mapthing no. 2998 is the normal monitor while mapthing no. 2999 is the respawnable version.

- Additionally when using the editors version you can take advantage of linedef types 314 and 315. These clones count as pushable objects, so they can be used to trigger certain effects in a level.


oML0DZB.gif



>>Updated Information For Mappers<<

As of version 2.1 you can now have the clones activate more linedef types than before, particularly linedef types that relied on a player object to activate them (e.g. 413 - Change Music, assuming that the "Not Climbable" flag is unchecked).
This works similarly to linedef types 314/315 mentioned above.

To utilise this feature use the Call Lua Function - 443 linedef special.
1) Type "P_CCHECK" in the upper front texture fields.

2) The x-offset of the front upper texture must only use numbers 1 - 4, the value set is compared to the number of clones you have in your original trigger sector.

3) Checking the "Not Climbable" flag checks if the no. of clones >= the x-offset. While the "Solid Midtexture" flag checks if the no. of clones <= the x-offset.

4) Lastly set the tag to the tag number of another linedef executor trigger (which would be on the same control sector that has a linedef special that affects the player).

Bug: When using the new linedef action, clones may not trigger an effect if they're in separate trigger sectors that share the same tag.

A test map is included in the this release, launch the game/map editor with both the editor edition (as a resource if using a map editor) and the map.



Special Note: This mod was mainly made for the vanilla characters (Sonic, Tails, Knuckles, Amy, Fang and Metal Sonic), it was not made with custom characters in mind. I may work on adding support for non-vanilla characters in the future.

Changelogs:
General Clone Fixes

- Clones now show a bit more independent behaviour when either they or the player are launched vertically by springs.
(Diagonal and horizontal springs will continue to not affect their horizontal momentum.)

- Clone-to-cacti collision fix

- Clones no longer die multiple times when you fall into a pit and you should no longer be rewarded points for doing

- Clones now jump with you when jumping of/from carrier type objects

- Clones now face the same angle the player is facing when they're carried

- Clones spawn afterimages when the player has the speed shoes power-up and sparkles when the player has invincibility power-up

- Clones die in pit

Character Specific Updates

- Amy clones will continue aerial hammer attack after hitting an object in mid-air

- Fixed issue with Tails bot player having its own table for clones

- Fang clones no longer able to bounce when original has stopped bouncing

Level Interaction & Mapping Stuff

- Clone breaking FOF floor implemented, fixed an incorrectly placed variable and made it so that Fang and amy can break FOF floors that they're on top of (same should apply to ceilings if gravity is reversed)

- Due to how the table of clones was setup, if you had one clone missing and an incomplete table (not having all 4 entries filled),
then if you were to break two cherry monitors at once, an error will occur and only one clone is spawned after breaking the two monitors.

- Shatter/Bustable FOF blocks that are linked to a trigger linedef executor works with clones now.

- Additional mapping features added in order to have the clones trigger effects that only the player could trigger.

1) Credits to #scripting channel peeps on Discord, for helping with the following:
- operation tips (Tatsuru)
- bitwise operation explanation (Monster Iestyn)
- solving the sprite error issue with Amy and Fang's abilities, by explaining how certain player variables related to the
player's state (like anim_duration, tics, etc.) work (Monster Ieystyn and... I forgot the rest I'm sorry ;_; )
- assigning MF_PUSHABLE flag to copies to trigger a specific linedef executor (Zipper)
- appropriate setup for storing multiple player clones in a table (Zipper, Golden, LJ Sonic, Kayasako)

2) Credit to Zolton for the double cherry monitor sprites
 

Attachments

  • srb20002.png
    srb20002.png
    63.4 KB · Views: 106
  • TVCH example.png
    TVCH example.png
    14.1 KB · Views: 5,986
  • L_DoubleCherry(play)-v2.1.pk3
    11.7 KB · Views: 2,445
  • L_DoubleCherry(editor)-v2.1.zip
    14.6 KB · Views: 822
Last edited:

Inazuma

Go on, I dare you!
Judge
This addon is honestly ridiculously awesome. I'm intrigued as to how mappers can utilize this fascinating gimmick in levels. Amazing work! Welcome to Releases!
 

little guy*

A guy who loves Adventures!
srb20455.gif
Time to release all hell on badniks and eggman

Other than glitching it with SMS, I really enjoyed this mod. It's nice to finally get to build a Sonic empire
 
Last edited:

So2ro

Member
attachment.php

Me and the boys coming to beat you up



All jokes aside i really like this mod, wished there was a way to increase the max clone cap tho
 

Attachments

  • srb20260.gif
    srb20260.gif
    2.1 MB · Views: 4,662

MK.exe

The one and only!
Kart Krew™️
Already getting LOZ 4 seasons vibes. I wonder if the clones can trigger sector effects....
 

LuxisLand

Probably dead.
When you have 2 clones, reminds me sonic heroes, and i would love a 2.2 mod of Sonic heroes... this is the closest thing we have to a mod of sonic heroes.
 

WellDoneSnake

Formerly "TSDude"
Heyo, glad that you all are enjoying this mod. I want to put an update out that fixes a few issues that I didn't spot earlier such as the Tails bot (from the Sonic & Tails character selection) causing an error to appear and the lack of z-momentum applied to the clones when jumping off/from carrying objects (objects that carry you like ropes, etc.).

If anyone finds an issue in-game (mainly with the vanilla characters) then it'd be much appreciated if you help point it out, that way I won't have to spam updates like I usually do.
 

SD2CSemiFinalVersion

Kid or Squid? :shrug:
This is a really amazing mod!

It's neat that it actually works perfectly in netplay! Not once in the short amount of time that I was hosting did I experience a SIGSEV or a synch failiure because of the clones. It's pretty neat!
 

JakeLeB

Now with 25% more fat
3) Lastly this mod only supports the vanilla characters (Sonic, Tails, Knuckles, Amy, Fang and Metal Sonic), I may work on adding support for non-vanilla characters in the future.
attachment.php

Me and the boys coming to beat you up



All jokes aside i really like this mod, wished there was a way to increase the max clone cap tho

🤔 hmmmmmmmm...
 

WellDoneSnake

Formerly "TSDude"
Responding...

Other than glitching it with SMS, I really enjoyed this mod. It's nice to finally get to build a Sonic empire
Yeah at the moment, custom characters aren't fully supported. I mainly scripted this for the main characters of srb2.

I wonder if the clones can trigger sector effects....
Funny that you asked that, while working on these bugs in particular:

fW0wg8f.gif
hIm3AJk.gif

3CarM3H.gif
UJk8K7S.gif

I realised that it might be possible to make these clones trigger other types of linedef specials (those that are not limited to pushable objects). Although the idea I have in mind doesn't actually make them react with a sector special the same way the player does, it's a little hacky.

suggestion: command that allows infinite bots
Mainly left it at 4 clones being the max that you can have so that it'd be easier for players to keep track of them. If I add more then I think I'd have to mess with the camera too to help with keeping an eye on them (which I kinda want to avoid haha).

&#55358;&#56596; hmmmmmmmm...
I will rephrase what I mentioned in the first post lol, they weren't made to support custom characters so it's a use at your own risk kind of situation

I may or may not update this today, MK's post triggered my curiosity, I wanna see how far I can push these clones.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Top