Skip to content

Instantly share code, notes, and snippets.

@SydMontague
SydMontague / decodereqs
Created December 12, 2021 19:39
Decode Requirements
ID 1
QUOTA 0 QUOTA QUOTA QUOTA 0
ID 2
QUOTA 0 QUOTA QUOTA QUOTA 0
ID 3
QUOTA 0 QUOTA QUOTA QUOTA 0
ID 4
@SydMontague
SydMontague / calculateDamage.c
Created October 28, 2021 13:44
Digimon World damage formula
int calculateDamage(DigimonEntity *attacker,DigimonEntity *defender,int moveId)
{
byte factors [4];
int damage;
Special attackSpecial = MOVE_PARAM[moveId].special;
for (int i = 0; i < 3; i += 1) {
Special victimSpecial = DIGIMON_PARA[(defender->entity).type].special[i];
factors[i] = victimSpecial == 0xff ? 10 : TYPE_FACTORS[attackSpecial][victimSpecial];
}
package de.phoenixstaffel.decodetools.keepdata;
import de.phoenixstaffel.decodetools.core.Access;
public class Digimon {
private short id;
private short unk1;
private short evoListPos;
private Level level;
private Attribute attribute;
====== Monochromon's Shop ======
Customers:
3/9 - Goburimon
3/9 - Gotsumon
2/9 - Weedmon
1/9 - Muchomon
==== Goburimon ====
35% Meat
50% Port. Potty
@SydMontague
SydMontague / rdreqs.txt
Created June 6, 2020 13:25
Digimon World Re:Digitize Evolution Requirements
ID 1 7400
QUOTA 0 QUOTA QUOTA QUOTA 0
ID 2 7410
QUOTA 0 QUOTA QUOTA QUOTA 0
ID 3 7420
QUOTA 0 QUOTA QUOTA QUOTA 0
ID 4 7430
MMD Animation Section
Pointer Table (4 bytes offset from the section start)
<Animation>
uint16_t -> frameCount + hasScale (MSB 1 -> hasScale)
<for each Node, except Root>
Scale (3x fixed point 16-bit | optional, only when hasScale is set)
Location (3x int16_t)
Rotation (3x fixed point 16-bit)
<instructions>
read in words, with 4-bit opcode
00 FF FF
01 FF 00
02 00 01
03 01 02
04 02 03
05 FF 02
06 04 05
07 05 06
08 06 07
09 FF 02
void setFoodTimer() {
if(digimonLevel == 1) { // Fresh, next even hour
r2 = ((currentHour / 2) + 1) * 2
if(r2 > 24)
r2 -= 24
store(r2, 0x13849A)
}
else if(digimonLevel == 2) { // In-Training, next by 3 dividable hour