Page 3 of 74 FirstFirst 123451353 ... LastLast
Results 31 to 45 of 1109

Thread: Prefab Editor (Alpha)

  1. #31
    Colony Founder HAL9000's Avatar
    Join Date
    Feb 2014
    Posts
    1,913
    Rep Power
    1
    Looking good Pille. What's the max sized prefab you've loaded in?

  2. #32
    Colony Founder Pille's Avatar
    Join Date
    Apr 2015
    Location
    Milky Way
    Posts
    1,645
    Rep Power
    1
    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)?
    Last edited by Pille; 06-07-2017 at 08:03 PM.

  3. #33
    Colony Founder HAL9000's Avatar
    Join Date
    Feb 2014
    Posts
    1,913
    Rep Power
    1
    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

  4. #34
    Colony Founder Pille's Avatar
    Join Date
    Apr 2015
    Location
    Milky Way
    Posts
    1,645
    Rep Power
    1
    Quote Originally Posted by HAL9000 View Post
    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.

    Quote Originally Posted by HAL9000 View Post
    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.^^
    Last edited by Pille; 06-07-2017 at 08:26 PM.

  5. #35
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    20,975
    Rep Power
    1
    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...

  6. #36
    Colony Founder Pille's Avatar
    Join Date
    Apr 2015
    Location
    Milky Way
    Posts
    1,645
    Rep Power
    1
    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.

    Quote Originally Posted by Guppycur View Post
    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.
    Last edited by Pille; 06-08-2017 at 11:47 PM.

  7. #37
    Colony Founder Pille's Avatar
    Join Date
    Apr 2015
    Location
    Milky Way
    Posts
    1,645
    Rep Power
    1
    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.
    Last edited by Pille; 06-11-2017 at 06:57 PM.

  8. #38
    Colony Founder HAL9000's Avatar
    Join Date
    Feb 2014
    Posts
    1,913
    Rep Power
    1
    Good stuff Pille!

    Just FYI the code for setting the texture long is:
    Code:
                                           
    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.

  9. #39
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    20,975
    Rep Power
    1
    Quote Originally Posted by Pille View Post
    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.

  10. #40
    Leader
    Join Date
    Mar 2014
    Location
    Brisbane, Australia
    Posts
    6,223
    Rep Power
    1
    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 :-)

  11. #41
    Colony Founder Pille's Avatar
    Join Date
    Apr 2015
    Location
    Milky Way
    Posts
    1,645
    Rep Power
    1
    @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.

    Quote Originally Posted by Guppycur View Post
    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.

    Quote Originally Posted by Guppycur View Post
    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.

    Quote Originally Posted by stallionsden
    GUPPY I am looking at you lol haha....
    Me too.
    Last edited by Pille; 06-12-2017 at 03:51 PM.

  12. #42
    Colony Founder HAL9000's Avatar
    Join Date
    Feb 2014
    Posts
    1,913
    Rep Power
    1
    Quote Originally Posted by Pille View Post
    @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:

    Code:
    <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"

  13. #43
    Colony Founder Pille's Avatar
    Join Date
    Apr 2015
    Location
    Milky Way
    Posts
    1,645
    Rep Power
    1
    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)?
    Last edited by Pille; 06-12-2017 at 08:56 PM.

  14. #44
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,896
    Rep Power
    1
    Quote Originally Posted by Pille View Post
    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)

    Code:
    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
    Code:
    if (!GameManager.bShowPaintables)
    			{
    				if (par0001 != MeshDescription.MESH_OPAQUE)
    				{
    					if (par0001 != MeshDescription.MESH_OPAQUE2)
    					{
    						goto IL_C2;
    					}
    				}
    				active = false;
    			}
          
          ...
    and
    Code:
    public Block()
    {
    	this.shape = new BlockShapeCube();
    	this.shape.Init(this);
    	this.Properties = new DynamicProperties();
    	this.blockMaterial = MaterialBlock.air;
    	this.MeshIndex = (byte)MeshDescription.MESH_OPAQUE;
    }
    so...
    if (Block.MeshIndex == 0 || Block.MeshIndex == 8) {
    //is paintable
    }
    Last edited by StompyNZ; 06-13-2017 at 02:39 AM.

  15. #45
    Guppycurian Forum Whore Guppycur's Avatar
    Join Date
    Apr 2014
    Location
    Enemy for life
    Posts
    20,975
    Rep Power
    1
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •