Skip to content

FlashEvent - Maniac Patch Parameters - #3329

Merged
Ghabry merged 1 commit into
EasyRPG:masterfrom
EasyRPG-NewFeatures:maniacs-FlashEvent
Jan 14, 2025
Merged

FlashEvent - Maniac Patch Parameters#3329
Ghabry merged 1 commit into
EasyRPG:masterfrom
EasyRPG-NewFeatures:maniacs-FlashEvent

Conversation

@jetrotal

@jetrotal jetrotal commented Jan 7, 2025

Copy link
Copy Markdown
Contributor

Supporting usage of variables when game uses maniac patch
and parameters size is bigger than 7.

//TPC Example
@ev.flash .player .rgbv v[100], v[101], v[102], v[103] .time 100

@Ghabry

Ghabry commented Jan 8, 2025

Copy link
Copy Markdown
Member

You can use the other overload of ValueOrVariableBitfield which does already do the Maniac and size checking:

int event_id = VariableOrVariableBitfield(com, 7, 0, 0);
// and so on...

See PlayBGM:

bool Game_Interpreter::CommandPlayBGM(lcf::rpg::EventCommand const& com) { // code 11510
lcf::rpg::Music music;
music.name = ToString(CommandStringOrVariableBitfield(com, 4, 0, 5));
music.fadein = ValueOrVariableBitfield(com, 4, 1, 0);
music.volume = ValueOrVariableBitfield(com, 4, 2, 1);
music.tempo = ValueOrVariableBitfield(com, 4, 3, 2);
music.balance = ValueOrVariableBitfield(com, 4, 4, 3);
Main_Data::game_system->BgmPlay(music);
return true;
}

@Ghabry Ghabry added this to the 0.8.1 milestone Jan 8, 2025
Supporting usage of variables when
game uses maniac patch
and parameters size is bigger than 7.

Update game_interpreter_map.cpp
@Ghabry
Ghabry merged commit ea2f6c0 into EasyRPG:master Jan 14, 2025
@jetrotal
jetrotal deleted the maniacs-FlashEvent branch December 15, 2025 03:46
sevenc-nanashi pushed a commit to sevenc-nanashi/easyrpg-player that referenced this pull request May 31, 2026
…hEvent

FlashEvent - Maniac Patch Parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants