Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Five years is a long time...
GridTerminalSystem.GetBlocksOfType<IMyTextSurfaceProvider>(lcds, block => block.CustomData.Contains("ShipLayout") && !block.CustomData.Contains("ShipLayoutHealth") && block.CubeGrid == grid);
GridTerminalSystem.GetBlocksOfType<IMyTextSurface>(healthbars, block => block.CustomData.Contains("ShipLayoutHealth"));
To:
GridTerminalSystem.GetBlocksOfType<IMyTextSurfaceProvider>(lcds, block => block.CustomData.Contains("ShipLayout") && !block.CustomData.Contains("ShipLayoutHealth") && block.CubeGrid == grid);
GridTerminalSystem.GetBlocksOfType<IMyTextSurface>(healthbars, block => block.CustomData.Contains("ShipLayoutHealth") && block.CubeGrid == grid);
This will prevent scripts on docked ships from overwriting the health data for the main ship (causes weird display flickering when grids try to update each other's LCDs).
Thanks!
I have my ship view set to ShipLayout 1 which is a view from above, only, this view appears to be reversed, so it's like looking from below because the longer weapon on the left nose side of my ship shows as on the right nose side of the image?
I went through all the image options up to ShipLayout 23 and found that ShipLayout 13 is the view that appears to be the same view but from below, as the blocks are much darker...and is correctly showing the gun in the correct spot
So basically i need the top down view flipped over, any ideas? PS i looked through the script and....as if i could work it out !! XD
But as I sayed before the system is at 95% while the hull is at 100%
So the question was if it was possible that the missing system integrity is a remnant of the premodified ship components even after reloading the new ship BP?
mine is L= 109, W = 159 H = 143
Will it be posible?
Also make sure that scripting is enabled in your world settings, and that the ship layout actually appears on the programmable block. That's a good quick to check the script is working. Good luck + hope that helps :)
"Caught exception during execution of script: Object reference not set to an instance of an object."
I put "ShipLayout 0" into the custom data of the LCD.
I'm using some mods like the Micro Programmable Block mod, if that helps. Though I wouldn't think that would be a problem.
Also ShipLayout XX (is about 1-20++), so just change number to see what you will like
I also noticed that putting "ShipLayout X" where X = 1 - 0, the view of the ship changes. Anything else we should know that might be of help? Awesome script!
Are you will work on it more? I hope so.
And if you can do, some upgrades.
1. Can you make that script save what block was destroyed/removed somewhere like in PB Custom Data. Just for to remember after load save, reload etc.
2. Can you separate armor blocks and terminal in ShipLayoutHealth, because Hull counts terminal blocks also.
3. And of course subgrids - look at "3D ship projection". He use whitelist with main tag for tblocks to know what grids to use. You can also do something like that.
Sorry for my english and best regards!
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1754043717
static Vector3I XUp(Vector3I pos, Vector3I size) { return new Vector3I(pos.Z, pos.Y, pos.X); }
static Vector3I YUp(Vector3I pos, Vector3I size) { return new Vector3I(size.Z - pos.Z, pos.X, pos.Y); }
static Vector3I ZUp(Vector3I pos, Vector3I size) { return new Vector3I(size.X - pos.X, pos.Y, pos.Z); }
static Vector3I XDown(Vector3I pos, Vector3I size) { return new Vector3I(pos.Z, size.Y - pos.Y, size.X - pos.X); }
static Vector3I YDown(Vector3I pos, Vector3I size) { return new Vector3I(size.Z - pos.Z, size.X - pos.X, size.Y - pos.Y); }
static Vector3I ZDown(Vector3I pos, Vector3I size) { return new Vector3I(size.X - pos.X, size.Y - pos.Y, size.Z - pos.Z); }
I also needed to change the 1/2/3 versions to use e.g. Vector3I.Abs(XUp(size, Vector3I.Zero)) as the size param
Another suggestion (an easy one this time!)... it would be cool if you allowed LCDs to have more than one user-selected view, i.e. an LCD with custom data "ShipLayout 13 17 21" would cycle between those three views.
So if you had a box on top of your ship, you won't see it on the bottom view, but the overall view looks the same.
It makes sense that the bottom views should be flipped horizontally. Something easy to fix!
I've been looking at multiblock support as well - it's a complete nightmare. ;) I've got the multiple grids drawing but getting them to:
a. offset/rotate from each other
b. calculate the overall size
is proving tricky!
You could use IMyTerminalBlock.IsFunctional to see if the block has been damaged below the Functional line, or if you use grid.GetCubeBlock(position) to get an IMySlimBlock, you can call IMySlimBlock.IsFullIntegrity to test if the terminal block has any damage at all.
You could even use both (plus your existing CubeExists call) to have four colours: undamaged, damaged but functional, damaged and non-functional, destroyed.
For example, with the Rock Lobster blueprint I shared with you before 3zanders, Layout 5 should be a plan view looking from below, and Layout 17 should be a plan view looking from above. However, both layouts have the functional blocks in the same position - if you damage the starboard large atmo thruster, you'll see that it appears on the left side of the diagram in both 5 and 17, where it should be flipped around if you're looking from the top compared to the bottom.
to me for example "ShipLayout 3" and "ShipLayout 15" show the same thing.
I can only manage to get a view from the right side of my ship (not from the left side). Also I can't find a view from top. (I have an asymetrical ship and what should be displayed at the right side stays on the left. As if you'd look from the bottom.)
Sorry for my english. I hope you can understand what my problem is.
And thanks for the awesome script. Keep up the good work!
Couple of questions please: -
"Note: Multigrid ships are not supported! It can only draw the layout for the grid the PB is on."
I would like to show the status of my tank using this script, it does however have 2 grids, base and turret.
https://steamuserimages-a.akamaihd.net/ugc/916953854633788943/0208D17B4988BF6725371DCFA6327415ED61453B/
1. If I place a PB on each of the sub grids running your script, could there be a way of merging the two outputs onto one LCD screen?
2. Will the output of a PB on grid 1 be able to display on an LCD on grid 2?
Thanks in advance,
Woostyboy :)
private IMyCubeGrid GetLargestCubeGrid(IEnumerable<IMyTerminalBlock> fullBlocks) {
var result = Me.CubeGrid;
foreach (var terminalBlock in fullBlocks) {
if (terminalBlock.CubeGrid.IsSameConstructAs(Me.CubeGrid) && terminalBlock.CubeGrid.GridSize > result.GridSize) {
result = terminalBlock.CubeGrid;
}
}
return result;
}
If you use the large grid PB the script works fine in the example ship. Sorry it takes up space D:
You'll need at least this mod installed: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=516770964
(I use that block to put the small grid PBs in the large grid ship without wasting excessive space.)
@Devid could you paste in the error in the PB you're seeing? If you don't own the entire ship strange things can happen.