Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Qwynn

#1
Outdated / Re: [A16]Better Terrain
February 20, 2017, 08:18:42 PM
Whew. I've been so busy on my own stuff I haven't had a chance to do any testing on the recent versions. I think I'll stat a game up tonight with the latest BT and let you know if I bump into anything.  ;D
#2
Outdated / Re: [A16] Expanded Woodworking
February 18, 2017, 06:57:01 PM
I'll add it to the currently incompatible list, sort of.

I have a kinda-sorta patch on github, but I need to update for the latest version of EW and send it off to my helpful tester again. If you'd like to play with it as well, please feel free (after I update it that is).
#3
Outdated / Re: [A16] Expanded Woodworking
February 18, 2017, 05:59:07 PM
Quote from: ambivalence on February 18, 2017, 10:49:32 AM
Could you make a patch for SeedsPlease? I guess, it's the great game changer – as great as VG.

I also play with SeedsPlease! and it is compatible out of the box. Load SeedsPlease after Expanded Woodworking. The load order should look like this:

  • Vegetable Garden
  • Expanded Woodworking
  • Expanded Woodworking for Vegetable Garden
  • SeedsPlease!
  • SeedsPlease! for Vegetable Garden

Quote from: dnks on February 18, 2017, 01:46:14 PM
Oh you meant the bench isn't working because it asks for wood, I thought you asking for a patch for SeedsPlease was about trees and seeds. Here, I should've thought about that. Add it after all the SeedsPlease files.

I was confused for a minute myself! Unless you're pulling seeds out of wood there shouldn't be an issue! But I realize now they were asking for the plant working bench to be stuffed for all the wood types rather than be stuck with just the default woodlogs (which become mixed lumber in EW). Thanks for the quick patch, dnks!
#4
Outdated / Re: [A16] Expanded Woodworking
February 18, 2017, 01:07:57 AM
Bamboo lumber has been added and its stats were adjusted inline with other woodtypes. Saguaro cacti now drop saguaro ribs.

Huzzah!

The steam version has been updated as well as the GitHub master files.
#5
Outdated / Re: [A16] Expanded Woodworking
February 17, 2017, 09:26:15 PM
Quote from: Trigon on February 17, 2017, 09:03:51 PM
Awesome! And yeah I'm not an expert on bamboo but I kinda figured it was something worth bringing up since it does cause some silliness with certain things. Also log walls are listed as strong but they're weaker than lumber of the same type. Is this intentional? And saguaro currently drops mixed lumber. I realize I meant to mention that.

Well that's silly. I forgot those cacti existed. I'll add them to the todo list as well! Thank you!
#6
Outdated / Re: [A16] Expanded Woodworking
February 17, 2017, 08:45:21 PM
Quote from: Trigon on February 17, 2017, 07:59:25 PM
Is the dependency under the VG link? Also I'm a huge fan of this development for fruit trees yielding wood now. Before I felt like there wasn't a good reason to grow fruit trees as opposed to berries and such. The yield-per day and long grow times were just underwhelming, but now that they drop wood they're definitely a strong contender, especially on ice sheets or other such cold biomes. Hell even in deserts now I would say.

Edit: Also. I don't know if I'm right about this but it seams to be the case that bamboo counts as lumber without ever being made into lumber, so it doesn't seem that it can be used for fueling stoves with expanded woodworking. Is it possible to make bamboo work as fuel at least or no? Because after playing and setting my people not to make all the logs into lumber I've come more in line with your reasoning, but since bamboo kinda acts as logs and lumber in VG I was wondering what your take on that was.

You'll need to download the primary version (the Github or Steam link) as well as the Vegetable Garden patch (the VG titled links beneath their respective categories).

Bamboo completely slipped my mind. I'll move bamboo to the raw log category and add in bamboo lumber (which does exist!) shortly! Thank you for reminding me!
#7
Outdated / Re: [A16] Expanded Woodworking
February 17, 2017, 06:42:32 PM
Quote from: Trigon on February 14, 2017, 09:23:43 PM
Shouldn't vanilla and VG buildings be able to take lumber? I don't see why you can't burn lumber in a furnace, campfire, etc.

Technically sure. It's a bit of a design choice though. I wanted there to be ample reasons to keep raw logs: using them as fuel to being needed in some construction and recipes. It makes a lot more sense you would use unprocessed wood as fuel rather than burn that lumber you just spent time making.

Additionally, a large update was pushed today with a couple of bug fixes and ease of use recipes. Most importantly, all wood and lumber has been rebalanced to actually be unique and Vegetable Garden fruit trees now drop wood! Finally, Expanded Woodworking for Vegetable Garden is now dependent on Expanded Woodworking, so please make sure you download the new dependency!
#8
Beautiful, Thririte. I just tested it against both the original problems and it all looks good. Thank you! I think I also see how it works now as well thanks to your additional commenting. That makes a lot of sense!

Hilariously, you've also given me an interest in C# sharp now, so I shall enjoy my floundering and I learn my way about it. Thank you for that as well!  ;D
#9
I'm proud of myself in saying that my guess was right! The public override int YieldNow () line was what was causing the issue. I fixed the problem by switching to PlantCollected. Of course, I then I had learn what the return function did and how to change it to return void!

But, I did.

Thank you so much Thirite. You've helped a tonne. Huzzah for compiling my first DLL. XD

Edit: Sadly I celebrated too soon. Now I have an issue of whenever the plant is designated to be harvested it doesn't lose it's growth rating.  :'(

Alas, back to figuring stuff out!
#10
Quote from: Thirite on February 10, 2017, 09:35:50 PM
Well, pretty much anything is possible. Whether something can be done neatly without overwriting base game code is the real question. I took a look at the source and for whatever bizarre reason the method for creating the products of harvesting is coded into the JobDriver_PlantWork class rather than the Plant class itself. You could still do it in a shitty hacky way though without detouring anything:

using System;
using RimWorld;
using UnityEngine;
using Verse;

namespace MySpecialPlant
{
public class SpecialPlant : Plant
{
public override int YieldNow ()
{
if (!this.HarvestableNow) {
return 0;
}
if (this.def.plant.harvestYield <= 0) {
return 0;
}
float num = this.def.plant.harvestYield;
float num2 = Mathf.InverseLerp (this.def.plant.harvestMinGrowth, 1, this.growthInt);
num2 = 0.5f + num2 * 0.5f;
num *= num2;
num *= Mathf.Lerp (0.5f, 1, (float)this.HitPoints / (float)base.MaxHitPoints);
num *= Find.Storyteller.difficulty.cropYieldFactor;


int amount = GenMath.RoundRandom (num);

ThingDef second_thing_def = ThingDef.Named ("HarvestedThing2"); // replace with the defName of whatever it is that should also appear beside the normal harvested item
Thing second_thing = ThingMaker.MakeThing (second_thing_def, null);
second_thing.stackCount = amount; // you could modify this to "amount * 0.5f" if you wanted half as much of the second thing created as the amount of the normal harvested item, for example
GenPlace.TryPlaceThing (second_thing, this.Position, this.Map, ThingPlaceMode.Near, null);

return amount;
}
}
}


Compile that as a dll and it would probably work. You'd also have to add this to the top of your fancy plant's xml ThingDef:
<thingClass>MySpecialPlant.SpecialPlant</thingClass>

So I've been working on this for a few days and am having a little bit of an issue. After a lot of trial, error, and google I managed to successfully compile the DLL and have it work. I won't tell you how long it took me to realize my original issue was due to using .NET 4.5 instead of 3.5, but it's a bit embarrassing.

Anyway! While it is working there seems to be a bit of a bug: Designating the plant for removal (cut) instead of harvest causes the second item to spontaneously drop without pawn interaction. I can then remove the cut order, wait a few ticks, issue a cut order again on the same plant and have the plant "shed" it's second item. Hello infinite resource issue.


using System;
using RimWorld;
using UnityEngine;
using Verse;

namespace FruitTreeWood
{
public class Apple : Plant
{
public override int YieldNow () // is this what makes the wood pop up instantly on cut?
{
if (!this.HarvestableNow) { // if this plant is harvestable now then...? removing this line doesn't seem to do anything?
return 0;
}
if (this.def.plant.harvestYield <= 0) { // if plant yield is greater or equal to 0 then...?
return 0;
}
float num = this.def.plant.harvestYield; // yield of first item?
float num2 = Mathf.InverseLerp (this.def.plant.harvestMinGrowth, 1, this.growthInt); // thought minimum growth for acceptable harvest but doesn't seem correct
num2 = 0.5f + num2 * 0.5f;
num *= num2;
num *= Mathf.Lerp (0.5f, 1, (float)this.HitPoints / (float)base.MaxHitPoints);
num *= Find.Storyteller.difficulty.cropYieldFactor; // looks for the yield number based on difficulty?


int amount = GenMath.RoundRandom (num);

ThingDef second_thing_def = ThingDef.Named ("WoodLog_Apple"); // replace with the defName of whatever it is that should also appear beside the normal harvested item
Thing second_thing = ThingMaker.MakeThing (second_thing_def, null); // creates the second item
second_thing.stackCount = amount/2; // changing to "amount * 0.5f" creates error on build about float and int, managed to change to amount/2 as a float
GenPlace.TryPlaceThing (second_thing, this.Position, this.Map, ThingPlaceMode.Near, null); // places the new item

return amount;
}
}
}


You can see here how I've slowly been trying to figure out the code. I did manage to fix another problem I was having with the second_thing.stackCount line, so at least I got that done.

Does anyone have some advice for the whole infinite resource thing? I've looked through the Rimworld source code a few times for ideas but... I'm not really sure what I'm looking for. I found the JobDriver_PlantCut, but I'm not sure if anything in there would help me.

My modding experience over the years has been limited to tweaking XML and LUA. This C# stuff is brand new.  :-[
#11
Outdated / Re: [A16] Expanded Woodworking
February 14, 2017, 07:47:26 PM
Quote from: Naxdar on February 14, 2017, 07:34:51 PM
I noticed that refueling VG/vanilla buildings takes only logs and buildings from other mods take only lumber, so that may be working as intended.

It is! There's no real way for me to innately force mods to switch to log fuel without a patch, though I am open to patching for some more popular mods.
#12
Outdated / Re: [A16] Expanded Woodworking
February 14, 2017, 07:16:33 PM
Quote from: Naxdar on February 14, 2017, 04:36:26 PM
I tried the mod and while the idea is interesting, there are some things that feel wrong. Maybe it's stuff you planned to do later but I will list them in any case :
- The stats on all lumber types feel like they were copied from stone. Anything built from lumber is a lot of work due to the 500% work to build modifier, it is only a little bit under the stone value. The hit points of wooden structures are superior to some types of stone. The 90% rest effectiveness multiplier makes wood unfit for building beds and makes growing bamboo mandatory.
- Refueling picks indiscriminately logs and lumber when logs are worth twice as much wood.
- Making all these new wood types would have been a good opportunity to make them slightly different. They all have the same stats.

Balancing wood types and giving them unique stats in on my todo list for the next release. I've already started working on it. By the time I had finished the original research on proper colours for the lumber itself I was researched out. My balance plans revolve around more research regarding hardwood, softwood, and their durability. It's a big priority.

Vanilla or Vegetable Garden should only ever take raw wood for fuel. Fueled buildings from other mods will unfortunately look for mixed lumber. I sadly had to decide here what would be the worst offender: other mods using mixed lumber for fuel or other mods asking for raw logs for construction. I figured it would make more sense to burn lumber than build with raw wood for the purpose of trying to keep the theme of the mod intact.

If you're seeing vanilla or VG fueled buildings take lumber, that's a conflict and I've love to know! You'll probably need to move EW lower in your load order to let it overwrite the buildings.

Thank you for the feedback though! I appreciate it!
#13
Outdated / Re: [A16] Expanded Woodworking
February 14, 2017, 04:16:16 PM
Quote from: Trigon on February 14, 2017, 04:11:37 PM
Awesome, thank you. I assume if it's just an extra recipe my saves will be fine?

Correct!
#14
Outdated / Re: [A16] Expanded Woodworking
February 14, 2017, 12:48:48 PM
Quote from: Trigon on February 14, 2017, 12:56:28 AM
Yeah I realized after asking that's what I should logically do. I did have one question though. I can't fuel my modded items without making mixed lumber, unfortunately I didn't think ahead and all my lumber is now one type. Is there any way to change types of lumber that I'm overlooking?

I've added a lumber to mixed lumber recipe to the github versions but haven't pushed a release yet. Feel free to download the updated master branch though!

Quote from: noble116 on February 13, 2017, 12:00:46 PM
Thank you for the great mod, I always wanted a little variety of wood, also not sure if you are aware but when building with ironwood it makes willow walls and such

This adjective issues has also been fixed in the master branch. I won't push releases though until I get a little bit more work done on some balance changes tonight or tomorrow.  :)
#15
Been meaning to post this here for a while now but it kept slipping my mind. I have a fork of this as well that focused solely on the animal side of things for a larger range of compatibility by switching to <WildBiome> tags, as well as an ADS patch. Feel free to take a look and/or use whatever if you plan on maintaining the entire pack for a while, Tamma.  ;D