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 - lobz

#1
Ok, I don't even know what "enterprise standard" means and your example is going a bit over my head, but, do you have like an example of a good tutorial that teaches how to change things in Rimworld without any complex tools? I mean, part of why I'm wrtiting this is that a lot of the tutorials I found start with using C# and a decompiler and I literally still haven't managed to make a DLL mod, so I wanted to slow down the speed of tutorials. If I'm going too fast, I want to do better. But I don't know exactly what making a Def that has the same name as a Core Def does, and I've been told it creates incompatibilities, and I don't want to avoid teaching the tool I learned as the right one to use. But maybe I could slow it down more.

I took your advice into consideration and slowed down this part of the tutorial. I also linked to the xpath generator tool (https://xmltoolbox.appspot.com/xpath_generator.html) which I think makes messing with xpath much easier. Maybe I should also add a "how to use this tool step by step"?
#2
Quote from: RawCode on July 30, 2021, 12:32:58 AM
i hope you understand that using xpath where you should not is not something beginners should do.

tutorial for beginners rely on "copy def you like to change from core to your mod and change whatever you want" not playing with xpath.

Oh! I do not understand that actually. Did I use xpath where I shouldn't? I remember when I made my first mod I got some feedback explaining I should use PatchOperations to make it have any chance of being compatible with other mods that alter the same thing. I think that's a good point and I wouldn't wanna teach bad practices.

Also, unfortunately I haven't had feedback from any actual begginners who don't have some familiarity with xml or at least html. Maybe I will add some extra resources to help understand xml pathing.
#3
Quote from: sharp-ID on July 29, 2021, 09:08:42 PM
i wish i could give you a like or two XD for your nice and kind work.

Thank you

Aw thank-you for the encouraging words! Did you read the tutorial? Find anything useful?
#4
Hi there, I'm making a small sequence of tutorials on modding rimworld for begginers who never modded before and don't have any tools (basically what I wish I had when I made my first mod) as I learn more on how to mod. It's still a work in progress but I wanted to share what I did with you all.

https://github.com/Lobz/modding-Rimworld-tutorial#readme
#5
Hi, I'm new here, and I know this topic hasn't been updated in some time but it's such a useful tool! can someone give a basic explanation of what do I have to do to integrate this in my code? Can I copy the workflow files or is there more to it?

PS.: is there a workflow for integrated automatic testing?
#6
Quote from: K on May 28, 2020, 12:05:05 PM
If you were intent on trying to have common code between the two versions, what you could do is move that common code out to it's own project file, then build it twice against the two different versions of the game, and put those two common code DLLs into your 1.0 and 1.1 folders. That's the closest thing I can think of to accomplish what you want.

That would be a lot of manual copying and pasting, wouldn't it? It sounds complicated... but maybe better than what I'm currently doing.
I haven't tried making a .dll mod yet, so I hadn't even thought abt this issue with compiling... My main worry was with duplicating code. Duplicating the .dll's is unavoidable.
#7
Quote from: LWM on May 28, 2020, 01:01:44 PM
I highly recommend ONE mod that has name that DOES NOT change: this highly increases the likelihood that any compatibility patches will continue to work with your mod after any updates.

That makes sense. So option B (two mods) is out.
#8
Say I want to keep my mod compatible with 1.0 and 1.1, like many mods are. The changes to make it compatible with each version is only one line or a few lines; only a small part of the mod. I don't want to have to maintain two copies of the code, so what do I do? I've seen several different approaches to handle that, and I'm trying to weight their pros and cons and maybe find a better alternative. Among my criteria are:

1. The mod must be compatible with both versions, with no error
2. Easy to maintain and update using Github and Steam (for modder)
3. Easy to use and update using either Github or Steam (for user)

These are the alternatives I've seen/thought of so far:

A. Using folders 1.0 and 1.1 with the code for each version
Pros: maintain single mod on the workshop and updates automatically when user changes version
Cons: each folder has to have a complete copy of the code, and if I change something, I have to copy the change for each version. very annoying to maintain, bug-prone.

B. Use two different release branches on git, release each as a different mod
Pros: avoid duplicating code, easy to maintain
Cons: have two different mod pages in Steam, user changing version needs to uninstall one and install the other

C. Using folders 1.0 and 1.1 as different branches on git and put them together on my home computer
Pros: maintain single mod on the workshop and updates automatically when user changes version + avoid duplicating code
Cons: users wouldn't be able to download from github... also it's a little monstruosity. it screams "gambiarra".

What I really wished I could do:

D. Have the common code in a common folder and the differing code in 1.0/1.1 folders
Pros: maintain single mod on the workshop, updates automatically when user changes version, avoid duplicating code
Cons: I have no idea how to do that

Or better yet:

E. Have all the code in the common folders, have some of the code only activate after detecting the right version
Pros: maintain single mod on the workshop, updates automatically when user changes version, avoid duplicating code... also this is so similar to how we deal with compatibility to other mods. it's neat.
Cons: I have no idea how to do that
#9
Unfinished / Re: (WIP) Gradual Romance
May 26, 2020, 06:31:22 PM
Hey there. This mod seems awesome. But I only just upgraded to 1.1 and I'm gonna wait until you have an 1.1 update too. Do you have any plans in that direction?

Btw I didn't find the dependency tag on your About.xml, so if you haven't added it, could I suggest you do?
#10
These mods are pretty cool! Any chance you'll add them to Steam? It would be convenient for keeping updated.
#11
Quote from: LWM on May 26, 2020, 11:51:37 AM
There's also
<designationCategory Inherit=false></designationCategory>
or
<designationCategory Inherit=false />

to keep it from being inherited from the parent Abstract def.  (capital "Inherit")
Thanks for the tip! I'm trying this out, but it seems adding either of those makes the game crash on startup. Maybe it doesn't work with patches?

Quote
Remember to make sure your minified item can be installed and uninstalled with the changes you've made ;)
Sure thing! It's working fine.

Quote
as far as being able to keep that 600 value...yeah...you can write custom C# patch operations to do that....but that's it.
I feared as much... It seems kind of overkill for such a simple mod, doesn't it

Quote
Good work!
Thanks :)
#12
ok read the links and tried to do the thing. Adding the recipe works fine, and I think the WorkToMake node is working? It's a bit weird because the value is 600 but when I check the work left to amke in the game it says 10. But at least this change seems to be in the base game as well.

I wish I could just replace the node with the value of WorkToBuild that's already there, that would be helpful since currently I have to patch the value for each thingdef like this:

<Operation Class="PatchOperationReplace">
    <xpath>Defs/ThingDef[defName="Bedroll"]/statBases/WorkToBuild</xpath>
    <value>
        <WorkToMake>600</WorkToMake>
    </value>
  </Operation>


Also, now I can't add the category for some reason? With a new def it was working fine but now it doesn't work at all. I wonder if it's because I'm superceding an inherited node? Is there a way to see what the final xml object is turning into? Should I go in the Help forum for this?

Edit: changed to a null category and it works just fine now:


  <Operation Class="PatchOperationAdd">
    <xpath>Defs/ThingDef[defName="Bedroll" or defName="BedrollDouble"]</xpath>
    <value>
      <designationCategory></designationCategory>
    </value>
  </Operation>


Also updated to 1.1 and publiched to steam.
#13
Thank-you so much! I was worried abt that but I had no idea how to do any different. Specially since I was making this mod as a way to test my skills before amking more complicated mods that definetly could create conflicts. I'll read the links you sent and come back here if I have trouble, ok?

Quote from: LWM on May 23, 2020, 11:13:08 PM
In your case that would be...what, adding a recipe maker section to each?

Well, I also had to add "workToMake" (instead of "workToBuild") and "<designationCategory>Root</designationCategory>" so the game would stop adding the bedroll in the furniture tab and making it a buildable item (which I think it's probably bad practice but I have no idea how to do that differently). Either way it's just adding a bunch of lines to the thingDef so it should be simple once I learn how to do it
#14
General Discussion / Re: Introduce yourself!
May 25, 2020, 01:03:38 PM
Hello there folks. Doing the thing with introducing myself shortly after joining. Haven't used a forum in decades so this is feeling nostalgic,

-What introduced you to RimWorld? Or to this style of game in general?
I've been playing strategy/group managing/city-building games for as long as I can remember. Have some very fond memories of managing a bunch of Lemmings to build things, or a bunch of Age of Empire peasants to cut wood and hunt for food... yeah actually I will never forget the thrill of kiting an elephant to hunt it with my squad of peasants in AoE. Ofc I also had a very intense The Sims phase; keeping a family happy and alive was so exciting, I always picked the poor family to keep it on the level of survival. Then I found my first rogue-likes and survival games like Pixel Dungeon and Don't Starve and I was instantly hooked, and now Survival is by far my favorite game type. Rimworld specifically was something I found on a Steam sale, but it pushed all the right buttons in my brain.

-What's your favorite other game?
I'm not much of a favorites person... I also love adventure games like Legend of Zelda and pure building-puzzle games like Train Valley. But I'm inclined to say Don't Starve Together is my favorite. All it lacks is a proper base-building mechanic.

-Most embarrassing gaming-related story?
idk how to answer this. maybe that time I spent a whole month trying and failing to beat the Water Temple in Ocarina of Time, and when I had finally done it, my baby cousin came to visit and deleted my file, and so I've never managed to complete that game?

-What kind of breakfast cereal is the best?
I'm into granola with chocolate milk, a drop of coffee and bananas.
#15
Hey there, this is my first mod ever in anything, so I'd love to hear some feedback, know if I'm doing some bad practice or something.

What the mod does: makes bedrolls and double bedrolls a craftable item, made in crafting spots or tailor benches.

Why: I want to make a bunch of bedrolls to use in caravans, so using the crafting interface is way more confortable than building-and-then-uninstalling. Also it makes a lot more sense, immersion-wise, to sew a bedroll the same way you sew a shirt.

How: a xml file replacing the bedrolls thingdefs, adding a recipe. I set their category to Root as a way to make it not appear in the furniture tab and remove the "build copy" button. Can that have any unintended consequences?

Source: https://github.com/Lobz/CraftableBedrolls

A harmless doubt: how does it know what the bedroll can be made of? I couldn't find any xml tags saying what resources are valid or not, and yet it only allows fabric-like materials in the recipe.