Modding Discussion A place to discuss map editing and other related stuff

Discussion in 'Mods' started by QuantumConcious, Apr 1, 2016.

Thread Status:
Not open for further replies.
  1. Advize

    Advize Cosmic Narwhal

    Yes, check your messages. If xTile and Xna Framework are added as references to your project it'll offer potential solutions and add the necessary lines. If not, you need to add them as references (I sent them to you earlier so I know you have them).
     
      Jinxiewinxie likes this.
    • Advize

      Advize Cosmic Narwhal

      Ah, I see the problem in my code. I made a super simple mistake, going to try the corrected version and will update my post if it works.

      Edit: Fixed it. Previous post has been edited.
       
        Jinxiewinxie and BoffoBoy like this.
      • BoffoBoy

        BoffoBoy Existential Complex

        Actually advize is it possible to kegs to get modded so they turn a shade green or purple when active? something so that people can see if they missed a keg easily just scanning quickly.

        I've been told the active keg animation is custom locked in exe.


        Ok well I'm about asleep, I posted before on suggestions asking for APE to add an Always Back layer to the game so we can stack things easier. Feel free to show the post some love =)

        Good night

        http://community.playstarbound.com/threads/always-back.112390/
         
          Last edited: Apr 2, 2016
        • Jinxiewinxie

          Jinxiewinxie Farmer Fashionista

          Where do I sign up to have Advize's babies? Here's the Custom Action Tile Property that Advize put together in action:

          [​IMG]

          My tile uses a custom property and then I was also able to customize the dialogue as you can see in the .gif.
           
          • Advize

            Advize Cosmic Narwhal

            I literally just saw someone say in the modding irc channel "still works well, but it's just annoying that you can't tint sprites without direct pixel manipulation". So to answer your question, yes, but I don't personally know how and it sounds performance intensive and annoying to implement.
             
            • BoffoBoy

              BoffoBoy Existential Complex

              ahh ok, am half asleep just something I originally wanted hehe
               
              • Advize

                Advize Cosmic Narwhal

                Updated code for custom Action tile properties (now with gamepad support):

                Code:
                public override void Entry(params object[] objects)
                {
                    ControlEvents.MouseChanged += Events_MouseChanged;
                    ControlEvents.ControllerButtonPressed += Events_ControllerButtonPressed;
                }
                
                static void Events_ControllerButtonPressed(object sender, EventArgsControllerButtonPressed e)
                {
                    if (!Game1.hasLoadedGame) return;
                    if(e.ButtonPressed == Buttons.A)
                    {
                        CheckForAction();
                    }
                }
                
                static void Events_MouseChanged(object sender, EventArgsMouseStateChanged e)
                {
                    if (!Game1.hasLoadedGame) return;
                    if (e.NewState.RightButton == ButtonState.Pressed && e.PriorState.RightButton != ButtonState.Pressed)
                    {
                        CheckForAction();
                    }
                }
                
                static void CheckForAction()
                {
                    if (!Game1.player.UsingTool && !Game1.pickingTool && !Game1.menuUp && (!Game1.eventUp || Game1.currentLocation.currentEvent.playerControlSequence) && !Game1.nameSelectUp && Game1.numberOfSelectedItems == -1 && !Game1.fadeToBlack)
                    {
                        Vector2 grabTile = new Vector2((float)(Game1.getOldMouseX() + Game1.viewport.X), (float)(Game1.getOldMouseY() + Game1.viewport.Y)) / (float)Game1.tileSize;
                        if (!Utility.tileWithinRadiusOfPlayer((int)grabTile.X, (int)grabTile.Y, 1, Game1.player))
                        {
                            grabTile = Game1.player.GetGrabTile();
                        }
                        xTile.Tiles.Tile tile = Game1.currentLocation.map.GetLayer("Buildings").PickTile(new xTile.Dimensions.Location((int)grabTile.X * Game1.tileSize, (int)grabTile.Y * Game1.tileSize), Game1.viewport.Size);
                        xTile.ObjectModel.PropertyValue propertyValue = null;
                        if (tile != null)
                        {
                            tile.Properties.TryGetValue("Action", out propertyValue);
                        }
                        if (propertyValue != null)
                        {
                            if (propertyValue == "CustomPropertyHere") //Change this to your Action property
                            {
                                //Insert code to execute when this tile is activated
                            }
                        }
                    }
                }
                
                Edit: Minor updates, mostly quality of life adjustment for Gamepad users.
                 
                  Last edited: Apr 2, 2016
                • QuantumConcious

                  QuantumConcious Phantasmal Quasar

                  I would love to add this stuff to the Main post but i am unsure were to start Maybe just add a spoiler tag with Codes by advize. LOL
                   
                    Advize and Jinxiewinxie like this.
                  • QuantumConcious

                    QuantumConcious Phantasmal Quasar

                    We need a video of how to use tIDE for Stardew Valley. Like how to load a map how to add TileSheets how to select a set of tile instead of just one at a time, Tile/map properties ect ect.My net is to slow to upload video or i would do it myself.

                    We all know how to select a group of tile instead of just one yeah. You click the little pyramid thing at the bottom left it is called View tiles in order of thier scource image configuration, Then just select and drag a box around them
                     
                      Last edited: Apr 2, 2016
                    • Jinxiewinxie

                      Jinxiewinxie Farmer Fashionista

                      Hmmmm, it might be something I could work on after I get some sleep later.
                       
                      • taintedwheat

                        taintedwheat Master Astronaut

                        I was chatting with boffoboy about this, but how about someone screw around/mod with the slime hutch as most people don't even if want to raise slimes [by reskining the building to look like a workstation/crafting room instead] or maybe lay it out where slimes are less likely to attack you [or both]
                         
                          QuantumConcious likes this.
                        • QuantumConcious

                          QuantumConcious Phantasmal Quasar

                          I might look into that i may have to only extend it to the right and add fence and gate if possible so you have a buffer to the slime, Plus i was thinking of using it to add the slime cave to my basement mod. So i could have the basement part oto the the botom right out of view and just extend the normal hutch to the right. That way the same file can be used for a hutch upgrade and my FarmHousebasement mod.

                          Changing the map for the hutch in the downward position might pose a problem like the Greenhouse and where the enter and exit point is, but i do believe it may be dynamic as you can place it anywere. But again the hardcoded script for it might still reference the xy tile the entrance is currently in.
                           
                            Last edited: Apr 2, 2016
                            BoffoBoy and taintedwheat like this.
                          • taintedwheat

                            taintedwheat Master Astronaut

                            Oh ok, yeah, whatever is clever -for the basement sounds also cute. They don't need water if they're not in the hutch right?

                            Just the vanilla layout sucks if your hella far in the game but not in combat x.x

                            But what is the point of slimes?
                             
                            • QuantumConcious

                              QuantumConcious Phantasmal Quasar

                              Unsure what the slime is actually used for apart from slime. But we have them and some people find them cute

                              Update:
                              I have extended the Slime Hutch by 2x the length and am able to bread slimes in the whole thing I have also added a wall barrier as you walk in the door. I added a no go zone for npc and you can stand in the entrance and they can not enter it. When they try to they just bounce of as if it was a wall, so now slimes can not get to you till you choose to go in and deal with them. :)


                               
                                Last edited: Apr 2, 2016
                              • taintedwheat

                                taintedwheat Master Astronaut

                                What really?! Omg that's sick!!!!

                                That will definitely allow me to keep it filled up instead of keeping it at only 5 slimes and killing any other ones that try to get at me x_x
                                 
                                • BoffoBoy

                                  BoffoBoy Existential Complex

                                  Sleep helps...

                                  I understand Ambient light now...

                                  Code:
                                  AmbientLight | Red Green Blue
                                  
                                  Where values for color intensity are inverted
                                  That means something like AmbientLight 400 400 30 gives you an intense Blue Light.
                                  https://gyazo.com/03f059bfb4f2ad142ea2e5f2127d16f9

                                  For White Light
                                  30 30 30 Gives you a very bright white light uniform over the map
                                  60 60 60 Gives you a more manageable white light uniform over the map
                                  90 90 90 Gives you a subdued white light that casts minor shadowing. This setting gives the map a much more lived in look without the need to place light pathing. Actually not sure what is going on, when I first enter an area light effects are noticeable (e.g. glow ring glows) but if I warp to another location of the map and come back, light is uniform.

                                  To be honest, not sure if this is just an artifact encountered only with my crazy physics bending mods but there's other warps within a building (e.g. Wizard's House and Basement), so it's a bug none the less.

                                  Bottom line I guess, if you want nice bright light go 60 60 60 else 90 90 90 for a more subdued cast, 30 30 30 is a bit too intense.







                                  On another matter, is there a way to delete custom tile properties without running into this if you just try and delete the entries?
                                  https://gyazo.com/4435595bcdbe1c3018ae08413e4ba0e2


                                   
                                    Last edited: Apr 3, 2016
                                    QuantumConcious and Jinxiewinxie like this.
                                  • Jinxiewinxie

                                    Jinxiewinxie Farmer Fashionista

                                    tIDE didn't like me working in the right hand field without first typing something into the left hand field. Maybe it was the way you cleared the fields?
                                     
                                    • BoffoBoy

                                      BoffoBoy Existential Complex

                                      If you spam the action over and over again eventually tIDE gives up and the custom line is no more.....
                                       
                                      • 7H3LaughingMan

                                        7H3LaughingMan Void-Bound Voyager

                                        Left-click on the box that is to the left of the Property Name and it should highlight the entire row. Press the delete key.
                                         
                                          barfyscorpion and BoffoBoy like this.
                                        • BoffoBoy

                                          BoffoBoy Existential Complex

                                          LOL the invisible boxes you are referring to I never saw?

                                          If I push my face up to the monitor and squint I can see the faint grey boxes...


                                          Thank you so much sir.
                                           
                                          Thread Status:
                                          Not open for further replies.

                                          Share This Page