Jump to content
Pille

Prefab Editor (Alpha)

Recommended Posts

Just a few hints to the new paint mode in alpha 1e:

It works similar to ms paint. You have to set the block properties in the set widget (see red arrow) and click on "paint" (see red arrow) to activate the paint mode, then click on the view and keep the left mouse button pressed to "paint" the blocks:

 

AQ7TVZH.png

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites
Just a few hints to the new paint mode in alpha 1e:

It works similar to ms paint. You have to set the block properties in the set widget (see red arrow) and click on "paint" (see red arrow) to activate the paint mode, then click on the view and keep the left mouse button pressed to "paint" the blocks:

 

AQ7TVZH.png

 

So this will translate to color the blocks in game. Like I could make a steel block red?

Share this post


Link to post
Share on other sites
So this will translate to color the blocks in game. Like I could make a steel block red?

If there is a color "red" in A16 then you could do that. The colors you can see in the editor aren't related to the ingame color atm.

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

6kwKoyu.png

 

Comments about the new toolbar of version 0.1f:

1. Selection mode

2. Drag mode

3. Paint mode / brush mode

4. Filler (work similar the color filler function of mspaint)

5. Block picker (click on a block to select it / writes block properties into the set tab)

6. Image-based selection (1. choose a png image, click on a block, hold the left mouse button and move the cursor to change the size of the mask).

This feature works better with black and white pictures with thick lines. There are a few examples in "Zombie (32 bit)\data\images\test pictures".

7. Inverse selection (inverts the current selection)

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

Thanks Hal.

512 x 512 x 256 blocks^3 (length x width x height) was the biggest one. It's a 32 bit program atm. That's why you can only build such tiny prefabs. ;)

 

Any idea how to handle electricity (e.g. wires)?

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

Haha yeah... but I bet Gup will get there eventually ^^

 

I haven't had a dig around in the code but I'm guessing wiring will be part of the chunk data so not something you can play with in a prefab

Share this post


Link to post
Share on other sites
Haha yeah... but I bet Gup will get there eventually ^^

It's a matter of seconds the switch to the 64 bit compiler, so that wouldn't be a problem.

 

I haven't had a dig around in the code but I'm guessing wiring will be part of the chunk data so not something you can play with in a prefab

 

Lol, I hope not. There is a 27 km (17 miles) long service tunnel in my base with electric lights every 5 meters.^^

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

My next project is two diersvilles...

 

Pille, you ready for Monday? :)

 

I'm... Demanding. No, that's not right... I ask for a lot though... :)

Share this post


Link to post
Share on other sites

Ready for vacation, yes.^^

 

I really hate the technical aspect of programming. Therefore my plan is to get the conversion of the editor over and done with as quickly as possible. So the release of the update will probably be next week.

 

I'm... Demanding. No, that's not right... I ask for a lot though... :)

And I'm ... disregardful. No, that's not right... I overlook a lot of requests though... ;)

 

Btw. I think all features you can ask for are already on my to-do list. :)

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

The editor is updated and "partially" ready for A16^^. The paint system is not fully supported yet (You have to paint the blocks ingame. I am going to improve the support in the next weeks). Hint: Resizing the prefab may cause problems.

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

Good stuff Pille!

 

Just FYI the code for setting the texture long is:



long _tex = 0;

for (int face = 0; face < 6; face++)
{
  var faceTex = getFaceTextureId()
  _tex = _tex & ~((long) byte.MaxValue << face * 8) | (long) faceTex << face * 8;
}

 

You can the use the SetTexture method on the prefab and pass the _tex variable. The gotcha is the face texture ID is the ID of the item in the painting.xml file rather than the actual texture ID.

 

Just shout if you need anything.

Share this post


Link to post
Share on other sites
The editor is updated and "partially" ready for A16^^. The paint system is not fully supported yet (You have to paint the blocks ingame. I am going to improve the support in the next weeks). Hint: Resizing the prefab may cause problems.

 

Okay, so painting inside the editor isn't working, but does that mean if I bring a pre-painted prefab in, that it will strip it of the painted features?

 

...honestly been playing the actual game (go figure), but was going to start giving this a whirl tomorrow, but not sure if I can actually do anything yet. If I'm reading both threads right, there's no current way to export and if I import I can't yet paint?

 

Pille, you're new to the guppycur kissass experience, but I will be singing your glory across the lands very shortly, I think. :)

Share this post


Link to post
Share on other sites

I have to admit I am saddened Hal hasnt continued his. However I do totally understand the reasons behind it. I finally after like 2 yrs became semi pro at that one lol haha :-(. I am pretty much asking if by chance you may if time has it do some short vids on each part of the editor if time befits you etc and not to much to ask as I am a visual learner more so then theory based.

 

I also expect you to be busy sorting this out so maybe some one whom gets the understandings of this to do some vids.. GUPPY I am looking at you lol haha....

 

I also like to thank you for continuing Hals editor into A16 and look forward to following this :-)

Share this post


Link to post
Share on other sites

@Hal

Ok Hal, thanks. Uhm what's the difference between face texture ID and 'actual' texture ID?

 

@Guppycur

You can import, modify and save pre-painted prefabs. The editor won't touch the paint data. Adding and trimming rows and columns don't work atm because the size of of those data depend on the dimension of the prefab.

 

If I'm reading both threads right, there's no current way to export and if I import I can't yet paint?

Right. As long as there is no way to export prefabs, the read-only support of my editor is a bit pointless. :)

The good news is that (I think) I've completely understood the format of the painting data. So it shouldn't take too long to improve the support for it.

 

Pille, you're new to the guppycur kissass experience, but I will be singing your glory across the lands very shortly, I think.

Lol, thanks Guppycur.

 

@stallionsden

As soon as possible stallionsden. :) However, adding the painting stuff has the highest priority at the moment.

 

GUPPY I am looking at you lol haha....

Me too. :D

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites
@Hal

Ok Hal, thanks. Uhm what's the difference between face texture ID and 'actual' texture ID?

 

Have a look in the painting.xml file and you'll see something like:

 

<paint id="1" name="txName_Brick">
<property name="TextureId" value="7"/>
<property name="Group" value="txGroupFaux"/>
<property name="PaintCost" value="2" />
</paint>

 

When updating the textures in code it's the paint ID not the TextureID that you'll need to use i.e. the "1" in the example above, not the "7"

Share this post


Link to post
Share on other sites

Ahh ok, that's nothing I need to care about. :)

 

@all

Does anybody know how to find out whether a block is paintable or not (I guess this info is in one of the xml files)?

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites
Ahh ok, that's nothing I need to care about. :)

 

@all

Does anybody know how to find out whether a block is paintable or not (I guess this info is in one of the xml files)?

 

im guessing if its terrain or a model, then not paintable

 

check out MeshDescription, it might guide you (i'm guessing OPAQUE + 2 are the paintables)

 

public class MeshDescription
{
public enum EnumRenderMode
{
	Opaque,
	Cutout,
	Fade,
	Transparent
}

public static int MESH_OPAQUE = 0;

public static int MESH_WATER = 1;

public static int MESH_CUTOUT = 2;

public static int MESH_TRANSPARENT = 3;

public static int MESH_MODELS = 4;

public static int MESH_GRASS = 5;

public static int MESH_DECALS = 6;

public static int MESH_TERRAIN = 7;

public static int MESH_OPAQUE2 = 8;

 

also

if (!GameManager.bShowPaintables)
		{
			if (par0001 != MeshDescription.MESH_OPAQUE)
			{
				if (par0001 != MeshDescription.MESH_OPAQUE2)
				{
					goto IL_C2;
				}
			}
			active = false;
		}

     ...

 

and

public Block()
{
this.shape = new BlockShapeCube();
this.shape.Init(this);
this.Properties = new DynamicProperties();
this.blockMaterial = MaterialBlock.air;
[color="#FF0000"]	this.MeshIndex = (byte)MeshDescription.MESH_OPAQUE;[/color]
}

 

so...

if (Block.MeshIndex == 0 || Block.MeshIndex == 8) {

//is paintable

}

Edited by StompyNZ (see edit history)

Share this post


Link to post
Share on other sites

The second this thing is viable (can do the basics) I'll be doing videos. Unless I'm working. ;)

 

Any eta guess? We talking days, weeks? Also, if you could be logged in with me and us on Discord while I'm discovering your editor, I think it would help the video If you were to show off some features.

 

Just thinking out loud.

Share this post


Link to post
Share on other sites

@StompyNZ

Thanks Stompy. I'll test this criterion as soon as I can.

 

@Guppy

Thanks in advance Guppy. It's hard to make an estimate (there are many variables^^) I guess it will take about a week to fix the remaining bugs and to add a decent support of the paint feature.

 

Also, if you could be logged in with me and us on Discord while I'm discovering your editor, I think it would help the video If you were to show off some features.

I consider your suggestion (I need a better mic and better language skills).:) If the lag is bearable we could also organize a Teamviewer session on my computer (this is my prefered way^^). I could show you all features directly.

 

 

Edit:

I just finished the implementation of the non-gui related part of the paint feature. So the dev version of the editor is able to read and change the paint data. However, the user interface needs to be improved. My estimation is still valid (probably too pessimistic though^^).

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

A new (experimental) version is ready. Please report all bugs you encounter.

 

Here is a short explanation of the "all texture" checkbox (can be confusing):

 

In editor (top view):

M0L2dQ9.png

 

In game:

USP61i8.jpg

 

So what you see depends on the view (top view, side view 1 & 2).

 

 

Edit:

 

Released another patch to fix the buggy texture buttons.

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

looking logicaly and good

 

I start working with your editor the next days, when I have released the exp. CP.

 

good work so far Pille

U hear from me soon :)

Share this post


Link to post
Share on other sites

Hi Pille, nice work with the editor so far I hope to spend some time getting to know it over the comming weeks.

 

Just tried the links for the 64bit version and both downloads are giving me zombierror.jpg.cf32732c2b164db4ace1af4e361936cd.jpg once they are extracted and run.

 

32bit version seems fine.

Share this post


Link to post
Share on other sites

This must be caused by a missing or wrong dll file. I am going to fix that with the next version. Thanks for your feedback!

 

Btw. the autoupdater is almost ready. So the next version will be the last one which has to be downloaded manually...

 

I start working with your editor the next days

Good luck Magoli. ;)

Edited by Pille (see edit history)

Share this post


Link to post
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...