adding chests and findable items

10 posts
• Page **1** of **1**

how do i go about adding chests and searchable items? im confused as the editor seems to sort them by chapter, as in by map by chapter, but battle locations only? like where are the guardinia castle chests? and how do i go about adding chests or searchable secret items to say, any non battle map?

**Posts:**13**Joined:**Thu Sep 26 2013 8:37am

I can't remember exactly how but I did add items in and outside battles.

Try to open Brothers Mod in the editor to see if you can figure out.

http://forums.shiningforcecentral.com/viewtopic.php?f=3&t=21486

Try to open Brothers Mod in the editor to see if you can figure out.

http://forums.shiningforcecentral.com/viewtopic.php?f=3&t=21486

**Posts:**1046**Joined:**Fri Sep 17 2004 5:31pm**Location:**Rio de Janeiro / Brazil

In SFI, chests located outside of battles are treated as an event on a per tile basis. You can go into the event section of the map editor and adjust these as you see fit. Unfortunately, you cannot add more chests than a map initially has. So, for example, the Guardiana castle has 7 chests, all of which are in the treasury. You are limited to 7 chests in total on that map. You can have less, but no more. The location does not matter, so you can move them around if you'd like, just be sure to delete the previous chest event. Fortunately, most town maps feature dummy chests in inaccessible locations (usually behind shop counters) that feature the chest event, but do not contain an item. You can move these if you'd like to add more chests without changing any if the previous accessible ones.

Perfection is not an option, it is a requirement.

**Posts:**255**Joined:**Sun Nov 03 2013 6:12pm

How / where can i see what enemies use each MOV type?

Further, does anything even make use of MOV type 3 or 0? certainly none of the player units do.

if any enemy units use it, what ones..?

while im at it any enemies use MOV type 7?

Further, does anything even make use of MOV type 3 or 0? certainly none of the player units do.

if any enemy units use it, what ones..?

while im at it any enemies use MOV type 7?

**Posts:**13**Joined:**Thu Sep 26 2013 8:37am

I the class window, you can switch to the enemy tab to look at their move types, resistances, etc.

Perfection is not an option, it is a requirement.

**Posts:**255**Joined:**Sun Nov 03 2013 6:12pm

ShininGeek wrote:I the class window, you can switch to the enemy tab to look at their move types, resistances, etc.

figured that abit ago. turns out class mov 0 and 3 are used for....some kind of AI targeting. they have various effects when a tile costs 1-9 movement. 4+ is when it gets really interesting. at 6 a enemy acts like your not alive on the map. considering creative use of this

at 4 or maybe 5, a enemy sees you but isnt allowed to attack or cast spells on you

i hope weird things like this dont happen sense im going to be using the extra empty terrain types.

**Posts:**13**Joined:**Thu Sep 26 2013 8:37am

I believe move type 0 is used for drawing attack ranges

Perfection is not an option, it is a requirement.

**Posts:**255**Joined:**Sun Nov 03 2013 6:12pm

I'be been wondering for awhile but.

to be sure, unpromoted growth, and promoted growth, are both added onto base stats for your 20/20 stats right?

so base 5 attack, with 15 unpromoted, and 20 promoted, is 40 total at 20/20?

further, how does RNG work for this in this game? i believe i read SF2 has a min and max for all stats at each level, and had fire emblem like growth chances, and your stats ups on levels were force changed if the end result for that level fell out of the min/max paramaters. is that how it works here or what?

and while im at it. what other 'big' mods are there for SF1, other then challenge, SFI, and brothers?

to be sure, unpromoted growth, and promoted growth, are both added onto base stats for your 20/20 stats right?

so base 5 attack, with 15 unpromoted, and 20 promoted, is 40 total at 20/20?

further, how does RNG work for this in this game? i believe i read SF2 has a min and max for all stats at each level, and had fire emblem like growth chances, and your stats ups on levels were force changed if the end result for that level fell out of the min/max paramaters. is that how it works here or what?

and while im at it. what other 'big' mods are there for SF1, other then challenge, SFI, and brothers?

**Posts:**13**Joined:**Thu Sep 26 2013 8:37am

The way SFI handles stats is by using a certain growth value and a growth type, with slight RNG for some randomness in stats. Basically, the game will determine your new level on a level up and choose what the new stat will be based on the growth type and growth amount. So say you reach level 10 with a linear growth of 20. The game calculates that you should gain 50% of the growth amount by level 10, so the new stat would be the base stat + (20 * .5). Other stat growths provide different values at different levels which you can play around with in the editor. I don't believe the game will ever subtract stats, but I'm not positive.

Perfection is not an option, it is a requirement.

**Posts:**255**Joined:**Sun Nov 03 2013 6:12pm

Here's how the level up routine works, code included.

Target = Base Stat + Growth * (Curve % At Level)

So for example Max has a base of 6 ATK and a growth of 17.

He has the 'wavy' growth curve for attack, and if you check the curve data at level 14, he's supposed to be at 60%.

So let's say he's level 14.

60% of 17 would be 10 (rounded down I assume), so his target ATK would be 6+10=16.

If we're promoted, add in 85% of the stats for the pre-promoted level.

And if we're past level 20, instead make the target either the current value (80% chance) or one more than the current value (20% chance)

Then we'll compute a range R as either 25% of the target or 5, whichever is smaller.

Then we add a random number from 0 to R to the target.

Then we subtract a random number from 0 to R from the target.

So, basically we take a number weighted around the target with a maximum variance either way of R.

Cap the value at 99.

If the new value is less than the current value, we just take the current value. So no decreasing stats.

Increase stat to new value.

That's it pretty much, here's a big blob of code if anybody has any interest.

// 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

//AGI

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)+

//HP

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

//MP

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

//CRIT

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

Target = Base Stat + Growth * (Curve % At Level)

So for example Max has a base of 6 ATK and a growth of 17.

He has the 'wavy' growth curve for attack, and if you check the curve data at level 14, he's supposed to be at 60%.

So let's say he's level 14.

60% of 17 would be 10 (rounded down I assume), so his target ATK would be 6+10=16.

If we're promoted, add in 85% of the stats for the pre-promoted level.

And if we're past level 20, instead make the target either the current value (80% chance) or one more than the current value (20% chance)

Then we'll compute a range R as either 25% of the target or 5, whichever is smaller.

Then we add a random number from 0 to R to the target.

Then we subtract a random number from 0 to R from the target.

So, basically we take a number weighted around the target with a maximum variance either way of R.

Cap the value at 99.

If the new value is less than the current value, we just take the current value. So no decreasing stats.

Increase stat to new value.

That's it pretty much, here's a big blob of code if anybody has any interest.

// 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

//AGI

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)+

//HP

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

//MP

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

//CRIT

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

**Posts:**1113**Joined:**Tue Nov 18 2008 4:36am

10 posts
• Page **1** of **1**

Users viewing this topic: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Site Disclaimer & Privacy Policy