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

#1
Quote from: Necrosin on October 03, 2014, 04:31:32 AM
Great mod. Might be an idea for your primitive section, but pungee sticks would be a nice simple low tech trap to add defense to sand bags.

On the list! Unfortunately I will be buisy with school for a while, so I can't make any promises on when I can get the mod updated and add all this new content.

Normaly updates are easy, but Ty refactored the texture code, so that broke everything. On top of that, the new graphics code is not too mod-frendly. I spoke to Ty about this, he said he just hasn't gotten around to it yet.
#2
Ideas / Re: Improving the ThingComp code
September 10, 2014, 07:23:49 PM
AHH! I was unaware that was called that! (I love the little names programmers give these tricks)

I considered some solutions like that, but I feared that it would tangle up the load order. On top of that, I don't think it would scale: It could cause a lot of problems having to load something like a 200 frame animation at runtime. I really want this lib to be in line with the RimWorld design that I have learned by studying your code.

Thanks for the response Ty!
#3
Ideas / Improving the ThingComp code
September 10, 2014, 11:28:46 AM
Hi!

I'm requesting that thing comp "def"s become actual defs, containing PostLoad() functions.

long story on this thread:  http://ludeon.com/forums/index.php?topic=5939.0 short story to follow:

Basically, I wanted to make a library for animating things using frames. The best way I've found in the code to do this is through use of a ThingComp, however the "def" field in ThingComp is just a class, not an actual def. Consequently, I am unable to write functions like PostLoad() for the thing comp, which is troubling seeing as I need to make a hash table for the textures so that I can Identify and load them quickly by a string. (I can explain why I settled on this implementation if you want, just ask!)

This could be done from the PostLoad() of ThingDef, just simply foreach-ing through the CompProperties and running their PostLoad().
#4
Help / Re: The Thing Component code.
September 08, 2014, 01:04:38 PM
Quote from: StorymasterQ on September 07, 2014, 09:36:32 PM
I see that "CurrentRotationAngel" and am reminded of the Rouge Angles of Satin.
I'll admit, this helped quite a bit with the frustration  :)
#5
Outdated / progress update
September 07, 2014, 01:22:45 PM
Hi all! first off, I should say that I have been busy with school, so I haven't been working on as many new features as usual, but I figured it would be a good time to work on some balance fixes and improvements.

Currently, Somz and I are working on some visual improvements and some more early game traps (currently, all we have is a wall arrow trap).

Right now though, I can't do too much new coding without having to redo my work for the next update, so that means balance time! what's not working? what is too hard to get? what is too powerful? what sells for too much silver? I need answers to these questions, so if anyone finds a problem, please post here!
#6
Quote from: ison on September 07, 2014, 05:54:29 AM
Currently diseases have their severity stages which define how they affect pawn activities or pain. This is done only through defs, but for more complex diseases I think there would have to be a possibility to define custom disease behavior through code (I was thinking about adding some callbacks: OnFellSick, OnImmunityDeveloped, OnDiagnosed, OnCured, OnSeverityStageChanged, etc.).

Oh, I like this! just think of all the wicked awesome and crazy mods we can make with that! alien diseases, improvements to the zombie mod, chronic conditions... I like where this is going!!!
#7
Quote from: ison on September 05, 2014, 10:01:59 AM
Each wound will have some chance to cause infection if left untreated (also there will be some chance for wound to cause infection if poorly treated without using medicine).
how is this implemented? Can we write custom classes for special diseases, or are disease behaviors defined through defs alone?
#8
Help / Re: The Thing Component code.
September 06, 2014, 02:44:34 PM
Quote from: mrofa on September 06, 2014, 03:04:10 AM
For getting stuff on mod load you would need to hack Argain or Rawcode brains ;p
well, the def postload functions are called on mod load, but that's just my problem, comp properties don't have postload functions to use! you're right, I think I need some major help here.

the only thing is, the vanilla game implements almost everything in comps, and for a good reason: comps are extremely versatile and much cleaner than just creating a new class for every object! the only problem is that the way comp properties are done, it's almost like they're hard coded. I can't really do all that much with comp properties class, and I really think that I should be doing everything in there.
#9
Help / Re: The Thing Component code.
September 05, 2014, 08:24:07 PM
Quote from: mrofa on September 05, 2014, 05:45:02 PM
ExposeData save variables when you save the game.
public override void ExposeData()
        {
            base.ExposeData();
            Scribe_Values.LookValue<float>(ref CurRotationInt, "CurrentRotationAngel");
            Scribe_Values.LookValue<bool>(ref Rswitch, "CurrentTotationStatus");
        }

A small example from my hologram, it save the value of CurRotationInt variable when game get saved, and its runned on game load.
Same go for Rswitch it save if its true or false.
Thing is that on load both spawn setup and expose data are called, on which you get depends on you cod struture.
Becsoue i was stupid i had spawnsetup under expose data, so on load i got variable values from spawn setup insted of expose data since spawn setup was called last:D
I see, so that is how it works! thank you!
too bad I can't use it, that gets called each time an thing gets loaded, not when a def gets loaded by the gameloader at the main menu.
#10
Help / Re: The Thing Component code.
September 05, 2014, 03:00:15 PM
Quote from: mrofa on September 05, 2014, 12:59:38 AM
Thing is that its the same with spawnsetup of stuff that are already exist. Its called on load and all its settings are set.
I did encouter this when i did add expose data before spawnsetup in code sctructure :D

I don't quite understand what you are saying, though I am unfamiliar with exposedata. isn't that used for save/loading?
#11
Help / Re: The Thing Component code.
September 04, 2014, 09:24:22 PM
Quote from: mrofa on September 04, 2014, 05:49:16 PM
Well there is comp everything, CompSpawnSetup, CompApplyDamage maybe there is CompPostLoad.
I cant really help you with PostLoad since i have no idea how it works, its the same with hash tables even thrugh i did read 2 times the wiki page you posted :p

As for registering the state of the frame on load i suggest CompExposeData:D

I know, hash tables are hard! (the only reason I decided to lean them was because a friend told me about them)
my source is available if you want to look at it, but my code is sloppy as hell. that's kinda why I'm here, I wanted to clean my stuff up!
https://github.com/superpirson/RimWorld-Mod-TrapPack-/

the def postloads are called when the game loads, somewhere. (I couldn't find where, the gameloader is really big)
#12
Help / Re: I'd like to offer my art services
September 04, 2014, 09:16:00 PM
Quote from: Clayton on September 04, 2014, 08:11:24 PM
I've done different kinds of texture art for games all the way from Skyrim and Mount and Blade to Starbound and Running With Rifles. Unfortunately, I've never built a resume or portfolio so I don't have much to show for except for the other thread I posted her showing off some weapon sprite work.

I'd like to be on a mod team, but anything works, really :) I just want to start building an actual portfolio, and everything helps.
wow. While I am not sure my mod is exactly prestigious, I would love help, especially from someone with some knowledge of art.

Would you be interested in joining the team for my mod, Trap Pack? Right now it's just somz and I, and we are both learning by the seat of our pants. (well, somz is learning, I sorta gave up and moved over to 3D)
If you're willing, we would love to try to learn a bit from you as well!

http://ludeon.com/forums/index.php?topic=3997.0

I'll pm you with more details.
#13
Help / Re: The Thing Component code.
September 04, 2014, 04:31:03 PM
Quote from: mrofa on September 04, 2014, 04:12:21 PM
Hmm i get it, im not sure didnt play with it, did fast search thrugh ilspy and i didnt find the category of comps so if they are not hardcoded, check Verse.ThingComp and ThingCompMaker to see how to use you custom class in comp.
I do believe I can in-fact make my own comp, it's just I want to be able to run a post-load function for that comp.

basicly, the animated frames are labeled with strings, and thus you can at any time say potato.setFrame("rotting") to be able to change the frame, the idea being that it allows more readable code and defs.

the thing is, to be able to do that efficently, I need to set up a HashTable (see:   https://en.wikipedia.org/wiki/Hash_table), and it would be very bad form for me to have to do that in-game whenever an animated item is spawned; the frames should be registered immeditly when the game is loaded in order to not waist space and speed.

for a def type, this would be done in the PostLoad function, but since thingcomp "defs" aren't actually a def type, I can't do that.
#14
Help / Re: I'd like to offer my art services
September 04, 2014, 04:14:38 PM
Wow, that's a generous offer!
What's your experience? Would you be like a student or a master?
would you be interested in joining a mod team, or would you want to do freelance work?
#15
Help / Re: The Thing Component code.
September 04, 2014, 12:48:29 PM
Quote from: mrofa on September 04, 2014, 01:00:43 AM
Switching textures wont do ?
Edit:
Not quite sure what you want to add, but you can try simple texture switching in drawmat.
actually, that works. I have that working for both map mesh and real time drawers, thing is that I want to create a component so that in the future all people have to do to animate things is just add a single ThingComponent to the thing's def.
This would be great because then you could just attach this component onto anything, instead of having to make a new class for every single thing class you want to animate.


for instance, lets say I want an animated stool. that can be done by simply creating a thing class "AnimatedBuilding" that extends Building. This is what I did.
the problem with that is now I want to make an animated worktable. worktables use the Building_Worktable thing class, not the Building thing class, so in order to animate the worktable, I needed to create a "AnimatedBuilding_Worktable", and use that as the worktable's thing class.
this is a lot of work, so if I could just code a component, then that could do the job of animating without needing a whole new thing class.