Author Topic: Another idea  (Read 7460 times)

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #30 on: July 29, 2019, 01:08:42 pm »
So for now I've put the three gurus battle on hold until next release, I just want to get a working guest character for now.

So from the notes I see that enemies have two blocks of data actions and reactions each action is terminated with FE and the block terminated with FF.

So I set up enemy E7 as follows,  05 01 00 FE 02 (EC) (07) 00 00 00 FE FF 02 7F 03 00 FE 00 00 00 60 00 FE FF

EC Is the attack I created which it uses but only when it's the last one alive, and 07 should be the targeting (one enemy) but still shoots my party.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Another idea
« Reply #31 on: July 29, 2019, 02:36:58 pm »
Code: [Select]
07 - Farthest PC
Try 03. AI Targeting is different from PC tech targeting or enemy tech targeting.

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #32 on: July 29, 2019, 05:33:13 pm »
Ok so I have the battle ending when it's the last one alive working perfectly and it uses the attack I wanted it to but the targeting at 03 makes it only attack itself 00 and 04-09 make it attack one party member, 02 03 and anything above 09 will make it take no actions.

Also what can I change to make it move around?

For actions I have the run away code and the shoot laser code.
05 01 00 00 FE 02 7F 03 00 00 00 FE 00 00 00 00 FE 02 EC 00 00 00 00 FE FF

For reactions I have just the run away code again.
05 01 00 00 FE 02 7F 03 00 00 FE FF

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Another idea
« Reply #33 on: July 29, 2019, 06:00:20 pm »
17, 18, or 19 should work. Did you see the link on the last page to the AI documentation?

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #34 on: July 29, 2019, 11:16:16 pm »
That's it, we have the first fully working guest companion  :o

I actually did read the link, what I could understand of it was actually very helpful in organizing the data, I however did not read far enough down to see the targeting bytes and I feel kinda dumb about that  :oops:

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #35 on: July 30, 2019, 04:06:52 pm »
So I've been putting my guest on various maps and it hasn't caused much problem except that it counters when its attacked, is there anything I could put in the reactions section to make it ignore being hit?

It gets annoying when you use all enemy spells, other than that it's super fun.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Another idea
« Reply #36 on: July 30, 2019, 04:48:20 pm »
What's the full AI like?

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #37 on: July 30, 2019, 05:01:36 pm »
Ya I was thinking it might be leftover from the enemies original code, could I just fill it in with FF?

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #38 on: July 30, 2019, 06:15:07 pm »
Ok so I played with it and that doesn't seem to be it the whole reaction part of the code looks like this

05 01 00 00 FE 02 7F 03 00 00 FE FF 00 00  00 00 00 FE 00 00 00 00 00 FE 00 00 00 00 FE FF

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Another idea
« Reply #39 on: July 30, 2019, 06:25:50 pm »
You need one more value before the first FE FF in that section. I'm not entirely sure how it's handling things after that, because it's going to hit errors at that point.

If inserting an extra value doesn't fix things, give me the full AI, not just the reaction section.

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #40 on: July 30, 2019, 06:33:44 pm »
Not sure what value to add, I did 7F 03 00 (06) FE FF and nothing changed the full actions are in post 32, I'll keep playing with it to see if anything changes.

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #41 on: July 30, 2019, 06:38:57 pm »
Forget what I just said, I put a few more 00 00 00 00 FEs before the FF and that did it

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1763
  • Nu-chan
    • View Profile
    • Maurtopia
Re: Another idea
« Reply #42 on: July 30, 2019, 08:21:54 pm »
Here's the basic AI structure.

Condition FE
Action FE
FF
Condition FE
Action FE
FF

The first block is action, and the second is reaction. Conditions are always 4 or 8 bytes long, actions vary in length and can have as many per block as you want, unless you start with the randomizer, in which case there must be 4 to choose from.


05 01 00 00 FE 02 7F 03 00 00 FE FF 00 00 00 00 00 FE 00 00 00 00 00 FE 00 00 00 00 FE FF

In this section here, the bolded is being read as the displayed message for the Guest's final attack. It then hits an unexpected FF, which based on the Red Beast's behavior, should cause it to end the section.

In the red, there's a 5 byte action, so it'll get lopsided there, but it should have ended prior to that.

I'd double check all lengths in your commands to make sure they're right.

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #43 on: July 30, 2019, 10:53:52 pm »
Ok that clarifies things a bit, I can probably refine it a little now.

IHBP

  • Architect of Kajar
  • Chronopolitan (+300)
  • *
  • Posts: 379
    • View Profile
Re: Another idea
« Reply #44 on: August 08, 2019, 01:54:40 pm »
I figured out what the problem I was having with barrier was, I was testing it on Nu Spekkio and he has a reduce to 1 HP move, I forgot those cancelled barrier and protect.