Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Mod API Whitelist Discussion and Requests

Discussion in 'Modding' started by CptTwinkie, May 31, 2017.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. CptTwinkie ME Asst. Producer Staff

    Messages:
    4,355
    We've whitelisted many things that we think are needed or are nice to have for modding. Since we don't make mods ourselves we really need your feedback and reasons for any changes to this whitelist.


    The ModAPI can be accessed by downloading the Medieval Engineers - Mod SDK from Steam tools. The entire API is now in one dll, for your modding convenience...
    \steamapps\common\MedievalEngineersModSDK\OriginalContent\ModTools\MedievalEngineersModApi.dll

    We are generating a schema when we build the api which is found in Definitions.xsd
     
    Last edited: May 31, 2017
  2. Sir_Moodz Apprentice Engineer

    Messages:
    377
    Request: MyRangedWeaponBehaviorDefinition
    --- Automerge ---
    Request: MyCharacterHandItemsComponent
     
  3. Deepflame ME Director Staff

    Messages:
    377
    Why do you need MyCharacterHandItemsComponent whitelisted? It is probably fine, but we need to understand why. :)
     
  4. Sir_Moodz Apprentice Engineer

    Messages:
    377
    I don't know if it is correct but I am trying to change a tool's definition variables on the dedicated server by using a RaiseStaticEvent.
    Then I need to use myEntity.Components.TryGet<MyCharacterHandItemsComponent> to get the tool from from the player and change the definition.
     
  5. ripchord Trainee Engineer

    Messages:
    12
    Hi guys. One of my mods needs to remove a section of voxels from the world, and using the whitelisted CutOutShape method (VRage.Game.ModAPI.IMyVoxelMaps.CutOutShape(VRage.ModAPI.IMyVoxelBase,VRage.Game.ModAPI.IMyVoxelShape) is proving an issue as all the classes accessed via the

    IMyVoxelShape interface are showing as prohibited. Or at least it seems that way to my novice-level skills :) What I think I need to do is create a MyShapeSphere in order to move it into position and size it appropriately, then use it as the template to cut the shape out of the IMyVoxelBase planet, but the fact MyShapeSphere isn't whitelisted makes creating the template... problematic.

    I am quite likely doing it wrong, though, so if there is an existing whitelisted class that I can create an instance of & use in the CutOutShape function, please let me know!

    Thanks very much in advance.
     
    • Like Like x 1
  6. Yurand Trainee Engineer

    Messages:
    68
    Hello, is it possible to whitelist the stuff to make custom GUI menus? I'd really appreciate to have a proprer UI for the upcoming mods I have in mind.

    Thanks in advance.
     
  7. CptTwinkie ME Asst. Producer Staff

    Messages:
    4,355
    I asked and I got a very firm answer that we will not whitelist GUI elements. ¯\(ツ)/¯
     
  8. Deepflame ME Director Staff

    Messages:
    377
    Ok, we've done analysis and it seems okay to whitelist. No promise when we have it whitelisted, but I'm hopeful for next week. :)
     
  9. ripchord Trainee Engineer

    Messages:
    12
    Thanks so much :) Will be great to be able to put the final polish on the gunpowder mod.
     
  10. ripchord Trainee Engineer

    Messages:
    12
    Hi crew. Just wondering if the IMyVoxelShapeSphere & friends have made it to the whitelist stage yet? No stress if not.

    Also, I'm playing around with an idea to make a mechanical block which will appear to run on wind power (via applying angular velocity based on number of windmill blades in proximity x a random factor.) I think the most streamlined way to apply the force is via a MyCrankComponent, however this class isn't whitelisted. What's the possibility of having this added?

    Love your work!

    jonn19
     
  11. Yurand Trainee Engineer

    Messages:
    68
    Hello everyone, I've the request to whitelist MyDetectedEntityProperties in order to have a better handling of a custom tool behavior script.
    Also if there is some different way to know what is the tool targeting without this whitelisting, let me know!

    Thanks for all your support,
    Yurand
     
  12. Deepflame ME Director Staff

    Messages:
    377
    @ripchord : It took a while, and I just checked, but the voxel shapes are already whitelisted. :) We'll probably not touch the MyCrankComponent for now.
    @Yurand : MyDetectedEntityProperties will be available in 0.5.17 as well.
     
  13. Yurand Trainee Engineer

    Messages:
    68
    Great, I'm so excited on what I could build now with this new whitelisting, thanks so much! :)
    --- Automerge ---
    Sorry guys but I'm getting too much into it :p, today I'm requesting the whitelisting of Medieval.Entities.Components.MyGatherableEntityComponent for checking if entities are growable/farmable.
    Thanks for all your support,
    Yurand
     
  14. Deepflame ME Director Staff

    Messages:
    377
    We will not whitelist MyGatherableEntityComponent for .5, as we made changes to it for .6 and we would have to unwhitelist it again. In .6 we will have an alternative method to identify these entities.
     
  15. ablindman Trainee Engineer

    Messages:
    5
    Hi, would it be possible to open up a function to allow the setting of the player camera FOV? I'm trying to make a telescope and am currently limited to the ~40deg FOV provided with the crossbow zoom.

    Alternatively, if there's a way to change the magnitude of the crossbow zoom without any whitelisting that would be just as useful. Thanks in advance!
     
  16. Yurand Trainee Engineer

    Messages:
    68
    Hello, is it possible to whitelist Medieval.Definitions.MyQuestDefinition and ObjectBuilders.Definitions.MyObjectBuilder_QuestDefinition in order to create quests dynamically and on request?

    Thanks for all your support,
    Yurand
     
  17. Gorea Trainee Engineer

    Messages:
    5
    Is it possible to allow JSON serialization too?
    we have MyAPIGateway.Utilities.SerializeToXML and would be nice to have MyAPIGateway.Utilities.SerializeToJSON and MyAPIGateway.Utilities.SerializeFromJSON

    Yml would be nice to have too but i doubt will happen, as it is even more user friendly
    i intend to use this for server management mods config setings
     
  18. Digi Senior Engineer

    Messages:
    2,325
    We could really use more components whitelisted, like the ones from Sandbox.Game.EntityComponents.Character.*, I personally need MyCharacterMovementComponent to be able to control spawned characters (unless there's another way?)
     
  19. glubbfreund Trainee Engineer

    Messages:
    12
    Would like to copy a sign by code, therefore I need to get the MyFontStyle Type from the first, and assign it to the new one. But the Compiler complaining because MyFontStyle is just internal.

    Error: The type or member 'MyFontStyle' is prohibited

    Please allow to or perhaps you know some alternatives. Thanks in advance.
     
  20. glubbfreund Trainee Engineer

    Messages:
    12
    Unfortunately every script mod fails on restricted API classes - either I use the wrong way or everything is imho too stricted right now.

    2017-12-18 09:30:01.708|Main thread> Compilation of KingsClaimBlocks failed:
    2017-12-18 09:30:01.709|Main thread> MOD_ERROR: KingsClaimBlocks
    2017-12-18 09:30:01.709|Main thread> in file:
    2017-12-18 09:30:01.709|Main thread> C:\Users\Oli\AppData\Roaming\MedievalEngineers\Mods\KingsClaimBlocks\Data\Scripts\FreeClaimBlockBehavior.cs(86,45): Error: The type or member 'MySession' is prohibited
    2017-12-18 09:30:01.709|Main thread> MOD_ERROR: KingsClaimBlocks
    2017-12-18 09:30:01.709|Main thread> in file:
    2017-12-18 09:30:01.709|Main thread> C:\Users\Oli\AppData\Roaming\MedievalEngineers\Mods\KingsClaimBlocks\Data\Scripts\FreeClaimBlockBehavior.cs(86,55): Error: The type or member 'MySession MySession.Static' is prohibited
    2017-12-18 09:30:01.709|Main thread> MOD_ERROR: KingsClaimBlocks
    2017-12-18 09:30:01.709|Main thread> in file:
    2017-12-18 09:30:01.709|Main thread> C:\Users\Oli\AppData\Roaming\MedievalEngineers\Mods\KingsClaimBlocks\Data\Scripts\FreeClaimBlockBehavior.cs(86,62): Error: The type or member 'MySessionComponentContainer MySession.Components' is prohibited
    2017-12-18 09:30:01.709|Main thread> MOD_ERROR: KingsClaimBlocks
    2017-12-18 09:30:01.709|Main thread> in file:
    2017-12-18 09:30:01.709|Main thread> C:\Users\Oli\AppData\Roaming\MedievalEngineers\Mods\KingsClaimBlocks\Data\Scripts\FreeClaimBlockBehavior.cs(86,73): Error: The type or member 'MyAreaOwnershipSystem MySessionComponentContainer.Get<MyAreaOwnershipSystem>()' is prohibited
    2017-12-18 09:30:01.710|Main thread> MyModManager.LoadData() - END

    I want to add a type of claimblock with an custom behavior. Could you make MyAreaOwnershipSystem public instead of internal?
     
  21. Sir_Moodz Apprentice Engineer

    Messages:
    377
    Request: MyProjectiles

    Why? To shoot projectiles

    If I understand it right you can create projectiles with just a single line:
    MyProjectiles.Add(myProjectileAmmoDefinition, shootOrigin, directionNormalized, owner, weapon, velocity);

    I desperately need this, or else my next mod is on hold :(
     
  22. Deepflame ME Director Staff

    Messages:
    377
    Sorry I haven't been replying much here, so, since my last post, in order:

    @ablindman:
    We investigated it, and MyCameraComponent will be whitelisted in 0.6.2 Patch 1.

    @Yurand:
    Dynamic quests don't work well with the Quest Log as it attempts to display the completed quest by definition. If the quest definition is dynamic, this mechanic breaks down.
    We don't actually store the progress of the quest, because quests are, at the moment, guaranteed linear, when you complete a quest we know 100% certain you went through all the steps.
    This made the quest system a lot easier to set up without greatly inflating save files.

    @Gorea:
    We currently have no plans to add json (de)serialization. Sorry!

    @Digi:
    MyCharacterMovementComponent is already whitelisted, along with some of the other classes in that namespace.

    @glubbfreund:
    1. I'm not sure how to help you out with this issue. We will not be whitelisting MyFontStyle, but you can solve it by calling Serialize on the old sign, and then passing the result to the new sign's Deserialize method.
    2. You cannot access Sandbox.Game.World.MySession as it is a sensitive class. However, you can access session components through VRage.Session.MySession.Static.Components. MyAreaOwnershipSystem is already whitelisted.

    @Sir_Moodz:
    Sure, expect it in 0.6.2 Patch 1.
     
    Last edited: Jan 15, 2018
    • Like Like x 1
  23. Equinox Trainee Engineer

    Messages:
    14
    Request: VRage.Components.Entity.Animations.MySkeletonComponent and VRageRender.Animations.MyCharacterBone

    Why? To allow modders to use skinned entities posed in custom ways. (For example, here's some rails I created using them https://streamable.com/k9720).

    Related types that aren't required are VRageRender.Animations.MyCharacterBoneTransform. It would also be beneficial if there was a variant of Sandbox.Game.EntityComponents.Renders.MyRenderComponentCharacter that didn't update the bones every single frame with MyRenderProxy.SetCharacterTransforms since this is semi-expensive, and not needed for meshes in a static pose.
     
  24. Deepflame ME Director Staff

    Messages:
    377
    After a brief investigation, we will be whitelisting MySkeletonComponent, MyCharacterBone and MyCharacterBoneTransform. Look for them in 0.6.2. Patch 2. :)
     
    • Like Like x 2
  25. Equinox Trainee Engineer

    Messages:
    14
    Request: MyPhysicsHelper.Init*Physics (the whole file should be safe)

    Why? So we can create physics shapes that aren't backed 1:1 by a collision model.

    Request: An additional method in MyUseObjectsComponentBase.
    Code:
    public uint AddDetector(string name, Matrix matrix)
    {
    	return this.AddDetector(string name, Matrix matrix, default(HkShape));
    }
    This method already exists with a default argument, however it's uncallable from the Mod API because HkShape is in an unreferenced assembly.

    Why? So we can create detectors that aren't backed 1:1 by a model.
     
    Last edited: Apr 2, 2018
  26. Deepflame ME Director Staff

    Messages:
    377
    Whitelisted in 0.6.3.
     
  27. Equinox Trainee Engineer

    Messages:
    14
    Request: Medieval.Entities.Cube.IMySwitchableBlock marked public + whitelisted.
    Why? To let us make custom switches without re-implementing all the logic ourselves.

    Request: Change to MyUseObjectGeneric so it doesn't require the entity to be a cube block.
    Why? To allow use objects with custom logic on things that aren't cube blocks. I may be overlooking something here, but I can't see any resource it has to be a cube block (besides maybe something with subparts)

    Request: VRageRender.Animations.MyAnimationVariableStorage (and possibly other related types)
    Why? To allow us to set variables in the animation controller.

    Request: VRage.ObjectBuilder.MyObjectBuilderType (or a workaround for the below)
    Why? Needed to override MyQuestConditionBaseDefinition.

    Request: Sandbox.Game.SessionComponents.MySessionComponentResearch
    Why? So we can check if things are researched in a custom script.
     
    Last edited: Apr 23, 2018
Thread Status:
This last post in this thread was made more than 31 days old.