Valkama

FE4 Ranked LTC (Chapter 6 Completed!)

32 posts in this topic

Posted (edited)

On 7/28/2017 at 9:02 PM, lang_tu_syd said:

It's a pleasure to watch. I guess it took a lot of planning for you to have these precise moves to get the LTC possible. 

Have you ever thought about putting in commentary to explain your moves? It would be great to understand your thoughts and reasoning behind it.

I'm not sure if I will. I might go back a later date and go over them again with commentary but as of right now there are no plans for it.

Edited by Valkama

Share this post


Link to post
Share on other sites

Posted (edited)

Chapter 4 is done: 

Spoiler



 

Probably one of the easiest chapters in the game, it's more of a movement puzzle than anything. The jealousy formation at the start nets +10 to Claud/Adean, +10 to Lewyn/Erin, +5 to Midir/Brigid, +5 to Ayra/Lex and also funnily enough +5 to Claud/Brigid(Doesn't matter). It looks like I'm going to overshoot my goal of 500 levels in Gen 1 which is nice because it means I don't need as many levels gen 2 when there is more experience to go around.

Edited by Valkama

Share this post


Link to post
Share on other sites

Gen 1 is Done! First I made some minor changes to Chapter 4:

Spoiler

 

The differences are Sylvia and Erin trigger their conversation and Dew drops 6k on Sylvia.

And now Chapter 5:

Spoiler

 

I ended up getting 520 levels total which was a lot more than I was expecting. I got pretty much all the inheritance I wanted (Although I had to dump 25k on the Tyrfing :/). Well off to Gen 2!

 

Share this post


Link to post
Share on other sites

Apparently Leif's inheritance doesn't work the same as everyone else. His inventory gets reorganized into a specific order. This is a problem cause I need him to start with the return ring. I'll just sell off some of the lower value swords and replay through chapter 4 and 5 real fast as I still have the routes written down so it should be quick although this is kinda annoying.

Share this post


Link to post
Share on other sites
On 4/20/2017 at 11:29 PM, Valkama said:

I found out how RNG was calculated and wrote a C++ program to predict future Random Numbers. Then the program would plug those numbers into another program that I wrote which functioned more as an Arena simulator of sorts and had it spit back how many Random Numbers I would have to burn in order to get an Arena clear I wanted. Essentially the program just does the trial and error for me. I haven't been able to use it outside of the Arena though because enemy AI is weird.

That sounds quite complicated, don't know if this is asking too much but would you mind giving some instructions and the programs to manipulate the RNs. Thank you.

Share this post


Link to post
Share on other sites
8 hours ago, lang_tu_syd said:

That sounds quite complicated, don't know if this is asking too much but would you mind giving some instructions and the programs to manipulate the RNs. Thank you.

Well the code isn't super user friendly as it was designed for me to use and me only but here you go.

This is the main RNG generator. It generates numbers in the same way FE4 generates numbers up to position 1000010.

Spoiler

#include <iostream>
using namespace std;

int main()
{
 int RNGTABLE[1000010];
 RNGTABLE[1]=16;
 RNGTABLE[2]=14;
 RNGTABLE[3]=32;
 RNGTABLE[4]=14;
 RNGTABLE[5]=82;
 RNGTABLE[6]=40;
 RNGTABLE[7]=69;
 RNGTABLE[8]=97;
 RNGTABLE[9]=49;
 RNGTABLE[10]=89;
 RNGTABLE[11]=16;
 RNGTABLE[12]=84;
 RNGTABLE[13]=93;
 RNGTABLE[14]=35;
 RNGTABLE[15]=72;
 RNGTABLE[16]=40;
 RNGTABLE[17]=88;
 RNGTABLE[18]=81;
 RNGTABLE[19]=36;
 RNGTABLE[20]=43;
 RNGTABLE[21]=51;
 RNGTABLE[22]=79;
 RNGTABLE[23]=65;
 RNGTABLE[24]=18;
 RNGTABLE[25]=60;
 RNGTABLE[26]=85;
 RNGTABLE[27]=54;
 RNGTABLE[28]=20;
 RNGTABLE[29]=48;
 RNGTABLE[30]=52;
 RNGTABLE[31]=52;
 RNGTABLE[32]=54;
 RNGTABLE[33]=79;
 RNGTABLE[34]=25;
 RNGTABLE[35]=94;
 RNGTABLE[36]=24;
 RNGTABLE[37]=39;
 RNGTABLE[38]=73;
 RNGTABLE[39]=31;
 RNGTABLE[40]=84;
 RNGTABLE[41]=49;
 RNGTABLE[42]=95;
 RNGTABLE[43]=74;
 RNGTABLE[44]=80;
 RNGTABLE[45]=74;
 RNGTABLE[46]=60;
 RNGTABLE[47]=12;
 RNGTABLE[48]=13;
 RNGTABLE[49]=17;
 RNGTABLE[50]=73;
 RNGTABLE[51]=92;
 RNGTABLE[52]=12;
 RNGTABLE[53]=6;
 RNGTABLE[54]=83;
 RNGTABLE[55]=10;
 int b = 1;
 int n = 0;
 do
 {
    n=b*55;
 for(int i = 1; i<56; i++)
    {
        if (i<24)
        {
            RNGTABLE[i+n]=RNGTABLE[i+n-55]-RNGTABLE[i+n-55+31]-1;
        }
        else
        {
            RNGTABLE[i+n]=RNGTABLE[i+n-55]-RNGTABLE[i+n-24]-1;
        }
        if (RNGTABLE[i+n] < 0)
        {
            RNGTABLE[i+n]=RNGTABLE[i+n]+100;
        }
    }
 b+=1;
 }
 while(b<18182);

 

 

return 0;
}

Here is what I use to find the position I'm in. Put this in the space between "while(b<18182)" and "return 0;":

Spoiler

 

//rn finder
int rn=1;
int rnc=1;
int found=0;
int rnone=16;
int rntwo=14;
int rnthree=32;

do
{
    rnc=rn;
    if (RNGTABLE[rnc] == rnone)
    {
        rnc+=1;
        if (RNGTABLE[rnc] == rntwo)
        {
            rnc+=1;
            if (RNGTABLE[rnc] == rnthree)
            {
                found = 1;
            }
        }
    }
    rn+=1;
}
while(found==0);

 

Here is what I use the print the information I want. Put this after the last code but before "return 0;":

Spoiler

cout<< "True Position: " <<rn-1<<endl;
cout<< "Relative Position: " <<(rn-1)%55<<endl;
cout<< "Displayed: " <<(rn-1)%55<< " " <<RNGTABLE[rn-1]<<endl;
cout<< "Next 4 Values: " <<RNGTABLE[rn]<< " " <<RNGTABLE[rn+1]<< " " <<
RNGTABLE[rn+2]<< " " <<RNGTABLE[rn+3]<< " " <<endl;

Under the second code, the variables rnone, rntwo, and rnthree can be editted to whatever are the next 3 RN values. This should find out what position you are in. It prints out the next several numbers just as verification that it found the correct spot, I've never see the generator find a duplicate 3 RN chain(First one I found when seeing if they existed was at around position 850 thousand) but if you do just change the variable rn to the number after the false position and it will skip it.

For the arena I don't have a set in stone code as it needs to be modified depending on player/enemy skills and whatnot but assuming no skills are in place and the player is faster this would work. This code should go in place of the position finding code:

Spoiler

//BATTLE SIMULATION
int ed, pd, eh, ph, epmax, ppmax, pp, ep, rn, rnc;
ed=10; //enemy damage dealt
pd=10; //player damage dealt
eh=70; //enemy hit rate
ph=70; //player hit rate
epmax=30; //enemy max hp
ppmax=30; //player max hp
rn=1; //starting position
do
{
    rnc=rn;
    pp=ppmax;
    ep=epmax;

do
{
//combat cycle

//player attack
if (pp > 0)
{
if (RNGTABLE[rnc] < ph)
    {
        ep-=pd;
    }
    rnc+=1;
}
//enemy attack
if (RNGTABLE[rnc] < eh)
{
    pp-=ed;
}
rnc+=1;
}
while(ep > 0 and pp > 0);

rn+=1;
}
while(ep>0);

Again this code is pretty barebones and more exists for me to use as you need some amount of coding knowledge to use it. I have contemplated making it more user friendly and actually compiling it into a program to distribute but as of right now this is what I use.

Share this post


Link to post
Share on other sites

Chapter 6:

Spoiler

 

Pretty easy chapter. The most annoying thing about it is how there is no arena so I have to sometimes do sub optimal moves to get RNG correct for the less reliable boss kills(Thanks Great Shield!). Managed to get both the steel sword and light sword to crit so now I have 4 crit weapons. Looking ahead at chapter 7 Leif did start with the return ring so everything is good!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.