Slices FAQ

From OHRRPGCE-Wiki
Jump to navigation Jump to search

Slices are a major part of the OHRRPGCE engine, with a lot of different features to learn. So they have their own list of Frequently Asked Questions.

If you have your own questions, feel free to ask them on the Discussion page, on the Forums, IRC or Discord, or in the general questions Discussion page (see How do I add a question?)

General Questions[edit]

What's a slice?[edit]

See What are slices?

How are the built-in slices arranged?[edit]

For a list of the built-in slices, and also everything that's not a slice but is drawn on top of them, see Layers.

What isn't a slice?[edit]

Most of the stuff you see on-screen are drawn as slices, and can therefore be manipulated with scripts. But user-defined menus (in the Edit Menus) editor, built-in menus like Status the "pick hero" menu and inns, 'plotstrings' (i.e. use of the showstring and showstringat commands, and also showvalue), map names, and debug overlays like the FPS counter, are not drawn with slices.

Battles are partially slice-based (a work in progress), but you can't use scripts there anyway.

Can I use slices without scripting?[edit]

Currently, unfortunately, no.

Sizing and positioning[edit]

I want a slice to expand to cover/fit its children[edit]

There's currently no built-in way to do this, but there will be in the next release after Fufluns (it's being tested). You could write a script to recalculate the size of a slice.

Container Slices[edit]

Sprite Slices[edit]

Rect Slices[edit]

Grid Slices[edit]

Ellipse Slices[edit]

Map Slices[edit]

Special Slices[edit]

Select Slices[edit]

Panel Slices[edit]

What if I want a panel to have more than two children?[edit]

You'll have to use multiple panel slices, daisy-chained together, so each panel slice has two children and is a child of another one, except for the top-most.

Scroll Slices[edit]

Is there a way to check which slice is being currently displayed in a scroll slice?[edit]

Note that Scroll slices don't have a concept of a current or currently displayed slice.

But yes, you can check whether a slice is partially visible (or rather, partially within the bounds of the scroll slice) with slice collide, and whether it's wholly visible with slice contains.