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 Fri Mar 29, 2024 2:37 am
All times are UTC + 0
Ares Custom Foundation bug?
Moderators: Ares Support Team at PPM, Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [18 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Frank123
Medic


Joined: 19 Sep 2016
Location: Somewhere in Asia

PostPosted: Mon Sep 19, 2016 7:44 am    Post subject:  Ares Custom Foundation bug?
Subject description: AI keeps building the same building type
Reply with quote  Mark this post and the followings unread

Hello! I'm new to this forum!
Today I've just applied ares' custom foundation for the Psychic Amplifier to remove the blank four corners of it. Human player is perfectly normal but AI's are so stupid that they keep building more and more of it instead of 1, ignore BuildLimit=1.
AI's weird behavior is only back to normal after I've removed the custom foundation's code.
I'm using Ares version 0.9
I've double checked the rules code and it's ok, and here is the art code:

[YAPSYA]
Image=YGPSYA
;;Foundation=4x4
Height=10
NewTheater=yes
CameoPCX=psiamicon.pcx
Buildup=YGPSYAMK
DemandLoadBuildup=true
FreeBuildup=true
ActiveAnim=YAPSYA_A
ActiveAnimDamaged=YAPSYA_AD
ActiveAnimZAdjust=-60
;ActiveAnimYSort=724
ActiveAnimPowered=yes
DamageFireOffset0=-20,44
DamageFireOffset1=-74,64
CanHideThings=true
CanBeHidden=false
OccupyHeight=0
AddOccupy1=-1,-1
Foundation = Custom
Foundation.X = 4
Foundation.Y = 4
Foundation.0 = 1,0
Foundation.1 = 2,0
Foundation.2 = 0,1
Foundation.3 = 1,1
Foundation.4 = 2,1
Foundation.5 = 3,1
Foundation.6 = 0,2
Foundation.7 = 1,2
Foundation.8 = 2,2
Foundation.9 = 3,2
Foundation.10 = 1,3
Foundation.11 = 2,3

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


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Sep 19, 2016 10:09 am    Post subject: Reply with quote  Mark this post and the followings unread

The first cell in a building needs to be occupied (Foundation.0 = 0,0) otherwise the AI doesn't recognize that it has been built. You also didn't generate an outline, it's not required but it's recommended to do so.

_________________



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
Frank123
Medic


Joined: 19 Sep 2016
Location: Somewhere in Asia

PostPosted: Mon Sep 19, 2016 11:23 am    Post subject: Reply with quote  Mark this post and the followings unread

Thank you very much Mig! Btw, I've cloned the building without custom foundation for AI and the problem is solved now. But I still hope future Ares version could fix this problem.

Back to top
View user's profile Send private message
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Mon Sep 19, 2016 2:10 pm    Post subject: Reply with quote  Mark this post and the followings unread

Mig Eater wrote:
The first cell in a building needs to be occupied (Foundation.0 = 0,0) otherwise the AI doesn't recognize that it has been built. You also didn't generate an outline, it's not required but it's recommended to do so.


So this is a known bug? I have been having the same issue with a "cross" foundation building. Is there anyway to solve this without losing the shape?

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


Joined: 28 Sep 2013
Location: Plovdiv, Bulgaria.

PostPosted: Mon Sep 19, 2016 2:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Rotate and render, again?

_________________
"If it ain't broke, don't fix it."
"If you are loyal to everybody, can you truly be loyal to anybody?"
Ares Documentation: http://ares-developers.github.io/Ares-docs/
My YouTube Channel: https://www.youtube.com/channel/UCtxeQoEM_iVd-F-xUIwleyQ
PillBox20's Red Alert 2 Mod: http://www.moddb.com/mods/pillbox20s-red-alert-2/downloads/pillbox20s-red-alert-2-version-02

Back to top
View user's profile Send private message Visit poster's website YouTube User URL Skype Account
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Mon Sep 19, 2016 2:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

Yes it is a known bug & no there is no way to fix it.

_________________



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
AlexB
Commander


Joined: 31 May 2010
Location: Germany

PostPosted: Mon Sep 19, 2016 8:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

It's not a bug, and it won't be fixed. Note that you can use negative coordinates to shift the foundation so the 0,0 field is never empty.

"Fixing" this would mean adding code that incurs a performance cost for everyone, even if not required, because others set up the foundations correctly. Also it would second-guess the modder's decision and thus would appear to behave randomly.

The reason for the issue is that the AI places a building and then looks at the very cell it placed the building at whether it was placed and still exists. If the cell is empty because there's a hole in the foundation, then apparently the building has not been placed there or it is assumed to have been destroyed. This confuses the AI and its base building efforts.

_________________

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


Joined: 11 Feb 2016

PostPosted: Tue Sep 20, 2016 7:23 am    Post subject: Reply with quote  Mark this post and the followings unread

what does the pair mean?
with Renegade's generator the second number is always -3

_________________

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


Joined: 28 May 2013

PostPosted: Tue Sep 20, 2016 9:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Only pair I can understand are the X, Y values for the cells that Ares can use. It
is mentioned in Ares docs, that not to use Chrome browser. With other browsers,
Renegade's tool generates correct values.

Using negative values for X and Y, clips the foundation in the game.

Back to top
View user's profile Send private message
Frank123
Medic


Joined: 19 Sep 2016
Location: Somewhere in Asia

PostPosted: Tue Sep 20, 2016 6:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

So there is no way to make a cross-shaped foundation building for AI? I don't understand the "negative coordinates" part, could you make it clear?
Sorry, English is not my 1st language.

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


Joined: 28 May 2013

PostPosted: Tue Sep 20, 2016 7:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

In your case, you can remove 1 cell from 3 sides but leave the 0,0 cell as it is. AI
doesn't have problem with that. (Left part of the image).

Negative coordinates is not useful as the game clips them and the foundation is
reduced. Shown as in the in-game image when cell coordinates are reduced by 1.



custfoundation.jpg
 Description:
 Filesize:  47.24 KB
 Viewed:  3718 Time(s)

custfoundation.jpg



Back to top
View user's profile Send private message
Frank123
Medic


Joined: 19 Sep 2016
Location: Somewhere in Asia

PostPosted: Tue Sep 20, 2016 7:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

@E1 Elite: Thanks, I've cloned the building and done the same way for the AI one, and mine still reserves the cross shaped foundation!  Razz

Back to top
View user's profile Send private message
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Tue Sep 20, 2016 7:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

Indeed, tested and I get the same foundation ingame as E1 Elite. You can even check my code in the case something might be wrong.
Spoiler (click here to read it):
Code:
Foundation = Custom
Foundation.X = 5
Foundation.Y = 5
Foundation.0 = 0,0
Foundation.1 = 1,0
Foundation.2 = 2,0
Foundation.3 = 0,1
Foundation.4 = 1,1
Foundation.5 = 2,1
Foundation.6 = 0,2
Foundation.7 = 1,2
Foundation.8 = -1,0
Foundation.9 = -1,1
Foundation.10 = 0,-1
Foundation.11 = 1,-1
FoundationOutline.Length = 19
FoundationOutline.0 = -1,-1
FoundationOutline.1 = 2,-1
FoundationOutline.2 = 3,-1
FoundationOutline.3 = 3,0
FoundationOutline.4 = 3,1
FoundationOutline.5 = -1,2
FoundationOutline.6 = 2,2
FoundationOutline.7 = 3,2
FoundationOutline.8 = -1,3
FoundationOutline.9 = 0,3
FoundationOutline.10 = 1,3
FoundationOutline.11 = 2,3
FoundationOutline.12 = -2,0
FoundationOutline.13 = -2,1
FoundationOutline.14 = 1,-2
FoundationOutline.15 = 0,-2
FoundationOutline.16 = 2,-2
FoundationOutline.17 = -2,2
FoundationOutline.18 = -1,-2
FoundationOutline.19 = -2,-1

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
silverwind
Cyborg Firebomber


Joined: 11 Jun 2016

PostPosted: Tue Sep 20, 2016 8:18 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'll probably do some testing into these negative coordinates, but in the meantime, I take it, an AI-only clone of the building is the way to go, huh?

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


Joined: 11 Feb 2016

PostPosted: Tue Sep 20, 2016 9:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

wait... what does outline do

_________________

Back to top
View user's profile Send private message Skype Account
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Wed Sep 21, 2016 4:14 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't understand the obsession with freeing up every last cell? Are your maps too small or what?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

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


Joined: 31 May 2010
Location: Germany

PostPosted: Thu Sep 22, 2016 2:39 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks, E1 Elite! That's not how it should be. I wrote some code to fix this. No ETA yet, though.

_________________

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


Joined: 14 Jul 2015
Location: Egypt

PostPosted: Thu Sep 22, 2016 3:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

I had this bug since 2014.

_________________
If you are a MetalHead (Heavy Metal Fan) and don't want to be a metalhead, Just remove your metal ball from your head. �:p .

Back to top
View user's profile Send private message ModDB Profile ID Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [18 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.2182s ][ Queries: 14 (0.0129s) ][ Debug on ]