Implement Maniacs Battle Common Events#3307
Implement Maniacs Battle Common Events#3307MakoInfused wants to merge 3 commits intoEasyRPG:masterfrom
Conversation
|
The way how you do parallel process updating looks completely different to how it is done on the map. For the map the common events all have a parallel process directly attached to them: Lines 1283 to 1308 in d9dd9be (ignore the async stuff for now) Maybe add What needs to be tested: On the map parallel processes can be suspended and they will continue where they stopped. Does Maniac Patch do this in battle? To test this run two parallel processes: PP1 (has run condition S1 = ON): PP2 (has run condition S2 = ON): The expected message output is A, C, B. D never shown. At least when battle pps are like map pps. Also worth testing if they keep the progress across battles: For this simply do something like PP1: When it resets it will always show A. When it remembers the state it will show B when a 2nd battle starts. Also parallel processes can run... in parallel. So you can do stuff like this: PP1: PP2: I think the output should be A, B, C, D. |
|
@Ghabry I tested all of the exact scenarios as you outlined them and here are the results!
No. It seems to work in a much more simple/diferent way. Suspension Test: Resume Test: Parallel Test: |
927aeed to
742ac35
Compare
|
Please don't create merge commits. They result in a mess as you can see here with these >200 commits. Instead do a rebase: During the rebase their will be conflicts. Fix the conflicts and (rebasing can be tricky, look for a guide in case you need assistance or ask in the chat) |
Ah yeah, sorry about that-- I had forgotten about that part. I'll get this fixed up. |
64c449b to
4ac69ce
Compare
|
All fixed up, won't happen again. Thanks for the heads up. |
|
|
||
| void Scene_Battle_Rpg2k3::CallBattleBeginCommonEvents() { | ||
| for (auto data_common_event : lcf::Data::commonevents) { | ||
| if ((!data_common_event.switch_flag || Main_Data::game_switches->Get(data_common_event.switch_id))) { |
There was a problem hiding this comment.
Nit: condition could be inverted to reduce indenting:
| if ((!data_common_event.switch_flag || Main_Data::game_switches->Get(data_common_event.switch_id))) { | |
| if (data_common_event.switch_flag && !Main_Data::game_switches->Get(data_common_event.switch_id)) continue; |
When using maniacs patch and we have a "Battle Begin" trigger set in the editor like this:

In battle we now have it get triggered like this:

When we use a "Battle (Parallel)" trigger in the editor like this:

In battle it will result in a repeated common event getting triggered every 5 seconds (since that is what my wait time it set to in the above image) like this:
