Log in

View Full Version : Forcing the AI to do ships with 3 weapon families


Ragnarok-X
February 5th, 2005, 12:44 PM
hey, fast question. I want my AI to design ships using 3 weapon families. I can get two families by using the majority and secondary ability, but is it actually possible to get a third weapon in the design, somehow ? In fact i want my ship to use 2 normal weapons, one short and one longrange. A third weapon family is needed because using the general "Point-defense" ability would not work, since i want the AI to use a specific point-defense weapon, and not the one with the most damage output (or however it chooses). I dont have enough AI-Tags for each point-defense weapon as well.

Any suggestions ?!

Aiken
February 5th, 2005, 03:13 PM
Using AI tags and dummy abilities (like Palace and such) is the only way to achieve it.

Fyron
February 5th, 2005, 04:17 PM
As with any valuelss ability, the AI chooses which PDC to use by tech reqs and component level, not by damage or any relevant criteria. Add some dummy tech reqs to the one you want the AI to use (multiple entries for the techs it already requires are perfect), and boost its roman numeral values by 1. This will cause the AI to use it over others.

If you want more detailed info, we are in the process of writing a formal guide to this very topic over on ModWorks:

*link* (http://www.spaceempires.net/home/modules.php?name=Forums&file=viewtopic&t=417)

Rollo
February 5th, 2005, 05:18 PM
Atrocities: Well written and a strong addition to the 101. Great work Fyron. How did you come by this information?




Fyron: Memory of old forum discussions + testing when working on Adamant AI.



oh, sure. just don't give any credit to the guys who found out and told you =P.


quoted from other forum: see fyrons link above

Example 1:

Name := Comp W
Number of Tech Req := 1
Tech Area Req 1 := Tech A
Tech Level Req 1 := 3

Name := Comp X
Number of Tech Req := 2
Tech Area Req 1 := Tech A
Tech Level Req 1 := 1
Tech Area Req 2 := Tech B
Tech Level Req 2 := 1

Comp X is "more advanced" because it requires 2 different tech areas. It will be added to the ship design, bypassing Comp W.




I am pretty sure this is wrong. Comp W is more advanced since it requires a total of 3 tech levels. While Comp X needs two tech areas, the total number of level is only 2.

I am 99% sure the AI would pick Comp W in case of of a valueless ability.

Fyron
February 5th, 2005, 05:22 PM
Rollo said:
oh, sure. just don't give any credit to the guys who found out and told you =P.

Erm... sorry. Would you like credit? I wasn't trying to steal your limelight, just adding information in one centralized location. I have no idea who posted what, so it is hard to just pull names out of a hat...


I am pretty sure this is wrong. Comp W is more advanced since it requires a total of 3 tech levels. While Comp X needs two tech areas, the total number of level is only 2.

I am 99% sure the AI would pick Comp W in case of of a valueless ability.

This has been my experience of how the AI evaluates components... I shall go test it again.

Fyron
February 5th, 2005, 05:37 PM
Ok. I don't know what I saw before that lead me to think that number of tech req areas was relevant, but it is not. Updated that linked post. Thanks for the feedback Rollo.

By the way, if you ever feel bored and want to write up little mini tutorials on any specific modding aspect, feel free to submit them to ModWorks. http://forum.shrapnelgames.com/images/smilies/laugh.gif

Edit:
Tested a tie with valued abilities and edited post with results.

Aiken
February 5th, 2005, 06:41 PM
I pretty sure it was Timstone who found a connection between the number of tech levels/reqs and AI decisions. Bab5 tread is too long to search, so I hope my memory serves me well.

Atrocities
February 5th, 2005, 09:18 PM
The problem with adding in AI tags to make the AI add a third weapon is that the AI will add that third weapon at the expense of all other weapons. Or so it has been with the test I ran. http://forum.shrapnelgames.com/images/smilies/frown.gif

Rollo
February 6th, 2005, 12:53 AM
fyron: Erm... sorry. Would you like credit? I wasn't trying to steal your limelight, just adding information in one centralized location. I have no idea who posted what, so it is hard to just pull names out of a hat...



no, i was just pulling your leg http://forum.shrapnelgames.com/images/smilies/tongue.gif


Artocities:The problem with adding in AI tags to make the AI add a third weapon is that the AI will add that third weapon at the expense of all other weapons. Or so it has been with the test I ran.




That must have some other cause. It definately works, it has been used for the space monsters since before SE4 Gold came out.

Perhaps there is not enough room in the design left to add weapons. I would need to see the design file and component list to make an educated guess.

Nodachi
February 6th, 2005, 01:48 AM
Wouldn't making the AI Tag a must have ability and then defining how many under misc abilities work without shorting the primary or secondary weapon?

Ragnarok-X
February 6th, 2005, 08:04 AM
Indead. You can always get two different weapons by using the majoraty and secondary component things. Getting a third weapon could work if calling for any type of ability through the must have. I knew that, but as mentioned in my first post, i dont have enough dummy tags or ai tags to assign a new one to each point-defense weapon.

Nodachi
February 6th, 2005, 08:24 AM
Ragnarok-X posted:

i dont have enough dummy tags or ai tags to assign a new one to each point-defense weapon.



Wow! That means you've used a ton of them. Are you sure you've used them all? How about Open Warp Point with a zero value? Spaceport? Warp Point - Turbulence with a zero value? Star - Unstable? Sector - Sight Obscuration? There's a lot of them that can be used with zero values and because you use a zero value if you have a design that calls for component that really does use one of those abilities the AI will pick the correct one because it should have a value greater than zero.

Someone correct me if I'm wrong! http://forum.shrapnelgames.com/images/smilies/wink.gif

Ragnarok-X
February 6th, 2005, 09:22 AM
You are indeed right, but the problem is editing all weapons to include the dummy abilites you mentioned is already a majorpain in the arse, imagine ~20+ different point-defense weapons, all which have 10 components/levels. In addition it becomes very hard to design a douzen AI designcreation.txts with all those weird abilites name which you wont remember. If we could just create new tags/abilitres, such like "Brakiri PD- Tag".
It would make work so friggin much easier..

Nodachi
February 6th, 2005, 09:58 AM
I agree. Hopefully SEV will let us define our own tags. http://forum.shrapnelgames.com/images/smilies/happy.gif

Rollo
February 6th, 2005, 10:33 AM
If this is all about adding specific point-defense, it can be done without AI-tags or dummy abilities. In fact it can be done without altering the designs, too.

Add higher tech level requirements (dummy levels) to the PDC that the AI should prefer. And establish a hierachy or pick order for the AI by adding redundant tech levels.

Example:

Name := Comp X
Number of Tech Req := 4
Tech Area Req 1 := Tech A
Tech Level Req 1 := 1
Tech Area Req 2 := Tech A
Tech Level Req 2 := 1
Tech Area Req 3 := Tech A
Tech Level Req 3 := 1
Tech Area Req 4 := Tech B
Tech Level Req 4 := 1

The component still need only 2 tech levels. Tech A Level 1 and Tech 2 Level 1. But it has 2 dummy levels of Tech A. Thus making the level total 4 and the AI will use this component over any other that has 3 levels or fewer.

I hope this helps.

Ragnarok-X
February 6th, 2005, 02:45 PM
Yes indeed. Thanks a bunch, that will greatly reduce the amount of work involved.

Fyron
February 6th, 2005, 02:48 PM
Rollo said:
Add higher tech level requirements (dummy levels) to the PDC that the AI should prefer. And establish a hierachy or pick order for the AI by adding redundant tech levels.


Wasn't this my entire suggestion from the beginning? http://forum.shrapnelgames.com/images/smilies/tongue.gif


Ragnarok-X said:
You are indeed right, but the problem is editing all weapons to include the dummy abilites you mentioned is already a majorpain in the arse, imagine ~20+ different point-defense weapons, all which have 10 components/levels. In addition it becomes very hard to design a douzen AI designcreation.txts with all those weird abilites name which you wont remember. If we could just create new tags/abilitres, such like "Brakiri PD- Tag".
It would make work so friggin much easier..

Why are their 20 PDC available to all races??? If it is race specific, shouldn't it require a racial trait? This solves the problem very cleanly...

Ragnarok-X
February 6th, 2005, 05:44 PM
Unfortunally it isnt race-restricted. Babylon 5 offers many weapon branches, like pulse weapons, gravitic weapons, plasma, laser and so on. Each brance offer at least one PDC system, and its each species decision which weapon brance to research. Of course some species may get better weapons in certain areas, but its still open...