Jump to content

Prefab Editor (Alpha)


Pille

Recommended Posts

It actually doesn't remove a pre-existing Townships line, but doesn't add it to xmls that don't have it yet, when I choose townships in the editor. Adding lines for Biomes and Zones that way does work, though. Sorry about the unclear report, I was working with several different files so I didn't notice the exact circumstances right away.

Link to comment
Share on other sites

Also, a question: is there currently a way to auto-compare 2 prefab files to each other to locate changes?

I also want this feature, Yes, it is in demand everywhere ...

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

PS: i can't figure out how to find a specific block inside a prefab(search). This is possible now ?

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

A! I always forget to tell :).

... I understand that icons (symbols sleepers...) will not look good when zoomed ...

but still, during work it is not so important, more important is the possibility to see the icon...

perhaps you can even slightly improve the turn off threshold of the icons when zooming ?

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

It actually doesn't remove a pre-existing Townships line, but doesn't add it to xmls that don't have it yet, when I choose townships in the editor. Adding lines for Biomes and Zones that way does work, though. Sorry about the unclear report, I was working with several different files so I didn't notice the exact circumstances right away.

 

No problem. Got it!

 

 

PS: i can't figure out how to find a specific block inside a prefab(search). This is possible now ?

 

There're several search tools but I am afraid none of them is particularly useful^^:

 

4Rvvws7.jpg

 

Green (magnifier): It's an auto selection tool. You can enter a list of block ids (separated by a , ) and the editor will select the corresponding blocks when you switch the layer.

 

Orange (x-ray mode): I've added blacklists and whitelists to the x-ray mode tool, so it can be used as search tool to some extent. However, there is a technical limitation which makes it less useful than it could be. Have to invent a fix for this issue.

 

Red: This is a list of selected block ids. If you click on an item from the list the editor will unselect all blocks except the ones having the corresponding id.

 

 

 

What I could add:

 

Find idle villagers (easy): I could add a function allowing you to switch through all blocks with a certain id (similar to the find idle villager feature in Age of Empires)

 

Hide blocks (harder): We could find blocks by hiding everything else. It's harder to implement though but would fix the x-ray mode.

 

 

Do you have other suggestions regarding search tools?

 

 

 

A! I always forget to tell .

... I understand that icons (symbols sleepers...) will not look good when zoomed ...

but still, during work it is not so important, more important is the possibility to see the icon...

perhaps you can even slightly improve the turn off threshold of the icons when zooming ?

 

It's an easy request. I'll make it adjustable (text field in the option dialog). Btw. it may affect the performance on slow systems. That's why I added the threshold.

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

Do you have other suggestions regarding search tools?

.

For example, it might look like this:

 

- when entering the desired ID (only one - in one time) - simply display a text list (which will stay to work with it) with the coordinates of these blocks.

- when you click on the block (in list) - the corresponding block is shown (and selected) in the working window.

- when working with the list - you can select blocks and perform actions (delete, select a group with pressed shift-button, replace ID, or parameters)

 

It is highly desirable that the "search" worked for all prefabs (that it was possible to identify prefab which then work)

 

 

(this is perhaps all that could come in handy for me to solve my tasks, such as finding a rare block...)

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

@owl79

Mhh I get a new allowedtownships line even if it wasn't there before. :( Sorry if I bother you.^^

 

Here, try with this prefab (not mine so I'll take the link down again of course), that's what I used to confirm it (I still can reproduce the error):

*poof*

 

Not sure how else to help; maybe it matters if the .xml was originally created with an older alpha? I remember I had problems with xml options not "taking" before, and I often use the editor on older prefabs.

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

Ok maybe I can find the reason for this bug. Thanks.

 

Not sure how else to help; maybe it matters if the .xml was originally created with an older alpha?

 

No I don't think so. The formation of the xml file looks a bit strange though. This could be the problem.

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

How Sleeper Volumes really truly work

 

SleeperIsLootVolume:

 

- Provides a protection against other (intersecting or outer) Sleeper Volumes (see fig. 1)

 

Example:

 

Blue and red Volume have SleeperIsLootVolume true.

B: yellow areas

C: white tiled area

D: wooden area

E: drywall area

F: white area

 

[table=width: 500, class: grid]

[tr]

[td]Transition; moving from X to Y (X -> Y)[/td]

[td]Allowed Spawning Area(s)[/td]

[td]Used SleeperVolumeGroup[/td]

[td]Comment[/td]

[/tr]

[tr]

[td]A -> B[/td]

[td]B[/td]

[td]Green Volume[/td]

[td]Moving from A to B[/td]

[/tr]

[tr]

[td]A -> C (red arrow)[/td]

[td]C[/td]

[td]Blue Volume[/td]

[td]Moving from A to C triggers sleepers in C, not B[/td]

[/tr]

[tr]

[td]A -> D[/td]

[td]D and E[/td]

[td]Red Volume[/td]

[td][/td]

[/tr]

[tr]

[td]B -> C[/td]

[td]C[/td]

[td]Blue Volume[/td]

[td][/td]

[/tr]

[tr]

[td]B -> E[/td]

[td]E and D[/td]

[td]Red Volume[/td]

[td][/td]

[/tr]

[tr]

[td]C -> B[/td]

[td]B[/td]

[td]Green Volume[/td]

[td][/td]

[/tr]

[tr]

[td]C -> F[/td]

[td]D and E and F[/td]

[td]Red Volume ?[/td]

[td][/td]

[/tr]

[tr]

[td]D -> E or vice versa[/td]

[td]-[/td]

[td][/td]

[td]No additional spawns triggered[/td]

[/tr]

[tr]

[td]E -> B[/td]

[td]B[/td]

[td]Green Volume[/td]

[td][/td]

[/tr]

[tr]

[td]E -> D[/td]

[td]-[/td]

[td][/td]

[td]No additional spawns triggered[/td]

[/tr]

[tr]

[td]E -> F[/td]

[td]C and F[/td]

[td]Blue Volume ?[/td]

[td][/td]

[/tr]

[/table]

(empirically investigated, not completely verified)

 

 

PRVgSuc.jpg

fig. 1

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

Added a 'How-To and FAQ' section to the OP and made the 'unintended post' more useful. Click

 

Note: The tutorial about sleepers isn't finished yet. There is some unexpected stuff you should be aware of when using sleeper volumes (explanations follow later).

Link to comment
Share on other sites

There must be a mismatch between the blocks defined in the blocks.xml and those used in your prefab. Perhaps the game directory is not set or you loaded a modded prefab but your blocks.xml was unmoded. Click on 'Extras' -> 'Set game directory...'. You should get this dialog:

 

K6L5ges.jpg

 

Is the text field empty?

 

PS. Wir kِnnten uns auch auf Deutsch unterhalten wenn du willst ;-)

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

  • 3 weeks later...

Hoffe du hattest Erfolg. :)

 

 

 

It is highly desirable that the "search" worked for all prefabs (that it was possible to identify prefab which then work)

 

a "search for block-ID" - function would be very handy for many uses.

 

Partially done! Hope you read this Magoli. ^^ I have added a global block search feature and a framework for further global functions. Ofc it's not available to you atm. :p

 

Basically, you enter 'search id' into the console and select a directory and you get a list of prefabs containing the corresponding block.

 

 

Ya know what would be cool...

 

...loading an image with a transparency, so we could "draw" on it.

 

Sorry, I've missed this post. Not sure what you. Afaik there is a similar feature but it's quite buggy...

 

 

Preview (v0.44):

- added option for level of detail of symbols and texts

- added global search feature

- added advanced block search

- fixed: wrong texture id (concrete dark grey <->concrete grey)

 

 

Advanced search (very basic atm but it's already useful):

tQbjKtf.jpg

 

Not sure if I need a more advanced 'advanced search'^^. Probably yes. I think there should be a way to all properties into account (id or block name, rotation, meta and so on) not just the block id...

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

What I was asking about was loading a 2d image file like this:

 

1971564_0.jpg

 

...and being able to load it UNDER your program gui as a semi transparent image I could scale, and it would allow me to place blocks in your editor over the semi transparent image for accuracy.

 

- - - Updated - - -

 

:chuncky:

 

Thanks!

 

(by the way, i have never seen more the crash with adding/removing rows/columns) :)

 

Yes, I too have not seen any more crashes from this, and I just edited 80 prefabs so I think you found it. :)

Link to comment
Share on other sites

:chuncky:

Thanks!

Yeah, np. Your suggestion make sense and it is time to implement a powerful search...

 

 

(by the way, i have never seen more the crash with adding/removing rows/columns) :)

Yes, I too have not seen any more crashes from this, and I just edited 80 prefabs so I think you found it. :)

 

I doubt it but we have support for logfiles now, so there's a chance to crush the bug one day.^^

 

 

...and being able to load it UNDER your program gui as a semi transparent image I could scale, and it would allow me to place blocks in your editor over the semi transparent image for accuracy.

 

Probably in one of the next updates... I'll do my best. It depends on the bugginess of the current implemention of this feature.

 

 

We are very close to the release of 0.44. So that's the latest and perhaps the last preview screenshot. In 0.44 you can 'copy' blocks to the search tab pressing ctrl + middle mouse button (or you can use the 'copy to search' button on the set tab). I've added two scope radio buttons to the set tab ('grid view' and 'search list') allowing the user to edit selected blocks from the search list:

 

M144GPW.jpg

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

Ok just wondering if this Editor is Broken? I click on blocks and it only shows me the block ID's.

 

Trying to just find the Doors is a pain, and your older versions were alot better when you zoomed in to a certain spot it actually showed some graphics just to let you know where the doors were located at and that helped a huge deal. Also still having issues understanding the META part. I figured out that a number 4 locked the doors. Should be Descriptions on each number and what they actually do.

 

But PLEASE.... Make it so when you click on a block it tells you the actual Block Name and not just the Block ID.

 

Thank You for this also :)

Link to comment
Share on other sites

Mhh I haven't removed any of these features, so I guess the game directory is not correctly specified. Please click on 'Extras' -> 'Set game directory...' and make sure that the text field is not empty:

 

K6L5ges.jpg

 

 

Also still having issues understanding the META part. I figured out that a number 4 locked the doors. Should be Descriptions on each number and what they actually do.

 

There are descriptions but the underlying feature is a bit buggy ... I need to fix this.

Link to comment
Share on other sites

sounds amazing - i havent understood nothing, but iam sure it will be a practical and powerful function.

 

iam looking forward to the 0.44 version

 

rock on buddy :)

 

Glad to read that you've understood everything. ;p But seriously, let me know if something is not clear. The concept of the gui is a bit inconsistent atm. and needs an overhaul. So being confused would be normal.^^

 

 

 

Update time!

 

Changelog v0.44

 

- added level of detail settings to options. Smaller values mean more details if zoomed out.

- added search features to the search tab. Explanation see below.

- added button 'clear' to edit tab and search tab. The Clear button will clear all text fields.

- added button 'copy to search' to the edit tab. The button copies the block data to the search tab.

- added scopes 'grid view' (default) and 'search list' to the edit tab. If you want to edit selected blocks on the block grids then select 'grid view' and if you want to edit selected blocks from the search list (search tab) then select 'search list'.

- added console commands:

help: shows a list of available console commands.

search: enter 'search ID' to get a list of prefabs which contain blocks with this id. Example: 'search 1' prints a list of prefabs containing stone blocks (id of stone is 1). This command will close your currently loaded prefab!

- changed max. length of console output to 5000 lines

- fixed: concrete texture has wrong texture id

 

How to use the search tab

 

1. Enter the block data: You can directly enter the data into the text fields of the search tab. This might be difficult though because atm. there is no feature showing you the meaning of the entered numbers. I recommend to enter the block data into the edit tab. Then you can use 'copy to search' to copy the data to the search tab.

If you want to copy the data from one of the blocks in the grid view to the search tab, you can use the block picker tool. Press 'CTRL + Middle Mouse Button' to copy the block beneath your cursor.

 

2. Define the search criteria: Use the check boxes to determine which criteria are taken into account.

 

3. Press search button to start the search.

 

4. You get a list of coordinates representing blocks that satisfy the search criteria. Click on items in the list to show the blocks (press ctrl + left mouse button for multi selection). You can edit selected blocks by changing the scope in the edit tab to 'search list'.

 

gvplFUK.jpg

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

  • 2 weeks later...

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