[Tutorial] [1.0] How to make a .dll-mod (Power Generation)

Started by Haplo, May 01, 2014, 03:42:18 PM

Previous topic - Next topic

comfix


skullywag

Post your code in the mod help forum, someone will help you out, we cant do much with no code to look at.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Haplo

Yes sorry, I'm a bit behind my schedule and this is a bit down my todo list.
Hopefully I get it updated until the end of the week.

Dave-In-Texas

I downloaded vs express as recommended (hey free is cool!)
and ran across this newer more featured and totally free version..
so far it has been a pleasure to use (I used VS years ago to code vb/vc and its definitely better than what i remember)

https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

RickyMartini


milon

Skissor, I'm assuming you haven't found an answer or you would have posted it. What about MonoDevelop? It's cross-platform.

http://www.monodevelop.com/

RickyMartini

Quote from: milon on October 26, 2015, 06:38:57 AM
Skissor, I'm assuming you haven't found an answer or you would have posted it. What about MonoDevelop? It's cross-platform.

http://www.monodevelop.com/

Thanks for the answer and no I havent found a solution, I'll try your link. :)

hoochy

Thanks for this source code, very handy to see some simple examples. The biggest thing I find missing is just the overview of modding. Would be nice if there was some "guide" that tells you what sort of mods need what kind of modifications. However I know this is a lot of effort and is constantly changing. I feel like if there was just a basic overview guide it would increase new modders productivity greatly!

Mithrawndo

Thank you for putting up this tutorial, the contents seem very useful!

I have a small problem though: The includes (using) are showing with a red line under them, despite the dll files being copied across from the Rimworld folder as per the instructions.

This image shows what I mean, and thanks in advance for any help!

Entrio

hi all,
love the game, decided to give modding a go.
So I've compiled my first dll:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using Verse;
using RimWorld;
using RimWorld.Planet;

namespace Panoptes
{
    public class SomethingAwesome : Pawn
    {
        public SomethingAwesome() : base()
        {
            Debug.Log("this is fine wine here!");
        }
        public override void Tick()
        {
            base.Tick();
            Debug.Log("this is fine wine here!");
        }
    }
}



But when i launch the game and enable dev mode, I can't see the messages in the debug log.

location of my dll is D:\Work\OneDrive\games\RimWorld\Mods\Panoptes\Panoptes.dll


Am i placing the dll in correct location?

Thank you in advance

EDIT:
After reading the WIKI i have changed my structure as mentioned on here http://rimworldwiki.com/wiki/Modding_Tutorials/Mod_folder_structure
still no luck

EDIT2:
NVM, got everything sorted, the dll is now loading correctly
I tried <something> once, it was <description>

Haplo


MrGrigsby

Hey all, wanted to jump into this tutorial (thanks for making it by the way), but it is telling me that I need the .Net 3.5 framework. I have 4.5 and was wondering if I can go ahead with the tutorial without downloading the 3.5 framework. Thanks!

Silerra

I thing you only need to set the "target framework" on .Net Framework 3.5.
You can find this option in your project properties.

On my computer is following frameworks installed:
Microsoft .NET Framework 4.5 SDK
Microsoft .NET Framework 4.5 Multi-Targeting Pack
And this works for me. But I'm beginner in Rimworld-Modding, too. So I'm not sure if the error could be somewhere else.

MrGrigsby

It looks like I am getting an error on startup that I do not understand how to clear. The debugger at start up is telling me I do not have the right version number, but everything in the files is the correct version, 0.15.1284.

Also, it looks like all the code is ready to go for the mod itself and I do not need to modify anything. If this is wrong, then can someone tell me what I need to be fixing.

Haplo

Can you post a detailed description or a Screenshot of the error?
Is it that the debugger (visual studio) tells you that the source files are of another version?
In this case:I've used Visual Studio Community edition 2015.newer versions may need a one time upgrade of the project. Just say yes when he asks you. I'm not sure how other debuggers work though..
If it's a file inside the project that is found to be out of date then I really need a Screenshot to see what problem you have..