See likes

See likes given/taken

Your posts liked by others

Pages: [1]
Post info No. of Likes
Fennec's Random Plant Mod (cross-posted from the old forum)

Hi all,

If you're tired of finding the same old plants in UrW - or if you'd just like to see some more variety - I've made a mod to add randomly-generated plants into the game.In addition to adding more wild plants, it also adds some other features:

New grains and vegetables grown in fields and sold in villages:

Poisonous plants that also have other effects (pretty pointless for plants poisonous in any form, but useful and interesting for plants that become edible when boiled):

Poisonous berries:

Herbs to help you reach spiritual enlightenment (okay, they're actually just drugs):

Medicinal mushrooms:

Additionally, all plants generated by this mod (except mushrooms and berries) provide seeds so you can grow them at your own settlement.

Download the JAR file (attached to this post) and double-click it to run it. It generates four .txt files, each of which start with "flora_mod". These four files should be in the same directory where you saved the JAR file. Move these files to the UrW directory where any other mod files would go, then have fun exploring a world full of new plants!

This mod simply adds more plants to the game, but it does generate enough to be a suitable replacement for the vanilla plants. If you do wish to replace the vanilla plant files entirely, start up the game, move the "flora_mod" files to the UrW directory, and remove all the existing files that BEGIN with "flora_". These default files will automatically re-appear each time the game is booted, but I would strongly recommend backing these up somewhere just in case something goes unexpectedly wrong. Also, since these files do re-appear when you boot up the game, you will have to remove them each time if you do want to remove all the vanilla plants.

Finally, for my fellow programming nerds here, I have included the source code within the src folder in the JAR file in case anyone wants to see my sloppy coding.

- names of picked berries are now accurate
- mod should no longer generate plants that wither before they can be harvested
- mushrooms are now roughly as common as in vanilla
- beneficial berries and mushrooms are now somewhat more common
- program can now be run by double-clicking on it
- "Ok, done!" message appears as pop-up window
- should be compatible with all operating systems now

Known issues:
- plants with names containing "snap" trigger a sound effect when interacted with. this can be fixed by manually changing the name in the flora file.
- poisonous plants with additional effects may be mistakenly identified as edible before all effects are known. rare issue, but proceed with caution if "there's still more to learn".
- (issue encountered on Ubuntu 14.04) flora files appear in /home directory instead of the directory containing the JAR if run with OpenJDK Runtime. this issue does not occur when using WINE.

March 23, 2018, 10:06:07 PM
Re: Need help with Fennec's plant mod Hello! I'm a bit late here, but if you still need help, simply run the JAR file, then move the .txt files it generates into the URW directory where you would place any other mod. :)
March 23, 2018, 10:09:28 PM
Re: What's Going On In Your Unreal World? I lost a faithful companion on this sad day. Kolja the dog met his unfortunate untimely demise while bravely fighting a ferocious lynx during a hunting trip. May he be remembered for his loyalty, his bravery, and his habit of interrupting my sleep by barking at trapped birds.
April 25, 2018, 10:10:43 PM
Re: Caves Funny enough, just today I've encountered things in two caves despite never having any luck before! The first was a bear... and it killed me, unfortunately. Created a new character, and what happened early on was pretty interesting:

So I started out searching for a village to settle near-ish to. While exploring, I encountered a lost adventurer who wanted me to lead him to a village, so I let him tag along. We came across a couple caves on the way, and one of them did contain treasure: a small bronze brooch, a fistful of cranberries (ok...?), and a few leaves from some plant (random plant mod) that it said would make me fall into a trance and journey into the spirit world.

I took that as a sign that the spirits were offering to lead us to the village we were searching for, so I ate the leaves. Sure enough, while tripping on those weird leaves, I stumbled across a village. Go figure!

@JEB Davis That story was a really interesting read! I actually read through the whole thing, not just the cave part, and I'm looking forward to seeing more!

@nekot Wow, okay, that's some really good luck there! And... traders? Can't help but wonder what they were doing lurking in a cave XD

April 28, 2018, 10:40:02 PM
Re: Dismissed hirelings not returing properly I've had this happen multiple times as well. I never keep hirelings around until they leave anymore; I always return to their village and dismiss them there once they say they have a day left. Hopefully this gets fixed soon; I'd like to not have to dismiss them early but unfortunately it's the only way to guarantee they won't get lost.
April 28, 2018, 11:09:43 PM
Re: Poisonous berries This is possible with mods - my random plant mod, for example, has a chance of generating poisonous berries (each type of berry has a 10% chance of being poisonous, with an equal weight to each type of poison).

I agree that it'd be great to see poisonous berries actually included in the vanilla game, though. Eating unknown plants carries so little risk (and no risk at all with berries) that the herblore skill is basically useless as long as you don't go around eating strange mushrooms.

April 29, 2018, 05:21:37 AM
Re: Improving Fennec's random plant generator Hey, sorry for the late reply! It's been awhile since I've touched my mod, or even URW.

You can find the source code by extracting the files from the JAR (7-zip will do this if you're on Windows). The formatting's a mess if you open it in Notepad, but it's fine in NetBeans.

Herbal effects can be assigned to any type of plant, except crops. Herbs always have some sort of effect, with a 20% chance of being poisonous and 80% chance of being beneficial. Berries about a 14% chance of being poisonous and 17% chance of being medicinal. Even mushrooms can be medicinal, but the chance is only about 7% (whereas the chance of poison of some sort is 50%). Psychoactive chance is slightly above 2% for any plants which roll for effects, whether medicinal or poisonous, and regardless of plant type. The reason for these odds is that I wanted to roughly mimic the vanilla distribution of effects of plants (hence also why some medicinal effects are more common than others), but I also didn't want to make any effects exclusive to certain types of plants (and I wanted to make berries actually worthwhile... if they don't kill you).

Crops don't have special effects because they are only meant to be used as a food source, not used for healing purposes, but throwing in a small chance of non-poisonous, non-psychoactive effects might be a good idea.

The plant type quotas is a good idea, but that'd take more than a little tweaking to implement. The easiest solution I could see would be to generate semi-randomized plants with certain characteristics first, then make fully-randomized ones after. If this is done without huge overhaul to the mod, though, these would have to be hardcoded to match certain plant types, since the individual flora files are generated entirely separately. So, for instance, instead of a guaranteed shamanic plant (of any type), it'd be a guaranteed magic mushroom, and so on. But it could work.

Flour should never be an issue with this mod. 33% of crops are grains, and all herbs produce seeds. (Making flour from certain roots should be possible, but, looking back over the code, it looks like it isn't possible after all. That was definitely an oversight on my part.) Threads and dyes are outside the scope of this mod -- forcing it by overriding the name generation to contain certain elements is possible (as you suggested), but it's honestly easier to just change the crafting recipes. Just don't mix plant types when crafting, and you're good.

It's theoretically possible for a region to end up devoid of plants, or at least mostly barren, but I'm not sure some minimum number of plant species is necessary to enforce. Each plant has a 1/3 chance of appearing in any given region (except southern, which is 1/2) and can appear in multiple regions (minimum of 1), and the mod generates a minimum of 30 species (not counting crops, as they're distributed differently), so that results in an average of at least ten species per non-southern region (though it'll realistically end up being around 15 per region).

Editable settings is something I've considered, but never got around to implementing because that'd be a ton of extra work. Adjusting the rate of poison by plant type is definitely a good idea, as well as being able to toggle whether or not deadly poison can occur. Maybe you want mushrooms to be more abundant. Maybe you want to go on an endless lsd trip. There's a lot of possibilities here, especially with settings that are highly customizable. (That's a lot of work, of course, but even something simpler like a difficulty setting (higher difficulty = higher chance of poison; lowest difficulty = no deadly) would add more depth.

Some berries and mushrooms can usually be found in winter, although this isn't hardcoded. On average, you'll wind up with 1-4 kinds of berries and 2-4 kinds of mushrooms that don't wither until December (Winter month). Only cranberries and Tellervo's gift mushrooms last this long in vanilla, so personally I think those are decent odds.

Your template idea is interesting, but it would also be difficult to implement, since it involves largely overriding the random generation. I'm also not sure how much point it'd even have -- correct me if I'm wrong, but if you can identify anything about a plant (even with uncertainty), doesn't it always tell you whether it's edible or not?

Stimulant plants do exist, and chances are you'll end up with at least a couple. There's a 1 in 10 chance any given medicinal or poisonous plant (hopefully edible when boiled!) will have a stimulant effect (although realistically the chance is slightly lower -- there's also a 1 in 10 chance for sedative, and the stimulant check is skipped for sedative plants, so it's more like a 10% chance for sedative, 9% for stimulant).

Personally, I don't see the need for mod-related recipes, mainly because the existing recipes in game (minus pea soup) don't call for specific ingredients. Regional dishes are an interesting idea, but seriously complicated to make. Right now, the mod just generates some herbs, dumps them in a text file, generates some crops, dumps them in another text file, and so on. Anything like recipe generation would require either a) overhauling the mod so that it holds onto all generated Plant objects to be referred back to later, instead of overwriting them once they've been dumped to a file, or b) creating a separate mod which takes flora files as input and works things out from there. I'm actually not sure atm which would be more practical.

I'm not sure if you can obscure plant names in cookery descriptions, or if you can create recipes with additional effects besides those of the basic ingredients, so I don't see what advantage recipes for medicines or psychoactive mixtures or medicines would have over simply boiling herbs and drinking them or using them in other recipes.

You've got a lot of interesting ideas, though. Thank you for the feedback!

May 16, 2019, 03:26:18 AM
Re: What's Going On In Your Unreal World? This morning, I slipped and fell on the ice, bruised my knee, and broke my phone screen. This was after several minutes of wandering lost-ish in the cold.

Then my URW character fell out of a tree. Now she has to crawl through the snow, and she's woefully underdressed for the weather. Suddenly, my morning doesn't seem so bad.

Thankfully, I finished my cabin in time for winter, though I think I've angered the forest spirits with all my tree-chopping. I've seen almost no wildlife for months, besides a brief period of bird migration. My traps are empty. Food isn't a problem (I catch plenty of fish), but clothing... now that Dead month is here, my linen trousers, woolen undershirt, and birch-bark shoes and cap aren't nearly sufficient.

I wonder if it'd be worth using part of my shirt to make a pair of mittens (I have Rain's clothing mod). Though apparently I'm unable to do that while injured. Oh well. For now, I guess I'll hunker down, keep fishing, and sacrifice herbs daily hoping to appease the spirits.

EDIT: Trapped a squirrel just after posting this. Fancy that! Between that and the hare furs I recently bought, I can finally make myself some mittens!

January 13, 2021, 02:55:12 PM
Animal tracks visible through floor If you build "inside of a building" on a tile with visible tracks, the tracks persist. It isn't just graphical, you can still identify them by looking or using [t]racking.
January 14, 2021, 03:16:44 AM
Re: Animal Movement Around Water Animals can despawn, as PALU said. I don't know the exact mechanics involved, but I would assume animals don't despawn from the current wilderness map tile. Nearby and/or recently-visited tiles (visited on the zoomed-in map) are probably reasonably safe as well. It's also possible for animals to spawn on islands, which setting traps allegedly influences (again, I don't know the exact mechanics, but it's beneficial so long as you don't upset the forest spirits).

Animals can't cross water if it means entering the water. I don't know about crossing water where the land is connected diagonally, but I would assume so. I've seen them pass through diagonal gaps in fences. If you're worried about animals escaping, just block their path with a trap.

Predation does exist in URW, so you could lose your prey to a predator, unlikely as it is. But, hey, predators are more valuable anyway!

January 15, 2021, 06:27:39 PM