Jump to content

ZigTheHedge

Vintarian
  • Posts

    275
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by ZigTheHedge

  1. Hey, fellow players!

    Here's the mod which adds machines and coins for server offline trading!

    tradeorug.thumb.jpg.ee6799a601f0d0cdf44249268b7beb49.jpg

    Vending machine variant:

    tradeomat.png.c1d7b364733669310ca960cad6e73058.png

    Market stall variant:

    tradeobox.thumb.png.c3c2bf3b069f132445b0fa4958edd190.png

    Trade'o'rug (allows to sale five different items "as-is" for a difference prices - so it's possible to sell food for example):

    tradeorug-1.jpg.5d56c1de1f82ac8188ddf16c2df63a39.jpg

     

    These blocks are used for trading of course! The owner (player who has placed the block down) is able to set the trade (sneak-click):

    owner.png.f93d5253837e14c4a902a32d97097418.png

     

    Here Trade'o'mat expects to exchange 4 cattail roots for 1 sack of carrot seeds. And stock is filled for 12 deals. When the potential buyer opens interface, he sees the following:

    customer.png.af395d4442a3df1f9ea91a2808f3451b.png

    Just place required price to the left slot and push "Deal!" button to make a trade.

    And here are the coins to use with my Trade'o'mats and just for exchange between players.

    2021-01-09_15-04-24.thumb.png.1af453608f359de591b6f17cb300738e.png

     

    Video Tutorials (English and Deutsch) courtesy of Julius van Vern:

    Spoiler

     

    Changelogs and downloads have been moved to MODDB!

    https://mods.vintagestory.at/show/mod/59

     

    Spoiler

    1.5.5:

    - Disallow hotkeys usage when hovering mouse over an item in tradeomats (thanks, @Hexedian)

    1.5.4-B:

    - Fixed crash when trying to buy already bought product (in trade'o'rug)

    - Fixed crash when leaving "price" field empty (in trade'o'rug)

    1.5.2-B:

    - Added config options to disable various mod content.

    1.5.1-B:

    - Fixed Admin-shop crash on dedicated server.

    1.5.0-B:

    - Added "creative" variant for tradeomats (not trade'o'rug!). To set tradeomat to "creative mode", player with "gamemode" privilege have to check "Creative shop" tick in Owner GUI.

    1.4.9-B:

    - Fixed crash in multiplayer when trying to purchase something from Trade'o'mats type 1 and 2.

    - Fixed stacks merging in existing slots.

    1.4.8-B:

    - Fixed prices display on various GUI scale

    - Fixed crash when trying to pick up Tradeomat with installed CarryCapacity

    - Fixed shift-click behavior

    1.4.7-B:

    - Added third Trade'o'mat version (named Trade'o'Rug), which allows to sell exact items (or the whole stack) for the defined price. First of all it can be used to sell such items as weapons, tools and food

    - Added "Deal!" check-out sound :)

    1.4.4-B:

    - Fixed ability to trade items with temperature (wow, that was hard to catch)

    - Fixed memory leak

    - Added three coin variants: Copper, Silver, Gold. Coins are smelted from corresponding metals using clay mold (4 coins per 100 units of metal). They also reverse-smeltable. Coins can also be placed on solid ground.

    1.3.4B:

    - Fixed snow layer on open crate

    - Fixed open crates with items rendered empty on world load.

    - Added Brazilian-Portuguese translation (thanks @xCoiotex)

    1.31B:

    - Fixed claim behavior (now players can use tradeomats inside claimed areas)

    - Fixed Crate server sync

    1.3B:

    - Added second variation of Trade'o'mat! This variant renders it's contents inside! (dedicated server testing needed!)

    1.21B:

    - Added configurable limit of allowed Trade'o'mats per player. (You can find the TradeomatConfig.json file on ModConfig folder of your VintagestoryData).

    - Now players can use Trade'o'mats inside claims.

    1.12B:

    - Fixed incorrect side config for the upper Trade'o'mat part.

    - Now owner's name displayed on top popup.

    1.1B:

    - Completely rewrote synchronization code. Hopefully it will solve sync issues.

    1.0B:

    - Fixed client crash when trying to make a deal without configuring the Trade'o'mat first.

    - Fixed client crash when performing the last deal possible before selling out.

    - Fixed wrong attributes in purchased item.

    - Added "Block Help" tooltip for Trade'o'mat.

    Older versions:

    1.13.4 (no longer maintained):

    tradeomat_v1.13.4-1.31B.zip

    1.14.0+:

    tradeomat_v1.14.0-1.5.5.zip

    1.15-pre.1:

    tradeomat_v1.15.0-1.5.7.zip

    Suggestions are welcome! And bug reports also of course.

    • Like 9
    • Cookie time 1
    • Amazing! 1
    • Thanks 1
  2. 12 hours ago, Sergey Gribinichenko said:

    Arrrgh! There is no trashcan recipe when installed both necessaries and Immersion mods 🙄 

    That happens because Immersion removes vanilla Barrel. I'll try to fix this.

    9 hours ago, Ded Kamazy said:

    And you can implement a system for copying blocks processed with a chisel.

    That's a good idea! I'll think about what I can do with it.

  3. Hey, fellow players!

    Here's the initial public release of my "tweaks collection" mod, which aims to make yours (actually, mine :)) survival experience better!

    This mod adds the following thingies:

    1. Mailbox

    Spoiler

     

    Build one on a server and ask your friends to do the same. Afterwards, craft yourself a parcel and fill it with with whatever your friend needs. Then choose your friend's address and use your mailbox to send the parcel along with a short message.

    mailbox.thumb.jpg.9dd5c2469337a199a57c2408cdc12300.jpg

    parcels.jpg.dfa596f2ef3f4bf8c0fb78591fee24da.jpg

     

    2. Trashcan, the

    Spoiler

     

    Get rid of all your garbage with a convenient method of trash disposal! You are able to recover up to three items placed last before it will disappear forever.

    trashcan.jpg.b6901dab3825ffcbfacb49ce5c001997.jpg

     

    3. Rusty Spikes

    Spoiler

     

    These sharp rusty spikes able to hurt anyone who will try to jump on it! So, keep your eyes open!

    spikes.jpg.f64e29253b147a3cad33932f5af454c7.jpg

     

    4. Trapdoor patch!

    Spoiler

     

    Now trapdoors will act like a ladder. So, you can use it on a block instead of a ladder to climb the last block!

    trapdoorpatch.thumb.jpg.58967ea51a630fc6f6bf6aaf1e98240e.jpg

     

    Since version 0.7-B:

    5. Branch Cutter!

    Spoiler

     

    Ever wanted to build a hedge out of leaves? Well, there's a tool for leaf-gathering now! It's called a Branch Cutter! Five variants available (Copper, three kinds of Bronze, Iron).

    branchcutters.jpg.9b2fe7b2e9177d1859fb58b31375e9d3.jpg

     

    6. Vines patch

    Spoiler

     

    Now players can use those Wild Vines as a ladders.

    vinespatch.jpg.30b4c28037473aeefdb7ec687e616efd.jpg

     

    Changelogs and downloads have been moved to MODDB!

    https://mods.vintagestory.at/show/mod/19

     

    0.72-B changelog:
     

    Spoiler

    - fixed crash when receiving parcels

    - fixed log spam because of Branch Cutters

    - fixed constant damage when falling on a Rusty Spikes (now it depends on falling height)

    0.74 changelog:

    Spoiler

    - Added compatibility with 1.13.4+ versions of the game

    - Fixed usage of mailbox when trying to send the parcel to unloaded chunk

    0.75B changelog:

    Spoiler

    - Completely rewrote synchronization code. Hopefully it will help to keep server and all clients in sync when on dedicated server.

    0.7.7-B changelog:

    Spoiler

    - Fixed Branch Cutters server sync.

    0.7.8-B changelog:

    Spoiler

    - Fixed Branch Cutters Leaves dupe bug

    - Fixed Parcels crash of 1.14.0 stable

    0.8.2-B changelog:

    7. Grindstone

    Spoiler

    Give your instruments a breath of a new life. Use Grindstone Assembly with a Grindstone to spin the handle and sharpen your old tools to repair it.

    2021-01-17_23-36-59.thumb.jpg.a5610fa093a31e6e34a891b20fc372f0.jpg

    0.8.3-B changelog:

    8. Sulfuric Acid and Glue!

    Spoiler

    Now to make a proper grindstone, you'll have to make a glue first!

    Glue.jpg.90d78e7dd7142f8622972b1d55b56ed9.jpg

    0.8.4-B changelog:

    Spoiler

    - Fixed Lead vessel's various misbehaviors :D

    0.8.5-B changelog:

    Spoiler

    - Added Config file to enable/disable mod features + settings for various sharpener stones

    - Granite grindstone now really bad, but Obsidian will make you absolutely happy!

    0.8.6-B changelog:

    Spoiler

    - Added Obsidian-Diamond sharpening disk (requires Crushed diamond and Obsidian Disks to craft), which by default restores 15 durability per cycle

    - Added "Hard" mode for Mail delivery. If enabled in config, players are required to "Register" every placed Mailbox via Post Registry block (Creative only) before it will be usable. This can be used to prevent usage of Mailboxes like portable item teleporter during far-lands mining

    The following options were suggested by @Tech_Rabbit:

    - Added config option to reduce item slots count in parcels to just one slot

    - Added configurable limit of mailboxes which each player is allowed to place (0 - to disable limit)

    0.8.7 changelog:

    Spoiler

    - Expanded Branch Cutter usage. Now it is able to harvest glow worms, cacti, bamboo and fern trees.

    - Fixed crash when trying to interact with the Post Registry with empty hand.

    0.8.8 changelog:

    Spoiler

    - Added /listmailboxes command to view all mailboxes on a server (requires "readlists" privilege)

    - Changed default mailbox address generation

    - Added fail-check if mailbox address already exists (I just can't believe that nobody reported it! :)))

    0.8.9 changelog:

    Spoiler

    - fixed Mailbox naming

    - fixed Mailbox shift-click

     0.8.10 changelog:

    Spoiler

    - Compatibility fixes for 1.15-pre.1

     0.8.11 changelog:

    Spoiler

    - Fixed Grindstone (Hopefully)

      0.8.12 changelog:

    Spoiler

    - Fixed Trapdoor patch for 1.15.2

     

    Please keep me notified about found bugs! And stay tuned for more content! Yeeeehaaaah!

    For fellow modders (aka Mod Compatibility):

    Spoiler

    It is possible to make use of my Grinder to sharpen modded tools. All you have to do, is to add the following information to your item's attributes (or attributesByType) CASE-SENSITIVE:

    "sharpenable": true,
    "onGrindstoneTransform": {
    		translation: { x: -0.2, y: 0.3, z: 0.4 },
    		rotation: { x: 50, y: 0, z: 0 },
    		origin: { x: 0.5, y: 0.1, z: 0.5 },
    		scale: 1
    }

    Of course, use your proper values for onGrindstoneTransform.

     

     

    Older versions:

    1.15-rc.2:

    necessaries_v1.15.2-0.8.12.zip

    1.14.5+:

    necessaries_v1.14.5-0.8.9.zip

    1.14.0+:

    necessaries_v1.14.0-0.7.8-B.zip

    1.13.4:

    necessaries_v1.13.4-0.7.7B.zip

    1.12.14:

    If (and only!) you're already using Immersion mod, use -immersion version of Necessaries which is compatible.

    necessaries_v0.73.zip  necessaries_v0.73-immersion.zip

     

    Spoiler

     

     

     

     

    • Like 8
    • Amazing! 1
  4. Hey, fellow modders!

    Another question: I'm trying to make a custom molding recipe. I've made a form (copy/tweaking the toolmold.json of course), a recipe of the "clayforming" type for the mold, and a resulting item of course. Well, all the processing chain is working flawlessly: I can use a clay on a ground to knap a mold form, burn it, and pour a liquid metal into it to get a result. But I can't see the last step of this process in a Handbook! If I'm pressing "H" hovering my final item, I can only see the item explanation without any directions of getting it. What should I do to make the handbook recognize my molding recipe?

    UPD: Well, to fix this, you have to explicitly add "createdBy" (case-sensitive!) token in item json:

    	attributes: {
    		handbook: {
    			createdBy: "metalmolding"
    		}
    	},

     

  5. Hi, Tyron!

    12 minutes ago, Tyron said:

    what calls OnBlockPlaced there? The player when you place the stack yourself or something else? This item stack looks like it has been saved to disk manually and not fully loaded yet (via stack.ResolveBlockOrItem())

    The player. Regular right click with Item form of Block.

    13 minutes ago, Tyron said:

    Also I think you are mixing up something there. stack.Attributes is not the same as stack.ItemAttributes

    Yeah, I know. The screenshot just showing that stack.ItemAttributes were there during the "save" in OnBlockBroken, and weren't during "load" in OnBlockPlaced. They should serialize via Attributes.SetItemstack, right?

     

  6. Hey, fellow modders and authors of such a great API!

    I'm struggling with a problem, which I can't find the source of.

    When player breaks my block, it's inventory should be saved in dropped Item Attributes. Well, it does, I can confirm it via debug.

    Now, when I try to place the block using that item, I only get partial information from the former ItemStacks. Here are the code parts:

    OnBlockBroken (everything is saving inside ItemStack::Attributes just fine)

    public override void OnBlockBroken(IWorldAccessor world, BlockPos blockPos, IPlayer byPlayer, float dropQuantityMultiplier = 1)
            {
                if (world.Side == EnumAppSide.Server && (byPlayer == null || byPlayer.WorldData.CurrentGameMode != EnumGameMode.Creative))
                {
                    ItemStack[] drops = GetDrops(world, blockPos, byPlayer, 1);
                    ItemStack droppedItem = null;
    
    
                    if (drops != null)
                    {
                        if(drops.Length > 0)
                        {
                            droppedItem = drops[0].Clone();
                        }
                    }
    
                    if (EntityClass != null)
                    {
                        BlockEntity entity = world.BlockAccessor.GetBlockEntity(blockPos);
                        if (entity != null)
                        {
                            if (entity is IBlockEntityContainer)
                            {
                                ParcelInventory inv = (ParcelInventory)((IBlockEntityContainer)entity).Inventory;
                                droppedItem.Attributes.SetInt("contentsCount", inv.Slots.Length);
                                for (int i = 0; i < inv.Slots.Length; i++)
                                {
                                    ItemStack stack = inv.Slots[i].Itemstack.Clone();
                                    droppedItem.Attributes.SetItemstack("slot_" + i, stack);
                                }
                                //droppedItem.Attributes has three Values. First one - is the size of the following ItemStacks, which are two. 
                              
                                world.SpawnItemEntity(droppedItem, new Vec3d(blockPos.X + 0.5, blockPos.Y + 0.5, blockPos.Z + 0.5), null);
                            }
                        }
                    }
    
                    world.PlaySoundAt(Sounds?.GetBreakSound(byPlayer), blockPos.X, blockPos.Y, blockPos.Z, byPlayer);
                }
    
                world.BlockAccessor.SetBlock(0, blockPos);
            }

    Debug info from slot_0 (everything is fine - we have an Item here):

    image.thumb.png.dfa2f883a9dd6f6a6b7a244848de412a.png

    OnBlockPlaced (ItemStack::Attributes gone crazy and lost almost all information about ItemStack beside Id)

    public override void OnBlockPlaced(IWorldAccessor world, BlockPos blockPos, ItemStack byItemStack = null)
            {
                base.OnBlockPlaced(world, blockPos, byItemStack);
                if (world.Side == EnumAppSide.Server && byItemStack != null)
                {
                    int contentsCount = byItemStack.Attributes.GetInt("contentsCount", -1);
                    if (contentsCount != -1)
                    {
                        if (EntityClass != null)
                        {
                            BlockEntity entity = world.BlockAccessor.GetBlockEntity(blockPos);
                            if (entity != null)
                            {
                                if (entity is IBlockEntityContainer)
                                {
                                    ParcelInventory inv = (ParcelInventory)((IBlockEntityContainer)entity).Inventory;
                                    for (int i = 0; i < contentsCount; i++)
                                    {
                                        ItemStack stack = byItemStack.Attributes.GetItemstack("slot_" + i);
                                        // stack is not a valid ItemStack! Block == null, Item == null ItemAttributes == null!
                                        inv.Slots[i].Itemstack = stack.Clone();
                                        inv.MarkSlotDirty(i);
                                    }
                                }
                                entity.MarkDirty(true);
                                world.BlockAccessor.MarkBlockEntityDirty(blockPos);
                            }
                        }
                    }
                }
            }

    Debug info from stack (NPEs everywhere!):

    image.thumb.png.58f42580a69db5e20e1c099c0589cb7b.png

    Any ideas?

  7. 2 minutes ago, Avic said:

    ok, I put everything the way you wrote, but on the server it says - Unknown command

    Are you absolutely sure? Check your serverdata/serverconfig.json file and look for "ModPaths" setting. streamdc_v1.0.0.zip file should be placed intact (!!!no need to unzip it) in one of these locations. Next, you should put the same archive in your Mods folder in client. Either in %appdata%\roaming\vintagestory\mods or in main folder\mods. And, just in case, try to die at least once before issuing the command.

    • Thanks 1
  8. This small mod adds two functions:

    1. It keeps track of players deaths (on server as well) and creates local file (called deathcounter.txt, located in %appdata%\roaming\vintagestoryData) with only one string - the number of player deaths. So during the stream you can output it in an overlay.

    tn.jpg.cb5c1f93791621cb5d236263060ac713.jpg

    2. To view your Top-5 of deaths, use /dc command (privilege is .Chat).

    3. If player dies, a WayPoint is created automatically, and Top-5 is also sent to player.

    Since 1.1.0:

    4. Creation of WayPoint is customizable with the config file (%appdata%\roaming\vintagestoryData\ModConfig\StreamDCConfig.json). You can choose whether to create the waypoint at all, or change it's color and icon.

    Suggestions are welcome!

    1.15-pre.1:

    streamdc_v1.15.0-1.1.1.zip

    1.14:

    streamdc_v1.14-1.1.0.zip

     

     

    • Thanks 5
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.