News:

As a consequence of the forum being updated and repaired, the chatbox has been lost.
However, you can still come say hi on our Discord server!

Main Menu

Summon damage

Started by Mion Sonozaki, 17, August, 2013, 04:40:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

leaf

Yeah, it seems like a really jumbled way to code it =3c

I also realized my secondary explanation was wrong just now when I looked at tiamat branching to atlanta >_>
I saw a bunch of same element stuff branching to each other so I thought that it worked based on that, but I guess it was really just coincidence.
[spoiler=quotes]
[9:00:50 PM] Randel Peltier: Ok...what did I do last night?
[9:01:19 PM] Kain: Something boring, repetitive, and lasted for about sixty seconds.
---
[10:45:08 AM] Salanewt: But yeah, the elemental phalluses are being... Stroked up by Saturos and co., and the energy will go towards... Mt. Muffin, where the Golden Climax will arise.
[7:28:42 PM] Salanewt: An added bonus is that Isaac and co. were trying to stop Saturos and co. because their beliefs state that Mt. Muffin should remain a virgin.
---
[9:54:21 PM] Randel Peltier: Guess the number in my head an you get to pick what I say. Number between 1-10
[9:54:28 PM] leaf: 11
[9:54:36 PM] Randel Peltier: @#$%!
---
[8:38:13 PM] Randel Peltier: Shes like this queen up on a pedastal that I have yet to court.
[8:38:29 PM] Kain: You've tried courting her.
[8:38:43 PM] leaf: and failed spectacularly
[8:38:44 PM] Randel Peltier: Ive tried...shes the best dating game ever.
---
[12:24:35 AM] Salanewt: I need to find a picture of a naked person to put on the Christmas tree next year.
---
[2:19:06 PM] Zeadra: wait... Rief's a guy???
---
[1:09:57 PM] Zeadra: well if you want to know if its a new effect or something weird, just check GS1, if side step is there maby it is the nimble dodge thing
[1:10:35 PM] Kioll: For once, you've contributed something useful.  o.O[/spoiler]

Rolina

...Is there a particular reason it has to do it like that, or is it just plain sloppy code?  Wouldn't it be easier just to assign the HP Percentile damage value the same way you would a spell's power?

Salanewt

#22
Haha, it is pretty confusing. I had to go through the whole thing again because I initially missed three of the summons when I looked through it, and even then Teawater mentioned that I messed up horribly for Ramses (which does actually branch to the 6% part like the others).

As for the code, I like the theory that the programmers were on an hourly wage rather than contractual. :happy: I'm not sure why their compilers would jumble it up this much when other areas of the game are somewhat more organized, but I can see why they didn't use a bank to assign %-based damage.

While it would be super easy to set it up in the same way as ability power, type, or so forth, it would also take up more space than it does now. Especially when you only have 33 summons (including three enemy summons and two Daedalus parts). You would have to set aside a minimum of 353 bytes (if there are no summons before [380 - Venus]), and then have some code that reads that data. Kind of like this:

If ability ID is < 380 (CMP 380)
Skip section (BLT, or branch if less than)
Subtract 380 so the first ability is equal to 0 (SUB 380)
Grab bank address (LDR Address)
Read byte (LDRB from Address + modified ID)
Branch to calculation code

Looking at the earlier code again, it kind of looks like it checks for the three enemy summons and branches to Tiamat if they match rather than just branching to the added % damage. The other two checks are for "action types," which are similar to battle commands and include using items, fleeing, counterattacking, enemy flavour text, and so forth. The checks are for x06 (summon) and x0A*. Those first few duplicate checks are basically a way to bypass this summon check, but I'm also not sure how an ability is decided to be a summon action type.

I would imagine that they could be left out if there were a bank at any rate.

*I don't think we have actually pinpointed how that one is used, but it looks like it's for general use. It is also the default placeholder action type.


To make a long story short, they did it this way to save a little space in the code because they only have 33 summons that add %-based damage, and a large majority of these are generally exclusive to the player.


Edit: Just double checked, and it turns out that the first enemy summon checks are too far away from the added damage portion of the code to be able to branch to them directly. However, they are still close enough that the second checks could have been branches instead.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?