Jump to content

[REQ] Coloring all blocks on a ship/changing all parts to next tier


Deter

Recommended Posts

Is there a way to color all blocks on a ship at once? Or is the only way to possibly do that to merge all the blocks together?

 

I was thinking of having a program (simple one) look at the xml file and change the colors in it, but it doesn't seem to have the colors for all parts of the ship for some reason...

 

And with this, perhaps there is a way to change the type of all blocks on a ship to another tier. I have a nice ship that still has trinium in it, and the blocks are unreachable without ripping the ship into pieces.

 

Also, side note... has anyone noticed that when you explore a bunch of sectors, the game lags a bit hard on the map? I can get a good 30 frames but I'll drop to 15 on the map sometimes, but on my friends server where I haven't explored it is 60.

Link to comment
Share on other sites

Why use an external program when you can do it ingame?

 

Read the Documentation on BlockPlan and BlockPlanBlock.

Become Familiar with RGBColor coding.

Get to know how to traverse Trees:

Tree traversal#

 

call

Entity():getPlan()

to get the Blockplan and use the previously aquired Information accordingly.

 

Also, side note... has anyone noticed that when you explore a bunch of sectors, the game lags a bit hard on the map? I can get a good 30 frames but I'll drop to 15 on the map sometimes, but on my friends server where I haven't explored it is 60.

I did not experience such behaivior. Maybe ask around in the troubleshooting section?

Link to comment
Share on other sites

Why use an external program when you can do it ingame?

 

Read the Documentation on BlockPlan and BlockPlanBlock.

Become Familiar with RGBColor coding.

Get to know how to traverse Trees:

Tree traversal#

 

call

Entity():getPlan()

to get the Blockplan and use the previously aquired Information accordingly.

 

Also, side note... has anyone noticed that when you explore a bunch of sectors, the game lags a bit hard on the map? I can get a good 30 frames but I'll drop to 15 on the map sometimes, but on my friends server where I haven't explored it is 60.

I did not experience such behaivior. Maybe ask around in the troubleshooting section?

 

...Can you tell it to me like I'm 5 or give me a code to put in? I'm familiar with tree traversal sort of (took Java classes) but that was a while ago and I am not the best at it.

Link to comment
Share on other sites

Can you tell it to me like I'm 5

No I don't. Programming is not something 5-year olds should do. Playing in a sandbox is :D.

Additionally programming takes dedication and responsibility. You are responsible that your code doesn't interfere with the game itself (e.g. crashes), that it has a minimum of compatibility with other mods and that you maintain updates for your users.

 

But I know I'm not writing this to an 5-Year old.

I'm familiar with tree traversal sort of (took Java classes) but that was a while ago and I am not the best at it.

Excellent one thing less you have to worry about :)

 

Read the Documentation on BlockPlan and BlockPlanBlock.

This is the most important one. If you aren't familiar with these, you won't be writing an ingame mod to change colors anyway.

 

Some things to get started

local entityPlan = Entity():getPlan()       --get the Blockplan of the Entity where the script is executed
entityPlan:setColor(ColorRGB(0.5, 0.0, 0.0)) -- make everything red

 

And with this, perhaps there is a way to change the type of all blocks on a ship to another tier. I have a nice ship that still has trinium in it, and the blocks are unreachable without ripping the ship into pieces.

 

entityPlan:setMaterial(MaterialType.Iron)
local resources = {entityPlan:getResourceValue()}
local money = entityPlan:getMoneyValue()

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...