Ludeon Forums

Ludeon Forums

  • August 05, 2021, 06:45:57 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7

Author Topic: [Tutorial] How to Make a RimWorld Mod, Step by Step  (Read 171540 times)

SpaceDorf

  • Transcendent
  • *****
  • Posts: 4083
  • Secretly Captain Obvious
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #60 on: September 19, 2017, 12:29:58 PM »

Thank you flying spaghetti monster for finally sending my to the right IDE

sometimes microsoft gets it right

it's fast, it's portable, it's beautiful ..

Or not .. VisualStudio it is then .. fascinating that the IDE has become the greatest obstacle to start programming...
Logged
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

CrazyMalk

  • Drifter
  • **
  • Posts: 77
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #61 on: October 07, 2017, 12:09:54 AM »

Gosh... I'm getting my a** kicked from Visual Studio 2017... For some reasone there isn't any "build" tab in the Properties menu. Does anyone knows why?
Logged

CrazyMalk

  • Drifter
  • **
  • Posts: 77
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #62 on: October 07, 2017, 11:44:20 PM »

Nevermind, got it to work! But now i'm having a problem when trying to build the project:
Code: [Select]
Severity Code Description Project File Line Suppression State
Error CS0117 'HediffDefOf' does not contain a definition for 'Petrification' BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\BasiliskVision.cs 15 Active
Error CS1061 'Projectile_PetrifyBullet' does not contain a definition for 'def' and no extension method 'def' accepting a first argument of type 'Projectile_PetrifyBullet' could be found (are you missing a using directive or an assembly reference?) BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 16 Active
Error CS1061 'Projectile_PetrifyBullet' does not contain a definition for 'launcher' and no extension method 'launcher' accepting a first argument of type 'Projectile_PetrifyBullet' could be found (are you missing a using directive or an assembly reference?) BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 30 Active
Error CS0115 'Projectile_PetrifyBullet.Impact(Thing)': no suitable method found to override BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 21 Active
Error CS1061 'string' does not contain a definition for 'Translate' and no extension method 'Translate' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 29 Active
Error CS0103 The name 'HediffMaker' does not exist in the current context BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 40 Active
Error CS0103 The name 'Messages' does not exist in the current context BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 29 Active
Error CS0103 The name 'MessageSound' does not exist in the current context BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 31 Active
Error CS0103 The name 'Rand' does not exist in the current context BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 26 Active
Error CS0103 The name 'Rand' does not exist in the current context BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 33 Active
Error CS0246 The type or namespace name 'Bullet' could not be found (are you missing a using directive or an assembly reference?) BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 8 Active
Error CS0246 The type or namespace name 'Hediff' could not be found (are you missing a using directive or an assembly reference?) BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 40 Active
Error CS0246 The type or namespace name 'Pawn' could not be found (are you missing a using directive or an assembly reference?) BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 24 Active
Error CS0234 The type or namespace name 'Tasks' does not exist in the namespace 'System.Threading' (are you missing an assembly reference?) BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\BasiliskVision.cs 5 Active
Error CS0246 The type or namespace name 'Thing' could not be found (are you missing a using directive or an assembly reference?) BasiliskEye C:\Users\USUARIO\source\repos\BasiliskEye\BasiliskEye\Petrify.cs 21 Active

"Petrify" is the same as "Plague", on the tutorial :P Can anyone help me?
Logged

DJRockXD

  • Muffalo
  • *
  • Posts: 2
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #63 on: October 12, 2017, 06:48:33 AM »

I couldn't find the "defName" file or the "Bullet_Pistol" document using that "find in file" thing. Plus I could only find that function in Notepad++, not in Atom...
I found a "Bullet_Pistol" reference manually in the "Weapons_Guns" XML document, but not a stand alone version of it...
And I am probably an idiot for not being able to make the "Find in Files" function work even in Notepad++, as it couldn't find anything on my computer when I tested it out multiple times... Help please ):
Logged

CrazyMalk

  • Drifter
  • **
  • Posts: 77
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #64 on: October 12, 2017, 08:10:25 AM »

Try selecting only the "Core">"Defs" folder inside "Mods" on that browsing place. You need to set up a location to it search.
Logged

DrMrEd

  • Muffalo
  • *
  • Posts: 17
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #65 on: October 12, 2017, 09:16:11 AM »

I couldn't find the "defName" file or the "Bullet_Pistol" document using that "find in file" thing. Plus I could only find that function in Notepad++, not in Atom...
I found a "Bullet_Pistol" reference manually in the "Weapons_Guns" XML document, but not a stand alone version of it...
And I am probably an idiot for not being able to make the "Find in Files" function work even in Notepad++, as it couldn't find anything on my computer when I tested it out multiple times... Help please ):
Kudos to the tutorial maker and suggesting folks learn to search the Defs -- you'll be doing a ton of this when you start down your own path. But for this one, no need to search blindly for strings in files. All the weapons stuff is in Defs\ThingDefs_Misc\Weapons_Guns.xml. There Bullet_Pistol def is at line 65. There is no standalone version - although each ThingDef could probably be spread out in its own file, but that would be a nightmare in other ways.
Logged

CrazyMalk

  • Drifter
  • **
  • Posts: 77
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #66 on: October 22, 2017, 12:23:46 PM »

Ok... I was able to build the mod into a single dll, but now i'm having in-game console errors. And i think they are caused because i used a custom hediff in the C# code... What should i do to perfectly insert my custom heddiff into the Visual Studio project?
Logged

StoneWolf

  • Drifter
  • **
  • Posts: 25
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #67 on: November 06, 2017, 01:51:24 PM »

To begin with must I compliment you on having made this excellent tutorial! This is the sixth time I've tried modding and it is for sure the easiest start I've ever had. All thanks to you and Tynan of course! ;)

I'm just a bit curious though. In your tutorial you advise on setting a prefix for the defName variable in order to increase mod compatability. Should I do the same for the file name? Or does it really not matter what its called?
Logged

jamaicancastle

  • Colonist
  • ***
  • Posts: 506
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #68 on: November 22, 2017, 12:37:13 AM »

One correction to update this for B18: the message syntax has changed. Where you have
Code: [Select]
                    }), MessageSound.Standard);in the huge block of code for the projectile class, it should be
Code: [Select]
                    }), MessageTypeDefOf.NeutralEvent);(or any of the other MessageTypeDef options, that just seemed the most like what it was doing before). I can verify that the rest of it works as advertised.
Logged

kaptain_kavern

  • Planetologist
  • ****
  • Posts: 2074
  • started 10 mods in one tick.
    • View Profile
    • RimWorldMod Slack - A place for live chatting about RimWorld modding
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #69 on: November 22, 2017, 12:56:57 AM »

In your tutorial you advise on setting a prefix for the defName variable in order to increase mod compatability. Should I do the same for the file name? Or does it really not matter what its called?

Nope, for the file name, there is no problems, you can call them as you want. You could even have all your xml code in one file if you wanted ^^ - I don't see why doing this, but my point being: you can do anyhow you prefer

DrunkRussianBear

  • Muffalo
  • *
  • Posts: 2
  • Arms dealer
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #70 on: November 22, 2017, 06:48:15 PM »

I'm lost right now, what is the reason behind the C# code? is it necessary? I read through the tutorial but fail to understand the purpose of the code(what each line actually does).
Logged
Guns for everyone.

kaptain_kavern

  • Planetologist
  • ****
  • Posts: 2074
  • started 10 mods in one tick.
    • View Profile
    • RimWorldMod Slack - A place for live chatting about RimWorld modding
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #71 on: November 22, 2017, 09:55:32 PM »

For simple mods, you don't need C# at all. I've done lots of mods and still don't know C# yet.

Most of the time, you'll need C# if your mod needs to "something" that is not a vanilla "normal" mechanics. But you don't need C# at all to make new plants, animals, buildings, benches, etc... as long as they behave like vanilla do

DrunkRussianBear

  • Muffalo
  • *
  • Posts: 2
  • Arms dealer
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #72 on: November 22, 2017, 10:32:42 PM »

So for a simple weapon/clothing mod all I need is XML? if so that's pretty neat, I'm currently working on a weapon/clothing mod that adds the full arsenal of my fictional nation(can be found here: https://www.nationstates.net/nation=velariya) including uniforms and all. Just gotta wait for CE to update so I can make a compatibility patch once I know my guns work in vanilla.

By the way any chance you could take a peek through my mod once I'm done? I'm not sure what has changed in B18(code syntax wise) so I'm a bit scared it won't work in B18.
« Last Edit: November 22, 2017, 10:37:38 PM by DrunkRussianBear »
Logged
Guns for everyone.

kaptain_kavern

  • Planetologist
  • ****
  • Posts: 2074
  • started 10 mods in one tick.
    • View Profile
    • RimWorldMod Slack - A place for live chatting about RimWorld modding
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #73 on: November 22, 2017, 11:49:36 PM »

Oh right, I sure can have a look.

But most of the time the (red) error message will tell you explicitly what is going wrong. My updating/debugging mods process is: launch the mod, copy paste the wall of errors (starting by the red ones only, yellow error are often less harmful) in my text editor, then for each error I searched for the exact location and do what the error message is saying... Doing that for each errors, relaunch and repeat the process.

But if I can help you, I'll do, no problems

Son_Of_Diablo

  • Muffalo
  • *
  • Posts: 7
  • Refugee
    • View Profile
Re: [Tutorial] How to Make a RimWorld Mod, Step by Step
« Reply #74 on: November 25, 2017, 09:52:00 PM »

Thanks for this tutorial!
Really explains everything well! :)


I got the test mod working, but I do have an issue where it won't add Plague to the attacked pawn (I do get the success message though).
Logged
Pages: 1 ... 3 4 [5] 6 7