Started a Legend of Mana mod.
#1
08 February 2014 - 01:49 AM
---
Intent:
Address the lack of difficulty in LoM's combat by compensating for he gaps in the AI, without resorting to turning enemies in to damage sponges. The goal isn't so much to make the game /hard/ per se, but hard enough that the player A) has to move around more in combat instead of relying on stunlocking the enemy and B) take advantage of the techs available to them.
Hoping to have a proof-of-concept patch ready by tomorrow. Because it's cold out, and I have nothing better to do.
Initial Scope:
1. Change how hitstun works.
a. Enemies no longer experience hitstun when attacked by the player -- Done.
b. The player is still hitstunned when attacked by the enemy -- Done.
c. Allow NPC companions to hitstun or interrupt the enemy -- Debating whether this is a good idea or not.
d. If the lopsided hitstun proves to be annoying, I might drop the duration or just make it so enemies can interrupt player attacks without really stunning them. This would be a minor thing to change.
Result: Enemies still aren't very aggressive, but jumping into a group of them is now a bad idea.
2. Increase damage output from enemies.
a. Current implementation involves multiple the damage, after all other damage calculations are done, by some constant value, until I get more of a feel for what I'm looking for, with regards to what percentage of the life bar each hit takes.
Future scope:
1. Nerf bows and spears in some way to compensate for their range -- reduced recovery time would be ideal if this is feasible to change.
2. Increase enemy speed.
3. Improve AI (Assuming I can figure this out).
a. Make enemies get closer to the player (they tend to attack when out of range, currently).
b. Make enemies more likely to attack when in range.
c. Assuming the enemies work like pets, giving them more aggressive personality stats should be doable.
4. Fix the personalities fruits are supposed to convey to pets.
#2
08 February 2014 - 03:07 AM
I've tried a few times, but could never get into this game. If you manage to make the combat engaging somehow, I will definitely give it a shot.
#3
08 February 2014 - 03:13 AM
Elegnaim, on 08 February 2014 - 01:49 AM, said:
That sounds like a fantastic improvement. Goes without saying that if you want to distribute the mod here, you are welcome to.
#4
08 February 2014 - 12:59 PM
- PPF file and the two source asms I added.
- Currently, all enemy damage is being multiplied by five. This doesn't really work that well in practice since even at level 2 enemies can kill you in 1-3 hits. And then you're just lying there while the NPC mops everything up
Planned changes:
- Come up with a better damage increasing function.
- I don't want to make enemy damage sponges, as previously stated, but they are going to need to be more durable.
- The time it takes for the player to revive either needs to be shortened considerably, or you get a game over if the player dies. Otherwise, again, you're just sitting there unconscious while the NPC takes care of everything for you.
With regards to damage, I'm thinking more about how many seconds the player would need to, say, spam the basic light attack on an enemy for it to die. I'm thinking about eight seconds would work -- it would be long enough to give them a chance to counter attack, but not so long that fights would drag out.
The built-in difficulty modes you access in New Game+ boost enemy HP by a LOT but this means that you end up spending like thirty seconds wailing on an enemy if you're just using the stock equipment and that's maddening.
I think boosting their defense during the damage calculations is probably the best approach to this. I could also try to increase the random block chance, but that's random and I don't really like intrusive RNGs.
#6
09 February 2014 - 08:46 AM
Right now I'm looking at:
((Base. dmg x Player Level) / 3) + 10 * ((Player Level / 20) + 1)
I think this is giving me the values I was looking for at each level, although I have no idea how to come up with good level scaling functions.
I'll try to get this in the patch by this afternoon, along with forcing a game over if the player dies, regardless of the companion NPC status (I think this is a correct solution -- waiting to revive is not fun, and a game over just means you restart the current room, which is faster than waiting to revive anyway).
--- edit ---
Formula turned into (3 * (Base. dmg x Player Level) / 8) + 8 * ((Player Level / 16) + 2) after I got done screwing with it so that it was more readily translatable into MIPS. Er...
Anyway, I added the new patch to the same zip I linked to above.
Next step will be changing how death works and making the enemies a little more durable.
#7
11 February 2014 - 07:59 AM
Quote
Seems like a pretty good solution.
#8
12 February 2014 - 07:33 PM
So basically I can just insert a piece of code here that checks the player health and sets the return register to 1 if the player health is 0. Not terribly elegant, but there's nothing already present in the registers that I can clearly say indicates that the player was the character that just got killed.
So, inject that bit of asm, and I can start looking into scaling enemy HP to a reasonable value. And then figuring out the AI code.
wrt the AI code, from what I've seen, I get the impression that enemies stick their next action in some memory address, and then use that to perform some action. I found some addresses that you can zero out to force the enemies to not do anything. Those seem like promisingish places to start.
#9
13 February 2014 - 08:40 PM
- Game Over now occurs when the player dies, regardless of what the party members are doing.
- Also removed an extraneous instruction from the new damage function.
Plans for Next Update:
1. Boost enemy HP slightly (by inserting some code into the combat stat initialization loop -- after the loop ends, I can hook something in to mod HP), such that A) It scales to the player's level and B) Enemies that already have a higher amount of HP get less of a boost.
2. Nerf player attacks based on range. This is contingent on me finding out how to determine who the /attacker/ is during a given damage calculation run, since this should only apply to the player. Basically though, bows, spears, and light hammers would do 3/8 their calculated damage, gloves and daggers would be left alone
3. I'd still like to allow for the NPC party members to hitstun the enemy, although, again, this is contingent on me finding out how to determine who the attacker is in a given round of combat.
--- edit ---
Feb. 16, 2014:
1. I think I found a good place in the code to insert the HP boosting code. I think I'll just add a flat Player Level * 8 to whatever the existing HP is. This should only amount to enemies being able to weather two or three more attacks than usual. Also the essentially linear increase means that enemies with high HP get a proportionally smaller boost anyway, which is what I wanted.
Interesting thing about enemy HP is that the current function that sets up enemy HP in battle, as it is, increases it over a few runs of some loop construct. So I'm guessing that enemy HP is, maybe, defined as "HP per level" somewhere and this is calculated when battles are loaded.
I think what I was expecting was some table saying exactly how much value stats were assigned at a given level. In any case, I might be able to figure out the enemy level memory locations from this, if necessary.
2. My initial assumption about how enemy HP in battle worked was wrong. Not sure if I mentioned this, but I'd thought that you'd have four or so blocks of stats, which would just map to enemy 1, enemy 2, etc. in combat. In reality it looks like each enemy on the map has its own stats in memory.
If THIS is the case, making something that turns off enemy respawns might be feasible -- find out WHAT indicates that an enemy gets spawned when entering a room, and add something to the enemy death handling code to turn it off when they die. This isn't something that's intended as a core feature of this mod, though.
3. I found a memory write that, when disabled, causes the enemy to attack constantly, regardless of horizontal range to the player. Said memory write actually writes into about seven? different addresses, but if I can figure out what reads from said addresses I should be able to improve enemies getting into range.
From what I can tell, that entire block of code copies the player and enemy's x and y positions on the map into some other areas. I'm guessing it then compares them and if the total distance is less than a certain amount, it cause the enemy to attack.
--- edit 2 ---
Looks like the range that triggers enemies to attack is either data driven or AI package driven. I noticed that rabbites are fine at getting into range, whereas Potos aren't. Hm.
#10
19 February 2014 - 07:09 PM
I don't think improving getting into range will really be THAT helpful. It's only problematic on a few enemies. Getting enemies to act more frequently in general is probably a better approach. Hopefully I can find whatever function triggers attacks from this.
Anyone have advice on how to, er, navigate a series of jump statements in reverse? Assuming that jal's were used, I can get the RA and kind of follow that back, but I keep hitting dead ends or finding places where the RA is set to an unexpected value.
#12
16 March 2014 - 06:06 PM
2. There's a bug where, if you die, you still move slowly when you respawn. This is fixed in the code but I haven't merged it in yet because it screws up a bunch of offsets.
3.
--- update above ---
I've been working on the movement-related code lately, and I'm getting some weird crashes.
- I set up some code to set a flag for when the player is in battle. Had some issues finding an unused memory address to use for this but I think I got one now.
- Movement code looks like it's actually working, in so much as it's slowing the player down, but now I'm getting a crash when I attack. I'm not sure why this happens -- in the debugger, I changed the code at run-time such that, as soon as it jumped to the movement code, it'd basically jump back, and it was still crashing, even though nothing would actually HAPPEN at this point.
Current theory is that my code is fine and that I inadvertently corrupted the save state I was using. I hope this is the case. It IS possible that I broke collision detection somehow, except if I jump my new code completely, it'd stop crashing in that case, and I also remember just having perma-slow walk on in AND outside of combat, without issue.
I don't have any releasable updates right now. The HP buffs are contingent on getting the movement stuff working, and the movement stuff is proving to be a pain.
--- edit ---
Okay, problem isn't as big as I thought. The memory address that I thought was unused is relevant for something -- setting it to anything besides 00000000 causes problems.
I need to find either an actually free memory address, or, more elegantly, an existing variable that's always set to one value during combat and another outside of combat.
#13
27 March 2014 - 12:19 AM
Since you've been poking around the code already, I have a few questions. Is it possible to make it so that when you invite a second player off of their file, they can edit they're equips and techs without having to leave, load their game up, and THEN tweak their stuff? This has been the biggest hassle in all the years I've been playing this game.
Also, what about the instrument system? Just like spamming light attack, I feel that spaming instruments also makes it way too easy, since their effects come with AoE lock-down until after their 'zomg I'm getting hit' animations wear off. Would there be any way to put a timer on it, maybe lock it to the tech gauge so that it uses all/some of the gauge, depending on the strength of the instrument?
#15
27 March 2014 - 05:42 PM
Raemnant, on 27 March 2014 - 12:19 AM, said:
It's PROBABLY possible, but there's no existing framework for modifying NPC equipment so it'd probably be a huge undertaking. Also, I don't think the game stores whatever techs/items the companion NPCs/second player have, outside of what they've equipped. So you'd have to draw from P1's move pool/inventory.
Quote
Instruments aren't really over-powered.
1. They're hugely weaker than weapons, which offsets their range.
2. The player stuns after casting, and this last about as long as the enemy hitstun, so it doesn't matter much unless you have another player.
I THINK they're okay in what I'm doing -- range is desirable over damage in some cases 'cause I boosted enemy damage a /lot/ and getting close is riskier, although the player is slower now so getting away from the enemy is hard. I think something like getting away from the enemy, casting, and then using jump if they close in on you is probably a reasonable approach to how I'm setting things up. I'm not really going for HARD, just making the player be more active in combat.
Also once I get the enemy speedup stuff in, they should be able to get in range of the player better before the spell's charged. Or it'll be harder to target them, whatever.
Worth noting is that magic attacks still appear to hitstun enemies. I think my code changes only affected quick attacks.
#16
27 March 2014 - 06:29 PM
Kjata, on 27 March 2014 - 04:06 AM, said:
Ohh, yea I know. I read the stuffs on the homepage. What I meant by that was could a Legend of Mana hack even be made. Like, is it even possible. Its been ohh so many years, and I've never seen anyone try and do anything with it, so I was simply wondering if it could even be done.
To Elegnaim: What about EXP rates from the crystals enemies drop? Most of my playthroughs ever since my first when I was a little kid involved me only picking up EXP from the bosses, because I felt the amount of EXP the enemies give you is way too much. You lvl so fast, and by the time your'e 10 hours in, your'e overpowered. That might not be the case considering your'e making players move slower, and enemies do more damage, but I was just putting that out there.
#17
28 March 2014 - 02:56 AM
Raemnant, on 27 March 2014 - 06:29 PM, said:
I missed the "even." Oh well.
#18
28 March 2014 - 06:55 PM
Raemnant, on 27 March 2014 - 06:29 PM, said:
Enemy damage scales to the player level considerably, which should offset this and force you to rely more on equipment than base stats (which don't really have a huge effect anyway from what I've seen?)
#19
03 April 2014 - 08:06 PM
I have all the hitstun, movement code, and damage code in. Sooo, I'm calling this version 1.0 beta.
If I can ever figure out the AI code and play with more, I'd love to do more work on it, but as it stands, I'm happy enough with what I've got.
The game's still going to be rather easy but you can definitely die now. Also the... player movement's slower but enemy movement's faster, so I think that might be offputting to some people. Any feedback on how this works out is appreciated
#20
03 April 2014 - 10:00 PM