W/12.914 Keybinding Missing on some Orders

Started by r4ky, September 17, 2015, 07:45:20 PM

Previous topic - Next topic

r4ky

Hi, it's not really a bug it s more like a problem but with the Order all order can not be keybinded like : Slaghter, Uninstall, Claim, Strip, Plan.

In the keybinding option you can rebind Key Order on the section "Misc Control".

and in this section all Order are named like this :

Misc 1 : "B"
Misc 2 : "H"
......
Misc 12 : "P"

so you don't know what you are rebinding it should be nice to name it but the problem is there need to be Misc 13,14,15,16,17 !!! im often use Order Plan and withouth keybind it s so boring to do and the most stupid thing is that order remove plan is keybinded  so what you just hate the other one  ?  :P;D

little thing, i try to creat Misc13&14 with xml edit but it didn't work  :-\ i have it in the keybinding option but Key just do nothing

thanks

r4ky

#1
my real problem was i want to keybind order Plan like it was before with key "I" the thing is the order "Open" take the Key "I" now with the new alpha if someone want to know how to do it i am able to explain by just editing an xml but you won't be able to use Key for "I" anymore or by doing an harder way.

So to fix this problem there are two ways:
-You make a new c# class and fix the problem at the base. Unfortunately you need to do some c# coding to do this.
-The second one is a bit simpler. If you only want the key for planning on I and you don't care much that the open order has a keybinding you can simply do the following:
In the DesignationCategories place the Open command AFTER the PlanAdd command.
Here it is like this: The first to request the key gets it.
So the new DesignationCategory for Orders should look like this and you have I on PlanAdd:


-------------
here is the way by edit xml and i think it should work for any other order you want just remplace Plan by the other order you want to (ex: Slaughter) but i didn't try

In the DesignationCategories place the Open command AFTER the PlanAdd command.
Here it is like this: The first to request the key gets it.
So the new DesignationCategory for Orders should look like this and you have I on PlanAdd:

  <DesignationCategoryDef>
    <defName>Orders</defName>
    <label>orders</label>
    <description>Designate specific interactions with specific things.</description>
    <order>900</order>
    <specialDesignatorClasses>
      <li>Designator_Cancel</li>
      <li>Designator_Deconstruct</li>
      <li>Designator_Mine</li>
      <li>Designator_Haul</li>
      <li>Designator_PlantsCut</li>
      <li>Designator_PlantsHarvest</li>
      <li>Designator_PlantsHarvestWood</li>
      <li>Designator_Hunt</li>
      <li>Designator_Slaughter</li>
      <li>Designator_Tame</li>
      <li>Designator_Uninstall</li>
      <li>Designator_Claim</li>
      <li>Designator_Strip</li>
      <li>Designator_RearmTrap</li>
      <li>Designator_PlanAdd</li>
      <li>Designator_PlanRemove</li>
      <li>Designator_Open</li>
    </specialDesignatorClasses>
  </DesignationCategoryDef>


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

the second way that i didn't try :


If you really want to make the c# part, you have to make a new Designator_PlanAdd

original:
public class Designator_PlanAdd : Designator_Plan
{
public Designator_PlanAdd() : base(DesignateMode.Add)
{
this.defaultLabel = "DesignatorPlan".Translate();
this.defaultDesc = "DesignatorPlanDesc".Translate();
this.icon = ContentFinder<Texture2D>.Get("UI/Designators/PlanOn", true);
this.soundSucceeded = SoundDefOf.DesignatePlanAdd;
}
}


new:
public class Designator_PlanAdd : Designator_Plan
{
public Designator_PlanAdd() : base(DesignateMode.Add)
{
this.defaultLabel = "DesignatorPlan".Translate();
this.defaultDesc = "DesignatorPlanDesc".Translate();
this.icon = ContentFinder<Texture2D>.Get("UI/Designators/PlanOn", true);
this.soundSucceeded = SoundDefOf.DesignatePlanAdd;
this.hotKey = KeyBindingDefOf.Misc9; // This needs to be set to a free keybinding
}
}


Afterwards you need to change the Designator/DesignatorCategory to use your class and not the original.
This is a bit tricky, but doable :)


Big thanks to Haplo for the time and the help, all credit goes to him
and Ninefinger for ... try ?  ;D jk

r4ky

for those who use the Ultimate Overhaul Modpack as i did (because i think rimworld with this modpack is really crazy good) you need to know the step i told you to do dont fully work well you need to do it but you need to do another little thing too for make it work.

and the thing is :

RimWorld914Win\Mods\VeinMiner\Defs\DesignationCategoryDefs\DesignationCategories.xml

do the same thing as i told :

  <DesignationCategoryDef>
    <defName>Orders</defName>
    <label>orders</label>
    <description>Designate specific interactions with specific things.</description>
    <order>900</order>
    <specialDesignatorClasses>
      <li>Designator_Cancel</li>
      <li>Designator_Deconstruct</li>
      <li>Designator_Mine</li>
      <li>Designator_Haul</li>
      <li>Designator_PlantsCut</li>
      <li>Designator_PlantsHarvest</li>
      <li>Designator_PlantsHarvestWood</li>
      <li>Designator_Hunt</li>
      <li>Designator_Slaughter</li>
      <li>Designator_Tame</li>
      <li>Designator_Uninstall</li>
      <li>Designator_Claim</li>
      <li>Designator_Strip</li>
      <li>Designator_RearmTrap</li>
      <li>Designator_PlanAdd</li>
      <li>Designator_PlanRemove</li>
      <li>Designator_Open</li>
    </specialDesignatorClasses>
  </DesignationCategoryDef>


Thanks to Haplo again, all credit goes to him.

ison

I'm glad you found a solution to your problem. Unfortunately there can't be Misc13 because there are not enough keys on a keyboard. Thanks for the report though, locking.