EasyRPG / liblcf

Library to handle RPG Maker 2000/2003 and EasyRPG projects
https://easyrpg.org
MIT License
116 stars 55 forks source link

Add custom chunks required for ShowStringPicture #445

Closed Ghabry closed 1 year ago

Ghabry commented 1 year ago

This is implemented with a new data structure EasyRpgWindow that contains EasyRpgText.

When we ever add our own Window event functions these will provide a good baseline.

Design

The window has the same ID as the picture. The picture receives a new field easyrpg_type to indicate if anything is attached to the picture.

The savegame receives a new chunk "2" to the EasyRPG data: Array<SaveEasyRpgWindow>.

A SaveEasyRpgWindow describes a single window. Right now only ShowStringPic can create them.

A Window has styling information and a list of texts (SaveEasyRpgText).

Window styling stuff: width, height, system_name, message_stretch, flags like "draw_frame".

SaveEasyRpgText contains stuff like "text" (obviously), x, y, font, font size, letter spacing (unsupported), line spacing, flags like italic or bold.

jetrotal commented 1 year ago

image

Those 2 fonts that used to work on an old test build are crashing on this version. Fontx.zip

jetrotal commented 1 year ago

Unrelated but found while testing: Audio fails when pitch = v[n] It goes to 0%, or something like this

EasyRPG Dev Simulator project to test it: Project2.zip

Ghabry commented 1 year ago

The v[n] for sound effects must be a custom Maniac thing. The original does not support indirection. Though this is very likely super simple to implement. Please report it with parameters in the maniac meta bug

Same for bgm

Ghabry commented 1 year ago

just found a bug in liblcf: Flags with "default values" were never unset.

I wondered why StringPics do not preserve the flags correctly.

This also affects pictures: A picture with flag "remove on map change" disabled will have the flag enabled after loading. upps.

Ghabry commented 1 year ago

the lcf part is now ready for review.

Friendly reminder again that this is 100% incompatible to Maniac Patch like many other Maniac Patch related things.

This is just a lot more verbose than the others as I invented many new chunks to do this in a clean way :).