Issue with Field Buy Icons and Gates

Post Reply
User avatar
BigTex114
Posts: 42
Joined: Sat Feb 03, 2018 7:44 pm

Issue with Field Buy Icons and Gates

Post by BigTex114 » Tue Mar 13, 2018 2:59 am

So I'm making progress on my first map, a central Texas farm/ranch, and I'm really happy with how it's coming along. I've built two fields from scratch, and gone through a couple tutorials to get them set up. I've got the field dimensions, field map indicators, and field buy indicators. I can successfully toggle render field areas and set field sizes. It all looks good. When I go into game mode the buy icons are there. But they don't function. I get nothing.

On a related note, I can't get my gates to function either. I've tried four different gates, two I got from mod hub and two I exported from other maps. No luck with any of them. However, when I buy from the store in game, those gates open and close. So I must be missing something with the gates I'm importing. Any thoughts?

Btw, I'm relying as much as I can on the tutorials. There are so many good ones out there on YouTube and I'm grateful to everybody who's made videos.

Thanks
Currently playing Oakfield Farm on PC. :gamer:

User avatar
mcatalyst
Posts: 174
Joined: Tue Sep 22, 2015 6:19 am

Re: Issue with Field Buy Icons and Gates

Post by mcatalyst » Tue Mar 13, 2018 8:13 am

When you import the gates you also have to manually add the animatedObjects.xml information which should be part of the import files.

In the i3d (or GE User Attributes) make sure this all matches up.

<UserAttribute nodeId="####">
<Attribute name="index" type="string" value="__Gate___"/>
<Attribute name="onCreate" type="scriptCallback" value="AnimatedObject.onCreate"/>
<Attribute name="xmlFilename" type="string" value="animatedObjects.xml"/>
</UserAttribute>

That is assuming the animatedObjects.xml is in the root of the mod where the modDesc.xml is located.
FDR Logging Console Modder

MyrithisCatalyst Youtube: https://www.youtube.com/c/MyrithisCatalyst
FDR Logging Youtube: https://www.youtube.com/user/fdreviews

User avatar
BigTex114
Posts: 42
Joined: Sat Feb 03, 2018 7:44 pm

Re: Issue with Field Buy Icons and Gates

Post by BigTex114 » Wed Mar 14, 2018 12:54 am

Okay I'm working on it, thanks. Don't have it right yet.

Edit: Just so I understand, I've got to edit the modDesc.xml file to reference the animatedObjects.xml file in the directory?
Currently playing Oakfield Farm on PC. :gamer:

User avatar
mcatalyst
Posts: 174
Joined: Tue Sep 22, 2015 6:19 am

Re: Issue with Field Buy Icons and Gates

Post by mcatalyst » Wed Mar 14, 2018 4:23 pm

BigTex114 wrote:
Wed Mar 14, 2018 12:54 am
Okay I'm working on it, thanks. Don't have it right yet.

Edit: Just so I understand, I've got to edit the modDesc.xml file to reference the animatedObjects.xml file in the directory?
No, that is part of the i3d file. When you import the gate it should already have the animatedObjects.xml referenced in the User Attributes but it is missing the onCreate attribute to enable the trigger. At least that is my experience with the Wooden Gate prefab. The only thing you need to do outside of GE really is to add the animatedObjects.xml file into the root of the folder where the modDesc.xml file is located. You should be able to find the animatedObjects.xml file in the prefab gate folder.
FDR Logging Console Modder

MyrithisCatalyst Youtube: https://www.youtube.com/c/MyrithisCatalyst
FDR Logging Youtube: https://www.youtube.com/user/fdreviews

User avatar
BigTex114
Posts: 42
Joined: Sat Feb 03, 2018 7:44 pm

Re: Issue with Field Buy Icons and Gates

Post by BigTex114 » Wed Mar 14, 2018 6:37 pm

Okay. But with multiple mods won't you end up with multiple animatedObjects.xml files in the same root folder? Or would one file cover all gate types?
Currently playing Oakfield Farm on PC. :gamer:

User avatar
mcatalyst
Posts: 174
Joined: Tue Sep 22, 2015 6:19 am

Re: Issue with Field Buy Icons and Gates

Post by mcatalyst » Thu Mar 15, 2018 11:53 pm

If you already have an animatedObjects.xml file then you want to copy the containers inside the animatedObjects.xml file in the new mod and append it after the existing containers which are already there.
FDR Logging Console Modder

MyrithisCatalyst Youtube: https://www.youtube.com/c/MyrithisCatalyst
FDR Logging Youtube: https://www.youtube.com/user/fdreviews

User avatar
BigTex114
Posts: 42
Joined: Sat Feb 03, 2018 7:44 pm

Re: Issue with Field Buy Icons and Gates

Post by BigTex114 » Fri Mar 16, 2018 12:42 am

Thanks for your help. I don't have this going yet. I'll keep working on it.
Currently playing Oakfield Farm on PC. :gamer:

User avatar
BigTex114
Posts: 42
Joined: Sat Feb 03, 2018 7:44 pm

Re: Issue with Field Buy Icons and Gates

Post by BigTex114 » Sat Mar 17, 2018 1:31 am

Well after a week I finally have working gates but without the sound effect. lol

Edit: got the sound effect. Just had to copy the .wav file to the right directory.

Thanks for everybody's help.
Currently playing Oakfield Farm on PC. :gamer:

Post Reply