Users browsing this thread: 1 Guest(s)
Random Encounters Menu Option

#1
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Random Encounters Menu Option
by madsiur
version 1.1a
released on 01/30/2022
apply to FF3us 1.0 (no header)
wiki entry
download
readme

Files

Code:
encounters_on_off_nh.ips: IPS patch for the on/off options hack
encounters_on_off_anti_nh.ips: IPS patch to revert the on/off options hack
asm/on-off/main.asm: Main assembly file, use it to assemble the on/off options hack
asm/on-off/bank_C0.asm: Code that deals with random encounters (used by asm/on-off/main.asm)
asm/on-off/bank_C3.asm: Code that deals with the config menu option (used by asm/on-off/main.asm)

encounters_multi_nh.ips: IPS patch for the multi options hack
encounters_multi_anti_nh.ips: IPS patch to revert the multi options hack
asm/multi/main_multi.asm: Main assembly file, use it to assemble the multi options hack
asm/multi/bank_C0_multi.asm: Code that deals with random encounters (used by asm/multi/main_multi.asm)
asm/multi/bank_C3_multi.asm: Code that deals with the config menu option (used by asm/multi/main_multi.asm)

encounters_multi_dp_nh.ips: IPS patch for the multi options hack (Divergent Paths incrementors)
encounters_multi_dp_anti_nh.ips: IPS patch to revert the multi options hack (Divergent Paths incrementors)
asm/multi/bank_C0_multi_dp.asm: Code that deals with random encounters (used by asm/multi/main_multi.asm)

Description

This hack add config menu options for random encounters. There are two hacks. The first one was version 1.0 which had an on/off option. The second one has 4 options respectively 0%, 50%, 100% and 150% random encounter rates. In other words, if you select 150% for example a random battle will occur in average 50% faster than normal. There is also a third option which is the multi options hack but it use Divergent Paths random encounters incrementor values (75% of vanilla values), so you can expect with that one around 75% of the random encounters number compared to the original game. All the hacks use free SRAM $7E1E1F to save the player's choice but this can be changed for example in main.asm.

With the on/off options hack, you can now use the Moogle Charm relic for something else, and the new code does no longer checks for that flag ($7E11DF bit 1) when preparing a possible random encounter. You can also now repurpose the “no encounter” item flag.

The same apply to the multi options hack but on top of that the Charm Bangle is no longer useful so you can repurpose it in the same mannner if you use that hack. In the multi options hack, $7E1E1F is loaded instead of $7E11DF when preparing a random encounter.

The multi options hack also has the difference that it edit and reorder the 8 incrementor tables in asm/multi/bank_C0_multi.asm. If you want to fine tune the random encounter rate, it's the best place to do so. I believe some fine tuning could be possible there; the 50% (half) and 100% (normal) tables have been kept intact but the 150% one does a flat +50% of the 100% table, in the same manner than the difference between the 50% and 100% table in vanilla m(the values are doubled).

The on/off options hack use 118 ($76) bytes of free space at $C3F091 and the multi options one use 186 bytes ($BA) bytes at the same offset. For the $C0 bank, 17($11) bytes of free space are used by the on/off options hack and 9 bytes are used by the multi options hack. You can change those free space offsets in the ASM files by modifying the org instructions as long as the new offsets are in the same banks. To assemble the hack type an xkas 0.06 command such as "xkas main_multi.asm rom.smc" at the root of the asm/multi folder.

A final note; if you use one of the three hacks you'll need to restart a new game to have it work correctly, because the correct SRAM initialization is done at the beginning of the game. An alternative is to use bsnes+ debugger, load a game and before entering the main menu go to debugger > memory editor, then type 7E1E1F and edit the value there to a value between 00 to 01 for the on/off options hack and 00 to 03 for the multi options hack.

Screenshots

[Image: image_a.png] [Image: image_d.png]
  Find
Quote  
[-] The following 6 users say Thank You to madsiur for this post:
  • Gi Nattak (01-23-2022), h.carrell (01-27-2022), Lightning (01-22-2022), PowerPanda (01-23-2022), SSJ Rick (02-02-2022), Warrax (01-23-2022)

#2
Posts: 311
Threads: 20
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 2
Status
None
This is actually good for playtesting when I don't want to keep equipping moogle charms and/or items that I temporarily give the "no random encounter" status to. Since 50% of my hack focuses on improving the random battles, naturally it won't be included - but great job nonetheless!
  Find
Quote  
[-] The following 1 user says Thank You to Lightning for this post:
  • madsiur (01-23-2022)

#3
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(01-22-2022, 11:50 PM)Lightning Wrote: This is actually good for playtesting when I don't want to keep equipping moogle charms and/or items that I temporarily give the "no random encounter" status to. Since 50% of my hack focuses on improving the random battles, naturally it won't be included - but great job nonetheless!

I think the main audience for this hack might be people wanting to attempt a form of LLG without worrying about random encounters. It could also fit with ROM hacks that are made with LLG completion in mind. However, it is not compatible with any other menu option hack using the same menu space, like my Font Menu Option one.
  Find
Quote  
[-] The following 1 user says Thank You to madsiur for this post:
  • Gi Nattak (01-23-2022)

#4
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
I am amazed at how quickly you coded this. One suggestion for improvement though. Within the C0 bank for random encounters (C0/C29F - C0/C2DE), there are 4 options listed:
1. Normal
2. Charm Bangle Equipped
3. Moogle Charm Equipped
4. Charm Bangle + Moogle Charm Equipped

Could you use that avilable code to have 4 different values?
0%
50%
100%
150%

I think this would take an already-great idea and make it even better!


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  
[-] The following 1 user says Thank You to PowerPanda for this post:
  • madsiur (01-23-2022)

#5
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(01-23-2022, 04:22 PM)PowerPanda Wrote: Could you use that avilable code to have 4 different values?
0%
50%
100%
150%

Do you mean have 4 options in the menu or having the relics (and combination of them) do that effect? Either way is possible but the former is a bit more menu work. Since I'm using a SRAM byte I can have 2 flags instead of 1 and have 4 combinations possible (0 to 3). I could do this as a 2nd patch for the hack.

So the tables would look like this? (The $C0 disassembly point out the first two words of each table might be inverted? was that ever confirmed as a bug?)

Code:
// 150%
90 00
20 01
40 02
00 00

// 100%
60 00
C0 00
80 01
00 00

// 50%
30 00
60 00
C0 00
00 00

// 0%
00 00
00 00
00 00
00 00
  Find
Quote  

#6
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
You're on fire lately madsiur with all the new patches. Definitely useful for play testing.



  Find
Quote  
[-] The following 1 user says Thank You to Warrax for this post:
  • madsiur (01-23-2022)

#7
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
(01-23-2022, 05:28 PM)madsiur Wrote:
(01-23-2022, 04:22 PM)PowerPanda Wrote: Could you use that avilable code to have 4 different values?
0%
50%
100%
150%

Do you mean have 4 options in the menu or having the relics (and combination of them) do that effect? Either way is possible but the former is a bit more menu work. Since I'm using a SRAM byte I can have 2 flags instead of 1 and have 4 combinations possible (0 to 3). I could do this as a 2nd patch for the hack.

So the tables would look like this? (The $C0 disassembly point out the first two words of each table might be inverted? was that ever confirmed as a bug?)

Code:
// 150%
90 00
20 01
40 02
00 00

// 100%
60 00
C0 00
80 01
00 00

// 50%
30 00
60 00
C0 00
00 00

// 0%
00 00
00 00
00 00
00 00

Yes, I mean having 4 different menu options. I don't know if the wording is inverted or not, but it doesn't matter as long as you're just doing calculations. Whatever the wording says in FF3usME, the numbers will at least be correct.

Note also that there is another set of tables. One set covers dungeons, and the other the world map. Make sure to edit both.

And yeah, if this hack is coded, I will add it to Divergent Paths. In the space provided, I'll be able to add in a relic that I cut, and then one that prevents the Frozen status, since you helpfully just released that patch too.  Objection!


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  
[-] The following 1 user says Thank You to PowerPanda for this post:
  • madsiur (01-23-2022)

#8
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(01-23-2022, 09:28 PM)PowerPanda Wrote: Note also that there is another set of tables. One set covers dungeons, and the other the world map. Make sure to edit both.

Ah yeah I just saw this. Thanks for pointing it out!

(01-23-2022, 09:28 PM)PowerPanda Wrote: Yes, I mean having 4 different menu options. I don't know if the wording is inverted or not, but it doesn't matter as long as you're just doing calculations. Whatever the wording says in FF3usME, the numbers will at least be correct.

I think I have enough room to put "150 100 50 0" on a single option line. What I was asking is if a patch exist to correct both tables, because the disassembly comments make it seems the "normal" is "less" and "less" is "normal". Or does those vanilla value in that order are correct and work in the intended way?

Code:
(normal.  no Charm Bangle or Moogle Charm)

C0/C29F:    C000   ("less encounter" frequency ==> looks like "normal encounter")
C0/C2A1:    6000   ("norm encounter" frequency ==> looks like "less encounter")
C0/C2A3:    8001   ("more encounter" frequency ==> looks right)
C0/C2A5:    0000   ("no encounter" frequency ==> looks right)

(Charm Bangle, halves of above numbers)

C0/C2A7:    6000   ("less encounter" frequency ==> looks like "normal encounter")
C0/C2A9:    3000   ("norm encounter" frequency ==> looks like "less encounter")
C0/C2AB:    C000   ("more encounter" frequency ==> looks right)
C0/C2AD:    0000   ("no encounter" frequency ==> looks right)


(01-23-2022, 09:28 PM)PowerPanda Wrote: And yeah, if this hack is coded, I will add it to Divergent Paths. In the space provided, I'll be able to add in a relic that I cut, and then one that prevents the Frozen status, since you helpfully just released that patch too.

Yeah I'll probably work on a second version of this patch toward the end of the week. Thanks for the good idea!
  Find
Quote  

#9
Posts: 614
Threads: 49
Thanks Received: 0
Thanks Given: 4
Joined: Feb 2017
Reputation: 25
Status
None
The disassembly is correct. I don't know what the labels in the other programs mean, because I never edited the encounter rate of a map itself.


Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
  Find
Quote  
[-] The following 1 user says Thank You to PowerPanda for this post:
  • madsiur (01-23-2022)

#10
Posts: 3,966
Threads: 279
Thanks Received: 234
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
I just released v1.1 of the hack. See first post and readme for details. I kept available the 1.0 patch and code (not optimized) for those who would like a simpler on/off option instead of four options. I'll have a smaller update soonish as an optional patch that drops the encounter rate overall (PowerPanda's Divergent Path encounter rates).

Here's what v1.1 looks like:

[Image: image_c.png] [Image: image_d.png]
  Find
Quote  
[-] The following 2 users say Thank You to madsiur for this post:
  • PowerPanda (01-26-2022), Warrax (01-26-2022)



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite