Quantcast
Channel: Programming (In-game)
Viewing all 903 articles
Browse latest View live

Building an effective refinery ship from a small welder array using merge block

$
0
0
I have already built an effective large grid torpedo welder. The torpedoes are 2X2X7 blocks long. I want to build a refinery/assembler ship from the same welder array that I use for the torpedoes, but to do that the blueprint needs to be way longer than 7 blocks. To overcome this problem I want to weld up 7 block long sections of the ship at a time and then use merge blocks to eventually bring the sections together into one ship; completely automated.

I would like to be able to weld up the...

Building an effective refinery ship from a small welder array using merge block

Calling enum by index does not work

$
0
0
Whenever in my script I try to use a "(EnumName)SomeCalculatedInt" expression I receive an error inside ingame complier - "The type or namespace name 'EnumName' could not be found (are you missing a using directive or an assembly reference?)
Same happens when I use test with static values like "(EnumName)2".

I have some logic in the script based on the index of the enum but I do not want to use direct [int]EnumName in if statements as its harder to understand the script.

Automatic Landing System

$
0
0
Hi,
I try to build an Automatic Landing System but the code fails.
During landing at a certain hight from sea level the space ships stops and does not continue descending.
Here is my code:

Code:
using Sandbox.Game.EntityComponents;
using Sandbox.ModAPI.Ingame;
using Sandbox.ModAPI.Interfaces;
using SpaceEngineers.Game.ModAPI.Ingame;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System;
using VRage.Collections;
using...
Automatic Landing System

Automatic mining program

$
0
0
Hi,
I am triing to build and to program an automatic space mining ship/drone. I was looking for scripts on different pages and forums but non of those seems to be working. I would like my ship to do basic manoveur, docking, collision avoidance, mining, ore finding?

i use this api: https://github.com/malware-dev/MDK-SE/wiki/Api-Index

I would be very glad if any of you could help me with the above.

Getting instance from modded block

$
0
0
Is there any way to import a mod in Visual Studio so i can get an instance of the implemented blocks?
I'm currently getting my data parsing the IMyTerminalBlock#DetailedInfo property.
I really don't like the idea of parsing several Strings every so many ticks.

Any help would be appreciated ^^

Programming Oxygen Gauge

$
0
0
So I got this script, and it is not mine. However, it can be modified from a Hydrogen Gauge Script, to an Oxygen Gauge Script with some modification. I made some changes, and I was wondering where I am going wrong.



// Space Engineers in-game scripting for Programmable block
// public domain code by Sean L. Palmer

// Relies on mod by Morphik with LCD images for fill percentages
// [DX11] Hydrogen LCD Percentage Bars...

Programming Oxygen Gauge

Parsing to Vector3D always returns 0;0;0

$
0
0
Hi,

after the last Update my conversion from String to Vector3D doesn't work anymore. Here an example:

Vector3D PoSi = new Vector3D(5, 5, 5);
string GPS = Me.Position.ToString();
Echo(GPS); >> This returns [X:-4, Y:1, Z:2]
VRageMath.Vector3D.TryParse(GPS , out PoSi);
Me.CustomData = PoSi.ToString(); >> This returns X:0 Y:0 Z:0


Can anyone help?
--- Automerge ---
Problem solved ;-)

anything.Position.ToString(); adds "{" and "}" to the String ....

Parsing to Vector3D always returns 0;0;0

Fuzz on LCDs filled with spaces?

$
0
0
[​IMG]

Hi, I'm working on a multi-LCD project and am seeing some texture bleeding on what appear to be the glyph quads as well as the edge of the LCD, from one side to the other (see near the yellow highlight, right side).

Is it possible that having nearest-neighbor as an option for both glyph and overall LCD texture filtering would help this? Or is that too far from the aesthetic of the game? If the engine has a setting for it, I suspect setting the LCD...

Fuzz on LCDs filled with spaces?

How to check if the electricity i'm reading from MyResourceSinkComponent is W, KW, MW etc.?

$
0
0
Hi there,

i'm reading wrong params from this method below because some are in W others in Kw etc.
How to convert them?

readonly MyDefinitionId electricityId = new MyDefinitionId(typeof(VRage.Game.ObjectBuilders.Definitions.MyObjectBuilder_GasProperties), "Electricity");
MyResourceSinkComponent sink;
public void GetPowInOut()
{
terminalCurrentInput = 0;
terminalMaxRequiredInput = 0;
foreach (IMyTerminalBlock block in TerminalBlocks)
{
if (!block.IsWorking) continue;
if...

How to check if the electricity i'm reading from MyResourceSinkComponent is W, KW, MW etc.?

MDK: Malware's DevKit for Space Engineers

$
0
0
https://github.com/malware-dev/MDK-SE

MDK-SE
(Malware's Development Kit for SE)

A toolkit to help with ingame script (programmable block) development for Keen Software House's space sandbox Space Engineers. It helps you create a ready-to-code project for writing ingame scripts, and provides an analyzer which warns you if you're trying to use something that is not allowed in Space Engineers.

General features
  • Helps you create...

MDK: Malware's DevKit for Space Engineers

Noob programming: play a sound if a group block turns on

$
0
0
Hi,

I'm a noob at programming in Space Engineers, this is the first time at all that I try to program.
I read online many tips, guide and examples and tried to figure it out how the Space Engineers programming works I read those guides:
https://steamcommunity.com/sharedfiles/filedetails/?id=360966557
https://www.spaceengineerswiki.com/Programming_Guide/Action_List

I was trying to set a program that every 1 second it checks the battery group status: if it's ON it plays...

Noob programming: play a sound if a group block turns on

Rotors look at Vector3

$
0
0
I'm trying to get rotors to look at a certain position but can't seem to really find anything out since everything I've tried so far redirected me to Unity's transform.lookAt but sadly no calculations to help does anyone have a idea?

IMyTextPanel GetPublicTitle() after loading game

$
0
0
GetPublicTitle() returns nothing for all LCD panels after loading the game. The title needs to be changed in order to make the method return a proper value. Are there any solutions for this? My scripts use the title to to assign outputs, afaik a while ago this problem didnt occur.

Sensor problem

$
0
0
Hi,

I have a problem. I don't know why the script gets stuck in the while Loop when I leave the sensor area.
If the while Loop the entity_list_out does not change and runs into the while Loop, entity_list_out is deleted by the Clear (.count again to 0)
Then the list should be filled again, but if I am not in the sensor. the entity_list_out.Count should be 0.
Where's the problem. Do you have to reset the sensor somehow or where is the problem?

Code:
List<MyDetectedEntityInfo>...
Sensor problem

Help with a script?

$
0
0
So, I use some scripts.. Whips horizon, isy solar rotor, JRGD, auto lcds, PAM, etc..

But I donno how to make 'em *blushes (I can actually barely work this computer thingy)

I am looking for one that is kinda rather specific.

It's for a gas station I want to make on the ice moon Europa.
One of those inverted tee type rotor piston type drill rigs. Y'all know the one, I'm sure.

I would like the script to toggle ON a group called...

Help with a script?

Continue Write in LCD

$
0
0
Hi,
the LCD is cleared before each output.
Can I somehow continue to write without deleting?

Best regards
Rodiboki

Need a second set of eyes - Coast/Cruise Control

$
0
0
When I'm out in space, to conserve fuel and maintain a speed, I typically turn off all of my front thrusters so they don't slow me down. I don't like turning off the dampeners and cruise like that, because if I get too off course, I end up blowing through too much steam/fuel to slow down and change where I'm pointing.

What I I thought I'd do is use some code that's provided by http://dco.pe/vsb/ and modify it. However, I'm having a bad time with the modifications.

The code I'm...

Need a second set of eyes - Coast/Cruise Control

Help! How to translate IGC data through custom method?

$
0
0
Hello. I'm new here, and not so familiar with C#, SE scripting and even english language.

I can't understand how to solve my problem and asking for some help.
I need some method which will contain IGC.SendBroadcastMessage() inside it, so this new method must recieve message data as argument and then translate it to IGC method.
Obviously, i need to specify some type for that argument, but i don't know how to do that for TData.

Sorry if i wrote something wrong.

Block scripts requests thread

$
0
0
As programmable blocks came to SE, and not all players are programmers, I guess a thread with block requests is reasonable.

Basically, if you want a script on your block, post explanation here. Other programmers and I (Although I'm generally a busy person so maybe not often) will be more than happy to program it for you. Of course I still suggest you to learn programming, but you might not want to, and it's all fine. Other people like other things.
(Yes, I wanted to create website for that,...

Block scripts requests thread

how to use blockdefinition

$
0
0
I am trying to get all hydrogen engines in a grid but the only thing I can find for that is IMyPowerProducer and I can't find out how to use blockdefinition for it.
--- Automerge ---
bump
Viewing all 903 articles
Browse latest View live