Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 7:18 pm
All times are UTC + 0
New faction AI crashing on game start, log uninformative.
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
TTFTCUTS
Vehicle Driver


Joined: 27 Sep 2015

PostPosted: Sun Sep 27, 2015 2:54 am    Post subject:  New faction AI crashing on game start, log uninformative. Reply with quote  Mark this post and the followings unread

I've been working on putting together a "Boss AI" type mod where a group of players have to work together to take down a souped up AI with all three vanilla factions' units and structures, plus a few of their own (mostly NYI).

All the clones of the base structures (BOSS[building name] e.g. BOSSGAPOWR) are in place, as well as a custom MCV (BMCV). When the game starts with them as an AI, it crashes. The log doesn't give any specifically helpful info from what I can tell, though I think the error address 004F671D is the Ares version of "can't build something in base planning"?

I haven't been able to work out why it's happening, though. Every category that I can find has a appropriate 4th side structures in there, and all of them have BossCountry in their owners field and AIBasePlanningSide=3.

Attached are the rulesmd.ini and log files. I've probably overlooked something dumb but I've pretty much reached the point of head-desking now after spending ~5 hours going over it again and again with no success.

Edit, since I forgot earlier: The problem was that I had the country listed after the special countries. Moving it up the list fixed the crash. The tutorial I worked from mentioned having the side in the right place in the listing (but didn't mention that incorrect placement would cause an IE), but didn't suggest that the country position also mattered.



debug.log
 Description:

Download
 Filename:  debug.log
 Filesize:  10.66 KB
 Downloaded:  5 Time(s)


rulesmd.ini
 Description:

Download
 Filename:  rulesmd.ini
 Filesize:  809.36 KB
 Downloaded:  3 Time(s)


Last edited by TTFTCUTS on Mon Oct 12, 2015 9:23 pm; edited 1 time in total

Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Sun Sep 27, 2015 9:21 am    Post subject: Reply with quote  Mark this post and the followings unread

004F671D indeed means the house cannot build something, in this case anything from BuildWeapons.

_________________

Back to top
View user's profile Send private message
TTFTCUTS
Vehicle Driver


Joined: 27 Sep 2015

PostPosted: Sun Sep 27, 2015 1:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

AI section:
Code:
BuildWeapons=GAWEAP,NAWEAP,YAWEAP,BOSSYAWEAP,BOSSGAWEAP,BOSSNAWEAP


BOSSYAWEAP:
Code:
Owner=BossCountry
AIBasePlanningSide=3
Prerequisite=PROC,BARRACKS


Prerequisite block:
Code:
PrerequisitePower=GAPOWR,NAPOWR,NANRCT,YAPOWR,BOSSGAPOWR,BOSSNAPOWR,BOSSYAPOWR;gs NAAPWR
PrerequisiteFactory=GAWEAP,NAWEAP,YAWEAP,BOSSYAWEAP,BOSSNAWEAP,BOSSGAWEAP,BOSSGAWEAP2,BOSSNAWEAP2,BOSSYAWEAP2,BOSSGAWEAP3,BOSSNAWEAP3,BOSSYAWEAP3
PrerequisiteBarracks=NAHAND,GAPILE,YABRCK,BOSSYABRCK,BOSSGAPILE,BOSSNAHAND,BOSSNAHAND2,BOSSGAPILE2,BOSSYABRCK2
PrerequisiteRadar=GAAIRC,NARADR,AMRADR,NAPSIS,BOSSGAAIRC,BOSSNARADR,BOSSAMRADR,BOSSNAPSIS
PrerequisiteTech=GATECH,NATECH,YATECH,BOSSYATECH,BOSSNATECH,BOSSGATECH
PrerequisiteProc=GAREFN,NAREFN,YAREFN,BOSSYAREFN,BOSSNAREFN,BOSSGAREFN
PrerequisiteProcAlternate=SMIN;gs still counts under a PROC listing


So the factory is in BuildWeapons, all the prerequisite fields have boss stuff in them, the factory requires PROC and POWER, and has the right owner and build side... I don't see why it's failing :/

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Sep 28, 2015 7:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Adding "BOSS" to the beginning of the names makes them to long, they should be less then 8 letters long. It also breaks the theatre logic which changes the second letter (A is most cases) depending on what theatre you are playing on & loads the corresponding artwork.

Changing them to GABWEAP & NABHAND etc might fix it, you should also double check their entries for typos & make sure they are all listed under [BuildingTypes].

_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Sep 28, 2015 7:16 am    Post subject: Reply with quote  Mark this post and the followings unread

I'm not sure whether that is correct.
This is straight from YRPP.

It states that an ID can have 24 characters:
Code:
char ID [0x18];

Considering this is using Ares, I assume that isn't the problem?
How about you dump all the parsed types to debug.log and upload it here, then we can verify that it is the cause.

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Sep 28, 2015 7:40 am    Post subject: Reply with quote  Mark this post and the followings unread

I've seen many people say that 8 characters is the recommended limit over the years, if it's just a community myth tho I'd be happy to be proven wrong.

_________________



Last edited by Mig Eater on Mon Sep 28, 2015 7:54 am; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Mon Sep 28, 2015 7:45 am    Post subject: Reply with quote  Mark this post and the followings unread

I think we'd have to wait for AlexB, GraionDilach or CCHyper to confirm this then hehe.
ModEnc even states it could have 31 characters, though I take it YRPP is more up to date.

_________________


Mental Omega 3.0 Mission creator - Creator of FinalOmega: APYR 3.0 Map Editor

/ppm/'s stupidity

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Sep 28, 2015 12:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
I've seen many people say that 8 characters is the recommended limit over the years, if it's just a community myth tho I'd be happy to be proven wrong.

It depends on the Type on which you use it.
ParticleSystems, Weapons and other pure ini codes (no files) can have ID's longer than 8 chars.
But for everything that uses files i always use 8 chars or less, since filenames are often restricted to 8 chars due to the games roots in DOS. "Often" since there can be exceptions too, but i find it the most secure way to simply make all filenames 8 chars or less.

e.g. TI had massive trouble in the past with filenames for terrain being longer than 8 chars.

Buildings and units can work fine at first glance with longer filenames, though i would expect trouble when 2 long files only differ in the ending.
e.g.
MYVEHICLEA.VXL
MYVEHICLEB.VXL
in theory the game could shorten them to DOS filenames like
MYVEHICL.VXL
MYVEHICL.VXL
and thus don't find the correct files anymore.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
TTFTCUTS
Vehicle Driver


Joined: 27 Sep 2015

PostPosted: Mon Sep 28, 2015 1:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's the log with the dumped type data. Interestingly it says the American AI can't build anything from powerplants, but it seems to be working normally.

Also it's worth noting that as far as I can tell all of the buildings and stuff do work, you can build them all when you play as the boss side. I'm not sure that theatre logic is relevant for unit names either, except for passing through to art? The tesla coil is just "TESLA" after all, and several other names are similar.

If the names ARE an issue, then I think it's on the AI side somehow, in which case I'll change them.

Edit: Come to think of it, the American AI warning is probably because I didn't remove the other owners for the boss version of the power plant. - NOPE, might be because of no defined AI.PowerPlants in the vanilla countries?

Edit 2: Further information - I tested the side by playing them and every structure is functioning correctly, so it's not the structures themselves as far as I can tell. Also shortened all the names to be max 8 characters and it still crashes, so it's not likely to be that either.

The revenge of edit: Another thought is that the base planning sanity checker isn't spitting out any warnings that the AI would be unable to build one of these factories, which strikes me as odd. It's like it gets past that bit and then breaks anyway.



debug.20150928-144413.log
 Description:

Download
 Filename:  debug.20150928-144413.log
 Filesize:  84.36 KB
 Downloaded:  3 Time(s)


Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Tue Sep 29, 2015 7:38 am    Post subject: Reply with quote  Mark this post and the followings unread

Have used more than 8 chars for filenames and IDs, typically upto 15 chars for INI objects and upto 20 chars
for map entries. YR is built to read files like expandmd02.mix which is 10 chars long. 8 chars restriction may
still exist when it is related to terrain files.

Anyhow 8 chars or theater shouldn't affect if it is INI only mod with cloned objects that still use existing objects
with like Image=GAWEAP etc.

There were multiple changes needed in your rulesmd, like why do you need all the buildings from every
side for 1 country, why 4 con. yards etc.. There won't be enough base space for them. Also aimd would need
the 4th side AITriggers. Your INI contains stuff from YR 1.000 version, make sure you have installed YR 1.001
patch, Ares needs it.

Made a sample 4th side from vanilla INI files to be used with Ares, attaching it.



4thSideExample.zip
 Description:

Download
 Filename:  4thSideExample.zip
 Filesize:  138.06 KB
 Downloaded:  89 Time(s)


Back to top
View user's profile Send private message
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Tue Sep 29, 2015 1:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

I haven't yet looked at any file, so the following I'm speaking generally.

IDs can be longer than 8 characters, and they are not used after the BuildWeapons list has been parsed. The game just keeps a list of building types. Some IDs are handled specially, but that's more for art related settings.

Power plants are special. Ares selects the first one in case no power plant can be built at some point in time, ignoring the prerequisites.

I'm not sure whether PrerequisiteFactory= will be problematic. Its value is 127 chars long, and I'm not sure whether Ares expanded it. I would have to check this.

The base planning sanity checks were trimmed down a bit from their initial implementation. A few tags that the AI can live without have been removed from the checks. Also, it does not simulate the base plan generation, so it might be a bit out of sync.

_________________

Back to top
View user's profile Send private message
TTFTCUTS
Vehicle Driver


Joined: 27 Sep 2015

PostPosted: Tue Sep 29, 2015 2:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
There were multiple changes needed in your rulesmd, like why do you need all the buildings from every
side for 1 country, why 4 con. yards etc.. There won't be enough base space for them. Also aimd would need
the 4th side AITriggers. Your INI contains stuff from YR 1.000 version, make sure you have installed YR 1.001
patch, Ares needs it.

Made a sample 4th side from vanilla INI files to be used with Ares, attaching it.

All buildings and 4 conyards are specifically because it's meant to be an over-active enemy which multiple players face off against on team maps - as mentioned in the first post - such that it would have the whole base space of several players. They need to be duplicated because of the AIBasePlanningSide being a single value. The other values for things like the area the AI considers as a base and various limits have been increased too.

I made a similar thing a few years ago without ares, but it had all the players under unholy alliance build lists and just hijacked the soviet side for the AI - it worked totally fine from a base building standpoint. This time, for the remake, I wanted to have the players limited to the side they picked, and so going for a fourth side seemed like a good way to do that.

The triggers are already taken care of, they even work already (if the side is changed to one of the working ones), so they weren't particularly relevant.

As for the 1.000 stuff, I'm not sure - I extracted it from 1.001 as far as I am aware, and Ares seems to run fine. It should abort loading and mention it's the wrong version in the Syringe log if not.
(Edit: comparing the files directly with a comparison tool, I see what you mean...)

Thanks for the example stuff. At least hopefully I can compare and see what's gone wrong now. Finding full examples for this has been a seemingly impossible task.

AlexB wrote:
The base planning sanity checks were trimmed down a bit from their initial implementation. A few tags that the AI can live without have been removed from the checks. Also, it does not simulate the base plan generation, so it might be a bit out of sync.

BuildWeapons is one of the ones still checked though, if the source is anything to go by, and there was mention of this error being specifically about picking the factories earlier in the thread. I have no idea if that address is explicitly factory or what to be honest.

Also, even with all 9 factories added in the PrerequisiteFactory value, it's only 98 characters long, 119 for the whole line. (All the BOSS<whatever> is now B<whatever>) And it worked correctly when playing the side anyway.

EDIT: HOLY CRAP. I found out where the error was. It was the order in which the countries were defined. Moving it from 14 to 10 and offsetting the others seems to have fixed it. Apparently that breaks the AI and absolutely nothing else.

Back to top
View user's profile Send private message
Zero Fanker
Civilian


Joined: 16 Jul 2015
Location: China - unofficial secret research centre

PostPosted: Mon Oct 12, 2015 6:30 am    Post subject:   Reply with quote  Mark this post and the followings unread

iirc,all base infrastructures should have the similar name as those of origin games
That is to say, construction yard should be [XACNST]
"X" can be any letter of A-Z
In the same way,power plant should be [XAPOWR]
,war factory should be [XAWEAP],but barrcks can have 3 different formats of name , each has a fixed foundation
I am not sure whether this is the real reason for your problem , but at least I follow this rule when adding the fourth side in my mod , and everything works well even though I haven't written AI triggers

Back to top
View user's profile Send private message
TTFTCUTS
Vehicle Driver


Joined: 27 Sep 2015

PostPosted: Mon Oct 12, 2015 9:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

As per the edit at the end of the last post when I found out a few days ago, it was that the country list was out of order. Moving the new country up solved everything.

The format of structure names only matters if you aren't using "Image=" heck, the prism tower is ATESLA.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [14 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1751s ][ Queries: 13 (0.0092s) ][ Debug on ]