Jump to content

ASM Condition That Checks if All Fielded Ally Units Dead


MarkyJoe1990
 Share

Recommended Posts

Heeeeeey everyone.

So I decided to make an ASM conditional code that checks if all of your currently fielded units are dead. It's great for people who would rather their game overs be caused by not having any units than a specific main character dude dying.

This is for FE7.

Download

Basically just paste this dmp into an area of your rom and then you can call the condition in your events with IFAF [Conditional ID] [Offset plus 1].

CheckAllCurrentHP:
.thumb
.org 0x00

mov		r1, #0x00		@Sets cycler to 0x00
mov		r2, #0x00		@False
CheckCharacterID:
ldr		r0, =0x0202BD50 @Loads start of character ID pointer offset
ldr		r0, [r0, r1]	@Looks for a pointer
cmp		r0, #0x00		@Checks to see if a pointer exists (Not Zero)
beq		EndCode			@If there isn't a pointer, meaning no character, then end code
CheckIfDeployed:
ldr		r0, =0x0202BD60	@r0=Offset of current X position
ldrb	r0, [r0,r1]		@r0=value of current X Position plus slot
cmp		r0, #0xFF		@Check if their position is 0xFF
beq		CycleNext		@If equal, Skip
CheckCurrentHP:
ldr		r0, =0x0202BD63	@r0=Offset of current HP
ldrb	r0, [r0,r1]		@r0=value of current HP plus slot
cmp		r0, #0x00		@Check if current HP is zero
bne		EndCodeFalse	@If not, set to false and end code
mov		r2, #0x01		@If so, set true and continue to next unit

CycleNext:
add		r1, #0x48		@Allows the checking of next slot
b		CheckCharacterID

EndCodeFalse:
mov		r0, #0x00
bx lr

EndCode:
mov		r0, r2
bx lr

Edited by MarkyJoe1990
Link to comment
Share on other sites

  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

No, I assumed that already. I meant something like, say, 80% of your units are dead, or 60%. 100% sort of includes the main character...

I don't see why it's so extreme. FE8 did it with it's skirmishes, the Tower of Valni, and Lagdou ruins. You can go to each of those without your main characters and get a game over if you lose all your fielded units.

It's also helpful if you don't want your main character to cause a game over, but rather when all your fielded units die. It also allows you to not have to field your main character just so the game doesn't glitch if you DO lose all your fielded units.

Frankly, I think that getting a game over by losing a percentage of your units seems far more arbitrary. You still have units to fight with in that scenerio, so there's no reason to consider it a game over.

Edited by MarkyJoe1990
Link to comment
Share on other sites

Alright, what about most RPGs? Final Fantasy for example. Even if your main character dies, the game doesn't end unless you lose all your fielded party members.

Normally in FE, if you edit the death quotes so that the main character's death causes no game over, the game will be on an endless loop if you lose the rest of your units. This conditional code fixes that problem.

Edited by MarkyJoe1990
Link to comment
Share on other sites

You don't really die in final fantasy

you just pass out

Plus you have a bajillion phoenix downs and shit that doesn't exist in FE

When you actually die in FF (aka Aeris) you can't use a phoenix down

Edited by Zhuge Liang
Link to comment
Share on other sites

You don't really die in final fantasy

you just pass out

Plus you have a bajillion phoenix downs and shit that doesn't exist in FE

What if someone wanted to make those things exist in FE? There's no rule saying FE hacks must all have permadeath and a lord that causes a game over if s/he dies, and some people, like myself, prefer the lack of permadeath.

Edited by MarkyJoe1990
Link to comment
Share on other sites

I don't see why it's so extreme. FE8 did it with it's skirmishes, the Tower of Valni, and Lagdou ruins. You can go to each of those without your main characters and get a game over if you lose all your fielded units.

It's also helpful if you don't want your main character to cause a game over, but rather when all your fielded units die. It also allows you to not have to field your main character just so the game doesn't glitch if you DO lose all your fielded units.

Frankly, I think that getting a game over by losing a percentage of your units seems far more arbitrary. You still have units to fight with in that scenerio, so there's no reason to consider it a game over.

"Lord Eliwood, we've lost everyone except renault and karel, should we retreat?"

"Nah, keep going Marcus, it's not like Nergal's army of morphs would be able to kill three people, we've got this in the bag"

If you lose all but one unit, is that really worth continuing?

Link to comment
Share on other sites

This certainly will be useful for a certain thing...

Defend or Infinite Skirmish. Where if an unit dies, he/she falls back, until the last one is dead, causing a game over. (Might need some edit I think?)

Thank for this!

Edited by Ubel Engel
Link to comment
Share on other sites

How does this code check to see if the character is fielded? I don't see that part of the code :(

and as Cam said there are better ways to do it but if it works there's nothing to really complain about it

but I think I'll still have to make a code that checks for a certain # of characters at this rate

Link to comment
Share on other sites

"Lord Eliwood, we've lost everyone except renault and karel, should we retreat?"

"Nah, keep going Marcus, it's not like Nergal's army of morphs would be able to kill three people, we've got this in the bag"

If you lose all but one unit, is that really worth continuing?

"Lord Eliwood, we've lost everyone except Renault and Karel, should we retreat?"

"Of course not, you dolt! There's only one enemy left on the map, and he's at half health!"

Link to comment
Share on other sites

"Lord Eliwood, we've lost everyone except Renault and Karel, should we retreat?"

"Of course not, you dolt! There's only one enemy left on the map, and he's at half health!"

If you lose all but one unit, is that really worth continuing?

So sorry, three units.

Edited by Kitty of Time
Link to comment
Share on other sites

I had a feeling this thread would be loaded with more posts when I got back from work.

Anyways, after calming down and reflecting on the things I said, I feel that I got a too defensive when the usefulness of this code was questioned, and for that, I sincerely apologize. Criticism should be welcomed with open... eyes? ears? Eh. You get the idea.

That said, I understand that this kind of thing isn't going to appeal to everybody, and I've no intention of changing that. This hack was made for my own Fire Emblem hack, Fire Mumblem. I felt the code could be useful to others who similarly prefer this kind of game over condition over losing their lord (There are "revival" codes out there that would greatly compliment this code.). If you don't need it, don't download it. I don't wish to argue over it's value, so if we could please drop it, I would greatly appreciate it.

Edited by MarkyJoe1990
Link to comment
Share on other sites

So sorry, three units.

I...Don't understand what you're saying, sorry. I'm just saying that the script can be useful if you're playing a chapter where the main character isn't required to win.

Like, imagine you're fighting the Fire Dragon, and Eliwood is about to land the finishing blow, but he misses, and the Dragon scores a fluke critical. Is there any reason the remainder of your forces should be disallowed from completing the game? Or even if, say, you suck at the game and every single one of your units but Athos dies, but the Dragon is almost dead--will Athos abandon the entire chapter and let all the other dragons come in? He really shouldn't.

As for the script itself needing suggestions, I don't think it does (hence why I'm arguing like this for it XD). If there's no script currently released to get rid of permadeath (I haven't checked), though, you should make that, since it would go well with this one.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...