Difference between revisions of "ModdingHooks"

From wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
  <code>namespace Staxel.Modding {
 
  <code>namespace Staxel.Modding {
 
     public interface IModHook : IDisposable {
 
     public interface IModHook : IDisposable {
        void GameContextInitializeInit();
+
      ...
        void GameContextInitializeBefore();
+
        void GameContextInitializeAfter();
+
        void GameContextDeinitialize();
+
        void GameContextReloadBefore();
+
        void GameContextReloadAfter();
+
        void UniverseUpdateBefore(Staxel.Logic.Universe universe, Plukit.Base.Timestep step, Staxel.Logic.StepMode mode);
+
        void UniverseUpdateAfter(Staxel.Logic.Universe universe, Plukit.Base.Timestep step, Staxel.Logic.StepMode mode);
+
 
     }
 
     }
 
  }</code>
 
  }</code>
Line 19: Line 12:
  
 
Other hook-able types include:
 
Other hook-able types include:
 
+
<code>
 
ICommandBuilder
 
ICommandBuilder
 
IItemBuilder
 
IItemBuilder
Line 32: Line 25:
 
ITileConfigurationBuilder
 
ITileConfigurationBuilder
 
ITileStateBuilder
 
ITileStateBuilder
 +
</code>

Latest revision as of 20:06, 6 January 2016

In the Staxel.dll

there is defined

namespace Staxel.Modding {
   public interface IModHook : IDisposable {
      ...
   }
}

To make a hooking make an assembly with a class that implements this interface publicly, and place this assembly next to the game .exe and it'll get loaded.

Other hook-able types include:


ICommandBuilder IItemBuilder IEntityAction IEffectBuilder IPlayerExtendedCommand IVillagerEntityCommand IVallagerEntityInstinct IEntityLogicBuilder IEntityPainterBuilder ITileComponentBuilder ITileConfigurationBuilder ITileStateBuilder