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.

changelog:
- 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
6
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
1
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
2
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
1
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
1
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
1
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
1