Data Realms Fan Forums
http://forums.datarealms.com/

NPC orders base guns alongside mod guns, [Fixed!]
http://forums.datarealms.com/viewtopic.php?f=1&t=45822
Page 1 of 1

Author:  polartechie [ Tue Sep 30, 2014 11:33 am ]
Post subject:  NPC orders base guns alongside mod guns, [Fixed!]

I'm working on updating Kettenkrad's Wehrmacht mod for the Steam Workshop, because I noticed some errors with it and he also has a lot of great content he hasn't included with the mod.

Thanks to help from Major, this is progressing well, but I would really like to squash one bug that has persisted from the vanilla Wehrmacht mod.

When the Wehrmacht is acting as an NPC faction, it will order the units as expected. They'll have all the gear they're supposed to. However, the NPC brain will also give them base weapons like "smg" and "blunderpop" in their inventories.

I noticed from the other thread here, that the items need to be grouped.
viewtopic.php?f=1&t=45659

I did this, as found in this thread, but the problem is the same (Although the AI does seem to use their proper weapons as much as the defaults now.)
viewtopic.php?f=1&t=32748

TL;DR -
I have two problems now:

1) The NPC controlled faction still orders basic equipment alongside what the troops should come with.

2) I have duplicate categories "Heavy Weapons, Heavy Weapons" one for everything but Wehrmacht, and one for only Wehrmacht.

I believe that if I can figure out why the Wehrmacht grouping isn't sticking with the other real groupings, the NPC will recognize that "Oh, I already have a primary weapon on this actor," and stop ordering garbage with his mighty Fatherland-gifted equipment.

Thank you for any help you can offer!


FIXED : AddToGroups lines must be directly under the PresetName lines.

Author:  polartechie [ Tue Sep 30, 2014 11:40 am ]
Post subject:  Re: NPC orders base guns alongside mod guns, even after grouping

Screencap of the lone Wehrmacht groups.

I notice one of the Heavy Weapons from "The Order" mod also have this symptom.

Attachments:
File comment: Screencap of the lone Wehrmacht groups.
error.png
error.png [ 625.36 KiB | Viewed 6389 times ]

Author:  polartechie [ Mon Oct 06, 2014 4:18 am ]
Post subject:  Re: NPC orders base guns alongside mod guns, even after grouping

Okay, so apparently the devices in this mod were being added to another group aside from the normal ones. They were being added to the "Wehrmacht" group alongside Primary/ Light/ Etc.

Removing this group from all devices definitely reduced the amount of base weapons being ordered, but some still get through.

It's still difficult to say why the NPC would order an SMG alongside an MP40, when they are added to the exact same groupings.

I still believe this has to do with the wehrmacht weapon groupings being placed outside everyone else's groups, even though the syntax and spelling is an exact match.

Author:  Rhyssia [ Mon Oct 06, 2014 5:39 am ]
Post subject:  Re: NPC orders base guns alongside mod guns, even after grouping

I'm guessing you dont have a loadout.ini in the mod.rts folder? (As far as the random weapon ordering, I ran across that while working on the EAF, I had to change some things in the loadout.ini that prevented me from playing campaign mode with auto base building.)

As far as the additional weapon groups. Do some of them show up in the normal list at all? If you check the scripts are there any spaces after AddToGroup = Heavy Weapons? Is it added right after "PresetName" ?

Author:  polartechie [ Mon Oct 06, 2014 5:54 am ]
Post subject:  Re: NPC orders base guns alongside mod guns, even after grouping

Rhyssia wrote:
I'm guessing you dont have a loadout.ini in the mod.rts folder? (As far as the random weapon ordering, I ran across that while working on the EAF, I had to change some things in the loadout.ini that prevented me from playing campaign mode with auto base building.)

As far as the additional weapon groups. Do some of them show up in the normal list at all? If you check the scripts are there any spaces after AddToGroup = Heavy Weapons? Is it added right after "PresetName" ?


Thanks for the reply

loadouts.ini is in place, and totally functional

Some of the addtogroups had comments (I just copied them from a group list I found)
All of the addtogroups are placed after description, which is immediately after the presetname. I'll move them around and remove the comments, and let you know how it goes!

Author:  polartechie [ Mon Oct 06, 2014 6:39 am ]
Post subject:  Re: NPC orders base guns alongside mod guns [Fixed!]

Rhyssia wrote:
I'm guessing you dont have a loadout.ini in the mod.rts folder? (As far as the random weapon ordering, I ran across that while working on the EAF, I had to change some things in the loadout.ini that prevented me from playing campaign mode with auto base building.)

As far as the additional weapon groups. Do some of them show up in the normal list at all? If you check the scripts are there any spaces after AddToGroup = Heavy Weapons? Is it added right after "PresetName" ?



I love you. :shock:

That totally worked!!!!!!

Keeping the AddtoGroups right below the PresetName is exactly how you stop AI from ordering default weapons!! The devil was in the groupings all along!

You're now credited in the Steam Workshop. Thank you so much!

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/