Modding:Modding API Updates: Difference between revisions

From Vintage Story Wiki
Marked this version for translation
mNo edit summary
Tag: Manual revert
(Marked this version for translation)
 
Line 1: Line 1:
<languages/><translate>
<languages/><translate>
<!--T:1-->
{{GameVersion|1.19.7}}
{{GameVersion|1.19.7}}


<!--T:2-->
The Vintage Story API is responsible for almost all functionality for modding the game. This page will list changes made to the API in each version, taken directly from [https://www.vintagestory.at/blog.html/ the VS News page]. Changes will be sectioned by ''content'', ''code'', or ''other'', based on what type of mod they mostly affect.
The Vintage Story API is responsible for almost all functionality for modding the game. This page will list changes made to the API in each version, taken directly from [https://www.vintagestory.at/blog.html/ the VS News page]. Changes will be sectioned by ''content'', ''code'', or ''other'', based on what type of mod they mostly affect.


<!--T:3-->
Some points may contain additional information on how this will affect mods.
Some points may contain additional information on how this will affect mods.


<!--T:4-->
This log starts at version 1.19.0, and changes from before then are not listed. Release candidate versions (suffixed with ''rc'') are not listed until they are released as stable versions.  
This log starts at version 1.19.0, and changes from before then are not listed. Release candidate versions (suffixed with ''rc'') are not listed until they are released as stable versions.  


<!--T:5-->
__TOC__
__TOC__


== How to Utilise This Page for Modders ==
== How to Utilise This Page for Modders == <!--T:6-->
This page gives updates on all API updates for code and content modders. When updating a mod, it is recommended to find the version your mod was released for in this list. From there, scrolling up will display all the changes made to the API since that version. If your mod uses any of those API features, it is recommended to test them. This will give you a good idea of what parts of a mod may need updating for newer versions.
This page gives updates on all API updates for code and content modders. When updating a mod, it is recommended to find the version your mod was released for in this list. From there, scrolling up will display all the changes made to the API since that version. If your mod uses any of those API features, it is recommended to test them. This will give you a good idea of what parts of a mod may need updating for newer versions.


== 1.19 ==
== 1.19 == <!--T:7-->


=== 1.19.6/1.19.7 ===
=== 1.19.6/1.19.7 === <!--T:8-->


==== Code ====
==== Code ==== <!--T:9-->


<!--T:10-->
* API Fixed: RegisterEventBusListener() delegates called twice in some cases
* API Fixed: RegisterEventBusListener() delegates called twice in some cases


=== 1.19.5 ===
=== 1.19.5 === <!--T:11-->


==== Content ====
==== Content ==== <!--T:12-->


<!--T:13-->
* Api Tweak: Items/Blocks can now define an attribute "inBarrelShape" to determine their shape inside a barrel
* Api Tweak: Items/Blocks can now define an attribute "inBarrelShape" to determine their shape inside a barrel


==== Code ====
==== Code ==== <!--T:14-->


<!--T:15-->
* Api Fixed: WorldAPI ''RegionMapSizeX'' would return a size off by one since game version 1.12.9. Affected methods are ''MapRegionIndex2D'', ''MapRegionPosFromIndex2D'', ''MapRegionIndex2DByBlockPos''
* Api Fixed: WorldAPI ''RegionMapSizeX'' would return a size off by one since game version 1.12.9. Affected methods are ''MapRegionIndex2D'', ''MapRegionPosFromIndex2D'', ''MapRegionIndex2DByBlockPos''
* Api Fixed: Chatcommands with multiple `WithPreCondition` or a pre-condition and `RequiresPlayer` would over-write each other. Now all pre-conditions are checked and if one pre-condition returns ''EnumCommandStatus.Error'' it won't process the command further.
* Api Fixed: Chatcommands with multiple `WithPreCondition` or a pre-condition and `RequiresPlayer` would over-write each other. Now all pre-conditions are checked and if one pre-condition returns ''EnumCommandStatus.Error'' it won't process the command further.


==== Other ====
==== Other ==== <!--T:16-->


<!--T:17-->
* Api Tweak: Don't crash on invalid GroundStack
* Api Tweak: Don't crash on invalid GroundStack


=== 1.19.4 ===
=== 1.19.4 === <!--T:18-->


==== Content ====
==== Content ==== <!--T:19-->


<!--T:20-->
* Tweak: Added a new attachment point on the seraph model for off-hand animations
* Tweak: Added a new attachment point on the seraph model for off-hand animations
* Tweak: New and updated stackrandomizers are available to allow random loot to be placed in containers in schematics; and these randomizers can be modded to add or change loot in vanilla ruins: for details see the randomizers in assets/survival/itemtypes/meta
* Tweak: New and updated stackrandomizers are available to allow random loot to be placed in containers in schematics; and these randomizers can be modded to add or change loot in vanilla ruins: for details see the randomizers in assets/survival/itemtypes/meta
Line 50: Line 60:
* Fixed: Microblocks not allowing 255 materials
* Fixed: Microblocks not allowing 255 materials


==== Code ====
==== Code ==== <!--T:21-->


<!--T:22-->
* Additional minor tweaks relevant only to coded mods:
* Additional minor tweaks relevant only to coded mods:
** ''KeyConfiguration'' used for hotkeys can now also represent a mouse button; mouse buttons are treated like keyboard keys with keycodes 240-247
** ''KeyConfiguration'' used for hotkeys can now also represent a mouse button; mouse buttons are treated like keyboard keys with keycodes 240-247
Line 65: Line 76:
** Notice: For coded mods using native binaries (.dll in Windows) in a /native folder, these will now not get loaded automatically (they would produce 'Bad IL format' errors at loading time anyhow). Applies to native binaries representing either libraries or a mod's own code not written in C#. Mods needing to load native binaries should instead write their own short DllImportResolver method [[https://github.com/anegostudios/vsmodexamples/blob/master/code_mods/NativeInterop/nativeInterop/NativeInteropModSystem.cs example]] to locate their native binaries properly for each platform, and also include a static call to set that DllImportResolver [[https://github.com/anegostudios/vsmodexamples/blob/master/code_mods/NativeInterop/nativeInterop/NativeInteropModSystem.cs#L16 example line of code]]
** Notice: For coded mods using native binaries (.dll in Windows) in a /native folder, these will now not get loaded automatically (they would produce 'Bad IL format' errors at loading time anyhow). Applies to native binaries representing either libraries or a mod's own code not written in C#. Mods needing to load native binaries should instead write their own short DllImportResolver method [[https://github.com/anegostudios/vsmodexamples/blob/master/code_mods/NativeInterop/nativeInterop/NativeInteropModSystem.cs example]] to locate their native binaries properly for each platform, and also include a static call to set that DllImportResolver [[https://github.com/anegostudios/vsmodexamples/blob/master/code_mods/NativeInterop/nativeInterop/NativeInteropModSystem.cs#L16 example line of code]]


==== Other ====
==== Other ==== <!--T:23-->


<!--T:24-->
* Tweak: Missing dependencies now listed in the mod manager
* Tweak: Missing dependencies now listed in the mod manager
* Tweak: Log an error if HeldRightReadyAnimation and HeldRightTpIdleAnimation for an item are set to the same animation
* Tweak: Log an error if HeldRightReadyAnimation and HeldRightTpIdleAnimation for an item are set to the same animation


=== 1.19.2/1.19.3 ===
=== 1.19.2/1.19.3 === <!--T:25-->


==== Code ====
==== Code ==== <!--T:26-->


<!--T:27-->
* API Fixed: DidPlaceBlock() not called on the last block in the stack
* API Fixed: DidPlaceBlock() not called on the last block in the stack


=== 1.19.1 ===
=== 1.19.1 === <!--T:28-->
There are no API changes for this version.
There are no API changes for this version.


</translate>
</translate>
{{Navbox/modding}}
{{Navbox/modding}}
Confirmedusers
556

edits