What would make the game easier to mod?

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

Previous topic - Next topic

Shinzy

Quote from: Diana Winters on July 28, 2016, 08:45:52 PM
I'm trying to make a mod (http://steamcommunity.com/sharedfiles/filedetails/?id=733113011&tscn=1469750669) that adds a new species of alien, but humans and aliens can't, ah, "hook up" without dev mode. Even if you do make them hook up with dev mode, they won't do any lovin'.

I heard this was to prevent animals from breeding with incorrect species, but this wouldn't really apply to humanlikes, would it? (Seeing as only lovers get lovin', but they don't produce babies anyways.)

Oh yes I second this! I would love to have my norbals be able to get some human lovin' too
they're bit rough around the edges, the norbals, but they deserve to be loved

RemingtonRyder

I recently thought it would be nice to be able to use a tool on the debug menu to skip forward a certain number of seasons or years.

amodchecker

"modular" AIs,  so you can specify in the XML use a colonist's AI, or a mech's AI, or some other AI, then things like MD2's droids wouldn't be such a pain in the rear to do/update,  i remember having Droids wayy back when your colonists could only grow potatos and didn't care if they where raw (i want to say it was A4 or there a bouts, but i could be a few versions off)
"Modular" Pawns, start with a base "type" then use XML for specs like traits,immunity gain speed, moment speed, etc
you can include my mods in your mod pack,  but you must give credit to me and there must not be any amount of money involved,

you can make mods of my mods as long as you give credit

you must inform me if you use my mods in any way shape or form

Supes

Load order tweaks,

"Depends on" is a good idea, but doesn't account for all load order situations, so there should also be an option for "Should Load Before/After"

a check for xml mods that use existing defs. this could be done using a temporary list of vanilla defs. using this list you can then tracks changes when mods replace a def.  then warns when another mod tries to make a change to an already replaced def.

RalphFox

Sorry if it was already suggested:
-An way to reload the mods without restarting;

-When i enable the debug mode, it would be nice to know the name of the class of the object i'm looking to (example, i'm seeing the geothermal generator, and his name is PowerPlantGeothermal, base class is BuildingBase, height is x, etc etc etc)

-Also, on debug mode, it would be nice if i was able to change the colonists skills, instead of having to generate a new colony with the predef colonists;
Someone: You have no idea what you're doing, do you?
Me: Yeah! isn't that exciting?


Maintaining Officially to v14:
Edge Technologies
Cupro's SOGA

mrofa

Thing identifier, simple string or enum added to thingdef class and specify in xml to tell what the thing actually is.
Is it a wall , door , workbench, seat or common pice of furniture. Adding thing like that would make search and codding much easier, not to mention efficient, since you wouldnt need to check 30 things about a thing to establish "Yep its a wall or a squieerl".
All i do is clutter all around.

magik20

Hi Tynan, I just wanted to chime in that for me modding is a huge addition to the game.

Please continue to make it easier to mod!

Sam_

I think I mentioned this previously here, or in another thread.

Adding a waterShallow and waterDeep terrainAffordance to the water terrains would allow modders to make "water buildings". Right now the only equivalent is to allow placement on water and land.


1000101

#98
Needs and ThinkTree modding suggestions:



First off, can you change the Needs a little?

Instead of a single field for "colonistAndPrisonersOnly" in NeedDef, can we get individual allowances?

ie: allowPrisoners, allowColonists, allowVisitors, allowAnimals, and allowMechanoids

This will make giving needs to individual pawn classes much simpler and remove the need for hardcoding to remove the Joy need from prisoners.



Secondly, can we get injection points inside the ThinkTreeDef sub-nodes so we don't have to clone the entire sub tree and all it's nodes to add new leaves at specific points?

eg:                <!-- Prisoner -->
                <li Class="ThinkNode_ConditionalPrisoner">
                    <leaveJoinableLordIfIssuesJob>true</leaveJoinableLordIfIssuesJob>
                    <subNodes>
                        <li Class="JobGiver_PrisonerEscape" />

                        <!-- Insertion hook for modders -->
                        <li Class="ThinkNode_SubtreesByTag">
                            <insertTag>Prisoner_PreMain</insertTag>
                        </li>

                        <li Class="JobGiver_PatientGoToBed" />
                        <li Class="JobGiver_PrisonerGetDressed" />
                        <li Class="ThinkNode_PrioritySorter">
                            <subNodes>
                                <li Class="JobGiver_GetFood"/>
                                <li Class="JobGiver_GetRest"/>
                                <li Class="ThinkNode_Priority_GetJoy">
                                    <subNodes>
                                        <li Class="JobGiver_GetJoy"/>
                                    </subNodes>
                                </li>

                                <!-- Insertion hook for modders -->
                                <li Class="ThinkNode_SubtreesByTag">
                                    <insertTag>Prisoner_Needs</insertTag>
                                </li>

                            </subNodes>
                        </li>

                        <!-- Insertion hook for modders -->
                        <li Class="ThinkNode_SubtreesByTag">
                            <insertTag>Prisoner_PostMain</insertTag>
                        </li>

                        <li Class="ThinkNode_ConditionalReleased">
                            <subNodes>
                                <li Class="JobGiver_ExitMapBest">
                                    <defaultLocomotion>Walk</defaultLocomotion>
                                </li>
                            </subNodes>
                        </li>
                        <li Class="JobGiver_WanderCurrentRoom">
                            <maxDanger>Deadly</maxDanger>
                        </li>
                        <li Class="JobGiver_IdleError" />
                    </subNodes>
                </li>


Because we don't have injection points inside the trees and node levels, modders have to clone the entire sub-tree and inject the clone before that particular sub-tree is used.  This leads to mod incompatibilities and redundancy in the sub-tree cloning itself.

Edit:  I have implemented additional ThinkTree injection points in CCL including within the priority sorters.
(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

1000101

Quote from: Sam_ on August 02, 2016, 06:33:19 AM
I think I mentioned this previously here, or in another thread.

Adding a waterShallow and waterDeep terrainAffordance to the water terrains would allow modders to make "water buildings". Right now the only equivalent is to allow placement on water and land.

CCLs PlaceWorker_OnlyOnTerrain supercedes the terrainAffordance allowing you to build on any terrain including water.  ;)
(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

UberWaffe

#100
These might exist/be possible, but from the XML-auto documentation it doesn't seem to be.


For pawns allow a property that determines the healing speed.
Say <baseHealRate>13.0</baseHealRate>
Currently if you give something a high <baseHealthScale>13.0</baseHealthScale> (say like a Thrumbo) it still heals wounds at the normal pace of 1 hp per healing step. Which means it can take ages to fully heal up after being wounded.


For <lifeStageAges> let <ImmunityGainSpeed> be part of life stages (seems to be hardcoded to drop off around 60-ish now, regardless of expected age).

Say
<lifeStageAges>
<li>
<def>AnimalBaby</def>
<minAge>0</minAge>
<ImmunityGainSpeed>1</ImmunityGainSpeed>
</li>
<li>
<def>AnimalJuvenile</def>
<minAge>6.0</minAge>
<ImmunityGainSpeed>1.2</ImmunityGainSpeed>
</li>
<li>
<def>AnimalAdult</def>
<minAge>25.0</minAge>
<soundCall>Pawn_Thrumbo_Call</soundCall>
<soundAngry>Pawn_Thrumbo_Angry</soundAngry>
<soundWounded>Pawn_Thrumbo_Pain</soundWounded>
<soundDeath>Pawn_Thrumbo_Death</soundDeath>
<ImmunityGainSpeed>1.2</ImmunityGainSpeed>
</li>
<li>
<def>AnimalOld</def>
<minAge>180.0</minAge>
<ImmunityGainSpeed>0.9</ImmunityGainSpeed>
</li>
</lifeStageAges>



Edit:
Also the ability to assign restFallFactor to trait definitions, and not just HeDiff stages definitions.
Ex: Traits that make pawn require more sleep overall, or less sleep overall.

In addition to this, the ability to always give certain traits to certain animal / species.
Ex: Make a new trait "Energetic" that halves the rate at which the pawn becomes sleepy. Always make all Wargs have it.

CannibarRechter

This is a longer thread, with a lot to read. Having played around with some modding for several weeks now, I think I understand a specific minor feature/flaw with the modding system correctly.

As of right now, if you want to mod an abstract class in the Core, you have to either A) modify it in the core directly, or B) copy it to your mod, and likewise copy all classes derived from that abstract class to your mod.

The abstract class thing being confined to the scope of a mod is important, to prevent namespace collisions I think. Regardless, it would be nice to be able to override Core abstract classes.

I think my suggestion would be to add an xml tag for abstract classes that looks like <override>true</override> or some such.

Apologies if I misunderstand how this works presently.

CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

skullywag

If you want a thing to use a different class in your mods dll you change the xmls <thingClass>Building<thingClass> for example to <thingClass>ModNamespace.CustomBuildingClass<thingClass> The you can extend the main building class or whatever. Is this what you are reffering to?
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

CannibarRechter

No, I was thinking of modifying an abstract class (and only an abstract class) in the base game, such that all the classes that derive from it in the base game pick up the changes. The only way that I have been successful at doing that is modifying the abstract class in the Core.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

skullywag

You can Detour using CCL, this is the current accepted way of doing any kind of override to core methods.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?