SRB2 Message Board

SRB2 Message Board (https://mb.srb2.org/index.php)
-   Resources (https://mb.srb2.org/forumdisplay.php?f=126)
-   -   Double Cherry Monitors [v2.1] (https://mb.srb2.org/showthread.php?t=47948)

WellDoneSnake 06-27-2020 04:00 AM

Double Cherry Monitors [v2.1]
 
4 Attachment(s)
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

https://mb.srb2.org/attachment.php?a...1&d=1593230303

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.

https://i.imgur.com/grqK8OM.gif https://i.imgur.com/gHmAvs2.gif https://i.imgur.com/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.


https://i.imgur.com/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:
Spoiler: Changelog v2.1
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.


Spoiler: Credits
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

Inazuma 06-27-2020 04:19 AM

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!

WellDoneSnake 06-27-2020 04:23 AM

Quote:

Originally Posted by Inazuma (Post 826693)
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!

Woah, thanks! I was honestly expecting a post about bugs I missed lol

little guy* 06-27-2020 05:38 AM

https://cdn.discordapp.com/attachmen...8/srb20455.gifTime 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

So2ro 06-27-2020 08:46 AM

1 Attachment(s)
https://mb.srb2.org/attachment.php?a...1&d=1593247297
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

MK.exe 06-27-2020 09:49 AM

Already getting LOZ 4 seasons vibes. I wonder if the clones can trigger sector effects....

LuxisLand 06-27-2020 12:10 PM

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.

MADVAL2 06-27-2020 03:22 PM

Quote:

Originally Posted by So2ro (Post 826700)
https://mb.srb2.org/attachment.php?a...1&d=1593247297
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

It's a dead meme

Icarus 06-27-2020 04:29 PM

Quote:

Originally Posted by MK.exe (Post 826703)
Already getting LOZ 4 seasons vibes. I wonder if the clones can trigger sector effects....

You meant Four Swords/Adventure right?




Also this was one of the best power-up in any Mario game.

Jonster 06-27-2020 04:51 PM

Hedgehog army, ATTAAAAAACK!!!

Mari0XS0nicGamer 06-27-2020 04:54 PM

Holy sh** this mod is amazing!

InjuringData663 06-27-2020 05:32 PM

Ah yes
Now that this exists...


I CAN FINALLY HAVE A FANG GANG REVIVAL!!

WellDoneSnake 06-27-2020 05:47 PM

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 06-27-2020 05:52 PM

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!

Trevor 06-27-2020 06:01 PM

Quote:

Originally Posted by madval2 (Post 826732)
it's a dead meme

howwwwwwwwwww dare youuuuuuuuuuuuuuuuuu bully mah boi

Gameobatts 06-27-2020 06:03 PM

this is way too much fun for a simple 3d world fan like me
suggestion: command that allows infinite bots
https://media.discordapp.net/attachm...896&height=560

Wayzy 06-27-2020 07:07 PM

all i have to say is

run sonic.

TehPuertoRicanSpartan 06-28-2020 04:52 AM

Wow-nic, it's a double Sonic exonic!

I'm sorry, I have to

JakeLeB 06-28-2020 01:40 PM

Quote:

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.
Quote:

Originally Posted by So2ro (Post 826700)
https://mb.srb2.org/attachment.php?a...1&d=1593247297
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 06-30-2020 03:55 PM

Responding...
 
Quote:

Originally Posted by little guy* (Post 826697)
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.

Quote:

Originally Posted by MK.exe (Post 826703)
I wonder if the clones can trigger sector effects....

Funny that you asked that, while working on these bugs in particular:



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.

Quote:

Originally Posted by Gameobatts (Post 826762)
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).

Quote:

Originally Posted by JakeLeB (Post 826850)
�� 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.


All times are GMT. The time now is 07:04 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.