Jump to content

Prefab Editor (Alpha)


Pille

Recommended Posts

thx for the update - that makes things much much easier for me - really appreciated

 

Np guardian of the prefabs. ;)

 

 

A new update is almost ready. Saving the prefabs in the ingame editor is no longer required in the next version (I am talking about point 5 under 'for A16 prefabs' and points 1, 2 and 3 under 'for A17 prefabs' in the post above). Moreover, the light properties can be read and saved (this part is not ready yet).

Edited by Pille (see edit history)
Link to comment
Share on other sites

What is now contained in prefabs instead of ID-numbers? The names of the blocks ?

 

You said you found the answer to your question. :tongue: The game still uses blocks in the tts files. The order of the block names in the blocks.xml defines their IDs (IDs lower than 256 are reserved for terrain blocks btw.). If you save a prefab with the ingame editor then the game stores the mapping for all used blocks in the .blocks.nim file

 

id 1 -> "stone"

id 2 -> "terrgrass"

and so on...

 

And if you load it then all IDs found in the tts file will be interpreted according to the mapping in the .blocks.nim.

Edited by Pille (see edit history)
Link to comment
Share on other sites

(I found the answer only regarding the editor's revision)

--------------------------------------------------------------

 

???....

But then if i shuffle the sequence of blocks (but don't change the names) - will it break the prefab?

Then what's the essence?

 

That is, there is no way to add a block to the middle of the list? How do I add a new Terran-block which should be up to 256....

 

I'm sorry if i'm being stupid, maybe i missed discussing it ?

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

But then if i shuffle the sequence of blocks (but don't change the names) - will it break the prefab?

Then what's the essence?

 

Nope. I am really bad at explainig stuff, so I'll try to construct an example. Let's say you're working on a prefab (size 1x1x2) that contains only two blocks. rConcreteBlock (block id is 2090) at position 0,0,0 and ladderSteel at position 0,0,1 (block id is 1109). Saving the prefab will create a tts file and a blocks.nim file with the following content, assuming you're using a vanilla blocks.xml (simplified):

 

tts:

position 0,0,0 -> 2090

position 0,0,1 -> 1109

 

nim file:

2090 -> rConcreteBlock

1109 -> ladderSteel

 

 

After changing the sequence of the block rConcreteBlock and ladderSteel:

If you load the prefab, the game will still be able to interpret the IDs in tts file correctly because it reads the nim file to get the block names assigned to the IDs. For instance, it knows that ID 2090 is supposed to be a rConcreteBlock (according to the nim, because 2090 is mapped to 'rConcreteBlock'). If you save the prefab using the new blocks.xml, both files will be changed but the result stays the same:

 

tts:

position 0,0,0 -> 1109

position 0,0,1 -> 2090

 

nim file:

1109 -> rConcreteBlock

2090 -> ladderSteel

 

 

 

That is, there is no way to add a block to the middle of the list? How do I add a new Terran-block which should be up to 256....

Afaik you can do what you want as long as you

 

* write all terrain blocks at the beginning of the blocks.xml (basically you have to insert the terrain block before the block "terrWaterPOI" because that's the first non-terrain block)

 

* define less than 256 terrain blocks

 

* define less than 32768 blocks (total number)

 

 

There might be more rules that have to be considered. It's better to read all comments in the blocks.xml...

 

 

I'm sorry if i'm being stupid, maybe i missed discussing it ?

 

No, you are not stupid lol. Afaik there was no discussion about the new system.

Edited by Pille (see edit history)
Link to comment
Share on other sites

Thank You!

 

Yeah, i just had to open the file first .nim before you ask a question.... He gives hints.

 

 

But for me it remains a mystery file with the extension .ins.

 

What is your opinion, it would be possible to use only one file ".nim" on all prefabs? After all, it is supposed to contain the same transformation table!

But each prefab has its own, is it for compatibility with third-party prefabs? But wasn't it better to make a converter for this?

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

But for me it remains a mystery file with the extension .ins.

 

I've no clue about that file atm. but if you delete it, the editor is still able to load the prefab. So I assume, it's not very important (hopefully^^).

 

 

What is your opinion, it would be possible to use only one file ".nim" on all prefabs? After all, it is supposed to contain the same transformation table!

 

Not sure that I understand your question. You can use the renamed blocks.nim from the block map prefab (prefab that contains all vanilla blocks) to load all vanilla prefabs. The ingame editor does not mind unused rules in the nim. So yes, we can use only one file on all prefabs.

 

block map prefab (A17 edition):

http://www.mediafire.com/file/g58mh6us2smrq8t/block_map_prefab_A17.zip/file

 

 

But each prefab has its own, is it for compatibility with third-party prefabs?

 

Yes, probably. In the current system, you only have to make sure that the blocks.xml contains all modded blocks. Actually, the ingame editor fulfills the task of a converter.

Link to comment
Share on other sites

Second attempt. Added full support for the nim files. That means saving the prefab using the ingame editor is no longer required. Sleeper and light properties still not supported (but in the next update). If you load and save an A17 prefab, the editor will delete all a17 features from it (e.g. light properties and sleeper properties):

 

 

32 bit

http://www.mediafire.com/file/bj6jj3ka5v5145c/Zombie_%252832_bit%2529_-_A17_-_Test2.zip/file

 

64 bit

http://www.mediafire.com/file/5mb45obw1abb3d3/Zombie_%252864_bit%2529_-_A17_-_Test2.zip/file

 

 

 

 

Test2 update (v 0.54©) has been reuploaded (fixed global replace and search).

Edited by Pille (see edit history)
Link to comment
Share on other sites

thx very much

 

global Replacer works well now - good job again

 

No problem dude. ;)

 

 

Today I've managed to implement the light properties. The next update (and the last one before the 'official' release of the a17 version of the editor) is near.

 

 

We will be able to set the light properties more precisely and within a wider range. For instance, you can make much more powerful lights using the editor.

 

 

 

Maximum luminosity ingame (light intensity and range):

 

tiTrS5w.jpg

 

 

 

 

Luminosity after editing with editor (you can have much more but it starts to become quite expensive at some point):

 

9o1WgLU.jpg

 

 

 

 

Real blood moon:

 

gmLCNmE.jpg

Link to comment
Share on other sites

@Ekk0

 

I'll do my best to release the next update by the end of the week. Stable version is scheduled for next week.

 

Cool, I'll keep an eye on the forums.

 

Looking forward to the update for A17. I've just got back into the game and am feeling creative.

Holy crap.

 

Sup, Guppy? Long time.

Link to comment
Share on other sites

Third test version. Added full support for the sleeper and light properties. Loading and saving prefabs should handle the sleeper and light data correctly. However, the new feature is not fully integrated into the GUI yet. There is no child safety lock and you can write insane value into the prefab files which may crash the game (the light range seems to be the most dangerous value. High ranges = high memory consumption). XML is still not supported btw. and some other features are temporarily disabled.

 

32 bit

http://www.mediafire.com/file/uvwc4l9tsw706c9/Zombie_%252832_bit%2529_-_A17_-_Test3.zip/file

 

64 bit

http://www.mediafire.com/file/q79ws4hwk3ph0gi/Zombie_%252864_bit%2529_-_A17_-_Test3.zip/file

Edited by Pille (see edit history)
Link to comment
Share on other sites

I will definitely study it in great detail and deeply - in my mod it is a necessity. But not now, now RWG - does not work. If by that time You will still be interested in this - i will write.

But, in Your list there are such famous things from A16 like: downtown, navezgane only, wilderness.....don't you know their purpose?

Link to comment
Share on other sites

But, in Your list there are such famous things from A16 like: downtown, navezgane only, wilderness.....don't you know their purpose?

 

I think I know their purpose. Was just confused by the other strange terms.^^

 

PS. Sorry for deleting the comment. You guys are too fast.

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...