[SPOILER ]Can I see your cursed stardew images please

SomeoneEls

Sodbuster
And if this still technically isnt quite stardew valley it is still part of the game so...
This code. I hate it.

C#:
private void randomWarpEvent(object obj)
{
    while(Game1.player.IsBusyDoingSomething())
    {

    }
    try
    {
        int loc = new Random().Next(0, 32);

        //finds a valid location
        while (loc == 15 || (loc >= 17 && loc <= 21) || (loc >= 25 && loc <= 30))
        {
            loc = new Random().Next(0, 32);
        }

        GameLocation locat = Game1.locations.ElementAt(loc);
        Vector2 vect;
        GameLocation playerLocat = Game1.player.currentLocation;
        Vector2 playerVect = Game1.player.Tile;
 
        try
        {
            
            //Looks at the diagonal left half of the map for an empty tile.
            for (int y = 1; true; y++)
            {
                for (int x = 1; x<y; x++)
                {
                    Vector2 buf = new Vector2(x, y);
                    if (!locat.IsTileBlockedBy(buf))
                    {
                        vect = buf;

                        
                        int r = new Random().Next(0, 64);
                        if (r==3)
                        {
                            // I ****ing hate using goto here as goto sucks but its better than trying to create a complex break system that works with vector2 buf, as buf cannot be null.
                            goto randomWarpEvent_outOfLoop;
                        }
                        
                    }
                }
            }

        }
        catch (Exception e)
        {
            //keep doing it until it works, since using goto causes issues. This is pretty cursed though. I'm sorry for my crimes.
            
            if (GC.GetTotalMemory(false)> 1073741824)
            {
                //This doesnt really need to be here, but just in case you are SUPER unlucky and this loop goes on for far too long, no crash will happen.
                // In reality, if this executes there is something very wrong. (ie, there is more than a GB of memory that is being used?!?!)
                Console.WriteLine("Chaosaddon: Random warp failed due to lack of memory (OVER 1 GB OF MEMORY USED)");
                return;
            }
            randomWarpEvent(obj);
            return;
        }

    randomWarpEvent_outOfLoop:
        Game1.warpFarmer(locat.Name, (int)vect.X, (int)vect.Y, false);
        Thread.Sleep(15000);

        //if the integer cast made the current tile blocked
        if (playerLocat.IsTileBlockedBy(new Vector2((int)playerVect.X, (int)playerVect.Y)))
        {

            Game1.warpHome();
        }
        else
        {
            Game1.warpFarmer(playerLocat.Name, (int)playerVect.X, (int)playerVect.Y, false);
        }




    }
    catch(Exception e)
    {

    }
}
 
Please don’t disrespect the Pope. I’m Catholic and it was a big loss he was such a great Pope.
Huh? That was certainly not my intent. I agree he was a fantastic pope. I'm not even religious, but will miss him. He was far more grounded and sensible than his predecessors. Spoke of peace and solidarity with the poor all the time, which came from his background I think.
 

zack123

Sodbuster
And if this still technically isnt quite stardew valley it is still part of the game so...
This code. I hate it.

C#:
private void randomWarpEvent(object obj)
{
    while(Game1.player.IsBusyDoingSomething())
    {

    }
    try
    {
        int loc = new Random().Next(0, 32);

        //finds a valid location
        while (loc == 15 || (loc >= 17 && loc <= 21) || (loc >= 25 && loc <= 30))
        {
            loc = new Random().Next(0, 32);
        }

        GameLocation locat = Game1.locations.ElementAt(loc);
        Vector2 vect;
        GameLocation playerLocat = Game1.player.currentLocation;
        Vector2 playerVect = Game1.player.Tile;

        try
        {
           
            //Looks at the diagonal left half of the map for an empty tile.
            for (int y = 1; true; y++)
            {
                for (int x = 1; x<y; x++)
                {
                    Vector2 buf = new Vector2(x, y);
                    if (!locat.IsTileBlockedBy(buf))
                    {
                        vect = buf;

                       
                        int r = new Random().Next(0, 64);
                        if (r==3)
                        {
                            // I ****ing hate using goto here as goto sucks but its better than trying to create a complex break system that works with vector2 buf, as buf cannot be null.
                            goto randomWarpEvent_outOfLoop;
                        }
                       
                    }
                }
            }

        }
        catch (Exception e)
        {
            //keep doing it until it works, since using goto causes issues. This is pretty cursed though. I'm sorry for my crimes.
           
            if (GC.GetTotalMemory(false)> 1073741824)
            {
                //This doesnt really need to be here, but just in case you are SUPER unlucky and this loop goes on for far too long, no crash will happen.
                // In reality, if this executes there is something very wrong. (ie, there is more than a GB of memory that is being used?!?!)
                Console.WriteLine("Chaosaddon: Random warp failed due to lack of memory (OVER 1 GB OF MEMORY USED)");
                return;
            }
            randomWarpEvent(obj);
            return;
        }

    randomWarpEvent_outOfLoop:
        Game1.warpFarmer(locat.Name, (int)vect.X, (int)vect.Y, false);
        Thread.Sleep(15000);

        //if the integer cast made the current tile blocked
        if (playerLocat.IsTileBlockedBy(new Vector2((int)playerVect.X, (int)playerVect.Y)))
        {

            Game1.warpHome();
        }
        else
        {
            Game1.warpFarmer(playerLocat.Name, (int)playerVect.X, (int)playerVect.Y, false);
        }




    }
    catch(Exception e)
    {

    }
}
What does this code do??????
Curious
 

DOBITEUS

Planter
And if this still technically isnt quite stardew valley it is still part of the game so...
This code. I hate it.

C#:
private void randomWarpEvent(object obj)
{
    while(Game1.player.IsBusyDoingSomething())
    {

    }
    try
    {
        int loc = new Random().Next(0, 32);

        //finds a valid location
        while (loc == 15 || (loc >= 17 && loc <= 21) || (loc >= 25 && loc <= 30))
        {
            loc = new Random().Next(0, 32);
        }

        GameLocation locat = Game1.locations.ElementAt(loc);
        Vector2 vect;
        GameLocation playerLocat = Game1.player.currentLocation;
        Vector2 playerVect = Game1.player.Tile;

        try
        {
           
            //Looks at the diagonal left half of the map for an empty tile.
            for (int y = 1; true; y++)
            {
                for (int x = 1; x<y; x++)
                {
                    Vector2 buf = new Vector2(x, y);
                    if (!locat.IsTileBlockedBy(buf))
                    {
                        vect = buf;

                       
                        int r = new Random().Next(0, 64);
                        if (r==3)
                        {
                            // I ****ing hate using goto here as goto sucks but its better than trying to create a complex break system that works with vector2 buf, as buf cannot be null.
                            goto randomWarpEvent_outOfLoop;
                        }
                       
                    }
                }
            }

        }
        catch (Exception e)
        {
            //keep doing it until it works, since using goto causes issues. This is pretty cursed though. I'm sorry for my crimes.
           
            if (GC.GetTotalMemory(false)> 1073741824)
            {
                //This doesnt really need to be here, but just in case you are SUPER unlucky and this loop goes on for far too long, no crash will happen.
                // In reality, if this executes there is something very wrong. (ie, there is more than a GB of memory that is being used?!?!)
                Console.WriteLine("Chaosaddon: Random warp failed due to lack of memory (OVER 1 GB OF MEMORY USED)");
                return;
            }
            randomWarpEvent(obj);
            return;
        }

    randomWarpEvent_outOfLoop:
        Game1.warpFarmer(locat.Name, (int)vect.X, (int)vect.Y, false);
        Thread.Sleep(15000);

        //if the integer cast made the current tile blocked
        if (playerLocat.IsTileBlockedBy(new Vector2((int)playerVect.X, (int)playerVect.Y)))
        {

            Game1.warpHome();
        }
        else
        {
            Game1.warpFarmer(playerLocat.Name, (int)playerVect.X, (int)playerVect.Y, false);
        }




    }
    catch(Exception e)
    {

    }
}
What's the purpose of having that first while empty? 🤔 In my poor logic, I get that does nothing until the player "it's free" and then enters the try-catch statement, but it couldn't be replaced with a negative conditional or something? Can an AI find an alternative to not use the goto? 😅
 
And if this still technically isnt quite stardew valley it is still part of the game so...
This code. I hate it.

C#:
private void randomWarpEvent(object obj)
{
    while(Game1.player.IsBusyDoingSomething())
    {

    }
    try
    {
        int loc = new Random().Next(0, 32);

        //finds a valid location
        while (loc == 15 || (loc >= 17 && loc <= 21) || (loc >= 25 && loc <= 30))
        {
            loc = new Random().Next(0, 32);
        }

        GameLocation locat = Game1.locations.ElementAt(loc);
        Vector2 vect;
        GameLocation playerLocat = Game1.player.currentLocation;
        Vector2 playerVect = Game1.player.Tile;

        try
        {
           
            //Looks at the diagonal left half of the map for an empty tile.
            for (int y = 1; true; y++)
            {
                for (int x = 1; x<y; x++)
                {
                    Vector2 buf = new Vector2(x, y);
                    if (!locat.IsTileBlockedBy(buf))
                    {
                        vect = buf;

                       
                        int r = new Random().Next(0, 64);
                        if (r==3)
                        {
                            // I ****ing hate using goto here as goto sucks but its better than trying to create a complex break system that works with vector2 buf, as buf cannot be null.
                            goto randomWarpEvent_outOfLoop;
                        }
                       
                    }
                }
            }

        }
        catch (Exception e)
        {
            //keep doing it until it works, since using goto causes issues. This is pretty cursed though. I'm sorry for my crimes.
           
            if (GC.GetTotalMemory(false)> 1073741824)
            {
                //This doesnt really need to be here, but just in case you are SUPER unlucky and this loop goes on for far too long, no crash will happen.
                // In reality, if this executes there is something very wrong. (ie, there is more than a GB of memory that is being used?!?!)
                Console.WriteLine("Chaosaddon: Random warp failed due to lack of memory (OVER 1 GB OF MEMORY USED)");
                return;
            }
            randomWarpEvent(obj);
            return;
        }

    randomWarpEvent_outOfLoop:
        Game1.warpFarmer(locat.Name, (int)vect.X, (int)vect.Y, false);
        Thread.Sleep(15000);

        //if the integer cast made the current tile blocked
        if (playerLocat.IsTileBlockedBy(new Vector2((int)playerVect.X, (int)playerVect.Y)))
        {

            Game1.warpHome();
        }
        else
        {
            Game1.warpFarmer(playerLocat.Name, (int)playerVect.X, (int)playerVect.Y, false);
        }




    }
    catch(Exception e)
    {

    }
}
what does this do??? I don’t speak C# 😭
 

SomeoneEls

Sodbuster
And if this still technically isnt quite stardew valley it is still part of the game so...
This code. I hate it.

C#:
private void randomWarpEvent(object obj)
{
    while(Game1.player.IsBusyDoingSomething())
    {

    }
    try
    {
        int loc = new Random().Next(0, 32);

        //finds a valid location
        while (loc == 15 || (loc >= 17 && loc <= 21) || (loc >= 25 && loc <= 30))
        {
            loc = new Random().Next(0, 32);
        }

        GameLocation locat = Game1.locations.ElementAt(loc);
        Vector2 vect;
        GameLocation playerLocat = Game1.player.currentLocation;
        Vector2 playerVect = Game1.player.Tile;

        try
        {
         
            //Looks at the diagonal left half of the map for an empty tile.
            for (int y = 1; true; y++)
            {
                for (int x = 1; x<y; x++)
                {
                    Vector2 buf = new Vector2(x, y);
                    if (!locat.IsTileBlockedBy(buf))
                    {
                        vect = buf;

                     
                        int r = new Random().Next(0, 64);
                        if (r==3)
                        {
                            // I ****ing hate using goto here as goto sucks but its better than trying to create a complex break system that works with vector2 buf, as buf cannot be null.
                            goto randomWarpEvent_outOfLoop;
                        }
                     
                    }
                }
            }

        }
        catch (Exception e)
        {
            //keep doing it until it works, since using goto causes issues. This is pretty cursed though. I'm sorry for my crimes.
         
            if (GC.GetTotalMemory(false)> 1073741824)
            {
                //This doesnt really need to be here, but just in case you are SUPER unlucky and this loop goes on for far too long, no crash will happen.
                // In reality, if this executes there is something very wrong. (ie, there is more than a GB of memory that is being used?!?!)
                Console.WriteLine("Chaosaddon: Random warp failed due to lack of memory (OVER 1 GB OF MEMORY USED)");
                return;
            }
            randomWarpEvent(obj);
            return;
        }

    randomWarpEvent_outOfLoop:
        Game1.warpFarmer(locat.Name, (int)vect.X, (int)vect.Y, false);
        Thread.Sleep(15000);

        //if the integer cast made the current tile blocked
        if (playerLocat.IsTileBlockedBy(new Vector2((int)playerVect.X, (int)playerVect.Y)))
        {

            Game1.warpHome();
        }
        else
        {
            Game1.warpFarmer(playerLocat.Name, (int)playerVect.X, (int)playerVect.Y, false);
        }




    }
    catch(Exception e)
    {

    }
}
So, basically, this code warps you somewhere random as part of an event, then warps you back.

1. Waits untill the player is doing nothing (like not in a dialouge box or smthn)
2. Picks a random location.
3. Looks at the left diagonal half of the map for an empty tile, then does a random check if that tile will be used. If not, keep going. (this makes it so you warp at a random place at the map)
4. Catch statement. If the game tried to acess an invalid tile (a tile outside of the map), this runs the whole cycle over again.
5. Warp the farmer. Wait like 3 mins or smthn
6. Go back to the tile the farmer was at before. If its blocked, (integer casting bollocks) just warp home.

This works completely fine unless you have 1 GB of memory being used in the garbage collector. If this is true, it exits early and gives an exception message.
This is because of all the recursive calls. It basically loads the GC with a.. sizable amount of data if you are unlucky. It's very rare that you would have a stack overflow issue with this but just to make sure you arent like.. running 16 mods all with memory leakage issues (which is crazy) this stops. Honestly this last part is just me overengineering this.
 
Last edited:

SomeoneEls

Sodbuster
What's the purpose of having that first while empty? 🤔 In my poor logic, I get that does nothing until the player "it's free" and then enters the try-catch statement, but it couldn't be replaced with a negative conditional or something? Can an AI find an alternative to not use the goto? 😅
1.
This whole thing has multithreading so the game is basically running while this is running. Using an if statement that returns would make it so that you would have to call the function constantly, and then have a break statment when the thing is over.
2.
uhhh maybe but well...
The problem is that you CAN do this without a goto statement, but in order to do so you would have to add like, an if statment to every single scope with a flag. That would look way worse than it is currently. Here is a simpliler example.

C#:
void doRomance(int seed)
{
    int x = 2;
    bool can = false;
    bool noCanidates = true;


    foreach (var data in Game1.characterData)
    {
        Netcode.NetBool t = new Netcode.NetBool(true);
        Netcode.NetBool f = new Netcode.NetBool(false);
        NPC n = Game1.getCharacterFromName(data.Key);
        if (n == null)
        {
            continue; //if that charcter doesnt exist
        }
        foreach (var data2 in data.Value.FriendsAndFamily) //Remove any married ppl from the pool
        {
         
            if (data2.Value == "[LocalizedText Strings\\Characters:Relative_Husband]" || data2.Value == "[LocalizedText Strings\\Characters:Relative_Wife]")
            {
                can = false;
                Assembly.GetAssembly(typeof(NPC))
                     .GetType("StardewValley.NPC")
                    .GetField("datable")
                     .SetValue(n, f);
                goto NPCoverride; //either its a goto or ANOTHER flag. It just reads better for me using goto, and the label is pretty clear on what it does.
            }
        }
     
        if ((seed % x > x / 2) && (data.Value.Age == NpcAge.Adult)) //Adults only!                                                                            //Seed mod x must be greater than the middle of all the possible values.                                                      //(not quite this in retrospect but it works)
        {
            //Seed mod x must be greater than all the possible values.
            //(not quite this in retrospect but it works)
            can = true;
            noCanidates = false;
            Assembly.GetAssembly(typeof(NPC))
            .GetType("StardewValley.NPC")
           .GetField("datable")
            .SetValue(n, t);

        }
        else
        {

            can = false;
            Assembly.GetAssembly(typeof(NPC))
                 .GetType("StardewValley.NPC")
                .GetField("datable")
                 .SetValue(n, f);
        }

    NPCoverride:
     
        data.Value.CanBeRomanced = can;

        canRomance.TryAdd(data.Key, can);
        x++;
     
    }


    if(noCanidates)
    {
        doRomance(++seed);
    }


}
This, without the goto, can be written as

C#:
void doRomance(int seed)
{
    int x = 2;
    bool can = false;
    bool noCanidates = true;
    bool newflag = true;

    foreach (var data in Game1.characterData)
    {
        Netcode.NetBool t = new Netcode.NetBool(true);
        Netcode.NetBool f = new Netcode.NetBool(false);
        NPC n = Game1.getCharacterFromName(data.Key);
        if (n == null)
        {
            continue; //if that charcter doesnt exist
        }
        foreach (var data2 in data.Value.FriendsAndFamily) //Remove any married ppl from the pool
        {
         
            if (data2.Value == "[LocalizedText Strings\\Characters:Relative_Husband]" || data2.Value == "[LocalizedText Strings\\Characters:Relative_Wife]")
            {
                can = false;
                Assembly.GetAssembly(typeof(NPC))
                     .GetType("StardewValley.NPC")
                    .GetField("datable")
                     .SetValue(n, f);
                //goto NPCoverride; //either its a goto or ANOTHER flag. It just reads better for me using goto, and the label is pretty clear on what it does.
                newflag = false;
            }
        }
     
    new flag here -->    if ((seed % x > x / 2) && (data.Value.Age == NpcAge.Adult) && newflag) //Adults only!                                                                            //Seed mod x must be greater than the middle of all the possible values.                                                      //(not quite this in retrospect but it works)
        {
            //Seed mod x must be greater than all the possible values.
            //(not quite this in retrospect but it works)
            can = true;
            noCanidates = false;
            Assembly.GetAssembly(typeof(NPC))
            .GetType("StardewValley.NPC")
           .GetField("datable")
            .SetValue(n, t);

        }
    new flag here too -->    else if (newflag)
        {

            can = false;
            Assembly.GetAssembly(typeof(NPC))
                 .GetType("StardewValley.NPC")
                .GetField("datable")
                 .SetValue(n, f);
        }

    //NPCoverride:
     
        data.Value.CanBeRomanced = can;

        canRomance.TryAdd(data.Key, can);
        x++;
     
    }


    if(noCanidates)
    {
        doRomance(++seed);
    }


}
Its a bit less readable now, but imagine doing that for every single scope. Nightmares.
(Note that you would also do a lot of juggling with trying to get vect out)
 
Last edited:

FilthyGorilla

Local Legend
I have way too many, one of my favourite things is to find bugs and glitches of which I've found hundreds (especially with new releases), and they can often lead to some really weird interactions

Screenshot (2422).png

(giant fishing bar)
Screenshot (2361).png

(a fishing minigame.... in the fish pond....)
Screenshot (2125).png

(Invisible artisan goods)
Screenshot (2354).png

(obtaining a chest from a volcano chest)


Not bugs/glitches but still a bit cursed:
Screenshot (2055).png

(one of my layouts for 1.6 which I scrapped for being far too convoluted)
Screenshot (103).png

(negative total earnings)

I have ae bunch more too, especially on my phone, so I'll see if I can find them
 

Mr. Vampire

Farmhand
I have way too many, one of my favourite things is to find bugs and glitches of which I've found hundreds (especially with new releases), and they can often lead to some really weird interactions

View attachment 30307
(giant fishing bar)
View attachment 30308
(a fishing minigame.... in the fish pond....)
View attachment 30309
(Invisible artisan goods)
View attachment 30310
(obtaining a chest from a volcano chest)


Not bugs/glitches but still a bit cursed:
View attachment 30311
(one of my layouts for 1.6 which I scrapped for being far too convoluted)
View attachment 30313
(negative total earnings)

I have ae bunch more too, especially on my phone, so I'll see if I can find them
How'd you get that giant fishing bar? The biggest I would think possible is only with the buffs from desert festival, a gold star seafoam pudding, 2 cork bobbers and deluxe bait, but I don't think that would be that big
 

stardew_luv

Farmer
I play mobile so there are literally thousands of funny things I could post here. Especially when you save in mid day and come back to everyone walking through walls and cliffs and out of bounds or getting stuck somewhere like stranded overnight on Ginger island. Mobile is truly its own unique version of Stardew valley. Ape tried to improve it some but while some things got better others got far crazier. It was a messy muddle that should honestly never have been but without it I couldn’t play at all so I’m grateful it’s there. But Stardew was never EVER meant to be played mobile lol. You mobile players totally get it I’m sure.
 

Albusaur

Sodbuster
I have way too many, one of my favourite things is to find bugs and glitches of which I've found hundreds (especially with new releases), and they can often lead to some really weird interactions

View attachment 30307
(giant fishing bar)
View attachment 30308
(a fishing minigame.... in the fish pond....)
View attachment 30309
(Invisible artisan goods)
View attachment 30310
(obtaining a chest from a volcano chest)


Not bugs/glitches but still a bit cursed:
View attachment 30311
(one of my layouts for 1.6 which I scrapped for being far too convoluted)
View attachment 30313
(negative total earnings)

I have ae bunch more too, especially on my phone, so I'll see if I can find them
Very Crazy
 
Also feel free to tell how you got yours!
If this thread gets 2 pages then I will explain how mine is vanilla sdv.
Unless, of course, somebody guesses it and says how.
Ya got two pages now!🤣

I play mobile so there are literally thousands of funny things I could post here. Especially when you save in mid day and come back to everyone walking through walls and cliffs and out of bounds or getting stuck somewhere like stranded overnight on Ginger island. Mobile is truly its own unique version of Stardew valley. Ape tried to improve it some but while some things got better others got far crazier. It was a messy muddle that should honestly never have been but without it I couldn’t play at all so I’m grateful it’s there. But Stardew was never EVER meant to be played mobile lol. You mobile players totally get it I’m sure.
I play mobile, console, and computer

HereView attachment 30207i got four petrified slime from one slime ball (slime hutch if any of ya didn't know)
Dunno if it's supposed to happen
 
Top