Modding => Help! => Topic started by: Ansehelm on August 11, 2017, 05:32:07 am
Title: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 11, 2017, 05:32:07 am
Hey homies,
So I'm looking to make some items that give high stats in some areas and negatives in others to compensate (e.g. heavy armor with great hp boosts but -1 speed). I know this is possible, but it doesn't work in patcher since the field for item attributes doesn't accept negatives. How can I work around this?
Also, how does one get an item that includes an R/S/M reaction (e.g. a magic carpet that makes the user fly). Again, I know it's been done, but how would I go about it? Thanks
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Emmy on August 11, 2017, 10:43:50 am
This is what I use:
<Patch name="Unknown 1 and 2 = new item attributes"> <Description>Requires No Monster Breeding (overwrites code that lays eggs). Unknown 1 = byte you want affected, Unknown 2 = amount you want it affected by. Adds to item attributes.
Some useful values for byte 1: 33 = PA, 34 = MA, 35 = Speed, 3a = Move, 3b = Jump, 4a-4d = Equippable items (make an item grant the ability to grant other items), 4e-52 = innate statuses, 53-57 = status immunities, etc.
You can even add use of R/s/m through an item this way! :):):)
Credit to Pride to finding my mistake (twice). Version 1.3 improvements: 1. Works! (old version didn't work as more than just a proof of concept, please use this instead) 2. Can affect HP and MP now 3. Works properly with value caps
Does not accept signed values, or values greater than 0x7f for PA/MA/Speed/Move/Jump bonuses. Sorry :( </Description> <Location file="SCUS_942_21" offset="4a618"> 06002291 2A000834 DFFF4324 2500632C 11006010 21282202 03004810 2E000834 07004814 00000000 0B002391 0000AB94 00000000 21586301 0C000010 0000ABA4 0B002381 0000AB80 00000000 20586301 06000010 0000ABA0 0B002391 0000AB90 00000000 25586301 0000ABA0 07002391 AE710108 03008824 </Location> <Location file="SCUS_942_21" offset="4ceb0"> 86670108 00000000 </Location> </Patch>
Doesn't give negative stats, but it does allow you to use the unused bytes on every item to give one byte worth of unit data changes to any character temporarily with the item. This can do stuff like granting fly, but also can allow for making a +1 pa item without having to use an attribute for that.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 11, 2017, 02:07:44 pm
Awesome, so I really like this. Ideally it would be great to have it without overwriting monster breeding if you're aware of another area it could be inserted.
I didn't think negative stats from items were possible, but I saw it in CCP, if anyone's around who is familiar with how that was done.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Lionheart537 on August 14, 2017, 12:39:10 am
Hey Emmy, can that hack add physical or magical damage reduction as well? IIRC there's a hack that changes item unkowns to do this, but if this here can do both that'd be outstanding! Either way it surely gives a lot more room for item attibuttes.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Emmy on August 14, 2017, 10:10:20 am
No it can't. You'll have to use Glain's hack for that, and they're incompatible with each other (due to using the same unknown fields to do different things).
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Lionheart537 on August 14, 2017, 10:57:10 am
Bummer. Both really cool either way!
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 14, 2017, 04:03:12 pm
Ok, so it looks like Celdia used ALMA, the legendarily buggy spreadsheets, to do that, so I think I'll see if I can get what I want with Emmy's hack. Is there something about the monster breeding code that is used to make this work, or was it just convenient space? I'd really like to use this without neutering/spaying all the beasts in FFT.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Pride on August 14, 2017, 04:26:01 pm
It removes monster breeding, I have my own somewhere that'll I'll hunt down when I get home
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Emmy on August 14, 2017, 06:09:13 pm
It was just convenient space, can be placed anywhere in scus that you can make for it. Only thing is, since it is scus space that is necessary, good luck finding another part of scus to put it unless you're willing to get rid of something or rewrite routines yourself to save the space for it. :( I just put it there because I got rid of monster breeding in MT.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 14, 2017, 07:29:56 pm
I'm sure there's some space I can find. I found this thread by Xif in which she seems to have found some extra space, although it's not conclusive.
http://ffhacktics.com/smf/index.php?topic=11010.0
Is it as simple as copy and paste, or do I need to change the code to reflect its changed location?
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Pride on August 14, 2017, 11:48:24 pm
Here's mine. The first unknown allows a second item attribute to be attached to the item via the first item unknown flag in the Patcher (potentially to allow more combinations) and the second flag attaches a R/S/M by ability ID. It automatically adds x100 so, for example, you would set the secondary flag as E2 to allow Short Charge with the Item. This asm is not as heavily tested as my other ones but I tested it again today and couldn't find anything. Please let me know if you come across an issue so I can fix it.
Edit: I also have another version of this one that uses the Kanji space you mentioned to allow R/S/M to have an attribute attached to it (IE blank support gets Fire Absorb/Water Weak through attribute) but I haven't finished that one completely since I'd hate to use that extra space just to throw a table on it. If you're interested, I could fix the display issue (functionally it works) and toss it in with this.
Edit 2: Busted
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 15, 2017, 12:26:08 am
Again, this looks very good, but I see it uses the same monster breeding space. I really like what this hack can do, but I don't want to sacrifice monsta breeding (think of those little morbol eggs - they deserve to grow up to become big, slimy monstrosities!). Ergo, if the entirety of this hack could be put in that extra kanji space, you would make lots of little unborn chocolings very happy :D
I'm not sure if I completely understand your statement regarding attaching attributes to R/S/M - I plan to eat most/any empty slots there, but if this adds attributes to R/S/M while keeping all of their current functionality as well, that would be very cool. If adding attributes becomes/replaces the function of the R/S/M abilities themselves, I don't think I'd use it because I have designs for most of those slots and I can free up space for elemental effects by consolidating several redundant sections in "Item Attributes" in patcher. I hope I explain myself
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Pride on August 15, 2017, 12:29:30 am
It doesn't use the monster breeding section, its a rewrite of the entire attribute section
And yes, it would be a bonus on top of what the support already does unless you find the asm that disables what the r/s/m already does
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 15, 2017, 01:32:21 am
Ah, I see.
http://uploads.im/7WNJz.jpg
Super Awesome! The chocobos thank you. Remind me to make a Pride Memorial Chocobo Sanctuary somewhere in my hack. Woo woo! Or we could have a long [insert platonic activity that is appropriate to your interests - my vote goes to poaching behemoths] on the beach sometime. :cool:
So I look forward to testing this out in the coming days. And if you could fix that display issue without much of a headache, that would be groovy
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 17, 2017, 01:48:58 am
Ok, so adding the R/S/M definitely works. One issue that I see is that heavy armor and other high hp items only give a fraction of their hp boosts (conversely, low-hp gear like the beginning soldier gear gives several times its nominal hp boost). My mod has some ASM changes, so there is a possibility that there's some overlap, but I don't think that's the case here
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Pride on August 17, 2017, 01:57:36 am
This ASM shouldn't affect HP/MP bonus at all, that's in a different routine completely but I'll investigate on my end.
Edit: I don't know how that happened but here we go
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 19, 2017, 01:10:04 am
Excellent, that solved the hp problem. The only other thing I notice is that while this works to attach R/S/M successfully, it seems to disregard values put in the "Item attributes" tab, e.g. a rug that was given the fly ability works with that, but the 2E float attribute doesn't work. Even with that bug this opens up a lot of great possibilities, so I appreciate the effort you've put in thus far. Fixing this would be icing on the cake.
Also, I'm unsure what kind of input it wants for the Unknown 1 Slot. Unknown 2 is easy, but I'm not sure exactly how unknown 1 works. For example, I put FB (fly) in both slots, and got an item that granted fly...and gave my character 99 PA and a bunch of extra move. Very cool possibilities here, just not sure how to interpret the inputs.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Pride on August 19, 2017, 10:43:39 am
Okay fixed the status part, originally messed up one of the storage pointers so it'll store the status properly now. Also added in your original question. Just be careful with adding in too many negative stats of the same kind (like 4 items of different types with -1 jump) since I don't have /any/ room to add in protection against this.
(http://i.imgur.com/8JL4d7T.png)
You use the 1st unknown as another attribute id, so like 18 would grant 2 PA (based on vanilla's original attribute).
Edit: Since I was assuming I should clarify, you need to use 255 - 128 to put a negative stat on a unit. 255 = -1, 254 = -2, etc.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Ansehelm on August 24, 2017, 02:32:09 am
Pride, this is...how do you say...Final Fantasy Tastic. Does everything I asked for, with the added benefit of additional mix and matching that comes with the first slot. In fact, there are even more possible spaces than I thought, because things like +2 Ma can just be created just by referencing a +1 MA slot twice, etc. Messing around with it, I even found a way to make units begin battles as crystals or treasure chests. Full marks. This almost completes my list of ASM stuff I need for my hack. Love it :cool:
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Lionheart537 on August 24, 2017, 02:43:37 am
Pride is the hero we don't deserve. :v/: :more: :v/:
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: nitwit on August 28, 2017, 01:54:35 am
Quote from: Pride on August 19, 2017, 10:43:39 am Okay fixed the status part, originally messed up one of the storage pointers so it'll store the status properly now. Also added in your original question. Just be careful with adding in too many negative stats of the same kind (like 4 items of different types with -1 jump) since I don't have /any/ room to add in protection against this.
(http://i.imgur.com/8JL4d7T.png)
You use the 1st unknown as another attribute id, so like 18 would grant 2 PA (based on vanilla's original attribute).
Edit: Since I was assuming I should clarify, you need to use 255 - 128 to put a negative stat on a unit. 255 = -1, 254 = -2, etc.
0005b684: a202003a sb r2,0x003a(r16)Store Unit's Move 0005b688: 92220018 lbu r2,0x0018(r17)Load Job's Jump 0005b68c: 00000000 nop 0005b690: 3042007f andi r2,r2,0x007fCap Jump at 127 (0x80 flags stepping stone) 0005b694: a202003b sb r2,0x003b(r16)Store Unit's Jump 0005b698: 92220018 lbu r2,0x0018(r17)Load Job's Jump 0005b69c: 00000000 nop 0005b6a0: 30420080 andi r2,r2,0x0080Get Stepping stone Flag 0005b6a4: 10400004 beq r2,r0,0x 0005b6b8Branch if Unit isn't a stepping stone 0005b6a8: 00000000 nop 0005b6ac: 96020048 lhu r2,0x0048(r16)Load Unit's Y Coordinate + Flags 0005b6b0: 08016db1 j 0x 0005b6c4 0005b6b4: 34424000 ori r2,r2,0x4000Enable Stepping Stone 0005b6b8: 96020048 lhu r2,0x0048(r16)Load Unit's Y Coordinate + Flags 0005b6bc: 00000000 nop 0005b6c0: 3042bfff andi r2,r2,0xbfffDisable Stepping Stone 0005b6c4: a6020048 sh r2,0x0048(r16)Store Unit's Y Coordinate + Flags Did you remember to rewrite this so something other than 128 is the stepping stone bit?
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Pride on August 28, 2017, 03:58:28 am
It would only affect items that would give stepping stone, Raven also pointed it out to me.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: nitwit on August 28, 2017, 10:52:14 am
I think that the Dragon, Behemoth, and Worker 7/8 classes all have move in excess of 128.
Title: Re: How to make items that give negative stats or R/S/M Abilities
Post by: Pride on August 28, 2017, 11:07:27 am
It only affects items, not classes with x80 + jump value unless they have enough negative items that would break it since I didn't have room to prevent underflow