View Full Version : Custom Weapon Issue
November 17th, 2007, 12:10 PM
I'm in a fresh game with my little custom mod, and have made no changes to the files since starting.
I previously added several weapons to the components.txt file, one set of which seems to be a bit screwy:
The item has "Vehicle Type := Fighter", "Restrictions := One Per Vehicle", and works fine for me. I am now coming across AI *satellites* that are equipped with this weapon - which was supposed to be for fighters only.
Assuming no spelling/typo errors, why is the "Vehicle Type" restriction not holding for AI designs? I have double checked and I cannot add these weapons to my satellites, or any vehicle type, except fighters as intended.
The AI also seems to be violating the "One Per Vehicle" restriction too - I've seen some with over 12 on one satellite. http://forum.shrapnelgames.com/images/smilies/happy.gif Unexpected, to be sure.
Is this a game issue or some screwup on my end?
Note that I have NOT modified any AI files myself, to use or not use these new weapons which I added.
November 17th, 2007, 12:16 PM
On looking through the Enemy Unit Designs, I find that the AI is using this weapon on both satellites and weapon platforms. Yet even within the game UI, it says "Vehicle Types Fighter".
Was I silly to assume "Fighter" meant only fighters? Does it actually mean Ftr\Sat\WP?
November 17th, 2007, 02:57 PM
This is a known bug. The AI completely ignores restrictions on component use. It can't go over the tonnage limit, it might not be able to go over the engines limit, and I'm not sure about life support/crew quarters requirements, but pretty much everything else is ignored when the AI makes its designs. I remember some discussion a while back about designing a Cheater AI race, and one of the things this AI would do is build ships and bases with two space yards, getting double normal build speed.
November 17th, 2007, 04:10 PM
Well that's no good.
I take it SE4 is no longer getting updated, correct?
No biggie, but a rather annoying issue.
November 17th, 2007, 07:06 PM
Does the AI also get to ignore the "Vehicle Size Maximum" constraint for Mounts?
November 17th, 2007, 07:27 PM
The AI doesn't completely ignore restrictions.. It won't add components that are restricted from the current vehicle type to a design. However, components within the same family can be upgraded, ignoring vehicle restrictions. This happens for human designs as well as the AI. Make sure your fighter weapon has a unique Family value and a unique Weapon Family value.
Really, the only restriction ignored by the AI is X Per Vehicle.
There are no mount settings ignored by the AI.
November 18th, 2007, 02:28 PM
I think your statement is incorrect in that the AI is definitely ignoring the "Vehicle Type" restriction for these weapons.
These custom weapons *are* using a Weapon Family number that is used by other weapons, but they have a different Family number. (There is no text on what Weapon Family number does in the Components.txt file - how does it work?)
Its easy enough for me to change the Weapon Family number for them, but the AI is definitely ignoring the restrictions in a way no human could. (You can't upgrade to a weapon that you can't design a ship to use in the first place, yet the AI can, it seems.)
I will check out the new Weapon Family number on the next game. Thanks!
November 18th, 2007, 02:40 PM
Is there a document that I should have read covering issues like this one (unique Weapon Family values)?
I don't mean to be bugging folks with beginner questions - I've read through the Dubious Guide, the Strategy Guides, a couple of Modding FAQs, but didn't come across any specific stuff that documented the common "gotchas" in modding SEIV.
If I have overlooked a good resource, please point me to it. I realize this is an old game with a high user knowledge base, and newbie questions can get quite tiresome.
But many thanks for the quick and accurate responses I've received in the past week or two. I'm quite enjoying SE4 - spending half my time tinkering with files and half actually playing. http://forum.shrapnelgames.com/images/smilies/happy.gif
November 20th, 2007, 10:22 PM
Kammak, I'd just post to the forum. This question in particular is closer to cutting-edge than newbie, and rarely do people here get annoyed by questions.
I think you're on to the answer to the restrictions. The AI designs and upgrades can ignore some restrictions that apply to humans, but they are also limited in their own ways - for example, as you see, they only design according to the AI design files, so if you do what you already thought of - change the unwanted weapon family to a different number, then they won't use it. That kind of approach (telling the AI specifically what to do) tends to get around such AI issues, and can sometimes be taken advantage of in good/interesting ways.
November 21st, 2007, 12:05 AM
The AI can do all sorts of crazy things. I created a race called the Cheaters a while back that uses AI tricks to do things like add 10 engines to a design, multiple space yard components, mine warheads on ships.
Here's the link if you want to take a look at it: The Cheaters AI (http://www.spaceempires.net/home/downloads-details-468-The_Cheaters_AI_v1.0.html#dldetails)
It has a few resource management issues, but it's fun to play against a computer opponent who doesn't follow the standard rules.
vBulletin® v3.8.0, Copyright ©2000-2013, vBulletin Solutions, Inc.