Author Topic: Battle Order is out of whack  (Read 4076 times)

Y.Zabiru

  • *
  • Posts: 15
    • View Profile
Battle Order is out of whack
« on: 2010-06-01 19:50:39 »
Using Hojo, I increased the HP/MP and all general stats to compliment the 9999 HP/MP/DAMAGE limit breaker patch.

I updated the kernel, and i saved the scene.bin file, and now instead of Sample: H0512 and H0512-OPT I faced the Hundred Gunner in the elevators instead.

How can I restore the order of battles, or am i screwed and have to reinstall everything again?

Bosola

  • Fire hazard!
  • *
  • Posts: 1752
    • View Profile
    • My YouTube Channel
Re: Battle Order is out of whack
« Reply #1 on: 2010-06-01 20:12:30 »
Use ProudClod's Kernel look-up feature. It should come into play every time you save a SCENE with PC.

Also, without wanting to sound condescending - you did remember to reinsert both SCENE and KERNEL.BINs, right?

Y.Zabiru

  • *
  • Posts: 15
    • View Profile
Re: Battle Order is out of whack
« Reply #2 on: 2010-06-01 20:32:48 »
do what now..? speak simple-person english.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Battle Order is out of whack
« Reply #3 on: 2010-06-01 21:15:05 »
Bosola has this habit of assuming that people know what he's talking about. ;)

He's saying to use Proud Clod's ability to adjust the KERNEL.BIN. I'm pretty confident in it. When he's talking about reinserting the SCENE and KERNEL.BIN he means back into a PSX ISO if you're using that.

Y.Zabiru

  • *
  • Posts: 15
    • View Profile
Re: Battle Order is out of whack
« Reply #4 on: 2010-06-01 23:33:11 »
how do you adjust the Kernel.bin with proud clod? Also, i'm just using the PC Version.

i reinstalled, after rescuing my saves, but i really do want to be able to give bosses significantly more HP and stats withotu screwing up the scene order. so how does a simple person like me go about doing that beyond using Hojo?

secondadvent

  • *
  • Posts: 287
    • View Profile
Re: Battle Order is out of whack
« Reply #5 on: 2010-06-02 00:32:29 »
PrC IIRC updates your kernel once you save your scene.bin (a popup comes and asks you if you want to update the kernel, which happens when it notices the lookup table is out of date). I would suggest using Hojo to do it, unless you are specifically going to use PrC at some point, otherwise you would be downloading PrC for something that Hojo can already do (not to say you shouldn't use PrC, but Hojo is the only one of the two that allows you to simply change the enemy stats... someone needs to accidentally render Hojo obsolete since most of the other old mods/tools have had the same happen to them, and for good reasons :roll:).

Hojo's way to fix the Kernel lookup data is done by going to File->Update Kernel File... and finding your kernel.bin in the FF7/Data/Kernel directory, and it should automatically update that file based on your current Scene.bin changes. You should probably update the kernel from now on, after every time you save your scene.bin in Hojo, just to be safe so that instances like that don't happen again :P. If you need to use PrC for anything though, you will not need to remember to update the kernel, another reason Hojo should become fully outdated (or Hojo should get a way to automatically do this, but I still say an all-in-one program for the scene.bin would be full of win).

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Battle Order is out of whack
« Reply #6 on: 2010-06-02 03:25:52 »
PrC IIRC updates your kernel once you save your scene.bin (a popup comes and asks you if you want to update the kernel, which happens when it notices the lookup table is out of date). I would suggest using Hojo to do it, unless you are specifically going to use PrC at some point, otherwise you would be downloading PrC for something that Hojo can already do (not to say you shouldn't use PrC, but Hojo is the only one of the two that allows you to simply change the enemy stats... someone needs to accidentally render Hojo obsolete since most of the other old mods/tools have had the same happen to them, and for good reasons :roll:).

Hojo's way to fix the Kernel lookup data is done by going to File->Update Kernel File... and finding your kernel.bin in the FF7/Data/Kernel directory, and it should automatically update that file based on your current Scene.bin changes. You should probably update the kernel from now on, after every time you save your scene.bin in Hojo, just to be safe so that instances like that don't happen again :P. If you need to use PrC for anything though, you will not need to remember to update the kernel, another reason Hojo should become fully outdated (or Hojo should get a way to automatically do this, but I still say an all-in-one program for the scene.bin would be full of win).

That's in the works. And a manual KERNEL.BIN update is going to exist in the next version.

Gemini

  • *
  • Posts: 260
  • Not learner's Guru
    • View Profile
    • Devil Hackers
Re: Battle Order is out of whack
« Reply #7 on: 2010-06-02 05:10:08 »
Semi offtopic, but you should also add an option to rebuild the lookup tables used when the Sort->Name voice is invoked in the item menu. I haven't seen yet a tool able to do that, even tho it's pretty simple to achieve. :( This is my code for doing this operation, just to save you some time coding it:
Code: [Select]
typedef struct tagItemEntry
{
int id;
GString name;
} ITEM_ENTRY;

void SortDictionary(std::vector<ITEM_ENTRY> &data)
{
int a,b;
ITEM_ENTRY temp;
int sortTheStrings=(int)data.size()-1;

for(a=0; a<sortTheStrings; ++a)
{
for(b=0; b<sortTheStrings; ++b)
{
if(wcscmp(data[b].name,data[b+1].name)>0)
{
temp=data[b];
data[b]=data[b+1];
data[b+1]=temp;
}
}
}
}

void StripComments(GString in, GString &out)
{
for(int i=0; i<in.GetLength(); i++)
{
if(in[i]==_T('/') && in[i+1]==_T('/')) // found a comment
{
int j;
// skip line entirely
for(j=0; ; j++) if(in[i+j]==_T('\r')) break;
if(in[i+j+1]==_T('\n')) j++;
i+=j;
}
else out.Append(in[i]);
}
}

void FixSortItemMenu()
{
u8 *buffer;
std::vector<ITEM_ENTRY> data;
ITEM_ENTRY entry;
TCHAR *list[]=
{
_T("..\\..\\script\\kernel\\items.txt"),
_T("..\\..\\script\\kernel\\weapons.txt"),
_T("..\\..\\script\\kernel\\armors.txt"),
_T("..\\..\\script\\kernel\\accessories.txt")
};
u16 counters[]={0,128,256,256+32};

int fsize=StoreFile(_T("..\\..\\MENU\\ITEMMENU.MNU"),buffer);
for(int i=0; i<4; i++)
{
CText text(list[i]);
for(int j=0, id=counters[i]; j<text.GetCount(); j++, id++)
{
entry.id=id;
entry.name.Empty();
StripComments(text.GetString(j),entry.name);
data.push_back(entry);
}
}

SortDictionary(data);
u16 *dest=(u16*)(buffer+0x37B8);
for(int i=0; i<(int)data.size(); i++) dest[data[i].id]=i;
FlushFile(_T("..\\..\\MENU\\ITEMMENU.MNU"),buffer,fsize);

delete[] buffer;
}
Shouldn't be too hard to adapt it to C# and your internal framework.
« Last Edit: 2010-06-02 05:13:31 by Gemini »