Ludeon Forums

RimWorld => Mods => Help => Topic started by: Bunnie on January 13, 2015, 08:31:37 AM

Title: Item limitations
Post by: Bunnie on January 13, 2015, 08:31:37 AM
Would it be possible to have an item which can be used, similarly to a neurotrainer. But instead of gaining XP like the aforementioned item, you would get a thought.

E.g. Right-Click, Use <Item>, Item is used and colonist gains a "Used <item> +10" thought.

Thanks in advance for any replies!
Title: Re: Item limitations
Post by: mrofa on January 13, 2015, 03:09:14 PM
Yes it would be possible.
Title: Re: Item limitations
Post by: OldVamp on January 13, 2015, 03:32:41 PM
"joywire"
Title: Re: Item limitations
Post by: StorymasterQ on January 14, 2015, 07:43:12 PM
This sounds like the beginnings of a cache of 'entertainment magazines' mod.

"I read it for the articles, I swear!    +10"
Title: Re: Item limitations
Post by: Igabod on January 15, 2015, 12:53:43 AM
Quote from: mrofa on January 13, 2015, 03:09:14 PM
Yes it would be possible.

I think the important question here is "How can it be done?" Is it possible through XML or only through a .dll? I'm pretty sure the answer is that it's only possible through a .dll. So unless you know C# or know someone who knows it and owes you a favor, it's not going to be possible.
Title: Re: Item limitations
Post by: JuliaEllie on January 15, 2015, 01:01:50 AM
1st of all yes this is totally possible
2nd by "entertainment magazines" you mean PC gaming magazines right? :D
Title: Re: Item limitations
Post by: Evelyn on January 15, 2015, 01:19:19 AM
Quote from: JuliaEllie on January 15, 2015, 01:01:50 AM
by "entertainment magazines" you mean PC gaming magazines right? :D

"Oh baby, show me those 256 colors..."
Title: Re: Item limitations
Post by: JuliaEllie on January 15, 2015, 01:31:58 AM
Quote from: Evelyn on January 15, 2015, 01:19:19 AM
Quote from: JuliaEllie on January 15, 2015, 01:01:50 AM
by "entertainment magazines" you mean PC gaming magazines right? :D

"Oh baby, show me those 256 colors..."

Aaaw that hot Intel out of the box cooler

90s kids/teens will remember

wait what? Did you follow me here Evelyn??  :o
Title: Re: Item limitations
Post by: Evelyn on January 15, 2015, 01:41:50 AM
There's a "Show unread posts since last visit" button that I tend to use. You bumped this thread and put it at the top of the list, so I did see it because of you but it was not your presence specifically that drew me to post here.
Title: Re: Item limitations
Post by: StorymasterQ on January 15, 2015, 01:42:25 AM
Bender knows how it goes.

(http://i.imgur.com/nTOKO.jpg)
Title: Re: Item limitations
Post by: Evelyn on January 15, 2015, 01:43:14 AM
This is why this forum needs [spoiler] tags.
Title: Re: Item limitations
Post by: StorymasterQ on January 15, 2015, 01:45:51 AM
Quote from: Evelyn on January 15, 2015, 01:43:14 AM
This is why this forum needs [spoiler] tags.
True. I was thinking, "Wait, I can't set the width of this image? Well, can't I just crop it? Or google a smaller picture? Nah, lazy." *Posted* :p
Title: Re: Item limitations
Post by: JuliaEllie on January 15, 2015, 01:45:58 AM
Quote from: Evelyn on January 15, 2015, 01:43:14 AM
This is why this forum needs [spoiler] tags.

more like [nsfw] :D
Title: Re: Item limitations
Post by: mrofa on January 15, 2015, 02:32:27 AM
Quote from: Igabod on January 15, 2015, 12:53:43 AM
Quote from: mrofa on January 13, 2015, 03:09:14 PM
Yes it would be possible.

I think the important question here is "How can it be done?" Is it possible through XML or only through a .dll? I'm pretty sure the answer is that it's only possible through a .dll. So unless you know C# or know someone who knows it and owes you a favor, it's not going to be possible.

Well i got the code for picking up the item, you can see it in clutter in sleep pills or spoonge gun ammo or here (https://ludeon.com/forums/index.php?topic=9025.0)(love the turret :D).
So i would only need to put a though there which is a part i dont know how to do yet, but if any one do just copy the code and add the though part :D
Title: Re: Item limitations
Post by: Bunnie on January 15, 2015, 08:20:12 AM
Thank you guys for the replies! I'm completely new to modding so I have a feeling a lot of my ideas wont get turned into mods until I know I can do it well enough... I don't want a half assed attempt against my name... lol
 
Quote from: Igabod on January 15, 2015, 12:53:43 AM
I'm pretty sure the answer is that it's only possible through a .dll. So unless you know C# or know someone who knows it and owes you a favor, it's not going to be possible.
I do conveniently have a slave (or friend as some people call them) who is rather good at coding :P I just bought him FarCry4 so the least he can do is help me code some stuff XD Maybe even teach me a bit...

Quote from: StorymasterQ on January 14, 2015, 07:43:12 PM
This sounds like the beginnings of a cache of 'entertainment magazines' mod.

"I read it for the articles, I swear!    +10"
While not my actual idea behind this question. I feel this could quite easily be added in to the mod if I got the basics down :P

Quote from: mrofa on January 15, 2015, 02:32:27 AM
Well i got the code for picking up the item, you can see it in clutter in sleep pills or spoonge gun ammo or here (https://ludeon.com/forums/index.php?topic=9025.0)(love the turret :D).
So i would only need to put a though there which is a part i dont know how to do yet, but if any one do just copy the code and add the though part :D
Thanks! I'll have a look at it :) I did look at the code in the core files for the neurotrainer but (as I have no coding knowledge or modding experience) had no idea what I was really looking at... lol
Title: Re: Item limitations
Post by: unifex on January 15, 2015, 05:59:04 PM
Not sure its exactly along the lines, but in here:

https://github.com/calmhorizons/innerworlds/blob/master/iw-base/src/main/dist/Defs/ThingDefs/BaseItemsMisc.xml

and

https://github.com/calmhorizons/innerworlds/blob/master/iw-base/assembly/Innerworlds-Base/Items/AetherInfusion.cs

there is an AetherInfusion, which bumps up a new research skill for the colonists. The UsedBy method in there could be used to add a thought.