Welcome to the Shining Force Central Forums!
SFC Forums Index Shining Forums Shining Force
Register for your free forum account now or Login to remove this advert.

Collecting Leveling Stat Data

Looking for help

Discussion about the original classic Genesis/Mega Drive game. Posts about the GBA remake belong in the forum below.

Collecting Leveling Stat Data

Postby FurryEskimo » Thu Mar 21 2019 2:21pm

I've created a google sheets form that can record a ton of data on every character's stats. It'll average the stats and graph the data automatically.
I could use your help though. The more people record their data, the more accurate my data will become. I've already started, and discovered that every wiki on this game has conflicting and incorrect data. (eg. Wrong character stats, and lots of info wrong about spells!!)
There seem to have been a few others who investigated leveling data. They seem to have made a few breakthroughs, but their data is no longer available, and I believe that graphing the data will make it easier to understand.
The leveling rate seems to have a randomness factor, so I need to collect more data to find a reliable average.

I'd really appreciate some help here.
Just inputting stats when you get a new character, and what stats change.
I'll post the doc if this post is approved.
You do not have the required permissions to view the files attached to this post.

User avatar
Posts: 3
Joined: Sun Mar 17 2019 3:26pm

Re: Collecting Leveling Stat Data

Postby Siel » Sun Mar 24 2019 8:09pm

Here's an ancient thread with data for all characters at all levels from the game itself:

There's even an area at the bottom to preview specific levels' median, maximum, and minimum stats.

User avatar
Shining Member
Shining Member
Posts: 349
Joined: Sun Oct 18 2009 2:20pm

Re: Collecting Leveling Stat Data

Postby FurryEskimo » Sun Mar 24 2019 8:57pm

Cool! Though, I'm having trouble opening these documents... They say they're .XLS files, but I don't have excel and google is having trouble opening the files for google sheets. Any suggestions?

User avatar
Posts: 3
Joined: Sun Mar 17 2019 3:26pm

Re: Collecting Leveling Stat Data

Postby Siel » Sun Mar 24 2019 10:16pm

I threw them into Google Sheets and they seem to be working as normal. Dragging&dropping directly from the unextracted .zip file doesn't seem to upload properly though.

User avatar
Shining Member
Shining Member
Posts: 349
Joined: Sun Oct 18 2009 2:20pm

Re: Collecting Leveling Stat Data

Postby Lobo » Mon Mar 25 2019 10:45pm

I may have something for you too, whenever I'm able to check on my old files.

Here on should be the part of the code that handles level up.

// Level Up Routine
000246EC BSR $000246F8
000246EE BCS $000246F6
000246F0 BSR $00024852(pc)
000246F4 TST.B D0
000246F6 RTS

000246F8 MOVEM.W D0,-(A7)
//Get Force Member's ID
000246FC BSR $000225B0(pc)

00024700 BSR $00024708
00024702 MOVEM.W (A7)+,D0
00024706 RTS

00024708 MOVEM.L D0-D4/A0,-(A7)
//Check if at max level
0002470C BSR $00022C2E(pc)
//If so, exit
00024710 BCS $000247EA(pc)
//Check if Jogurt
00024714 CMP.B #$1D,D0
//If so, skip
00024718 BEQ $00024722
//Otherwise add 1 to level
0002471A MOVEQ #$01,D1
0002471C JSR $000201AC
//Set EXP to 0
00024722 CLR.W D1
00024724 JSR $00020144
//Get new level, save to D3
0002472A JSR $0002007C
00024730 MOVE.W D1,D3
00024732 CLR.W D4
//Get Current ATK to D2
00024734 LEA $A9F4,A0
00024738 JSR $00020080
0002473E MOVE.W D1,D2
00024740 MOVE.W D4,D1

00024742 BSR $000249D8(pc)

//Get address of stat growth
000249D8 MOVEM.L D2-D4/A0,-(A7)
000249DC BSR $00024AA2(pc)

//Get level character was promoted at
00024AA2 BSR $00024ADA
//If 0, not promoted
00024AA4 BEQ $00024AAE
00024AA6 MOVE.L $000203F0,A0
00024AAC BRA $00024AB4
00024AAE MOVE.L $000203EC,A0
00024AB4 MOVE.L D0,-(A7)
//Index into stat growth table to find char's data
00024AB6 AND.W #$00FF,D0
00024ABA MULU #$0006,D0
00024ABE ADD.W D0,A0
00024AC0 MOVE.L (A7)+,D0
00024AC2 RTS

//Get Stat Growth Value (ATK)
000249E0 MOVE.b $00(A0,D1),D2
000249E4 BSR $00024A2E

//Get address into char data of corresponding stat
00024A2E MOVE.W D1,D3
00024A30 ASL.W #1,D3
00024A32 MOVE.w $04(PC,D3),D3
00024A36 RTS

000249E6 BSR $000249FC

// Calculate contribution of prepromoted levels to stat growth
000249FC MOVEM.L D2-D4/A0,-(A7)

//Get unpromoted stat growth?
00024A00 BSR $00024AAE(pc)
00024A04 MOVE.b $00(A0,D1),D2
00024A08 BSR $00024A2E
//Get char data address
00024A0A BSR $00024AC4(pc)
00024A0E CLR.W D4
//Get starting stat value?
00024A10 MOVE.B $00(A0,D3),D4
//Get level promoted at
00024A14 BSR $00024AE6(pc)
00024A18 BEQ $00024A26
00024A1A BSR $00024A44

00024A44 MOVE.L D2,-(A7)
00024A46 BSR $00024A56

//Compute growth % based on level and growth curve
00024A56 MOVEM.L D2-D5/A0,-(A7)
//Check if level < 20
00024A5A CMP.W #$0014,D1
00024A5E BLE $00024A66
//Set to 100% growth
00024A60 MOVE.W #$0064,D1
00024A64 BRA $00024A9C

//Level < 20
//Find growth curve
00024A66 AND.W #$00C0,D2
00024A6A ASR.W #5,D2
//Get address of growth curve values
00024A6C MOVE.L $000203E8,A0
00024A72 MOVE.w $00(A0,D2),D2
00024A76 LEA $00(A0,D2),A0
//Find break point in curve
00024A7A MOVEQ #$01,D2
00024A7C CLR.B D3
00024A7E CMP.B (A0),D1
00024A80 BLE $00024A88
00024A82 MOVE.B (A0)+,D2
00024A84 MOVE.B (A0)+,D3
00024A86 BRA $00024A7E
//Interpolate to get growth %
00024A88 SUB.W D2,D1
00024A8A CLR.W D4
00024A8C MOVE.B (A0)+,D4
00024A8E SUB.W D2,D4
00024A90 CLR.W D5
00024A92 MOVE.B (A0)+,D5
00024A94 SUB.W D3,D5
00024A96 MULS D5,D1
00024A98 DIVS D4,D1
00024A9A ADD.W D3,D1
00024A9C MOVEM.L (A7)+,D2-D5/A0
00024AA0 RTS

//Multiply curve % by growth to get target value
00024A48 AND.W #$003F,D2
00024A4C MULS D2,D1
00024A4E DIVS #$0064,D1
00024A52 MOVE.L (A7)+,D2
00024A54 RTS

//Take 85% of growth value and add to base stat
00024A1C ADD.W D1,D4
00024A1E MULS #$0055,D4
00024A22 DIVS #$0064,D4
00024A26 MOVE.W D4,D1
00024A28 MOVEM.L (A7)+,D2-D4/A0
00024A2C RTS

//Get stat growth from current level
000249E8 MOVE.W D1,D4
000249EA JSR $0002007C
000249F0 BSR $00024A44(pc)
000249F4 ADD.W D4,D1
000249F6 MOVEM.L (A7)+,D2-D4/A0
000249FA RTS

00024746 BSR $000247F0(pc)

//Get stat increase
000247F0 MOVEM.L D6-D7,-(A7)
//Check that target stat value isn't zero
000247F4 TST.W D1
000247F6 BNE $000247FC
000247F8 CLR.W D2
//If so, just end
000247FA BRA $0002484C
//Check if level > 20
000247FC CMP.W #$0014,D3
00024800 BLE $0002481A
//Check if stat > 99
00024802 CMP.W #$0063,D2
00024806 BGE $0002481A
//Set target stat to current value
00024808 MOVE.W D2,D1
//Get random number from 0-4
0002480A MOVEQ #$04,D6
0002480C JSR $000002E0
00024812 TST.W D7
// If zero add one to target (20% chance of increasing target by one)
00024814 BNE $00024818
00024816 ADDQ.W #$1,D1
00024818 BRA $00024846

//Level < 20
0002481A MOVE.W D1,D6
//Increase target stat randomly, anywhere from 0 to 25% of target or 5, whichever is lower
0002481C ASR.W #2,D6
0002481E CMP.W #$0005,D6
00024822 BLE $00024826
00024824 MOVEQ #$05,D6
00024826 JSR $000002E0
0002482C ADD.W D7,D1
//Do it again but subtract
0002482E JSR $000002E0
00024834 SUB.W D7,D1
//Cap target at 99
00024836 CMP.W #$0063,D1
0002483A BLE $00024840
0002483C MOVE.W #$0063,D1

//Take max of current and target
00024840 CMP.W D2,D1
00024842 BGE $00024846
//Get difference to D2
00024844 MOVE.W D2,D1
00024846 MOVE.W D1,D7
00024848 SUB.W D2,D7
0002484A MOVE.W D7,D2
0002484C MOVEM.L (A7)+,D6-D7
00024850 RTS

//Store difference for message box
0002474A MOVE.B D2,(A0)+
//Increase ATK
0002474C JSR $00020130
//Repeat for DEF
00024752 ADDQ.W #$1,D4
00024754 JSR $00020084
0002475A MOVE.W D1,D2
0002475C MOVE.W D4,D1
0002475E BSR $000249D8(pc)
00024762 BSR $000247F0(pc)
00024766 MOVE.B D2,(A0)+
00024768 JSR $00020134
0002476E ADDQ.W #$1,D4
00024770 JSR $00020088
00024776 MOVE.W D1,D2
00024778 MOVE.W D4,D1
0002477A BSR $000249D8(pc)
0002477E BSR $000247F0(pc)
00024782 MOVE.B D2,(A0)+
00024784 JSR $00020138
0002478A ADDQ.W #$1,D4
0002478C JSR $00020098
00024792 MOVE.W D1,D2
00024794 MOVE.W D4,D1
00024796 BSR $000249D8(pc)
0002479A BSR $000247F0(pc)
0002479E MOVE.B D2,(A0)+
000247A0 JSR $00020148
000247A6 ADDQ.W #$1,D4
000247A8 JSR $000200A0
000247AE MOVE.W D1,D2
000247B0 MOVE.W D4,D1
000247B2 BSR $000249D8(pc)
000247B6 BSR $000247F0(pc)
000247BA MOVE.B D2,(A0)+
000247BC JSR $00020150
000247C2 ADDQ.W #$1,D4
000247C4 JSR $00020090
000247CA MOVE.W D1,D2
000247CC MOVE.W D4,D1
000247CE BSR $000249D8(pc)
000247D2 BSR $000247F0(pc)
000247D6 MOVE.B D2,(A0)+
000247D8 JSR $00020140
000247DE ADDQ.W #$1,D4

000247E0 BSR $00024AFE(pc)
000247E4 BSR $00021DA6(pc)
000247E8 TST.B D0
000247EA MOVEM.L (A7)+,D0-D4/A0
000247EE RTS

User avatar
Shining Hero
Shining Hero
Posts: 1034
Joined: Fri Sep 17 2004 5:31pm
Location: Rio de Janeiro / Brazil

Return to Shining Force

Who is online

Users viewing this topic: No registered users and 1 guest