Space Engineers

Space Engineers

[Beta] Cheetah's Radars: now with Target Scanning & Analyzing!
 This topic has been pinned, so it's probably important
Cheetah  [developer] 6 Oct, 2017 @ 11:31pm
Clarification on the mod's statuses
I see that too many people just don't understand how SE mods work, and often accuse me of removing controls or GPS markers or stuff.

It is important to understand that for every modded block, some part of its functionality is performed by the game itself, and some part of its functionality is performed by the modder's code, if there is any. I will call it default functionality and custom functionality.

If we take a modded thruster, for example, everything is done by the game itself. The modder just supplies a block model and writes its specifications in the .sbc file (power consumption, thrust force, flame color and length, etc.). The game just takes the model of a modded block, acknowledges it as a thruster, and associates the defined specs with it. There is no custom C# code, only sbc definitions. Nearly every modded thruster on the Workshop only has default functionality.

A well-known counter-example is Cython's Shields: everything that they do is made by Cython's own code, and thus is custom functionality. For Shields, SE only provides an entry in G-screen menu, the ability for the player to place and weld the Shield block, an entry in the ship's terminal, an on/off switch (along with Show in terminal and Show on HUD switches), and power consumption. Shield points, deflecting damage, visual effects — all of it does not exist in vanilla SE, this is the sole work of Cython's code. It is custom functionality. So, the rule of thumb is: custom functionality is all the new game mechanics which are not found in pure vanilla worlds.

Again: default functionality is provided by the game, and custom functionality is provided by the modder's code.


There is two distinct types of brokenness for a mod with custom functionality provided by modder's code.

First, it is "broken" because there is a logical error in code which leads the code's work in the wrong direction or generates an exception. The coder made a mistake, and due to this the game thinks something else than it was supposed to do. It is often called a bug.

Second, it is "broken" because the F11 window shows errors upon world load. It says: Mod bla-bla (N errors). When you look up a log, you see something like "Compilation of <something> failed".
This means that upon world load the game has encountered a specific type of error called compilation error, and thus the game can't even allow to run the code — it's just impossible. If SE will encounter a compilation error, it will never ever try to run the mod partially, it will completely disable it's custom functionality until completely valid code is supplied.

A compilation error is an error when there is a syntax mistake (and the computer just can't understand the code), or when the code tries to reference and/or use something that is not found or forbidden from usage by mods. You've ever heard about ModAPI whitelist, right? That's it. When a mod tries to reference something that is not whitelisted, it produces a compilation error. A similar thing happens when KeenSWH makes changes to the code of SE that is open to ModAPI: if they move something to another place, but the mod is not updated, then the mod tries to reference something that does not exist in the old place, and this also produces a compilation error.

This is exactly what had happened many times with the Radars. Keens change their code, my code tries to access something which ceased to exist in their usual places, and this produces a compilation error. This means, the default functionality is still provided by the game (placing a block and adding an on/off switch to its terminal), but my custom functionality isn't here. Compilation error means that the code does not exist in the world. And yes, the Power slider and the Active/Passive mode switch and everything else what you don't find in any other blocks than Radars is added by my code, not .sbc definitions. If my code is not running, it can't add any sliders, or GPS markers, or anything.
Last edited by Cheetah; 6 Oct, 2017 @ 11:38pm
< >
Showing 1-2 of 2 comments
Zzo 6 Oct, 2017 @ 11:54pm 
Englightening. I think it's funny/crazy how quickly they jumped to the conclusion that the functionality was silently removed,haha.
Thanks for the update.
Last edited by Zzo; 6 Oct, 2017 @ 11:54pm
HalberdGuard 6 Nov, 2018 @ 11:41am 
I want you to know, Cheetah, that I appreciate and admire your response here. I am late to the party, and have not read the discussion that led to this, but it sounds like some unpleasant or self-entitled people gave you a hassle; seems like that is becoming more common. To be honest, though, this code is your work, and if you choose to change or remove something about it, or even the whole thing, yes, they can express their opinion, but they cannot reasonably be upset that you are no longer sharing your work with them. They did not earn it, or purchase it... But anyway, I am always encouraged to see someone react to unreasonableness with calm, courteous, and open reasonableness. Good on you. And thanks for a cool mod!
< >
Showing 1-2 of 2 comments
Per page: 1530 50