Repository navigation
v1.8.0
What's new since v1.7.1?
IDE version: v2024.14.2.256
This update brings a rewrite of the whole encounter system, so porting things over MAY be a bit of a hassle. If you want to update an existing project, make sure to back it up so you have an ability to reverse the changes. Be careful.
encounter changes:
- !! full
o_encrewrite !!
what came with the rewrite: - better syntax, now can compare with other things written for the engine
- a lot more customizability, especially when we’re talking about custom menus/buttons/actions
- better consistency throughout the whole engine
- tp bar origin point changed to middle center in
spr_ui_enc_tpbar - moved tp bar to a separate object with controllable x and y position
- added support for tp bar displaying the amount of tp that will be deducted upon casting a spell or an act
- encounter rewrite supports rearranging, adding and removing buttons in the ui
- added new constructor
enc_actionresponsible for actions in encounters (e.g. fight, act, spell) - added new constructor
enc_buttonresponsible for buttons in encounters (e.g. spare, item) - added a new variable for the
enc_setconstructor calledparty_actions, which works like thebonus_actionsvariable ino_encused to work. - removed support for adding passing arguments into acts because that was useless. if you ever used that… i’m deeply sorry…
- sprites are now no longer automatically reset after an act is finished. not a technical limitation, but a way of opening up your possibilities in terms of what can be an act; however, if your actor is using their act sprite, their sprite will change into “actend” and soon go back to “idle”. tldr; set the sprites back to idle for the actors you’ve tampered with during the act sequence
- it’s now possible to have two-page act and spell pages
win_conditionfromo_encis now inside theenc_setconstructor. works the same way- after fixing a bug related to
o_enc_box, you now must set your box’ssprite_backvariable to the back wall of the encounter box. the sprite used must be 2x
enemy changes:
- enemies now have new methods:
__defeat- fully internal. marks the enemy as defeated and adds carrying money to the blind__run_defeat- called when the enemy should run away__fatal_defeat- called when the enemy is dealt a fatal blow__freeze_defeat- called when the enemy is frozen - split
enemyconstructor’sdia_bubble_offsetvariable into three separate ones instead of an array -dia_bubble_off_x,dia_bubble_off_y,dia_bubble_off_type- for better clarity - new enumerator
BUBBLE_RELATIVE, contains valuesBUBBLE_RELATIVE.TO_DEFAULT_POSandBUBBLE_RELATIVE.TO_ACTOR_BASE. made to avoid magic numbers in actor dialogue bubble creation - argument 2 of the act
execvariable now receives the party member’s name instead of their index - new encounter script
enc_enemy_set_tiredthat makes the enemy tired/not tired - sparing enemies now grants you spare percentage if they can be spared. the amount is specified in
mercy_add_pity_percentof the enemy struct. if set to 0, none is added.
item changes:
- all spells’
usearguments now expect the spell caster’s name instead of their index - renamed some argument names in default items to better reflect their purpose
- all items’
usearguments now expect a target’s index instead of their name to allow items being used against enemies
text_typer changes:
maxwandmaxhare renamed towidthandheightrespectively.- you can now set the maximum width of a
text_typerusing a new variable -max_width
misc changes:
- added carrying money to example enemies
- actors now have a new method -
s_get_middle_y(relative = false)- which returns their "middle" y position (the middle of their sprite), which is applied to all places it's applicable. has an optional argumentrelative. - fixed the encounter_end (Ctrl + W) command in the console
- renamed
party_getpostoparty_get_indexfor better clarity enc_getparty_sprite’s first argument is now party_name instead of party_index- renamed
o_ui_enemydialoguetoo_ui_actordialoguefor better clarity - new function
actor_dialogue_createthat creates speech bubbles enc_hurt_enemy’s third argument (used to be called index) now acceptsparty_nameinstead. adjusted all mentions to port.- in
cutscene_set_partysprite, changedselectiontoparty_name. - renamed
enc_sparepercent_enemytoenc_enemy_add_sparefor better consistency with the other enemy functions - renamed
enc_sparepercent_enemy_from_insttoenc_enemy_add_spare_from_varfor better consistency with the other enemy functions - added proper JSDoc to
enc_enemy_add_spareandenc_enemy_add_spare_from_var - added a “tired” hpchange sprite
- renamed
enc_steuptoenc_setup……………………. o_text_hpchangewill now calculate its y offset automatically if it’s colliding with another instance of itself- removed x_off and y_off arguments from
enc_hurt_enemy - miscellaneous bug fixes