Jump to content

Frepo

Vintarian
  • Posts

    68
  • Joined

  • Last visited

Everything posted by Frepo

  1. I made it do the opposite (increase fall damage). It's basically a custom made behavior for the player, that extends EntityBehavior and overrides the OnFallToGround method in there. But I'm not quite sure it completely replaces the fall damage mechanic (actually I think my method adds on top of the vanilla method), I wrote that a looong time ago with little experience. But it increased the damage for sure, so I was content and never looked back at it again. Maybe you can find something useful here. Patch json My custom behavior class Maybe you can just write something like this public override void OnFallToGround(Vec3d positionBeforeFalling, double withYMotion) { return; } But again, I'm very unsure that this method completely replaces the vanilla mechanic.
  2. With my current knowledge I think I would be able to get the player to being downed instead of dead at 0 hp. And thats about it What I would primarily need take a deep dive into is: - Animation (player crawling) - Getting some sort custom UI graphics displayed on the screeen (e.g. a revive-meter) - Restricting player controls But some day I will make this happen, if noone else already has.
  3. OMG it was the consumer class! Started working perfectly after changing to MPBase. Just had to copy in the Join-/LeaveNetwork methods, and OnConnected and OnDisConnected actions. What a relief to finally be able to move on from this. THANK YOU!!!
  4. If you take a look in the BlockLantern class, you'll find the method GetLightHsv, which retrieves the light from the lantern. And in this method is a call to it's entity class, BELantern: BELantern.setLightColor(this.LightHsv, lightHsv, stack.Attributes.GetString("glass", null)); Where the glass attribute is passed in. And as the name implies, this is where the light is set depending on the glass. Also in BELantern is where the player sets the color by interaction.
  5. @Spear and Fang Have you made any machines that uses behaviors based on the BEBehaviorMPConsumer? Where the autosifter differ from the toggle is that it's behavior is BEBehaviorMPConsumer, where the toggle is just BEBehaviorMPBase, just like your passthrough axle. In the Initialize method ( in BEBehaviorMPConsumer) there's a line that caught my eye; this.Shape = properties["mechPartShape"].AsObject<CompositeShape>(null); If don't know if this property is set anywhere, can't find anything when I search the word. So I was wondering if you know where this is set, or if I need to set this myself somewhere.
  6. Thanks guys for you help! I'm completely stuck on this. But, I will not give up! Gotta take a break from it, and come back later with a fresh approach. That usually helps.
  7. Wouldn't it be nice if players could revive each other? - The player enters a state of being downed when hp reaches 0 (or a configurable chance for this happening). - While downed: You can't do anything except slowly crawl around (no jumping). - You die after 60 seconds (configurable), if no friend was able to revive you during this window. - Revival takes a couple of seconds to perform (hold interact button with a bandage or any healing item in hand) Not a new concept by any means, but I think it would be super nice to get a chance to save your friend when out on long expeditions far far away from home. Also, it's fun! These situations tend to get quite intense, being on a timer to save your friend.
  8. I'm doing some fixing of the auto-sifter mod, since I love the machine and dev is discontinued, and also to start learning how to mod for the MP-system. Currently I'm stuck at combining the static shape model with the animated/rotating part. Only the static model shows up in-game. The code for the wooden toggle is used as basis for this machine, since they both only connect horizontally ("ns", "we"), and don't have inventories and such. I've split the model into 3 separate models autosifter-inventory.json is the complete model (left pic), autosifter-stand.json is the static part (middle), and autosifter-moving.json is the rotating part (right) As far as I understood, the shape is set to the moving one in the json for BlockAutoSifter (at shapeByType) Here is the code for BlockAutoSifter, it's basically ripped off the vanilla BlockToggle: Here is the code for the BEBehaviorMPSifter, which is mostly ripped off the BEBehaviorMPToggle. Here in lies the problem, I think, probably in the getStandMesh and/or OnTesselation methods. Instead of adding the autosifter-stand model to the autosifter-moving model, it replaces it. And I have no idea why. So this is the end result... the machine functions as intended (guess the BlockEntity code is OK), but the wooden axle is nowhere to be seen.
  9. Me and some friends play with a "hardcore" modpack I put together, I've added some stuff myself, tweaked many of the mods and vanilla mechanics. If you wan't, you can give me your mail and I'll send you the modpack. Settings i strongly recommend with this pack: - Hunger: 125% - Creature Strength: 150% - Global deposit spawn rate: 80% - Worldmap and coordinates: OFF (very important) - Soil sand and gravel gravity with side-ways instability: ON (very important) Some notes on what's tweaked and changed: - When you die; Each item in your inventory (and hotbar and worn) have 50% chance to be deleted - Food tweaks (red meat nerfed, animal drops nerfed, bread buffed) - Many recipes changed to "weave together" different mods, but mostly to make stuff more costly - Raw grass, must be dried before you get dry grass - Tool tier system changed (stone -> copper -> tin/bismuth bronze -> black bronze -> iron -> steel -> titanium) - Sleeping made harder, low tier beds can break after use, can't sleep in rain or if it's too cold (make a fire and build better beds to mitigate the cold) - All rocks have a small chance of coming loose and fall when mining a nearby block, deals quite a bit of damage if it lands on you - Increased fall damage (+70%!!!), each piece of clothing reduces fall damage by 5% - Can't break cobblestone with hands anymore - Can't place water sources with buckets anymore - Drifters spawn everywhere! - More dealy wild animals Notable mods in the pack: - Primitive Surivial - Medieval Expansion - Better Crates - Better Ruins - Compass2 - Dungeons and Shafts - Feverstone Wilds - Kreatures and Kritters - Farm To Table (fixed) - Ranged Weapons - Titanium Tools - Lichen - NoWaterproofInventories (crashes the game since .NET7 update, I might have fixed it, not sure yet, just remove if crashes the game) + much much more
  10. Structure like this. E.g. Location of Vanilla file you want to replace: ..\Vintagestory\assets\survival\worldgen\treengenproperties.json Make a json (copy original) to this location in your mod to use that one instead: ..\MyMod_v1.0\assets\game\worldgen\treengenproperties.json It's kinda confusing, since the files we are looking to replace are placed in the folder named "survival", one would think we should also name our folder the same, but no, it's "game" for some reason. But I don't question it, it works for me
  11. I can't get this recipe to work { ingredientPattern: "TP", ingredients: { "T": { type: "block", code: "fregtech:fttrunkmetal-east", attributes: { type: "reinforced" } }, "P": { type: "block", code: "game:woodbucket" }, }, width: 2, height: 1, shapeless: true, attributes: { liquidContainerProps: { requiresContent: { type: "item", code: "game:dye-blue" }, requiresLitres: 1.0 } }, output: { type: "block", code: "fregtech:fttrunkmetal-east", attributes: { type: "reinforcedblue" } } }, Is something written wrong or is it simply not possible to combine several items with attributes in the same recipe? Coz it works fine like e.g. this:
  12. Re-installed Visual Studio and made sure the .NET desktop development workload is installed as well. Still same error. I'm not accustomed to visual studio at all, but I noticed that VintagestoryAPI.dll is compiled against an older runtime version of .NET (v4.x). This must be because VS i targeting a 4.x-framework (4.8 in my case), right? So changing the target framework to 7.x (if I only could) should recompile the assembly against that version instead, right?
  13. I just got back to modding again after a long time away. I noticed the game is now .NET7-based. After downloading the SDK I started my old project and tried a rebuild, and got this error: My mod still works fine after I updated the game (no changes whatsoever to the mod). I'm not sure what to make of this error. I realized my project wasn't targeting the .NET7 framework. I guess that must be the cause of the error. Problem is, I can't select the .NET7 framework in my project settings. It simply isn't there! The SDK seems to be installed and working. Visual Studio is up to date. Someone at StackOverflow mentioned you should check the box "Use previews of the .NET SDK"-box, and so I did. Is there anything else I need to do to make VS find the new framework version?
  14. Love the idea of more hazards in the environment. In addition to you venus flytrap I would also like to see a plant that can shoot some sort of projectile at you. And puffball mushrooms that, when stepped on, releases a poisonous cloud.
  15. You can patch in your items in survival/itemtypes/meta/stackrandomizer.json.
  16. Are there any loot tables (JSONs) for the collapsed chests found underground, where we can add custom loot? I found the loot tables for the urns in BlockLootVessel. But the collapsed chests are just variants of the standard chest you craft, and there seems to be no loot randomizing in BlockGenericTypedContainer or BlockEntityGenericTypedContainer (nor in their respective sub-classes).
  17. Anyone adept in harmony transpiler patches? I want to insert a new tier level between bronze and iron, so the progression goes ... -> tin/bismuth bronze -> black bronze -> iron -> .... The relevant jsons have been patched (changing miningTiers and toolTiers) and working fine. But I need to add the tier to a list in GetPlacedBlockInfo (in Block class): so the code becomes -> So I thought it would be nice to accomplish this with a small transpiler patch. But I'm unsure how to go about this. Studying the IL-code for the list I get the feeling I can't just insert my code before IL_0225: ldstr "tier_iron", since this would mess up the indexing, right? In that case, I would need to replace each subsequent ldc.i4.x instruction with x+1? Or must I replace all the IL-code for the entire list? If so, how do I replace this list? By replacing each instruction with a nop and then adding all the code again, including the new index?
  18. Ok, thanks for the confirmation!
  19. By "unimplemented" I mean they have no use yet. But do these ores (e.g. uranium and nickel) generate during worldgen? I have never seen them in-game, though I haven't been digging around in the deep depths that much.
  20. Frepo

    Tinder Box

    Yeah it's not supposed to be a game changer by any means, merely a "quality of life" tool. I would love to have one when firing up my 16 clay ovens, takes like half a minute to light them all with the torch
  21. Frepo

    Tinder Box

    How about a tinder box? A limited-use tool to instantly ignite stuff.CraftingClay bowl + flint + iron/steel bits + dry grass
  22. How about a tinder box? A limited-use tool to instantly ignite stuff. Crafting Clay bowl + flint + iron/steel bits + dry grass [EDIT] Oops! Should perhaps have posted this in the suggestions section.
  23. Jesus f-ing christ! That looks absolutely GORGEOUS!! And with a gear in the window there! A most excellent touch! BRAVO
×
×
  • 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.