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

SFII Exp Tweak experience

My adventures in ASM hacking this game to tweak exp gain

Discussion about this classic Genesis/Mega Drive game.

Re: SFII Exp Tweak experience

Postby nightshade00123 » Tue Jan 31 2012 7:05pm

WALL OF TEXT BELOW.

Sweet. That would be most excellent as it takes far to long to do these things with a hex editor, especially for people like me...........

Also there are other things that would be easy as well to add to it that aren't present currently, another would be being able to adjust growth curves which in itself isn't hard but it's not supported by the editor, and to top it off if you did adjust the growths using a hex editor like I did the stat calculators don't read them right anymore as it's set to only use the original growths for calculation purposes.

It should also be easy to have it where you 'click' a yes or no on enemy spell power, it's 1 byte right before each enemies stat data but it's not present in the editor, have to do it by hand using a hex editor by using 63 for increased spell damage or 00 for normal if I remember right.

I have also recently found out how to add several more levels of spells that the editor doesn't support, it only reads to slot 89. Originally Sir Hedge had found out that by replacing some spells you could add higher levels to others. I found out that you don't have to replace others and that there is actually a 100 spell cap on what the game reads, if I remember correctly. Anything after that does nothing, glitch spell.

Currently the game only uses 89 so that leaves an extra 11 more unused levels of spells to be added to whatever spells someone chooses.

I know I have came across more that I'm not remembering right now, such as item drops but that probably won't be as easy to add to the editor since it reads from different places and would probably require a great deal more effort to add in functionality for it.

But anyways if you want I could point you to these things and probably others once I think of them, although I'm sure you could find them faster than I could send it too you LOL.

That being said, I too tried contacting him a while back as well and no answer. Seems he's been absent for a little bit, hopefully not to much longer.

And speaking of buff/debuf exp and on a somewhat unrelated note, I'm not sure if you know this or not but enemies in SF2 do not use Boost and Attack spells, heck they barely use negative status effect spells on characters if at all, but I found an easy but sloppy work around for the negative status effects though. Unfortunately SF 2 for whatever reason has made these enemies, even though they possess the boost and attack spell, unable to cast it. The funny thing about that is SF2 came out after Shining Force1 and Shining Force CD, only by about a month or 2 for CD.

In both of those games the enemies would cast said spells, but not so in SF2. They also had the ability to use more types of spells and more frequently. Maybe you could shed some light as to why they behave so oddly in Shining Force 2. If it's too much of bother then no big deal. :thumbsup:

And last but not least, I'm very excited that you are adding new features to these tools. It's always nice to have more to do and more options when doing things as well. It's not often contributions of this sort come around so I'm very thankful.

EDIT

Will these new changes support an expanded rom or only the original, I use an expanded so you can see why the concern.

Thanks again!
nightshade00123

Shining Hero
Shining Hero
 
Posts: 539
Joined: Tue Mar 15 2011 2:40am

Re: SFII Exp Tweak experience

Postby ronnen » Tue Jan 31 2012 7:37pm

Broken up by issue brought up by night:

WARNING: SPOILER!


WARNING: SPOILER!



WARNING: SPOILER!


WARNING: SPOILER!


WARNING: SPOILER!


WARNING: SPOILER!


WARNING: SPOILER!


nightshade00123 wrote:And last but not least, I'm very excited that you are adding new features to these tools. It's always nice to have more to do and more options when doing things as well. It's not often contributions of this sort come around so I'm very thankful.

Thanks again!


I stand on the shoulders of giants. Especially BNC... the notes of his that Earl provided to me are :shock:
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: SFII Exp Tweak experience

Postby nightshade00123 » Tue Jan 31 2012 7:55pm

Spell power
WARNING: SPOILER!


Growths
WARNING: SPOILER!


Item drops
WARNING: SPOILER!


I'll probably send the messy notes that I have about those things so you can play with them or what not and hopefully the king will return someday soon as it would really be nice to have all these features in 1 editor rather than several.

And I agree, without BNC's notes and tools many things would not have happened, too bad he no longer comes here.........such a loss.
nightshade00123

Shining Hero
Shining Hero
 
Posts: 539
Joined: Tue Mar 15 2011 2:40am

Re: SFII Exp Tweak experience

Postby ronnen » Tue Jan 31 2012 10:40pm

nightshade00123 wrote:I guess I should have been more specific about the growths. Yes the editors let you change the original linear,middle,early, early+late, and late growths and assign any of them to characters, but you can't make new growths, like say I wanted to make one that I'll call bumpy. It gives rather large gains periodically but then follows it with small or no gain. Right now you can only do this with a hex editor but it's rather tedious, at least it was for me. And it seems like it would be something rather easy to do as it's just changing a value.


Hmm so the game seems to be set up to only allow 6 growth types. The code that does level up enfoces this by doing:
Code: Select all
0x000096DC: 0x0242 0x0007                       ANDI.W   #0x7,D2
0x000096E0: 0x5342                              SUBQ.W   #1,D2
0x000096E2: 0xC5FC 0x0074                       MULS.W   #0x74,D2
0x000096E6: 0x2079 0x001E 0xE000                MOVEA.L  0x1EE000,A0
0x000096EC: 0xD0C2                              ADDA.W   D2,A0


The game (according to SFEdit anyway) already uses 6 types: None, Linear, Late, Early, Middle, Early+Late

We know where those types are, and I'm guessing you understand how they are set up.
WARNING: SPOILER!


So allowing people to tweak existing growth tables in SF2Edit would not be that difficult. Though explaining how they work coherently enough for tweakers to understand the impact of their changes might.

Additionally, the 0x1EE000 in the code above redirects them to 0x1EE02C, and there I only see growth type tables from 1EE02C-1EE270... which is only enough to fit 5 growth tables of length 0x74 (which they appear to be based on the code). This makes sense, because type "None" wouldn't require a table.

Immediately following the growth tables though, is data related to another thing.

So, there isn't really room there to ADD growth types without doing some ROM expansion. And based on BNC's notes on ROM expansion, he seems to have somewhat intentionally danced around moving the data in this area (not saying it can't be done, just probably won't be simple).

Thus, allowing the addition of new growth types as well as use the old growth types probably won't happen in the current plans, at the very least until there is a version with simple edit existing growth types capability that is out there and seems to work well. :)

*edit* it occurs to me I could compress the data to only use one byte with very little effect, which would double the amount of growth types available. But I might need that extra space to account for having to parse the data differently... so 9 types + None... probably plenty IMO.
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: SFII Exp Tweak experience

Postby nightshade00123 » Wed Feb 01 2012 4:23am

ronnen wrote: it occurs to me I could compress the data to only use one byte with very little effect, which would double the amount of growth types available. But I might need that extra space to account for having to parse the data differently... so 9 types + None... probably plenty IMO.


That would be neat, as I know I have come across countless people who say the growths in SF2 are too streamlined. You can pretty much tell exactly how much of a stat you are going to get at any given level if you played it enough, I know I need to get a life LOL.

I thought it would be a neat idea to create some new ones similar to SF1, where at times the characters would get +4 or more to a stat but then it would come to slow down or no growth afterwards. Kinda create that random feeling to gaining stats that SF1 had but it really wouldn't be random, just a really high percentage increase of the total at a given level followed by smaller ones afterward.

And having a few extra ones to play with too could create some really unique characters, instead of the same old and predictable ones. Would be fun.
nightshade00123

Shining Hero
Shining Hero
 
Posts: 539
Joined: Tue Mar 15 2011 2:40am

Re: SFII Exp Tweak experience

Postby Earl » Wed Feb 01 2012 7:10am

Item drops
WARNING: SPOILER!


Anything you (or anyone) think(s) is feasible and desirable is at least exploring

Now I feel like a kid in a candy store! But as long as you're offering...
Something I've been wondering about for a while... Why does Bowie have the starting position he does on the map he does (eg why the upstairs of his house in Granseal)? I've searched for those initial coordinates, but no luck. That would be a handy thing not to have to work around...

Would it be possible to set a flag during the game's intro sequence? It might be a neat little easter egg to somehow reward people for watching it. I'm not sure it's possible to set flags before the character naming screen, but then again I don't know any reason why not...

And a while ago, nightshade figured out how character battle animations worked, but there were some things we were never able to figure out. Specifically, what's special about knights throwing spears in a ranged attack -- when you allow others to do that, they'll throw, but before the screen pans away the spear will return to their hand; when knights throw, the spear doesn't return until the camera has panned back after the attack.

Also, the game seems to occasionally take issue with having a character who wouldn't normally throw spears doing so -- it'll sometimes hang when the character tries to make a ranged attack... Although now that I think about it... the character I replaced was Kiwi, so maybe it's an issue with his trying to do a ranged attack at a time when his fire breath would have triggered? That would certainly explain the 'not every time' nature of the problem...
Earl

User avatar
Shining Legend
Shining Legend
 
Posts: 2927
Joined: Sat Apr 24 2004 6:39am

Re: SFII Exp Tweak experience

Postby ronnen » Wed Feb 01 2012 3:52pm

nightshade00123 wrote:And having a few extra ones to play with too could create some really unique characters, instead of the same old and predictable ones. Would be fun.


Consider your weekend booked: Stat Growth Compression Patch

There is a readme there, but highlights are:

WARNING: SPOILER!


Response to Earl:
WARNING: SPOILER!
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: SFII Exp Tweak experience

Postby nightshade00123 » Wed Feb 01 2012 4:56pm

ronnen wrote:Consider your weekend booked: Stat Growth Compression Patch

There is a readme there, but highlights are:


Ronnen, you are giving me so much to look through and digest that I'm having to keep putting more and more on a list I have of things to check out and see how I can use it. For someone like me , who is like comparing the tortoise and the hare with me being the tortoise, this is going to take a while to accomplish.



This doesn't go without saying thank you! :)
nightshade00123

Shining Hero
Shining Hero
 
Posts: 539
Joined: Tue Mar 15 2011 2:40am

Re: SFII Exp Tweak experience

Postby ronnen » Wed Feb 01 2012 5:26pm

Don't worry, I'm going on holiday soon so you'll have plenty of time!
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: SFII Exp Tweak experience

Postby Earl » Thu Feb 02 2012 4:50am

nightshade00123 wrote:...keep putting more and more on a list I have of things to check out and see how I can use it.

Sympathy. It's very much a case of "What did I go into the kitchen to get?" and/or "I went to Wikipedia to find out about exoplanets. So how did I end up at Spanish monarchy?" There's just so much worth looking into and a lot of it is kind of interconnected, so it's hard to stay focused on one thing at a time.
Earl

User avatar
Shining Legend
Shining Legend
 
Posts: 2927
Joined: Sat Apr 24 2004 6:39am

Re: SFII Exp Tweak experience

Postby nightshade00123 » Thu Feb 02 2012 6:41am

Hey ronnen, I don't suppose you came across some values pertaining to critical rates of spells have you?

All I have are the values associated with each spell, and it seems to be on a per spell basis. The values are set up like this.

1 in 32 - Blaze, Freeze, Blast, Katon, Dao, Apollo, Shining Ball, Blizzard, Snow Breath
1 in 16 - Neptun, Flame Breath, Kiwi Flame Breath
1 in 8 - Bolt, Raijin, Atlas, Holy Thunder, Kraken Bubble Breath, Odd Eye Laser
never - Demon Breath

I'm pretty sure it just a small table somewhere similar to weapon critical values, so it's probably fairly easy to spot.

I was going to go through and do some rom corruption on some spots and see if could turn them up but I figured I would ask since you were looking at spells/enemies and their casting behaviour. No worries if you don't want to. :)
nightshade00123

Shining Hero
Shining Hero
 
Posts: 539
Joined: Tue Mar 15 2011 2:40am

Re: SFII Exp Tweak experience

Postby Siel » Thu Feb 02 2012 8:32am

What about the glitch/oversight that has ranged counters not give EXP?
Siel

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

Re: SFII Exp Tweak experience

Postby ronnen » Thu Feb 02 2012 3:38pm

nightshade00123 wrote:1 in 32 - Blaze, Freeze, Blast, Katon, Dao, Apollo, Shining Ball, Blizzard, Snow Breath
1 in 16 - Neptun, Flame Breath, Kiwi Flame Breath
1 in 8 - Bolt, Raijin, Atlas, Holy Thunder, Kraken Bubble Breath, Odd Eye Laser
never - Demon Breath

I'm pretty sure it just a small table somewhere similar to weapon critical values, so it's probably fairly easy to spot.


Actually, it seems done in a rather different way than weapon crit rates.

Using a spell..

WARNING: SPOILER!


Then...

WARNING: SPOILER!


Or...

WARNING: SPOILER!


Siel wrote:What about the glitch/oversight that has ranged counters not give EXP?


Good question. When I look at the battle loop code, if a counter is determined to happen, regardless of if it is a ranged encounter or not, it appears to eventually fall into the "inflict damage" part of the code used for physical attacks. And there it always calculates exp based on damage, which almost always tries to reward that exp.

It could be that on a ranged attack a particular value is set (perhaps improperly so, perhaps not) that prevents the exp from being rewarded. I'd have to get a trace of a ranged counter to figure that out. I'll put it on the list for when I get back from vacation.

Probably be good to figure that out anyway... might provide more insight into the ranged graphical errors brought up by others.
Last edited by ronnen on Thu Feb 02 2012 3:49pm, edited 1 time in total.
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: SFII Exp Tweak experience

Postby nightshade00123 » Thu Feb 02 2012 3:46pm

Very nice as always Ronnen, and yes I wasn't planning on adding in new criticals rates as I thought the old ones where fine. I just needed to fit 1 or 2 spells into a different critical category so that they fall within tiers I had set for them.

Going off now to tweak such areas!
nightshade00123

Shining Hero
Shining Hero
 
Posts: 539
Joined: Tue Mar 15 2011 2:40am

Re: SFII Exp Tweak experience

Postby ronnen » Thu Feb 02 2012 3:51pm

nightshade00123 wrote:Very nice as always Ronnen, and yes I wasn't planning on adding in new criticals rates as I thought the old ones where fine. I just needed to fit 1 or 2 spells into a different critical category so that they fall within tiers I had set for them.

Going off now to tweak such areas!


Yet again something that'd be perfect to add to SF2Edit :(

I REALLY don't want to fork editors.
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: SFII Exp Tweak experience

Postby nightshade00123 » Thu Feb 02 2012 4:04pm

I know right, Space King has got to come back. There are so many neat things that can be added to this as of right now.

I know for a fact that he wouldn't have a problem letting others make changes to it, he let Sir Hedge add his changes to it and he even added some extra spell functionality for a request of mine pertaining to character spells, but that doesn't go without saying a mans work ie. created programs and such should at least be shown the courtesy of asking for the privilege to work on it, which is what it seems your doing. Very admirable of you considering some would just do it anyways.

Too bad no one knows how to get in contact with him, would be a shame that all this current energy and motivation that's here now be gone by the time he returns. I know I would be upset. :(

Although this is something to consider, maybe making the changes and 'only' releasing it with his consent once he returns. So at least in this regard the efforts of now aren't lost forever, and the finished product wouldn't be something that had to be worked on because it was already done. This is just a thought though.

And like I said Space King, from what I read of his post, has never came out and said against not modifying the original, in fact in his data folder in some of the notes he actually went as far as to say maybe others could find some of the things that aren't present in the editor as of yet. But like I said the consent is of most importance.
nightshade00123

Shining Hero
Shining Hero
 
Posts: 539
Joined: Tue Mar 15 2011 2:40am

Re: SFII Exp Tweak experience

Postby ronnen » Thu Feb 02 2012 8:00pm

nightshade00123 wrote: Although this is something to consider, maybe making the changes and 'only' releasing it with his consent once he returns.


Space King's http://meanderingdesigns.com/ is dead. So is incrediblefurpals.com

And he compiled the VB6 code to native and not p-code, so I can't decompile it without ending up with a bunch of impossible to update spaghetti code (i.e. I'd be better off just "recreating" it in .NET if I was going to go to this trouble).

Which, as an aside, if anyone already has his source code (SirHedge for example), they might want to sit on it for backup purposes

So I can't get the source without his help; thus your suggestion isn't really an option.
And yes I attempted to waybackmachine it, but of course it doesn't cache zip files.

Not to mention internet stalked him a bit this morning using my list of his known aliases (B.Murphree/S.king/dauntless/undaunted) to see if I could find an email address :shifty:
I did learn a lot about DoodleMaCZ though...

But no luck there on an email address. :D
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: SFII Exp Tweak experience

Postby SirHedge » Tue Feb 14 2012 5:02am

So I finally read through all of this and now I'm sad I didn't do so sooner! I PM'd ronnen the link to the source code (at least my variation of it, though I have SpaceKing's original as well if that's needed), but maybe he missed it. Either way, here's the link to the VB6 project for SF2 Edit: http://www.box.com/s/pe037n6lms3pajkx928k

Also, a bunch of comments:
ronnen wrote:I REALLY don't want to fork editors.

Since we've already forked editors once with the Caravan and SF2Edit, it'd be really nice to not need a third.

ronnen wrote:]I managed to get room for 11 growth types just with compression, so None + 10 table entries. The first five are just the default ones in the game (so applying this patch to a vanilla rom doesn't do anything but give a hacker room to play, functionally it remains the same).

Nice job on this. BNC figured this out way back in the day, though unfortunately I don't think we ever implemented it. Here's his post on it (he claims he got to 20 different types), if you're interested:
viewtopic.php?f=35&t=12611&p=342562&hilit=+growth#p342562

ronnen wrote:
nightshade00123 wrote:I have also recently found out how to add several more levels of spells that the editor doesn't support, it only reads to slot 89. {...} actually a 100 spell cap {...}

Shouldn't be too hard to expand SF2Edit's Spell editor to account for the 11 "blank slots."

This would be awesome, though I'm surprised you found spare space. When I was looking at that bit of code it looked to me as though something came immediately afterward and your only option was to overwrite existing spells. The space makes sense, though, since it'd be odd if they used exactly how many spells they had space for.

Also, anything with spells and AI would be nice. I'm still annoyed that healers will never cast the level 2 of their spells, even if they're out of range for level 1 and their ally needs healing. I know that you can sometimes get a healer with Heal 3 to cast Heal 2 (High Priests do it), but that doesn't help me much.


Finally, if ronnen is taking requests (or at least appending them to a huge list of requests):

- I'm wondering if there's a way to alter the chance of an item cracking when used (I'm basically looking at either the default, never happens, or always cracks after a single use). This would allow items to use better spells without messing up balance.

- Of lesser importance is the repair cost for items. I can reduce the price of items to fix this, but it'd be nice if instead I could just make repairs cost say 10% of an items value rather than 75%, like it is currently.


Either way, thanks for all the work you've already done. It's tough making hacks when no one is that good at reading assembly.
SirHedge

User avatar
Shining Hero
Shining Hero
 
Posts: 843
Joined: Sat Mar 15 2008 4:10am

Re: SFII Exp Tweak experience

Postby ronnen » Tue Feb 14 2012 2:51pm

SirHedge wrote:Finally, if ronnen is taking requests (or at least appending them to a huge list of requests):

- I'm wondering if there's a way to alter the chance of an item cracking when used (I'm basically looking at either the default, never happens, or always cracks after a single use). This would allow items to use better spells without messing up balance.

- Of lesser importance is the repair cost for items. I can reduce the price of items to fix this, but it'd be nice if instead I could just make repairs cost say 10% of an items value rather than 75%, like it is currently.


My primary goal at the moment is to get the editor in a place where it is easily extensible. Even with having to actually C# code up the Windows Forms at the moment, I was able to whip together the CharacterStartData module pretty quickly using the DataTemplate framework.

So, before I actually get started on the "requests" I need to :
[*]get a similar system as DataTemplates set up for Windows Forms
[*]set up a system to auto-wire up DataTemplate Values to the Form objects
[*]set up a datacross referencing system
[*]provide xml-friendly way of doing all of the above

But here is my current list of demands in no particular order of importance... people can feel free to add more if they like though hopefully once I get the editor set up to be extensible, some of this functionality could be outsourced to you all to add editor coverage ^_^:
WARNING: SPOILER!


And a little project for Stor for the Community project:
Code: Select all
[*] finish up BNC's work on Caravan that allows [b]adding[/b] of palletes for battle sprites - Stor has a version that does this but it's piece meal and not compiled etc. Be nice if he wasn't the guy "stuck" with having to do that every time someone needed it done.


And a whole list of things I'm not sure of at the moment, but are low priority (and or may never get done):
Code: Select all
[*]Ranged Coutners not giving exp? - this is a bug, not sure it really belongs in an editor. Also looks tricky to resolve based on my perusal of the ASM.
[*]Why Debuff spells are not used by enemies? - similar as above, debuff spells seem to be specially "considered" by the AI, but only *some* of them (i.e. Muddle 2 is, but Muddle 1 is ignored...)
[*]Healing spell usage - same as above basically; AI is not as straight forward to tweak as most other things ^_^
[*]Breath Animation Handlers? - Breath spawns from fixed points, not sure what controls that. For nightshade.
[*]Map Setups? - Earl has done some great work on this, despite BNC's notes on this area of the ROM being sparser than any other subject that I can tell... it'd be nice to be able to at LEAST mark up the ASM file to be more readable / noted... and maybe one day fold it into caravan which, as far as I can tell, doesn't allow editing of it at the moment.
ronnen

Shining Member
Shining Member
 
Posts: 162
Joined: Fri Jan 20 2012 9:01pm

Re: SFII Exp Tweak experience

Postby Earl » Wed Feb 15 2012 9:47am

How does the game determine character placement after a casting of Egress? Just curious if messing with a map and/or priest location could result in Bowie ending up inside a wall or something. Seems like something that would have a table for the different map possibilities... but then again, I know that the game updates your egress point regardless of last save at certain milestones (so you can't get back to Grans Island immediately after landing in Parmecia, for example).

I'd check this myself, but either it's not in the documentation I'm looking at, or I'm looking for the wrong things.
Earl

User avatar
Shining Legend
Shining Legend
 
Posts: 2927
Joined: Sat Apr 24 2004 6:39am

PreviousNext

Return to Shining Force II

Who is online

Users viewing this topic: No registered users and 1 guest