Jump to content

[A21] khzmusik's Modlets


khzmusik

Recommended Posts

I found a "two mods combined bug" - since both mods are yours I consider it a "bug" or oversight... if they were from different authors it would be an "incompatibility" .... If you put both snowberry love and food spoilage in a game, the snowberries, paste, and seed scrap to Divide by Zero force bringing up the log and barfing all over the screen. the tea scraps to glass... I am thinking the best fix would be to remove the attribute scrappable so they don't even have a scrap menu option.

I did not test this with just snowberry love mod alone but the more I look at it, the more I think it is unrelated to the food spoilage mod.

Edited by Brain75 (see edit history)
Link to comment
Share on other sites

Posted (edited)

Hey, glad you're enjoying the mods.

 

I just got back from a week-long vacation with my family, so I haven't been checking the forums.

 

On 4/5/2024 at 7:48 PM, Brain75 said:

Since you did the food spoilage, I think you are the guy to ask for this... could you consider a new mod request. Expanded storage for vehicles - not over the top ridiculos like adding C130 cargo storage to a bicycle, but realistic like adding a saddle bags to bicycle/minibike/motorcycle and ...... here's the big one.... also Coolers - little strap on coolers to bicycle, etc... One guy has already modeled the cooler into a vehicle - the flat bottom boat, be nice if your spoilage mod made that appropriately preservative.

 

I'm actually not sure I'm a good person to ask about vehicles. I haven't really worked with them all that much.

 

I looked into it briefly, and it would take a lot of research just to figure out if it's feasible. If it's possible to actually swap out a vehicle's container, then it might be possible to make a mod that swaps it out to a bigger container which has a higher "preserve" value. But so far I don't think that's possible. So, no promises.

 

On 4/6/2024 at 8:39 PM, Brain75 said:

also I think yo missed something in the food spoilage for SnoBalls and Twinkies... I see you removed the property Spoilable, but they still spoil. (since they inherit from cornbread??) - I managed to get them to not spoil in my own tweak just thinking you wanted to check yours.

 

 

My mod has neither SnoBalls nor Twinkies. (It does have "preserved pies" which are supposed to be like Drake's or Hostess fruit pies.) Those probably come from another mod.

 

The way I add food spoilage tags is by the item's name in the XML. It should start with "food" or "resourceCrop" and not contain "Can", "Schematic", or "Magazine". If the other mod doesn't follow this convention, then you'll need to make a compatibility modlet.

 

Another possibility is that the other mod loads after mine (mods load in alphabetical order). If that's the case, then you could rename my mod folder with a "z_" prefix to make it load later.

 

  

7 hours ago, Brain75 said:

I found a "two mods combined bug" - since both mods are yours I consider it a "bug" or oversight... if they were from different authors it would be an "incompatibility" .... If you put both snowberry love and food spoilage in a game, the snowberries, paste, and seed scrap to Divide by Zero force bringing up the log and barfing all over the screen. the tea scraps to glass... I am thinking the best fix would be to remove the attribute scrappable so they don't even have a scrap menu option.

I did not test this with just snowberry love mod alone but the more I look at it, the more I think it is unrelated to the food spoilage mod.

 

That's very odd. None of them have a "scrappable" attribute, and the ones that have materials, have the same materials as their vanilla counterparts. I will investigate.

Edited by khzmusik (see edit history)
Link to comment
Share on other sites

Posted (edited)
On 4/8/2024 at 12:56 PM, Brain75 said:

I found a "two mods combined bug" - since both mods are yours I consider it a "bug" or oversight... if they were from different authors it would be an "incompatibility" .... If you put both snowberry love and food spoilage in a game, the snowberries, paste, and seed scrap to Divide by Zero force bringing up the log and barfing all over the screen. the tea scraps to glass... I am thinking the best fix would be to remove the attribute scrappable so they don't even have a scrap menu option.

I did not test this with just snowberry love mod alone but the more I look at it, the more I think it is unrelated to the food spoilage mod.

 

I just double checked. With both Food Spoilage and Snowberry Love mods installed, seeds, paste, and drinks do not scrap at all. I also double-checked what items they spoiled to (for those items that spoil), and they spoil to vanilla items, so there should be no issues.

Edited by khzmusik (see edit history)
Link to comment
Share on other sites

Thanks for the prompt check - I am running ravenhearst + snow berry love, so guessing it is some other add or remove or or that causes the issue, I've hunted and can't find it - in fact there is not one single reference to snowberry I can find outside of biome frequency and your modlets. The more I dig into snowberry I wish it was a little more like real life - +1 food, -1 health, 1% chance of dysentery. As it stands it is not farm-able within ravenhearst because it does not have a lot of properties that it needs to make it work with Ravenhearst's extended farming modlet that too is a bit of a "I wish" item :).

Link to comment
Share on other sites

On 12/28/2023 at 11:24 PM, khzmusik said:

New mod:

 

Trader Routes: Biome Progression

 

This mod changes the "Opening Trade Routes" quests, so they progress through the biomes as the tier changes.

 

XPath only ("server-side").
 

Here is where the Opening Trade Routes quests send you:

  • Tier 2: Any biome except the Wasteland (unchanged from vanilla)

  • Tier 3: Any biome except the Pine Forest or the Wasteland

  • Tier 4: Any biome except the Pine Forest

  • Tier 5: Snow or Wasteland biomes only (technically, any biome except the Burnt Forest, Desert, or Pine Forest)

 

Repo: https://gitlab.com/karlgiesing/7d2d-a21-modlets/-/tree/main/khzmusik_Trade_Routes_Biome_Progression 

Download: https://gitlab.com/karlgiesing/7d2d-a21-modlets/-/archive/main/7d2d-a21-modlets-main.zip?path=khzmusik_Trade_Routes_Biome_Progression 

 

We're very interested in trying your Biome Progression mod. One question.

 

To make the final trader be in the wasteland we will enable that last section of xml. Should we then disable the preceding section also dealing with tier5_nexttrader ?

 

TIA

 

Max Headroom

Edited by Max Headroom (see edit history)
Link to comment
Share on other sites

Posted (edited)
22 hours ago, Max Headroom said:

We're very interested in trying your Biome Progression mod. One question.

 

To make the final trader be in the wasteland we will enable that last section of xml. Should we then disable the preceding section also dealing with tier5_nexttrader ?

 

TIA

 

Max Headroom

 

No, you shouldn't remove the existing tier5_nexttrader code. That code appends the "biome_filter" variable, which is needed.

 

The commented-out code includes this:

 

<set xpath="/quests/quest[@id='tier5_nexttrader']/variable[@name='biome_filter']/@value">wasteland</set>

 

That will change the value of the "biome_filter" variable to "wasteland".

 

An alternative is to replace the existing tier5_nexttrader code with this:

 

<append xpath="/quests/quest[@id='tier5_nexttrader']">
    <variable name="biome_filter_type" value="OnlyBiome" />
    <variable name="biome_filter" value="wasteland" />
</append>

 

But, I figured that it would be easier for people to just remove comments.

Edited by khzmusik (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
Posted (edited)

Using your biome progression mod as a template I am attempting to force the entire progression sequence from a pine forest start to be: burnt_forest => desert => snow => wasteland. What I've done isn't working. At the conclusion of tier-1 I'm getting the snow biome. What am I doing wrong?

 

Edit: I mistyped. I'm looking for pine_forest => desert => burnt_forest => snow => wasteland.


Here's my xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <!-- Remove the existing variable overrides -->
    <remove xpath="//quest[contains(@id, 'nexttrader')]/variable[@name='biome_filter_type']" />
    <remove xpath="//quest[contains(@id, 'nexttrader')]/variable[@name='biome_filter']" />

    <!-- Set new variable overrides for the biome filters (type is already "ExcludeBiome") -->
    <append xpath="/quests/quest[@id='tier2_nexttrader']">
        <variable name="biome_filter" value="pine_forest,burnt_forest,snow,wasteland" />
    </append>
    <append xpath="/quests/quest[@id='tier3_nexttrader']">
        <variable name="biome_filter" value="pine_forest,snow,wasteland" />
    </append>
    <append xpath="/quests/quest[@id='tier4_nexttrader']">
        <variable name="biome_filter" value="pine_forest,wasteland" />
    </append>
    <append xpath="/quests/quest[@id='tier5_nexttrader']">
        <variable name="biome_filter" value="pine_forest" />
    </append>

    <!--
        You may want the final quest to ONLY go to traders in the Wasteland.
        If so, un-comment the XML below.
    -->
   
    <append xpath="/quests/quest[@id='tier2_nexttrader']">
        <variable name="biome_filter_type" value="OnlyBiome" />
    </append>
    <set xpath="/quests/quest[@id='tier2_nexttrader']/variable[@name='biome_filter']/@value">desert</set>

    <append xpath="/quests/quest[@id='tier3_nexttrader']">
        <variable name="biome_filter_type" value="OnlyBiome" />
    </append>
    <set xpath="/quests/quest[@id='tier3_nexttrader']/variable[@name='biome_filter']/@value">wasteland</set>

    <append xpath="/quests/quest[@id='tier4_nexttrader']">
        <variable name="biome_filter_type" value="OnlyBiome" />
    </append>
    <set xpath="/quests/quest[@id='tier4_nexttrader']/variable[@name='biome_filter']/@value">snow</set>

    <append xpath="/quests/quest[@id='tier5_nexttrader']">
        <variable name="biome_filter_type" value="OnlyBiome" />
    </append>
    <set xpath="/quests/quest[@id='tier5_nexttrader']/variable[@name='biome_filter']/@value">wasteland</set>

</config>

Edited by Max Headroom (see edit history)
Link to comment
Share on other sites

The relevant section of the ConfigsDump\quests.xml looks like this:

  <quest id="tier2_nexttrader">

 

*snip*

 

    <reward type="Exp" value="500" />
    <variable name="biome_filter" value="pine_forest,burnt_forest,snow,wasteland">
      <!--Element appended by: "MaxHeadroom_Trade_Routes_Biome_Progression"-->
    </variable>
    <variable name="biome_filter_type" value="OnlyBiome">
      <!--Element appended by: "MaxHeadroom_Trade_Routes_Biome_Progression"-->
    </variable>
    <variable name="biome_filter" value="desert">
      <!--Element appended by: "MaxHeadroom_Trade_Routes_Biome_Progression"-->
    </variable>
  </quest>
 

I have a test game saved just before turning in the last tier 1 quest. The "next trader" quest given is in the snow biome. I'm stumped.

Link to comment
Share on other sites

OOhhh ...

 

The two remove statements are leaving the following in tier2_nexttrader quest

 

    <objective type="Goto" id="trader" value="5" phase="1">
      <property name="nav_object" value="go_to_trader" />
      <property name="biome_filter_type" value="ExcludeBiome" param1="biome_filter_type" />
      <property name="biome_filter" value="wasteland" param1="biome_filter" />
    </objective>
 

Can't be good. 

Link to comment
Share on other sites

Alrighty. I'm a newb at this so I watched one of David Taylors videos on doing simple things in 7dtd with xml. The following will reach into the tier2_nexttrader quest and changes the default biome filter in the /objective.

 

<set xpath="/quests/quest[@id='tier2_nexttrader']/objective[@type='Goto'][@id='trader']/property[@name='biome_filter']/@value">pine_forest,burnt_forest,snow,wastland</set>
 

In vanilla form only the wasteland was filtered out. Without changing that I was getting my day-3 self sent to the snow biome no matter what else I did. Just the way my test map fell out, the snow biome was closest.

 

It looks like tiers 3-5 are all based on the tier2_nexttrader quest so I hope this does not mess with them. They do each have (biome) difficulties set which may make the rest of this moot. But since I got snow for tier2 those may not be effective. I'll find out as I do my test play-through.

 

Link to comment
Share on other sites

Posted (edited)

I'm reading this late in the evening, and I'm probably missing a bunch of stuff, but I did notice one thing.

 

If you have duplicate XML property tags with the same property name, then the last one "wins" (because it is that last one that is read by the XML reader).

 

This is relevant for the following XML:

<variable name="biome_filter" value="pine_forest,burnt_forest,snow,wasteland">
  <!--Element appended by: "MaxHeadroom_Trade_Routes_Biome_Progression"-->
</variable>
<variable name="biome_filter_type" value="OnlyBiome">
  <!--Element appended by: "MaxHeadroom_Trade_Routes_Biome_Progression"-->
</variable>
<variable name="biome_filter" value="desert">
  <!--Element appended by: "MaxHeadroom_Trade_Routes_Biome_Progression"-->
</variable>

 

Notice the "biome_filter" variable is specified twice. Only the latter one (with the value "desert") will be the value used by the game.

 

I'm just doing an overview now. I'm sure there is more stuff that I can triage, but that is what I have for now.

Edited by khzmusik (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...