What would make the game easier to mod?

Started by Tynan, June 10, 2016, 04:01:27 PM

Previous topic - Next topic

makkenhoff

It is a little too generic I suppose, but reducing the overall amount of hard coded settings on the game world, pawns, animals, and the like is a step in the right direction. I have not messed around much with modding, mostly because I don't want to commit effort where I would be redoing the effort upon next release, I've experienced it, and I just don't have the creative drive to reinvent.

I think the ability to modify startup order (like clickable up and down arrows to increase or decrease priority) in the interface would make it easier to use mods from a user standpoint, and perhaps for some of the larger mods with extra dependencies.

Don't get me wrong, the current way isn't terrible for a handful of mods, but the higher amount of mods the more difficult the current way is to modify. I once made the mistake of trying to use 20 some mods, and gave up in frustration as I just could not figure out the necessary load order.

It would equally be nice to have a semi-autonomous system in place for dependencies - mostly for mod pack creators - to kind of look for potential mis-ordered mod dependencies - but perhaps this is beyond the scope of a simple tweak. (I was thinking a debug mode - with a search call that scans the mods in order on error looking for a missing function that might be in a mod that was put further down, a sort of dumb way to tell the user which mod is out of order, and the possible fixed order.)

Perhaps I'll add more later tonight, but I wanted to get these out while fresh on my mind.

palandus

Well, I did it anyway, and compiled a list of currently "private" variables that could be made "public". These are variables that are understandable to their purpose by just reading the variable OR by understanding the class and thus the variable logically then means "that" (whatever "that" may be). I put it all in a text file for perusal; the structure of it is as follows: Assembly C# -> "namespace" -> "class" -> "variables". The class name and variable name are taken verbatim from ILSpy of Assembly C# for Rimworld. You'll note that I didn't take "all" private variables and suggest turning them into public; instead I only chose the ones that appear logically understandable that could be made public.

While doing it I also noticed that there is A LOT of already made Public Variables, but are not currently moddable by XML, that people (including myself) would love access to.

My personal suggestion for making modding less difficult for us and less costly for you, Tynan, is to teach us how to create XML files of public classes and public variables to create the mods that we want to make. If we knew how to create the XML files (I checked the wiki and elsewhere and couldn't find any tutorials mentioning how to do, so sorry if this is already common knowledge), then we could do a lot of the work that you'd normally have to do to create the XML files yourself.

File attached is again all the possible currently private variables that could logically be made public and be understandable of their purpose to modders. I hope the information is useful in some way, as I did spend about 4 hours putting it together (lots of classes to look through).

[attachment deleted by admin - too old]

Rikiki

Here are my requests Tynan:

  • In Building_NutrientPasteDispenser, make TryDispenseFood overridable (so we can change the required food amount and the type of dispensed meal).
  • Handle map GenSteps from different mods (add an index to order them? or a system similar to the hook points in the thinkTree?). It is currently tedious to make patch for any other mod adding a GenStep :P (Haplo's ruins, prepare carefully, crash landing, outpost generator, ...).
  • In Verse.PawnRenderer.RenderPawnAt function, it would be cool to be able to use the wiggler as we want (so we can override the pawn rotation. My initial idea was to create a sniper foxhole in which the pawn is laying down to get better accuracy and protection. :) ).
  • In CompGlower.ShouldBeLitNow, add a public boolean parameter than can be easily toggled by modder. I currently have to spawn/despawn invisble glowers building as a workaround. :-\

skullywag

ooh biomes, we should be able to add our own biomes, this wasnt possible in A13.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

1000101

#64
Quote from: Rikiki on June 22, 2016, 07:56:07 AM
Here are my requests Tynan:

  • In Building_NutrientPasteDispenser, make TryDispenseFood overridable (so we can change the required food amount and the type of dispensed meal).
  • Handle map GenSteps from different mods (add an index to order them? or a system similar to the hook points in the thinkTree?). It is currently tedious to make patch for any other mod adding a GenStep :P (Haplo's ruins, prepare carefully, crash landing, outpost generator, ...).
  • In Verse.PawnRenderer.RenderPawnAt function, it would be cool to be able to use the wiggler as we want (so we can override the pawn rotation. My initial idea was to create a sniper foxhole in which the pawn is laying down to get better accuracy and protection. :) ).
  • In CompGlower.ShouldBeLitNow, add a public boolean parameter than can be easily toggled by modder. I currently have to spawn/despawn invisble glowers building as a workaround. :-\

1 and 4 have been in CCL for a bit now.  ;)

Quote from: palandus on June 22, 2016, 01:14:47 AM
Well, I did it anyway, and compiled a list of currently "private" variables that could be made "public"...I put it all in a text file for perusal.

Just so you know, they are refered to a "fields" because they are a part of a class or struct.  Variables are defined locally in code, fields are defined in structs or classes.  The difference is, a variable is a memory address and a field is a memory address offset from the start of the class/struct.

Second, most of those are named constants (const).  They don't actually exist after the code is compiled.  Any place a named constant is used, the compiler replaces the name with the value of the constant.  Making constants public won't allow you to change their values but it would be convenient to not have to duplicate them.

Quote from: palandus on June 22, 2016, 01:14:47 AMMy personal suggestion for making modding less difficult for us and less costly for you, Tynan, is to teach us how to create XML files of public classes and public variables to create the mods that we want to make.

I'm not sure it's Tynan's job to teach us to mod...

The xml is pretty straight forward, each xml class is a C# class, each xml tag is a field in that C# class.  Open the class in a decompiler to find all the fields and their possible values, ranges, etc.  For most simple mods you can simply refer to the core xml without even opening a dll.  But if you are trying to do fun and wonderful things, this is where the reverse-engineering starts and there are no answers Tynan can give to cover all the possibilities.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Rikiki

Quote from: 1000101 on June 22, 2016, 04:34:16 PM
1 and 4 have been in CCL for a bit now.  ;)
I know, but the topic of this thread is to make the core game easier to mod! So basically reduce the need of detour and other (dirty?) tricks. ;)

1000101

#66
Quote from: Rikiki on June 22, 2016, 04:37:22 PM
Quote from: 1000101 on June 22, 2016, 04:34:16 PM
1 and 4 have been in CCL for a bit now.  ;)
I know, but the topic of this thread is to make the core game easier to mod! So basically reduce the need of detour and other (dirty?) tricks. ;)

I'd call those "feature enhancement" compared to some of CCLs "pure fix" detours though.  A lot of the detours in CCL are just to "fix" core behaviour (such as the steam geyser issue which actually was in CCL from day one but used a different means to do it).
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

palandus

#67
Whatever. I'm done. Do with it what you want, I'm out. This is isn't worth the stress and the headaches. I'll go back to quietly lurking and being useless.

EDIT:

I have changed my mind. I won't go quietly. I understand that there will be repercussions for my actions, but at this point I have passed the point of caring of the consequences. I do not care if I get banned, both account and IP from this site. However, this needs to be said and I'll try and be civil.

The biggest problem with modding, is also the most costly to fix; the problem is you, Tynan and until that is fixed, no amount of "small and cheap" fixes will solve the problem.

You have worked in a large development team environment before starting rimworld, with Bioshock Infinite. You know from experience that communication with your fellows is critical in developing a game; if there is no communication there is no game, just a chaotic mess of code, assets, and dreams jammed together in a dysfunctional state. Therefore you, of all people on this site, should know what happens when there is ineffective communication between members working on a project.

Each major modder that works on the game should be considered an unofficial member on the development team as their mods ensures the longevity of the game when it is still in its Alpha Status; without modders, I can safely say that people would have likely forgotten about Rimworld soon after it got out of it's Kickstarter. These modders give life and greater enjoyment to users.

The reason there is modder burnout at all, is due to ineffective communication between yourself and those modders. The reason they can't update their mods is because of decisions you make without consulting them on how it will affect all the other members on the team; if you made similar decisions while working on Bioshock Infinite, without explaining to others the choices you made and why, it would cause huge problems to develop, as they usually do in game companies with ineffective communication. When you change something from public to private or completely refactor code without telling the other members on the team what you are doing, it will break their code and prevent them from doing their job. If you want modders to stick around and actively care about their burnout and the loss for the game as a whole then you need to setup a form of communication between modders and yourself; this wouldn't be necessary if you had only added modding at the end of the development cycle, but if you had, you probably wouldn't be as successful as you've been either.

Treat modders as team members, and explain your reasoning for changes with them, and listen to them on how the changes affect them. Without communication, modders will continue to burnout and many mods will never see the light of day. Your success as a developer and businessman depends on the success of Rimworld. If the modders all burn out before the actual release of the game then the content that they provide will not be present either. And as many users, for many games, feels that mods makes a dull game feel fresh again, you need modders to stick around. The only way that is going to happen is if you actively communicate with modders and try and avoid changing things that will directly prevent them from modding. By communicating with modders on a regular basis and knowing what things they use to make their mods work will help you in making better choices and ensure that modders stick around. Thus, working on learning how to communicate better with modders is the best way to make modding easier, for all involved. However, setting up an effective communication system will likely take a lot of work, trial and error, and working with community on a regular basis eating up development hours, so knowing you, you will likely say it costs too much, that it would take up too much time, divert critical development hours to communication time and dismiss my suggestion due to its cost. I hope that you will implement an effective communication system between yourself and modders; it is the best option. However, if you don't implement some way to communicate better, then I don't think that the potential I saw in the game in its Kickstarter will ever reach fruition and the game that I hoped to play and enjoy when it finally would release will never come to pass. ... But there is always the chance...

That is all.

Tynan

palandus - Communication is what I'm trying to do in this thread; but please also realize that I also have a lot of other things to do, that it's an alpha game, that I won't leave code poorly factored or cut core game progress speed or start building up compatibility cruft to make modding a bit easier in the short run. I really appreciate the fact that people are modding the game, but it's still an alpha game with an aggressive development schedule that gets new features often. This is good for players, because people like games that expand fast and add cool stuff, but it creates a natural and unavoidable problem for modders because the game isn't the same game month over month.

Anyway, thank you for your contribution.

Quote from: Rikiki on June 22, 2016, 07:56:07 AM
Here are my requests Tynan:

  • In Building_NutrientPasteDispenser, make TryDispenseFood overridable (so we can change the required food amount and the type of dispensed meal).
  • Handle map GenSteps from different mods (add an index to order them? or a system similar to the hook points in the thinkTree?). It is currently tedious to make patch for any other mod adding a GenStep :P (Haplo's ruins, prepare carefully, crash landing, outpost generator, ...).
  • In Verse.PawnRenderer.RenderPawnAt function, it would be cool to be able to use the wiggler as we want (so we can override the pawn rotation. My initial idea was to create a sniper foxhole in which the pawn is laying down to get better accuracy and protection. :) ).
  • In CompGlower.ShouldBeLitNow, add a public boolean parameter than can be easily toggled by modder. I currently have to spawn/despawn invisble glowers building as a workaround. :-\

Thanks for these. Will definitely do number 1, and will look into the others.

Note to everyone: This is the sort of actionable, specific request I'm looking for!
Tynan Sylvester - @TynanSylvester - Tynan's Blog

brucethemoose

I saw someone mention the Minecraft Forge Ore Dictionary before, and I think that's a brilliant idea.

For those that don't know, it's a system that allows you to essentially "label" items with a common alias. So if 3 mods add 3 different kinds of titanium and 3 computer chips, they could all be used interchangeably as long as mod devs added a "titanium" and "computer chip" label to each.

I don't know how long it would take to implement, but an item dictionary would certainly help modding scale up if the Rimworld community explodes after the Steam release.



mrofa

#70
palandus please stop being a drama queen.

Quote from: brucethemoose on June 23, 2016, 03:10:46 AM
I saw someone mention the Minecraft Forge Ore Dictionary before, and I think that's a brilliant idea.

For those that don't know, it's a system that allows you to essentially "label" items with a common alias. So if 3 mods add 3 different kinds of titanium and 3 computer chips, they could all be used interchangeably as long as mod devs added a "titanium" and "computer chip" label to each.

I don't know how long it would take to implement, but an item dictionary would certainly help modding scale up if the Rimworld community explodes after the Steam release.

This is already in, everything with the same <ThingDefName> is replaced by the last loaded mod contaning the same thingdef name thing.
So its more of the modders agreement on Thingdefname, to make like a specific list



All i do is clutter all around.

cuproPanda

(Off Topic)
It would be nice if we could thumbs-up or thumbs-down posts to easily show agreement or disagreement. Suggestions, comments, and inflammatory remarks could all benefit from that.


Quote from: mrofa on June 23, 2016, 09:56:41 AM
palandus please stop being a drama queen.

Quote from: brucethemoose on June 23, 2016, 03:10:46 AM
I saw someone mention the Minecraft Forge Ore Dictionary before, and I think that's a brilliant idea.

For those that don't know, it's a system that allows you to essentially "label" items with a common alias. So if 3 mods add 3 different kinds of titanium and 3 computer chips, they could all be used interchangeably as long as mod devs added a "titanium" and "computer chip" label to each.

I don't know how long it would take to implement, but an item dictionary would certainly help modding scale up if the Rimworld community explodes after the Steam release.

This is already in, everything with the same <ThingDefName> is replaced by the last loaded mod contaning the same thingdef name thing.
So its more of the modders agreement on Thingdefname, to make like a specific list

But that overwrites the previous versions. What happens when multiple people add something like wood - each with different colors, flammability, maybe market value? Each previous one would need to be replaced, which is completely different from what I was suggesting. It works for the most part, but it's not the same. You may say that we can easily add new wood, it just counts as stuff, but then what about making production tables - they need stuff plus wood, steel, etc. Plus, it avoids any toe-stepping which may prevent people from making mods (even if I think I have better ideas, why make a fishing mod when one already exists? If I add [resource] to my mod, this modder will think I'm trying to copy their idea!)
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

mrofa

If you have say 4 mods(thats tested number), each of them add wood with <ThingDefname>Wood, each mod wood have diffrent color, diffrent stuff stats and so one, last mod loaded will overwrite all prev version of such Thinkdef, this include settings of stuff and stats, descriptions and all stuff you got in xml thingdef.
Simply said if your mod loader have
1. Mod A
2. Mod B
3. Mod C
4. Mod D

Mod D duplicated resource with all its thingdef settings will be used in game.
This is basicly why you are able to replace vanilia thingdefs in a mod, becouse core is always on 1st position
All i do is clutter all around.

Sam_

The oreDictionary idea is pretty solid. But, I could see that being a community addition like CCL rather then a vanilla change. It might be possible with a bit of ingenuity now, I see it being required as the last mod in the load order which overrides the multiple labelled materials but maintains a separate def for each by changing the ThingDefName field to the original name, say Wood, and concatenate the mod name from the relevant field. So if my mod added a dark mahogany and I labelled it Wood, it will become GlitterTechWood and can be used interchangeably with OtherModWood from a mod called OtherMod which added a creamy birch and is named Wood in it's own file.

Rather then replacing the def it now has two materials that can be used in the same recipes as Wood in addition to every other version of Wood. It's similar to making the material a Stuff, but more powerful as the OreDictionary can make something a stuff in a recipe during loading without the xml recipe needing to be changed and both different defs would work for anything that as Wood as a recipe. So, mods can work with other mods by adding more types of ComputerComponents or Wood without needing communication between mod makers. It could be a powerful addition to the vanilla game for sure, it has been working in Minecraft for years, but like Minecraft it was a community addition and not what this thread is about.


milon

Quote from: Tynan on June 23, 2016, 01:27:38 AMpalandus - Communication is what I'm trying to do in this thread; but please also realize that I also have a lot of other things to do, that it's an alpha game, that I won't leave code poorly factored or cut core game progress speed or start building up compatibility cruft to make modding a bit easier in the short run. I really appreciate the fact that people are modding the game, but it's still an alpha game with an aggressive development schedule that gets new features often. This is good for players, because people like games that expand fast and add cool stuff, but it creates a natural and unavoidable problem for modders because the game isn't the same game month over month.

I just wanted to add that once the game is complete, even if Tynan doesn't provide a solid how-to, it'll at least no longer be a moving target and the community can put that together.  (For example, my current signature has a link to Alpha 13's uses of XML in Core, and my A14 version will be even better.)