Wc3C.net (http://www.wc3c.net/forums.php)
-   AMAI (http://www.wc3c.net/forumdisplay.php?f=601)
-   -   1.24 Broke AMAI it seems :< (http://www.wc3c.net/showthread.php?t=107061)

Zalamander 08-06-2009 12:47 PM

1.24 Broke AMAI it seems :<
Have got reports of bugs like, no player slots appear for 12 player maps if AMAI is installed(probably changes in Blizzard.j need updating)

But seems AI crashes and doesnt do anything at all(Most likely updates in common.ai needed as well)

moyack 08-06-2009 01:39 PM

AS far as I remember, AMAI uses return bug, which could be the cause of this issue.

[nVp]Zitrax 08-06-2009 06:28 PM

When patch 1.23 came out, some friends of mine reported to me the same thing.
It was fixed by SM in no time.

So I decided to test this bug for the new patch, I downloaded AMAI once again for the new 1.24 (totally useless patch in my opinion) and yeah, the same bug occur -> no player slots appear for ALL of the maps.I guess SM will need to work on this one too.But I don't see the point since everyone in here are waiting for the new 3.0 version.

Best Wishes,

Zalamander 08-06-2009 09:05 PM

Its much wors this time since I know AMAI uses the return bug exploit, a lot all over the place.

AIAndy loved using it at least I remember while we were developing it.

Strategy Master 08-07-2009 07:55 PM

Missing player slots is because blizzard.j file has changed so not using the commander will fix that, but of course the return bug is used intensivly within the AI so it will not do anything in game as it crashes even if you dont use the commander.

I will be working on fixing this as soon as possible. But it will take a while because i might most likely have to go line by line throughout the entire AI.

Zalamander 08-08-2009 08:00 AM

I've been trying to contact AIAndy about this since im pretty sure he can come up with a perl script that can parse the entire script and replace all uses of return bug with the new native function needed.

At least I think thats possible.

azaleA 08-08-2009 03:37 PM

I haven't used AMAI since 1.21. Now i wanted to test the latest version, but somehow it does not work. I dunno whether it is 1.24 which breaks AMAI for me. I used 2.54PE and tried to install AMAI on Terenas Stand. The problem: If I install the Blizzard.j too, I'm not able to execute or even host that map (it just returns to the menu where u can chose maps again and it doesn't start properly). If i don't Blizzard.j on this map, it starts but the AI does nothing (It just mines gold). Can someone help me please? Thanks in advance.

azaleA 08-08-2009 03:47 PM

It was about 2 years ago that I used AMAI, but it was really great. Now i wanted to test AMAI 2.54PE on 1.24 but it doesn't work. I tried both installations on Terenas Stand, once with blizzard.j and once without. When host the map with blizzard.j, it just won't start but returns back to the menu where u can chose maps again. And the installation without blizzard.j completely fails because the map starts but the AI doesn't do anything. I dunno where the problem. Can someone help me? Thx

I'm really looking to using the the complete AMAI 3.0 version. Hopes this version works for me.

Strategy Master 08-08-2009 07:08 PM

hmmm. Replacing h2I references with gethandleid is easy enough.

Its just whether or not any other functionality breaks in AMAI which will be the tricky bits or any unexpected return bug uses elsewhere.

Unsure how easy it is to just have a perl script to catch any such problems. Anyway i'll currently doing that simple replacement and updating native lists to 1.24. I'll get back to you on how that goes and if AMAI comes back to life.

Edit: Ok that didn't work. Dunno if I can use zoxc's jass compiler to find some return bugs?
Edit2: Zoxcs jass parser picking up a few things so i'll try fixing those and see how it goes.

@azaleA: Its not compatabile with latest warcraft patch for many reasons i'm afraid. No simple quick fixes on offer either.

Strategy Master 08-08-2009 08:16 PM

AMAI passes both pjass and JassParserCLI and H2I changed to GetHandleId and String2Int changed to StringHandle and still fails so now comes the hard bit.

How to get the world editor compiler to check the scripts?

Strategy Master 08-08-2009 10:30 PM

Some good news. I've managed to get AMAI to run within 1.24 with some thanks to the wc3c members\Vex.

But Bad news as well. The Commander system is ... well borked (no dialog popup) and throwing out pure gobbly gook when chatting. Also have got tremendous lag occuring every 5 mins. Other than that though its fine :P

Zalamander 08-08-2009 11:09 PM

Hmm did you take a 1.24 Blizzard.j and tried moving AMAI parts in there instead? since the original of that file has lots of new changes in 1.24 I think Blizzard them self even used return bug in the 1.23 one? :/

Found a few new functions when I ran a file compare.

Strategy Master 08-08-2009 11:21 PM

1 Attachment(s)
@Zal: Yes I have and had to (without choice) so that the player option screen shows up. Blizzard.j errors are what cause the no player options issue. Common.ai errors just crash the ai in game.

Anyhow i think the lag is fixed when the commander is used. without the commander the lag comes back (well according to my tests but that only affects player edition). Anyway i'll upload the simple edition exe compiled so far for 1.24.

Feel free to test. Hopefully the lag is gone but AMAI dialogue is not yet fixed.
I had a feeling the dialogue might screw up though because it was very reliant on conversion from string to int back to strings. Might need to use the hashtable's instead of gamecache to solve this issue, but i plan to replace gamecache usage with hashtable usage anyway eventually.

azaleA 08-09-2009 12:27 PM

Thanks for the 1.23 support. I will try it. But one question: Why can't I see my posts? I thought my registration is done properly?

Strategy Master 08-09-2009 02:44 PM

I've had a look at the AMAI dialogue. The code responsible for the language mess is in the common.ai file.


function LookupCT takes string s returns string
  local integer i = StringHash(s)
  return char_table[i - (i/JASS_MAX_ARRAY_SIZE)*JASS_MAX_ARRAY_SIZE]

function AddToCT takes string s returns nothing
  local integer i = StringHash(SubString(s, 0, 1))
  set char_table[i - (i/JASS_MAX_ARRAY_SIZE)*JASS_MAX_ARRAY_SIZE] = s

Obviously StringHash replaces the return bug usage to convert strings to ints but its resulting in gobbly gook dialogue. Converting to hashtable just results in AMAI displaying every message stored all at once (but without any text corruption). Fixing the array formula of char_table so its not effectivly always 0 results in no dialogue at all being displayed.

Most likely the problem is StringHash does something different to the old return bug from string to integers and another bug which the conditional system took advantage of has been squashed. The worst case scenario is language conditional responses will have to be scrapped. The actual translation system appears to be working correctly though.

All times are GMT. The time now is 09:19 PM.

Powered by vBulletin (Copyright ©2000 - 2020, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services