Ludeon Forums

Ludeon Forums

  • May 25, 2020, 10:30:23 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 17

Author Topic: What would make the game easier to mod?  (Read 66645 times)

Tynan

  • Developer
  • Administrator
  • Transcendent
  • *****
  • Posts: 12454
    • View Profile
    • Tynan's Blog
What would make the game easier to mod?
« on: June 10, 2016, 04:01:27 PM »

I'd like to make the game easier to mod, but it's hard to tell, from my perspective, what would be the most useful changes to make to make this happen.

So I'm soliciting requests.

Just try to think of the most important things you'd want that would make modding easier for you. I'll aggregate the suggestions and try to implement the most cost-effective and popular ones.

Thanks all!

-----------

Edit: The difficulty here seems to be that there are a ton of requests - everyone has their own little thing they want changed. Unfortunately we can't cover all these; I really want to make the changes that will have a big impact on a lot of modders. Bang for your buck, so to speak.

So it would be really great if modders could discuss and come up with a top-3 list of things that would help a lot of people at once. Consider this an invitation to discuss with each other what would help you all together.
« Last Edit: August 29, 2016, 06:17:10 PM by Tynan »
Logged
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Diana Winters

  • Super Tester
  • Colonist
  • ***
  • Posts: 466
  • Space Neko
    • View Profile
Re: What would make the game easier to mod?
« Reply #1 on: June 10, 2016, 05:10:24 PM »

Easier access to vanilla textures, as well as something akin to bethesda's creation kit
Logged

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: What would make the game easier to mod?
« Reply #2 on: June 10, 2016, 05:13:00 PM »

It would be nice to have a common injection point for code, similar to [StaticConstructorOnStartup] but more of [MyDLLEntryPointHere] which would happen before the xml is loaded.
« Last Edit: June 10, 2016, 05:19:28 PM by 1000101 »
Logged
(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

Plymouth

  • Colonist
  • ***
  • Posts: 161
  • Ballistics Engineer
    • View Profile
Re: What would make the game easier to mod?
« Reply #3 on: June 10, 2016, 05:13:37 PM »

I know it is a far call, but in case of changes, a sort of converter from old XML parameters to new ones would be a nice thing to have. Of course it is not something necessary, only very handy. Would save a lot of time in mod updates during alpha transitions, if such a program existed.
« Last Edit: June 10, 2016, 05:16:46 PM by Plymouth »
Logged

Tynan

  • Developer
  • Administrator
  • Transcendent
  • *****
  • Posts: 12454
    • View Profile
    • Tynan's Blog
Re: What would make the game easier to mod?
« Reply #4 on: June 10, 2016, 06:12:31 PM »

It would be nice to have a common injection point for code, similar to [StaticConstructorOnStartup] but more of [MyDLLEntryPointHere] which would happen before the xml is loaded.

Can you be more specific?

I know it is a far call, but in case of changes, a sort of converter from old XML parameters to new ones would be a nice thing to have. Of course it is not something necessary, only very handy. Would save a lot of time in mod updates during alpha transitions, if such a program existed.

That would be a massive and ongoing project, so I'm afraid it's a bit out of the cards. I'm really looking for simple things that'd be useful forever.
Logged
Tynan Sylvester - @TynanSylvester - Tynan's Blog

1000101

  • Planetologist
  • ****
  • Posts: 1344
  • RimFortress Builder
    • View Profile
Re: What would make the game easier to mod?
« Reply #5 on: June 11, 2016, 02:52:01 AM »

It would be nice to have a common injection point for code, similar to [StaticConstructorOnStartup] but more of [MyDLLEntryPointHere] which would happen before the xml is loaded.

Can you be more specific?

Currently, StaticConstructorOnStartup is called for generic classes at the end of PlayDataLoader.DoPlayLoad().  It would be useful to have a similar attribute which could be applied to a static constructor to be called as the first step in sequence.
Logged
(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

sirgzu

  • Colonist
  • ***
  • Posts: 187
  • Refugee
    • View Profile
Re: What would make the game easier to mod?
« Reply #6 on: June 11, 2016, 04:04:49 AM »

The ability to re-order mods by load order or manually in the mods page.
The ability to save a mod list presets.
Logged

SmartererThanYou

  • Drifter
  • **
  • Posts: 69
  • Yeah Science!
    • View Profile
Re: What would make the game easier to mod?
« Reply #7 on: June 11, 2016, 04:50:07 AM »

The ability to re-order mods by load order or manually in the mods page.
The ability to save a mod list presets.

I could be reading this wrong, but wouldn't  the ability to save a mod list be in the ModsConfig?
Logged

Jaxxa

  • Super Tester
  • Planetologist
  • ***
  • Posts: 1236
  • Refugee
    • View Profile
Re: What would make the game easier to mod?
« Reply #8 on: June 11, 2016, 05:33:41 AM »

The Detours from CCL are quite handy, although I don't know if you will want to officially support that.

----------------------------

I have written up my ideas for the mod manager in the suggestions forum.
https://ludeon.com/forums/index.php?topic=20662.0

The main ideas are being able to Reorder mods, and have XML tags in mods listing what other mods they depend on. Then warn if those mods are Not Installed  / Are Disabled / Are Later in the Load order. I think this would make more complex mods with dependencies easier for new players to work with.
Feel free to ask if you want me to explain how I think it could work in greater detail.

----------------------------

A minor thing that would be nice, In C# code I would like to see the Protected and Virtual modifiers be used more often instead of the Private modifier as I find these make creating derived classes easier.

When I was initially modding the Plant Class I wanted to change the Growing Times. I inherited from the base class, then ideally I could have just overridden the Resting Property, but it was not Virtual so I had to override the Tick function. That then references a Number of Private Properties / Functions that I had to reimplement in my derived class, if they were protected I would have been able to call the ones in the Base class.

I ended up finding a better way to do this using CCL Detours.

Plymouth

  • Colonist
  • ***
  • Posts: 161
  • Ballistics Engineer
    • View Profile
Re: What would make the game easier to mod?
« Reply #9 on: June 11, 2016, 05:52:13 AM »


I know it is a far call, but in case of changes, a sort of converter from old XML parameters to new ones would be a nice thing to have. Of course it is not something necessary, only very handy. Would save a lot of time in mod updates during alpha transitions, if such a program existed.

That would be a massive and ongoing project, so I'm afraid it's a bit out of the cards. I'm really looking for simple things that'd be useful forever.

Yeah, fair enough. It would be indeed a big project and not very viable at that, for it would only be useful as long as the game is in alpha and changes structure regularly.
Logged

cuproPanda

  • Colonist
  • ***
  • Posts: 644
  • Caffeine addiction
    • View Profile
    • GitHub
Re: What would make the game easier to mod?
« Reply #10 on: June 11, 2016, 03:19:41 PM »

Not very important, maybe something for a slow day:

I would like to see something similar to the Minecraft Forge OreDictionary. This would be useful for modders who want to add resources that already exist without requiring other mods as a dependency or conflicting with those mods. Take for example eatKenny's Industrialisation and my CorePanda - both add copper, but the two kinds of copper can only be used to make things from their respective mod (unless they are both named the same thing, but then one gets overridden). With something like <thingType>Copper</thingType> both mods' copper could be used for the same purposes without conflicting.

This would also have a benefit to the vanilla game, allowing the different kinds of trees to drop different kinds of wood, but still be able to be used in the same way for fuel/building/etc. without taking up stuffCategories. It would also give players a reason to grow different types of trees, but not require them to. Maybe they like the look of teak walls with birch beds and oak doors, for example.
Logged
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!

SmartererThanYou

  • Drifter
  • **
  • Posts: 69
  • Yeah Science!
    • View Profile
Re: What would make the game easier to mod?
« Reply #11 on: June 11, 2016, 04:06:54 PM »

Not very important, maybe something for a slow day:

I would like to see something similar to the Minecraft Forge OreDictionary. This would be useful for modders who want to add resources that already exist without requiring other mods as a dependency or conflicting with those mods. Take for example eatKenny's Industrialisation and my CorePanda - both add copper, but the two kinds of copper can only be used to make things from their respective mod (unless they are both named the same thing, but then one gets overridden). With something like <thingType>Copper</thingType> both mods' copper could be used for the same purposes without conflicting.

This would also have a benefit to the vanilla game, allowing the different kinds of trees to drop different kinds of wood, but still be able to be used in the same way for fuel/building/etc. without taking up stuffCategories. It would also give players a reason to grow different types of trees, but not require them to. Maybe they like the look of teak walls with birch beds and oak doors, for example.

Wish I'd thought of that :D it's a great idea.
Logged

palandus

  • Colonist
  • ***
  • Posts: 491
  • Refugee
    • View Profile
Re: What would make the game easier to mod?
« Reply #12 on: June 12, 2016, 03:49:00 AM »

@Tynan;
An interesting question. Having modded several different kinds of games from simple text-editor edits, to more complicated modding with toolsets, I'd like to weigh in on this discussion. I hope the stuff hasn't been already discussed by someone else, but I don't generally have tons of time on my hands these days to read tons of forum posts. Anywho...

1] Keep all "parent" classes at the top of each XML file. This way, a modder can easily figure out which groups of code are the "parent" and which are the "children". In some files, I can find "parent" code groups in the middle of the file.

2] Provide a list of all possible code that can be used in a parent or child. As an example, if you want to create a new trait, and want to restrict it so that only those who can do all kinds of skills, then you would need to know what are the names of the code lines that would be needed to allow cleaning, hauling, firefighting, etc...

This could be done in a "template" file that is a common occurrence in modding for older titles, with comments next to each code line explaining what they do, expected value ranges for numbers (ie Flammability is 0 to 1.0, and shouldn't be - values) and any specific order in placement within a code group (ie the StatBases might have to precede Costs; not sure on that but that is an example). Having a "template" would help to ease users into modding.

3] Provide documentation on how to add in sample items. So, as an example, have documentation on how to add a surgery option to add in a bionic brain. List of all the files that would need to be modified to do this. List off all the code needed to be added and to which files. Having documentation on how to add in sample items, would make modding a lot easier. That way a modder could have a "checklist" of what files they need to address to add in their item.

Sample items that really could use documentation (that I found hard to learn) are: Add a new Surgery, Add a new Storyteller, Add a new recipe, Add a new Joy Activity, Add a new Resource, Add a new Plant, and Add a new Animal. There is obviously more, but those are a few things that documentation could be really helpful for.

4] Make sure XML files are all "orderly" and neat. I don't know if the problem is just on my end, but editing some files, it seems like all the code is bunched up and nearly impossible to read without formatting it correctly with line breaks, spacing, and tabbing. When it is bunched up its hard to tell where one code group starts and another ends.

5] Give a list of all the "hidden" "parent" classes. What I mean by this is that in some files I see code using a parent class that isn't defined in any of the XML files. Knowing what is or isn't in these "hidden" "parent" classes, for inheritance purposes, would be very useful to modders. Then again, I may be completely wrong and there aren't any "hidden" "parent" classes, and if that is the case, my apologies.

6] If you wanted to do the documentation approach (not many check documentation so may be waste of time) the best things that could be in documentation would be:
- Samples on how to create specific items
- Templates on what code can be in a class and what cannot
- A list of things not exposed to modding and why
- A list of suggested books/online tutorials teaching C#

7] A conflicts checker in the mod loading interface, that could highlight which files have conflicts with eachother to help troubleshooting of mods.

8] Add in sample resources that are present in the game, but could be used by modders to avoid resource conflicts. As an example, add in Copper for modders to use, but isn't present in the base game as a resource that can be found. But, by having these sample resources available, it might cut down on conflicts as they'd use this resource rather than create their own. Common materials that might interest modders as resources are: Copper, Silicon, and Sand Piles.

9] Expose more of the code base to modders, providing more "hooks" for mods, requiring less C# to perform tasks. It may seem that making more code available would make things more confusing, and in some ways it might, but at the same time it reduces the amount of game modding knowledge that is required to accomplish something. The other benefit to exposing more code is that it will allow, you Tynan, to have more time in larger system creation and allow modders to add in the content. Code that I personally would love access to (that others may like as well) is:
- Shooting Mechanics = having access to the calculation that controls the hit/miss for colonists with weapons and enemies with weapons. If this isn't something you'd want to do, then you could indirectly provide access to the calculation by exposing the variables that control hit/miss chances for light levels, hit/miss chances for range, and allowing players to add in an increase firing speed based on skill level; a skilled shooter in theory should be more accurate and know how to reload their weapon faster.
- Experience Mechanics = being able to control how much experience each activity provides would be useful to modders. Yes, we can modify how much of an effect a high skill level provides, but we don't control how much experience a colonist or enemy gains for mining, growing, or shooting. Finally, being able to control how fast experience is lost per second based on skill level.
- Skill System = being able to add in new skills and add them to the skill interface (I'm not sure if this is possible right now, as I've never tried to add in new skills myself). Additionally, being able to break existing skills into sub-skills. So instead of having just "Shooting" skill, a modder could have a Neolithic Skill, a Small Arms Skill, and a Heavy Weapons skill, with different benefits/penalties based on skill level, and covers a specific set of items. Thus, you could have highly skilled gunslingers, that aren't good at rifles, but deadly with pistols.
- Extensive Surgery System = there is already an extensive health system, but there isn't an extensive system for addressing those various maladies. I've seen some modders add in animal surgeries, I've seen some do C# based scar removal surgeries, and I've seen some offer full bionic organs. However, it would be more ideal if the game itself allowed these kinds of things out of box rather than have modders "fix" the lack of these things for the game. The big problem is that it requires a lot of effort to add in a single surgery, and if you miss one of the files for it, the surgery doesn't work, and often the game won't tell you why it isn't working, unlike other forms of modding. If doing a full surgery system isn't ideal, then provide example samples that shows how to add bone repair, how to add in organ surgery/replacement, how to add in implants, how to repair scars or old wounds, and how to do all these things on animals as well. My biggest complaint with modding is that trying to do any of these things is extremely hard, extremely confusing, and many things require C# knowledge to achieve.
- Raid Mechanics = controlling how soon raiders arrive, how many raiders come, if they come with/without war beasts (ie Wargs), how many come with heavy weapons, small arms, or melee weapons, controlling how often you get raids, controlling which factions can arrive, what conditions they will start raiding at and controlling how different raid factions interact with eachother when two raids occur at the same time. Often times raids feel unfair, and being able to control how raids work at a fundamental level will allow for many interesting mods. A big problem with adding in new factions is the inability to control when they start raiding your settlement; ie in GlitterTech you are just as likely to be hit by a regular faction as you are to be hit by the Commando faction and getting the Commando faction early game is generally an instant kill.
- Map Generation Options = being able to control land generation such as mountains, hills, ruins, insect hives, and more would be very useful. Being able to litter the planet with tons of ruins or no ruins. Being able to control how many insect hives there are, or if you will find any. Being able to control if you have a single huge mountain range, or several smaller ones or a giant caveworld type level. The options available to users to do map generation is very sparse, and having greater access to map generation would be incredibly useful.
- Incident Controls = being able to add in your own custom incidents and edit the existing incidents. Being able to control what items can or can't be found in a resource pod drop would be useful. Being able to control what animals a psychic event affects would be useful.
- Item Slot System = being able to carry weapons, tools, and accessories on pawns would be very useful. Have a "hand" system where you can equip an item (if small enough) in each hand and use both items. This could allow for dual-wielding of weapons, using physical shields (ie shield blocks), or two-handing a one-handed object for a better bonus.   
- Expose Stuff System = as an example, all animals will produce meat and fur/skin of some kind. However, one cannot control the various stats of each type of meat, fur or skin. Some fur/skin isn't flammable, while others are. Being able to control the stats of each stuff item produced by things that are currently not available to editing would be useful. The most obvious ones are the animal byproducts of butchering. Other examples are = smelting weapons (say you wanted less metal to be produced from swords and more from maces) or salvaging clothing (something that currently isn't available).

I'd still love to see the game be the best it can be, and looking forward to Steam Release. However, making modding easier, more accessible to new users, and exposing more of the codebase will allow more and better mods to be released giving you Tynan, more time to spend interacting with fans, bug fixing, and creating entire new systems while modders work on adding more content to the game. I hope that some of the above suggestions might get implemented, and will check back later for any replies.
Logged

mrofa

  • Planetologist
  • ****
  • Posts: 1666
  • Squirrel Hunter
    • View Profile
Re: What would make the game easier to mod?
« Reply #13 on: June 12, 2016, 06:01:22 AM »

Jaxxa beat me to the punch :D
It would be nice for .dds support same as vanilia assets have.

Logged
All i do is clutter all around.

sirgzu

  • Colonist
  • ***
  • Posts: 187
  • Refugee
    • View Profile
Re: What would make the game easier to mod?
« Reply #14 on: June 12, 2016, 06:47:51 AM »

The ability to re-order mods by load order or manually in the mods page.
The ability to save a mod list presets.
I could be reading this wrong, but wouldn't  the ability to save a mod list be in the ModsConfig?

I'm not sure what you are referring to. Here is the sample use case:

- I'm playing a game with 15mods loaded
- New shiny mod appears
- Add new shiny mod to existing savegame
- The light bulbs suddendly explode
- The walls start shaking
- Silence
- I start a new game(s) with different mod subset for testing/reporting
- Have to manually reset my ordered mod list before continuing my save is tedious
Logged
Pages: [1] 2 3 ... 17