Registrarse

[pokeruby - pokeemerald] Sobrevivir al envenenamiento en el overworld con 1 PS

Lunos

Enfrentando a La Organización
Miembro insignia
Port a Pokeemerald:
https://whackahack.com/foro/441347-post5.html

POST ORIGINAL:
Holi. Con esta guia de instrucciones no explicadas este tutorial aprenderemos a modificar el envenenamiento en el overworld para que actue como en Pokémon D/P/Pt/HG/SS.
Los creditos van para el buen @BluRose quien escribió el tutorial justo aqui.
Sin mas que decir, comencemos.

Requisitos:
-Leer mi tema de introducción a Pokeruby.
-Editor de texto (yo usaré Notepad++)

Instrucciones:
1) Abrimos pokeruby\src\field_poison.c con nuestro editor de texto.
Ctrl+F "static void FaintFromFieldPoison(u8 monIndex)" y veremos lo siguiente:
static void FaintFromFieldPoison(u8 monIndex)
{
struct Pokemon *mon = &gPlayerParty[monIndex];
u32 status = 0;

AdjustFriendship(mon, FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE);
SetMonData(mon, MON_DATA_STATUS, &status);
GetMonData(mon, MON_DATA_NICKNAME, gStringVar1);
StringGetEnd10(gStringVar1);
}​
Vamos a convertir en comentario la Linea #6, poniendole 2 barras diagonales al inicio, tal que asi:
//AdjustFriendship(mon, FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE);​
2) Ctrl+F "static bool32 MonFaintedFromPoison(u8 monIndex)" y veremos lo siguiente:
static bool32 MonFaintedFromPoison(u8 monIndex)
{
struct Pokemon *mon = &gPlayerParty[monIndex];

// UB: Too few arguments for function 'GetMonData'
if (IsMonValidSpecies(mon) && GetMonData(mon, MON_DATA_HP) == 0
&& GetPrimaryStatus(GetMonData(mon, MON_DATA_STATUS)) == STATUS_PRIMARY_POISON)
return TRUE;
else
return FALSE;
}​
Simplemente cambiamos el "0" en la Linea #6 por un "1", tal que asi:
if (IsMonValidSpecies(mon) && GetMonData(mon, MON_DATA_HP) == 1​
3) Ctrl+F "s32 DoPoisonFieldEffect(void)" y veremos esto:

s32 DoPoisonFieldEffect(void)
{
struct Pokemon *mon = &gPlayerParty[0];
u32 numPoisoned = 0;
u32 numFainting = 0;
int i;

// count the number of mons that are poisoned and fainting from poison,
// and decrement HP of all poisoned mons
for (i = 0; i < PARTY_SIZE; i++)
{
u32 hp;

if (GetMonData(mon, MON_DATA_SANITY_BIT2) != 0
&& GetPrimaryStatus(GetMonData(mon, MON_DATA_STATUS)) == STATUS_PRIMARY_POISON)
{
// decrement HP of poisoned mon
hp = GetMonData(mon, MON_DATA_HP);
if (hp != 0)
hp--;
if (hp == 0)
numFainting++;
SetMonData(mon, MON_DATA_HP, &hp);
numPoisoned++;
}
mon++;
}
if (numFainting != 0 || numPoisoned != 0)
FldeffPoison_Start();
if (numFainting != 0)
return 2;
if (numPoisoned != 0)
return 1;
return 0;
}​
Muy sencillo, cambiamos esos 2 ceros en las Lineas #19 y #21 por 2 unos, tal que asi:
if (hp != 1)
hp--;
if (hp == 1)​
4) Abrimos pokeruby\data\event_scripts.s con nuestro editor de texto.
Acto seguido buscamos con Ctrl+F "fieldPoisonText_PokemonFainted" y veremos esto:
fieldPoisonText_PokemonFainted:: @ 81A1132
.string "{STR_VAR_1} fainted...\p$"​
Lo reemplazamos por esto y guardamos los cambios:
fieldPoisonText_PokemonFainted:: @ 81A1132
.string "{STR_VAR_1} survived the poisoning.\n"
.string "The poison faded away!\p$"​
Alternativamente, lo pueden reemplazar por el mensaje en Español:
fieldPoisonText_PokemonFainted::
.string "¡{STR_VAR_1} sobrevivió al\n"
.string "envenenamiento! ¡El veneno ha\l"
.string "desaparecido!\p$"​
5) C:\cygwin64\cygwin.bat
cd pokeruby
make

Aquí una muestra del resultado:


Y ya está.​
 
Última edición:

MetalKaktus

A la luz del quinto día, mira al este
Miembro insignia
Odio que tu Pokémon se quede a un PS y sobreviva al veneno, en mis tiempos las cosas no eran así. Me parece un mal sistema a implementar.

Opiniones aparte es un buen aporte que a más de uno les servirá. A si que muchas gracias por traernos esto al foro @Lunos

Poco a poco pokeruby se va convirtiendo en una base más estable.
 
Arriba