Jump to content

Aesirkin

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by Aesirkin

  1. 16 hours ago, Baratos said:

    Aesirkin, 

    Thank you so much for looking into this and providing a fix. I'm busy with work today, but will re-upload and test the new version. I'm super excited!!! Thank you again!

     

    No problem.  Thank you for reporting it and providing details!  I won't actually get to play a game with the mod for another week or two, so I'm just glad it wasn't sitting out there broken all this time.

  2. I actually found some time today and implemented a 'fix'.  Please redownload and insure that you have v1.1

     

    If you update the files on a game that was already started with v1.0 of the mod, I believe it should work.  Though existing crops may need replanted.

     

    Please let me know how the fix runs for you.

  3. 7 hours ago, Baratos said:

    According to a short discord conversation with Aesirkin the "growing" stage should only take about 50 real minutes on average. If it takes more than 10 hours it's considered a bug. 

    To provide more detail...

    We used fertilizer to get every plant to the growing stage. All plants are in farm blocks, and I've tried other using other tools from the garden workbench without any luck. The game is set to 120 real minutes per in-game day, and all plants are outside. The first 3 plants had events (dry, weeds) after about 3 real days. 

     

    Alright; I've confirmed this issue.  And after some infuriating rounds of testing today I believe I've identified the problem: this is a 7DTD bug.

     

    It appears that the growthRate property of any given block is ignored in favor of inheriting the growth rate of a block that it has upgraded from.  As the original "germinating" block has a growth rate of 1440, the "growing" block (and presumably all other event blocks) is then treated as though it has the same 1440 growth rate instead of the 50 that is explicitly defined in the block definition.

     

    I missed this in testing due to the short time periods that I applied to all blocks.  Sorry! :(

     

    Or possibly because I was testing on 20.3; maybe it worked there.

     

     

    In any case, this actually breaks a very major portion of this mod!  I apologize, but it appears to be unplayable as of now.

     

    The most obvious immediate solution to me is to reset all growth rates to 60, and then completely rework the blockPlaceholders file to emulate long growth with RNG-trees.  This is going to introduce randomness where I never wanted it to be, and is going to take some work.  I'll try to do this over the next few days if I can find the time...

  4. 3 hours ago, Baratos said:

    According to a short discord conversation with Aesirkin the "growing" stage should only take about 50 real minutes on average. If it takes more than 10 hours it's considered a bug. 

    To provide more detail...

    We used fertilizer to get every plant to the growing stage. All plants are in farm blocks, and I've tried other using other tools from the garden workbench without any luck. The game is set to 120 real minutes per in-game day, and all plants are outside. The first 3 plants had events (dry, weeds) after about 3 real days. 

     

    Hi Baratos.

     

    Thanks for the additional details.  Can you tell me how many hours per day the server had users online during those 3 days?  Time only progresses while players are online.

     

    I checked the code to make sure I didn't accidentally get the growth rates set wrong and don't see any obvious problems.  In testing I had all growth rates set to 2 minutes though.

     

    I'll try to mess around with a test game today.  Is this a public server that I could log into and test?  If so, would you be able to give me resources to do the testing with?  Also, was this a new game that you started with this mod or did you add this mod to an existing game?  The latter may cause some issues; I'm not sure.

  5. 2 hours ago, Josie said:

    This is a sweet mod. but it seems the timers on the composer don't work on the server when the window is open. I have to close the window over and over to see the timer go down.

     

    This is a known issue that only occurs on dedicated servers.  I don't know how to resolve it.  If anyone does, please let me know and I'll make the updates.

  6. Download Link

    Dropbox

     

     

    Video

    Youtube

     

     

    Version

    IMPORTANT!  If you're using v1.0 please redownload.  v1.0 has a severe bug that causes unexpectedly long growth times.

     

    Current version is 1.1

     


    Purpose

    So, what problem are we trying to solve?

     

    Farming gets boring.

     

    It's too easy to get large amounts of food with it late game, making it required, but not exciting.

     

    Meanwhile, it's full of busywork (doing the same thing with no thought) and missing interesting decisions.

     

    We want to make farming more challenging, preferably without just adding repetitive busywork.

     


    Description

    Plants will now progress through a long growing process, rewarding a large harvest at the end.  During this process various events will occur, and as a player you will need to decide whether to act (often using resources), wait it out, or harvest and move on.  Acting, and sometimes waiting, will usually increase the growth tier, or health, of that crop; while there are occasional events that can decrease the growth tier if not acted upon.

     

    Plants may be harvested any time after they progress beyond the seedling stage, which will be obvious from their size.  The harvest will be commensurate with the growth tier you have raised those plants to.

     

    Some actions you need to take will require special items, available from the new garden workbench.  Until you can make these items you'll be forced to simply wait.  This adds a sense of progression to farming, and gives you something to work towards.

     


    Details
    Spoiler warning!  Read this section only if you don't want to explore and figure it out yourself.

     

    Spoiler

    *** Growth Events ***
    Germinating - This plant was recently planted.  It requires compost to begin growing in earnest.  However, if you wait an extremely long time, it will take root without help.

     

    Growing - This plant is currently growing.  After a medium amount of time an event will occur as noted below or, if you're very lucky, it will grow to the next tier without incident.

     

    Weeds Encroaching - This plant has weeds growing with it; stealing water and nutrients from its roots.  It will not continue growing without help.  You can use your hoe to remove the weeks to allow it to continue at the current tier.  Weeds have difficulty encroaching on relatively mature plants.

     

    Soil Compacted - This plant will eventually move to the growth stalling status, but it will take several hours.  Use an earthworm to help aerate the soil and grow the plant by two tiers.

     

    Growth Stalling - This plant will eventually grow to the next tier, but it will take several hours.  Use compost to give it a boost so it can grow two tiers immediately.

     


    *** Watering *** 
    Statistically speaking, when plants become dry they are more likely to recover and grow to the next growth tier than they are to wilt back a growth tier.  So waiting out dry plants is viable, but very slow.  Don't worry, you don't throw a water jar at them; you empty the water and keep the jar.

     

    Dry - This plant is drying out.  After a medium time it may naturally recover and move to the next tier, but more likely will become very dry.  Use a murky water to move it to the next tier of growth.

     

    Very Dry - This plant is getting dangerously dry.  After a medium time it is likely to naturally recover back to "Dry", but may begin to wilt.  Use a murky water to move it to the next tier of growth.

     

    Wilting - This plant is wilting.  After a very long amount of time the plant will lose a tier of growth unless you use a murky water to move it forward instead.

     

    Probability of natural recovery: Approximately 65%

    Average time to natural result: Approximately 5-6 hours (varies wildly plant to plant)
    Natural recovery result: Next growth tier

    Failure to recover result: Previous growth tier

     


    *** Fungus *** 
    Mild Fungal Infection - This plant has the start of a fungal growth on it.  After a medium amount of time it may recover and continue growing, but more likely the fungus will grow worse.  Use an antifungal spray to eliminate the infection and move it to the next tier of growth instead.

     

    Fungal Infection - The fungal infection has taken hold on this plant and is stopping it's growth.  After a medium amount of time the fungus will likely naturally die back to a mild level, but can become more severe.  Use an antifungal spray to eliminate the infection and move it to the next tier of growth instead.

     

    Choked By Fungus - The fungal infection has spread to most of this plant's greenery!  After a very long amount of time the plant will lose a tier of growth unless you use an antifungal spray to eliminate the infection and move it to the next tier of growth instead.

     

    Probability of natural recovery: Approximately 75%
    Average time to natural result: Approximately 5 hours (varies wildly from plant to plant)
    Natural recovery result: Same growth tier
    Failure to recover result: Previous growth tier

     


    *** Special Statuses *** 
    These statuses tend to appear only on more mature plants, and often provide extra items or bonuses.

     

    Bees Settling - Bees have built a nest on this plant.  Use a collection kit to safely collect some of their honey.  After a medium amount of time this status will disappear.

     

    Moldy - Some strange mold has settled on your crop.  Harvest now to collect some along with your crop harvest.  After a medium amount of time this status will disappear.

     

    Choked by Rafflesia Weeds - This growing plant is being suffocated by a variety of Rafflesia; a plant known to smell like rotting flesh.  You can wait for the Rafflesia to bloom and die off, or use a special tool to remove it now while it's at maximum scent.  Removing it will surely attract animal scavengers.

     

    Vulture Nesting - A vulture has started a nest in this plant.  You can wait until the vulture and chicks leave, or you can use a special tool to remove the nest and collect the eggs.  Disturbing the nest may attract the mother, though.

     

     

    Harvesting
    Harvesting while the plant is still in it's small, seedling form will return only a seed.  When the plant grows in size you may harvest and receive some crops back, along with a seed and plant remains.

     

    Plants move through up to 20 tiers of growth.  You will receive approximately 1 additional crop during harvesting for each tier of growth beginning with tier 4, which is when the model changes to the larger size.  Hovering over the plant will provide text giving a general idea of growth tier (see below), and the color of the text will change with every tier.  So you may see two plants in the Fruiting stage, for example, with slightly different colored text (denoting different tiers)

     

     

    Growth Stages
    1-3    Seedling

    5-6    Young

    7-9    Fruiting

    10-13    Healthy

    14-16    Mature

    17-19    Strong

    20    Prize Winning

     

     

    Realism

    As much as possible I've tried to make events and responses realistic.  However, deviations needed made to best accomplish the gameplay goal of the mod.  I am aware that some things don't exactly match what we would expect in real life and welcome thoughts.  But please bear in mind that gameplay takes precedence over realism in this context.

     

     

    Compatibility

    This mod was written to be compatible with A20.  It may or may not work with other versions.

     

    This mod was designed for new games.  I do not believe this will work with existing games, but if you try it please post back and let me know!

     

    This was designed as a server-side, no download mod.  This means that if you're playing a single player game or a P2P game only the host needs to have it.  If you're running a server, only the server needs to have it.  Clients do not need to download the mod.

     

  7. On 5/27/2022 at 10:32 PM, Telric said:

    Only way using xml only would be having multiple blocks that the player gets that follow different lines. So by default player can craft place1 which has block1 and block2 as possible outcomes, then player gets the book and that book inverts recipes so player can no longer craft place1, but can now craft place2, which will have all 3 blocks as possible outcomes. Wouldn't affect blocks already placed, so they'd have to re plant the seeds or w/e you're doing. Blocks have no way of tracking player information besides what's hard coded (like ownership and what not, for certain blocks)

     

    Thanks.  Unfortunately, that's not viable for me because the plants always return seeds, so there will be no point where they would swap out the old seed for the new.  That's okay, though.  I'll just keep the books unlocking the tools that allow them to take action on the blocks and that will work well enough.

     

     

  8. On 5/23/2022 at 4:45 PM, Telric said:

    Blockplaceholders are defined by a matching name of the block in blocks.xml in the blockplaceholders.xml.. So if you have a block named OMGIMABLOCK in blocks.xml, in order to use it as a helper style block, it needs a matching OMGIMABLOCK blockplaceholder. Then, any block you wish for that OMGIMABLOCK to become when that placeholder is called, you put in blockplaceholders.xml. This is why my deposittier1helper is named the same in placeholders.xml, but you can see the list of possible blocks it will become. In my example, there is a chance for it to spawn air again, so for your purpose you can remove that.

     

    Have you found any way to make certain block possibilities dependent on books?

     

    For example, suppose that I have:

     

    				<placeholder name="place1">
    					<block name="block1" prob=".4"/>
    					<block name="block2" prob=".2"/>
    					<block name="block3" prob=".8"/>
    				</placeholder>

     

    But I only want block3 to be included in the rotation if the player has read the book that unlocks it.

     

    I looked at the default blockplaceholders.xml and gameevents.xml files, but don't see any option to do this.  the placeholders appear to be straightforward with no logic allowed, and the "requirements" listed at the bottom of gameevents.xml don't include the possibility to look at a cvar.

     

    Any ideas on a creative way to do this?

  9. 16 hours ago, poly said:

    In theory it is possible to reward players who perk into farming by allowing different tools to give different items (harvest).

    In the same way that the vanilla game makes farming without having perked into LOTL pretty much useless, giving more harvest based on perk level.

     

    You could completely change the items a player receives based on what level they are, or even depending on what item they use to harvest with.

     

    I might have to test out a few variables as this is something I would like to see in a mod!

     

    That's an interesting thought, but I don't think I want to go down that path with mine.  I'd be interested in seeing what you come up with though!  :)

    I've realized a way to make this happen.  Unfortunately, it's too expensive for my use case, especially for a public server where there may be 1000s of these blocks.  It's also extremely clunky for the user.  But maybe someone else can get some use out of this idea, especially for single player games.

     

    To do this, create two identical blocks.  Give them the PlantGrowing properties.  For block1, set the "Next" property to block2, and for block2, set it's next to block1.  Then set a small "GrowthRate".  The XML says you should keep this 2 or above, but it appears to work fine on 1.  My guess is that even smaller numbers will work, but will just become CPU intensive for the server.

     

        <property name="PlantGrowing.Next"        value="block2"/>
        <property name="PlantGrowing.GrowthRate"    value="1"/>

     

    Now give both blocks the same name, except with an appended note.  Maybe something like:

     

        block1,block,desc,"Frame Shape (Upgrade: wood)"
        block2,block,desc,"Frame Shape (Upgrade: steel)"

     

    And set each block's upgrade property to the material and target you want that path to take.

     

    Now when the user places that block or gets to that block some other way, they'll see a block that switches back and forth between needing wood or steel to upgrade.  They simply wait for the one they want to pop up, and then do the upgrade.  I'm guessing you could even set the GrowthRate to something like 0.15 so it switches every 10 seconds or so.

     

    You may want to pair this with a placeholders.xml block that has a very tiny chance of moving to a stable state.  That will prevent this block from cycling forever eventually crashing the game.

  10. 18 hours ago, Cranberry Monster said:

    Have you looked at the blocks.xml circa A17 or possibly A16? I seem to remember the wood frame upgrade path branching from reinforced wood to either iron reinforced or cobblestone, but as I wasn't poking around in the code back then, I'm not sure how it would've been accomplished. I'm wondering if it might be possible to give multiple values for "ToBlock", "Item", etc by stringing them together with commas, with all the first entries corresponding to one upgrade path, the second to a different path, and so on.

     

    Thanks for the suggestion.  I started playing in A20.1, so I don't have any historical experience.  I'm downloading A16.4 and A17.4 now to get access to those files.  I'll see what I can find.  Any more information you can remember about what block I might be looking for would be really helpful.

  11. I'm writing a farming mod in which players can take action to upgrade plant blocks.  For those unfamiliar with farming, I imagine this should be very similar to using a hammer to upgrade a frame shape, and the same solution should apply.

     

    I have a watering can item that players can use to water their plants.  This consumes a murky water:

          <item name="AesF_wateringCan">
             <property name="CustomIcon" value="bucketRiverWater" />
             <property name="CustomIconTint" value="99CCFF" />
             <property name="DescriptionKey" value="AesF_wateringCanDesc" />
             <property name="Tags" value="tool,wateringCan" />
             <property name="Group" value="Tools/Traps" />
             <property name="HoldType" value="34" />
             <property name="Meshfile" value="#Other/Items?Crafting/Metal/IronBucketWaterPrefab.prefab" />
             <property name="DropMeshfile" value="Items/Misc/sack_droppedPrefab" />
             <property name="Material" value="Mmetal" />
             <property name="RepairTools" value="resourceScrapIron" />
             <property name="DegradationBreaksAfter" value="false" />
             <property name="SoundJammed" value="ItemNeedsRepair" />
             <property name="ShowQuality" value="false" />
             <property name="RepairExpMultiplier" value="5.5" />
             <property name="SellableToTrader" value="false" />
             <property class="Action0">
                <property name="Class" value="Repair" />
                <property name="Delay" value="1.0" />
                <property name="Repair_amount" value="100" />
                <property name="Upgrade_hit_offset" value="-1" />
                <property name="Upgrade_action_sound" value="bucketbail_water" />
                <property name="Allowed_upgrade_items" value="AesF_wateringCan,drinkJarRiverWater" />
                <property name="UsePowerAttackAnimation" value="false" />
             </property>
             <property class="Action1">
                <property name="Class" value="Repair" />
                <property name="Delay" value="1.0" />
                <property name="Repair_amount" value="100" />
                <property name="Upgrade_hit_offset" value="0" />
                <property name="Upgrade_action_sound" value="bucketbail_water" />
                <property name="Allowed_upgrade_items" value="AesF_wateringCan,drinkJarRiverWater" />
                <property name="UsePowerAttackAnimation" value="false" />
             </property>
          </item>

     

    (Still a WIP)

     

    I would like this to create an empty water jar in the player's inventory.  First I tried adding a create item line within the actions, which I copied from the existing items.xml file:

    	<property class="Action0">
    		<property name="Class" value="Repair" />
    		<property name="Delay" value="1.0" />
    		<property name="Repair_amount" value="100" />
    		<property name="Upgrade_hit_offset" value="-1" />
    		<property name="Upgrade_action_sound" value="bucketbail_water" />
    		<property name="Allowed_upgrade_items" value="AesF_wateringCan,drinkJarRiverWater" />
    		<property name="UsePowerAttackAnimation" value="false" />
    		<property name="Create_item" value="drinkJarEmpty"/>
    		<property name="Create_item_count" value="1"/>
    	</property>

     

    However, nothing happens when I use this item to upgrade.  I copied it from I believe the boiled water item, which does give back an empty jar when used.

     

    So then I went to the plant block itself, and tried adding it to the upgrade property:

    		<property class="UpgradeBlock">
    			<property name="ToBlock"				value="AesF_FarmingYuccaGrowing" />
    			<property name="Item" 					value="drinkJarRiverWater" />
    			<property name="ItemCount" 				value="1" />
    			<property name="UpgradeHitCount" 		value="1" />
    			<property name="Create_item" 			value="drinkJarEmpty"/>
    		</property>

     

    Again, nothing happens.  No errors in either case; I just didn't get an empty jar.  I suspect because that create_item command is meant to occur during a "use" or "eat" event, and not an "upgrade" event.

     

    I also took a shot in the dark hoping there was such a thing as an "upgrade" event:

    	<drop event="Upgrade" name="drinkJarEmpty" count="1" />

     

    But 7DTD yelled at me that this was an invalid event type (I got an error in the console).

     

    How do I get this jar into the player's inventory when they consume the murky water to upgrade a block?

  12. Thanks; that cleared things up!

     

    16 hours ago, Telric said:

    As for why air blocks, in my rpg mod, ores are in specific areas. Once you mine them, they will come back in that same spot, but have a chance to become different ores. You can only have one timer for plant growth, so to counter that a bit, the ore has a chance to respawn as air, which will then regrow. The effect would be adding more time on that plantgrowth timer. Instead of just 5 mins or w/e i have it at, it could spawn an air block so it would be 10 mins.. At this point in time, the mod hasn't been balanced, so times and what not are subject to change, but the essence of the idea is there which is all that im after at this point. lol

     

    Apparently great minds think alike, because I was actually testing something similar with a helper block when you wrote this.  :)

     

    Thanks so much for all your help; I'm on my way to creating something pretty cool...

  13. On 5/19/2022 at 7:43 PM, Telric said:

    External sources can't really affect blocks, but you can do more than a preset path like H7SB... You can have:

    Planted Plant grows into a placeholder block. This placeholder could spawn the next stage block, a block that requires water, or a block that is infested. The player would have to react to whatever spawns there. So if its infected, spray it with pesticides (using a tool item to upgrade the plant). This would upgrade the block back to the planted stage, allowing it to regrow and choose what blockplaceholder it grows into again.

    This is something I use in my rpg mod, though not quite in this context, but the idea is the same.

    Here is the blocks. What this does is, I place the HELPER block into a poi. When world gen starts, it randomly picks something from that placeholder (linked further down). Player can break it, it downgrades into the AIR block. This block then regrows back into the helper, which will then choose between placeholders again. If this placeholder chooses the tier1air block to spawn, it repeats the process as that block grows.  A cyclical loop.  Hopefully this makes sense to ya.
     

    <block name="DepositTier1Air">
    	<property name="Material" value="Mair"/>
    	<property name="Shape" value="Invisible"/>
    	<property name="Texture" value="250"/>
    	<property name="FilterTags" value="fterrain"/>
    	<property name="SortOrder1" value="d0j0"/>
    	<property name="SortOrder2" value="0050"/>
    	<property name="Class" value="PlantGrowing"/>
    	<property name="PlantGrowing.FertileLevel" value="0"/>
    	<property name="PlantGrowing.Next" value="DepositTier1Helper"/>
    	<property name="PlantGrowing.GrowthRate" value="5"/>
    	<property name="PlantGrowing.IsRandom" value="false"/>
    	<property name="PlantGrowing.LightLevelStay" value="0"/>
    	<property name="PlantGrowing.LightLevelGrow" value="0"/>
    	<property name="PlantGrowing.IsGrowOnTopEnabled" value="false"/>
    </block>
    <block name="DepositTier1Helper">
    	<property name="AllowAllRotations" value="true"/>
            <property name="CustomIcon" value="OreBlueIcon" /> 
            <property name="Material" value="Mmetal"/>
            <property name="IsTerrainDecoration" value="true"/>
            <property name="Shape" value="ModelEntity"/>
            <property name="Model" value="#@modfolder:Resources/TelricsQuestWorld.unity3d?DepositIronOrePrefab"/>
            <property name="Collide" value="melee,movement"/>
            <property name="CreativeMode" value="Player"/>
            <property name="Stacknumber" value="500"/>
            <property name="Group" value="Building,Building2"/>
            <property name="EconomicValue" value="300"/>
            <property name="FilterTags" value="fdecor"/>
            <property name="SortOrder2" value="0050"/>
            <property name="MaxDamage" value="125"/>
    		<property name="Place" value="TowardsPlacer"/>
    	<drop event="Destroy" count="0"/>
    </block>
    <block name="DepositCopperOreBlock"><!-- tier 1 ore -->
    	<property name="AllowAllRotations" value="true"/>
            <property name="CustomIcon" value="OreBlueIcon" /> 
            <property name="Material" value="Mmetal"/>
            <property name="IsTerrainDecoration" value="true"/>
    	<property name="DisplayInfo" value="Name"/>
            <property name="Shape" value="ModelEntity"/>
            <property name="Model" value="#@modfolder:Resources/TelricsQuestWorld.unity3d?DepositCopperOrePrefab"/>
            <property name="Collide" value="melee,movement"/>
            <property name="CreativeMode" value="Player"/>
            <property name="Stacknumber" value="500"/>
            <property name="Group" value="Building,Building2"/>
            <property name="EconomicValue" value="300"/>
            <property name="FilterTags" value="fdecor"/>
            <property name="SortOrder2" value="0050"/>
            <property name="MaxDamage" value="125"/>
    		<property name="Place" value="TowardsPlacer"/>
    	<drop event="Destroy" count="0"/>
    	<drop event="Harvest" name="resourceCopperOre" count="1,2" tool_category="DepositTier1Harvesting" tag="tier1gathering"/>
    	<drop event="Harvest" name="resourceFlint" count="1,2" tool_category="DepositTier1Harvesting" tag="tier1gathering"/>
    	<property name="DowngradeBlock" value="DepositTier1Air"/>
    </block>



    Blockplaceholders:
     

    	<placeholder name="DepositTier1Helper"> <!-- tier 1 -->
    		<block name="DepositTier1Air" prob=".2"/>
    		<block name="DepositCopperOreBlock" prob="1"/>
    		<block name="DepositIronOreBlock" prob=".2"/>
    	</placeholder>

     

     

    Telric, could you please help me understand this better?

     

    I think it's a little clearer to me now.  I understand exactly what it does, and it's awesome functionality that's going to be the core of my new farming mod.  But I don't actually understand how it does what it does yet.

     

    I see where DepositTier1Air has the property PlantGrowing.Next set to DepositTier1Helper.  This makes sense to me.  After 5 minutes the air block should 'grow' into the helper block.

     

    But then you have two entities named DepositTier1Helper.  You have a block in blocks.xml, and then a placeholder in in Blockpaceholders.xml.  I don't understand what the placeholder does or how it is used.  If you showed me this code and asked me to guess, I'd say that DepositTier1Air would always turn into a DepositTier1Helper block (as defined in block.xml) after 5 minutes, and that's it.

     

    What causes 7DTD to know that there's a placeholder and to use that placeholder?  Does any block that has an identically named placeholder immediately roll against the placeholder list and then turn into whatever block is chosen?

     

     

    Also, what is the point of the air block?  Why not just bounce between the ore blocks and the placeholder blocks?

     


    Thanks again!  :)

     

  14. I've done some unsuccessful testing on this, mostly with having two "UpgradeBlock" properties within a given block.

     

    Here is an example using H7SB Farming as a base, though I've tried many variations of this:

     

       	<block name="seedYuccaFert">
          	...
            <property class="UpgradeBlock">
             	<property name="ToBlock" value="seedYuccaWater" />
             	<property name="Item" value="compost" />
             	<property name="ItemCount" value="1" />
             	<property name="UpgradeHitCount" value="1" />
          	</property>
          	<property class="UpgradeBlock">
             	<property name="ToBlock" value="plantedYucca1" />
             	<property name="Item" value="resourceSnowBall" />
             	<property name="ItemCount" value="1" />
             	<property name="UpgradeHitCount" value="1" />
          	</property>
       	</block>

     

    Trying to use an item that repairs using compost just gives a "missing snowball" error.  While using an item that repairs with snowballs works to move the plant to stage "plantedYucca1".  So it appears that the second upgradeBlock property just overwrites the first.

     

  15. 14 hours ago, khzmusik said:

     

    I'm the one who wrote that modlet, so I can tell you the technical details.

     

    DMT is being sunsetted, but not because XML modding can do the things DMT could do. DMT used to be used for C# patching using Harmony, and that is now supported natively by the game. But it's still C# code, so requires both client and server installation.

     

    The main reason I haven't updated that modlet to A20 is not because of DMT, it's because weather itself was totally revamped in A20, and none of the A19 code can be used. Another reason is that A20 severely nerfed farming, so making crops be able to die - thus making farming even more difficult - is something I thought was unnecessary, and not something I thought anyone else would be interested in.

     

    The placeholder block idea from Telric is probably your best bet if you want an XPath-only modlet.

     

    Thanks so much for the response, khzmusik!  It's a little disappointing, but having that explanation and confirmation from you is invaluable.

     

    I think you're right that the placeholder idea is a great baseline for where I want to go with this, and provides the RNG that I need in order to accomplish much of anything.  I was so glad to see that's possible.

     

    I think the other thing that I really need to make this work is a way to introduce player choice.  Optimally, this would be done through multiple upgrade paths (https://community.7daystodie.com/topic/28883-can-a-block-have-multiple-upgrade-paths/).  If a crop begins to wilt do you use murky water to get it going quickly, or do you wait for rain which may add an hour or two onto the growth cycle?  Or maybe boiled water will speed it along more or add to the harvest!

     

    If that's not possible I'm not really sure where to go with this.  But if you have any thoughts on that I'd love to hear them.

     

    Really appreciate you guys helping me to think it through!  I feel like I'm close to having everything I need to carve out a general scope for the project and get started.  :)

  16. I did some limited testing with this.  I set four different crops to decreasing grow and stay values.

     

    	<append xpath="/blocks/block[@name='plantedCorn2']">
    		<property name="PlantGrowing.LightLevelGrow" value="14"/>
    		<property name="PlantGrowing.LightLevelStay" value="12"/>
    	</append>
    	<append xpath="/blocks/block[@name='plantedMushroom2']">
    		<property name="PlantGrowing.LightLevelGrow" value="10"/>
    		<property name="PlantGrowing.LightLevelStay" value="8"/>
    	</append>
    	<append xpath="/blocks/block[@name='plantedYucca2']">
    		<property name="PlantGrowing.LightLevelGrow" value="6"/>
    		<property name="PlantGrowing.LightLevelStay" value="4"/>
    	</append>
    	<append xpath="/blocks/block[@name='plantedGoldenrod2']">
    		<property name="PlantGrowing.LightLevelGrow" value="2"/>
    		<property name="PlantGrowing.LightLevelStay" value="0"/>
    	</append>

     

    I then started a new game with this mod.  All crops grew normally and harvested normally on a sunny day.

     

    I then set clouds to 1 (though it didn't appear to get cloudy) and rain to 0.5.  Again all crops grew normally and harvested normally.

     

    I then built up some frame shapes around them and placed a layer of glass above them.  Again all crops grew normally and harvested normally.

     

    I then covered that glass with two layers of frame shapes, shaped like railings laying down.  Again all crops grew normally and harvested normally.

     

    So I feel like maybe these properties do nothing, but would welcome other thoughts.

  17. I'm curious if a single block could have multiple upgrade paths depending on upgrade materials used.

     

    For instance, can I make a frame shape that you can upgrade with a mallet (and 8 wood) to a wood block or can upgrade with a hammer (and 6 cobblestone) to a cobblestone block?

     

    I'm specifically interested in whether we can send planted crops down different paths depending on player choice and action.  This allows us to have events happen to the crops, and players can decide if they want to do anything, and whether it's worth using certain resources to maximize harvest and optimize growth time, or whether they're okay using a less valuable resource for a medium harvest and growth speed.

  18. I noticed these two tags in the blocks.xml file as part of cropsGrowingMaster:

    
    	<property name="PlantGrowing.LightLevelGrow" value="8"/> default, light required for growing up
    	<property name="PlantGrowing.LightLevelStay" value="0"/> default, light required for not dieing off

     

    They are commented out, but there's nothing noting they won't work.  The second one in particular is interesting, because it would have no use at all if light levels don't change; other than preventing players from building over a planted crop and still harvesting it, which is a lot of work to have done considering said players won't be able to replant anyway.

     

    I've also noticed that sometimes when I put plants down areas will be pink instead of green; more often in my underground farming areas relying on lightshafts.  Interestingly, the same plot can be green some times and pink others.  I once built a cabin in the snow biome and noticed all the plants were pink when I had them on the roof, but then often green underground.  I never paid much attention, but now I'm wondering if that means that weather is affecting incoming light (and maybe temperature?) and the farm plots are reacting dynamically.

     

    If this is all true, then using these properties could allow the possibility to have crops react to weather (certain types anyway), which opens up some interesting possibilities.

     

    Does anyone know anything about these values, or how weather, location, etc is interpreted by the game in terms of farming?  The wiki indicates that any block with a straight line to the sky has a light value of 15, but I'm beginning to doubt that.

  19. Thanks Telric!  This is awesome!  It doesn't make sense to me yet, but it will when I have time to sit down and really work through it.

     

    If that mod is public, could you link it please?  I'd love to see all of this in context.

     

    Are the probabilities something that can be worked into the skills system?  So as a player ups their skill they are more likely to require less cycles to complete the process?  Specifically looking to integrate with the action skills mod: https://7daystodiemods.com/action-skills/

  20. I'm in the beginning stages of making a farming mod.  I'd like to remove busywork and introduce player action only when it involves player decisions and resource tradeoffs, in order to keep farming interesting.  A requirement of this mod is that it is XML and runs only on the server (no client install required).

     

    I love the concept presented by this mod: https://7daystodiemods.com/crop-growth-by-weather/.  However, that one was made using DMT.  Though when I look at the forum page for DMT it says DMT is being sunset because A20 XML modding can do the things DMT used to be needed for.  So I'm hoping I can recreate some of the functionality presented there in an XML-only modlet.

     

    I would like to affect crops, either with a random preset path when planted, or preferably during the growth cycle, based on any of the following:

    • Temperature
    • Biome
    • Elevation
    • Rain
    • Sunlight
    • Time of day
    • Day of week

     

    Is it possible to do any of those?  I can't find any other mod that does so to work from example.  Has anyone found a way to have external variables have an effect?

     

    I did find the H7SB farming mod (https://7daystodiemods.com/h7sb-farming/) which is pretty awesome, and it's been very instructive.  However, that mod's approach is to send every planted crop down a preset path (plant > fertilize > water > grow (wait) > water > grow (wait) > harvest).  I want variation so players need to react and think during the farming process, preferably based on external stimuli.  If I need to create 100 preset paths for the game to choose from when a seed is planted that's fine, but I can't find any way to do even that.

     

    Any thoughts or suggestions are appreciated.

  21. My friend and I were talking about how nice it would be if there was a very small block on the HUD that shows the current quantity of each minable material in our backpack (iron, coal, nitrate, lead, wood, etc).

     

    At the time we were mine-hopping and this would have allowed us to more quickly and easily decide when to switch which item we were mining in our dual-mines, when to move to another mine, and when to quit to head home.  Right now we need to hit tab, which stops mining and slows us down, and we can't keep tabs on our progress as we go necessitating multiple-checks.  This isn't a big deal, but would be a small quality of life improvement that would help mining go a little smoother.

     

    Optimally this mod would work without needing anything installed on the server so it could be used in multiplayer games.

  22. If anyone is interested in trying this out, and in helping me test, I have a version available for download at https://www.dropbox.com/s/wnlppi3wlo9xemc/AesirkinNutritionBuffs.zip?dl=1

     

    Please be sure to backup your game files (including C:\Users\[username]\AppData\Roaming\7DaysToDie) before trying it.  Recommended for a new install, but preliminary testing seems to indicate it may work okay on an existing game.  There is an included readme.txt file that explains exactly how it's supposed to work.

×
×
  • Create New...