How to force troops to use all equipment

正在查看此主题的用户

Stildawn

Squire
Hi All

Ive been making my own troop trees... I like the uniform look with all troops of one type having the same equipment...

So... My questions are:

1. Does the troops have the same 9 slots like your character? (meaning: 4 weapon slots, 1 helm, 1 armour, 1 boots, 1 gloves and 1 horse?)
2. How do you force your troops to take all assigned equipment? (e.g. I have royal knights which I want to have a sword and kite sheild, with a great lance and a steel sheild in which they wear on their back... In making them I gave them all the equipment but in game some come with steel shields in hand and others with Kites in hand... None came with any shield on their back) (e.g.2. I have made high level archers in which i gave them a war bow, a pike and 2 lots of arrows... How do I know that they are taking both lots of arrows?)

Thanks.
 
Normally you'd use the tf_guarantee flags, but since you want them to carry duplicate equipment (2 shields or 2 quivers) I donno.
 
There's no way to do this in the troops file.
You'd need a script on agent spawn to do the following: get the troop type, find out which items it needs to have equipped, check through the agent's equipped items and if the item isn't equipped, use agent_equip_item to slap it on the agent. The script would get large as you specify it for the equipment each troop type is supposed to have. You could store this info in troop_slots at game start and then the script would just check those slots on agent spawn, of course.
 
Lol that all sounds much to difficult for me (Ive been using Morgh Tools since I suck at modding)

I think Ill just have to settle with no duplicates...
 
Caba`drin 说:
There's no way to do this in the troops file.
You'd need a script on agent spawn to do the following: get the troop type, find out which items it needs to have equipped, check through the agent's equipped items and if the item isn't equipped, use agent_equip_item to slap it on the agent. The script would get large as you specify it for the equipment each troop type is supposed to have. You could store this info in troop_slots at game start and then the script would just check those slots on agent spawn, of course.

The only issue with doing that is whatever equipment you give to him last will be what he uses throughout the fight. Other people may have different experiences with it, but that seems to be the behavior I'm seeing.

EDIT: Also, I don't believe that equipment will show up in the loot when the troop is defeated.
 
JethroKirby 说:
Caba`drin 说:
There's no way to do this in the troops file.
You'd need a script on agent spawn to do the following: get the troop type, find out which items it needs to have equipped, check through the agent's equipped items and if the item isn't equipped, use agent_equip_item to slap it on the agent. The script would get large as you specify it for the equipment each troop type is supposed to have. You could store this info in troop_slots at game start and then the script would just check those slots on agent spawn, of course.

The only issue with doing that is whatever equipment you give to him last will be what he uses throughout the fight. Other people may have different experiences with it, but that seems to be the behavior I'm seeing.

I am under the impression that giving the order "Use any Weapon" should reset the AI's decision making on which weapon to wield...so if this were given to grc_everyone once the spawn was complete, it should allow them to swap between all equipped items?
 
A tad OT, but still I wonder when I look in the troops.txt that some troops have multiple weapons of the same type (i.e. two identical Spears). Is it just an accidental double-click and whoops they added two and it doesn't matter, or is there any logic behind that I can't seem to grasp? :smile:
 
Stildawn 说:
(e.g.2. I have made high level archers in which i gave them a war bow, a pike and 2 lots of arrows... How do I know that they are taking both lots of arrows?
Give them custom-made unlootable and unshoppable quiver with 2x # of arrows instead
 
Caba`drin 说:
JethroKirby 说:
Caba`drin 说:
There's no way to do this in the troops file.
You'd need a script on agent spawn to do the following: get the troop type, find out which items it needs to have equipped, check through the agent's equipped items and if the item isn't equipped, use agent_equip_item to slap it on the agent. The script would get large as you specify it for the equipment each troop type is supposed to have. You could store this info in troop_slots at game start and then the script would just check those slots on agent spawn, of course.

The only issue with doing that is whatever equipment you give to him last will be what he uses throughout the fight. Other people may have different experiences with it, but that seems to be the behavior I'm seeing.

I am under the impression that giving the order "Use any Weapon" should reset the AI's decision making on which weapon to wield...so if this were given to grc_everyone once the spawn was complete, it should allow them to swap between all equipped items?

/facepalm

I didn't think of that. I'll have to try it out later. :smile:
 
nightstormer 说:
A tad OT, but still I wonder when I look in the troops.txt that some troops have multiple weapons of the same type (i.e. two identical Spears). Is it just an accidental double-click and whoops they added two and it doesn't matter, or is there any logic behind that I can't seem to grasp? :smile:
I'm just guessing, but I think it means they're twice as likely to get a spear when pulling random equipment from a list that has more items than they can carry.
 
HannibalTheCannibal 说:
I'm just guessing, but I think it means they're twice as likely to get a spear when pulling random equipment from a list that has more items than they can carry.


But....when I edited the script so I could ask to view my troop's equipment they actually had everything in list defined in troops.txt on them. First I asked to see their equipment, took it all. Asked again, and other items were there. So they seem to carry it all, though. None the less your explanation does seem logical still, thank you.
 
GetAssista 说:
Stildawn 说:
(e.g.2. I have made high level archers in which i gave them a war bow, a pike and 2 lots of arrows... How do I know that they are taking both lots of arrows?
Give them custom-made unlootable and unshoppable quiver with 2x # of arrows instead

This may work to solve at least one of my questions... Is there away to make this quiver easily with morgh tools? I have no modding skills at all... I had to get extensive help just to get the extra troops to work lol.
 
Stildawn 说:
GetAssista 说:
Stildawn 说:
(e.g.2. I have made high level archers in which i gave them a war bow, a pike and 2 lots of arrows... How do I know that they are taking both lots of arrows?
Give them custom-made unlootable and unshoppable quiver with 2x # of arrows instead

This may work to solve at least one of my questions... Is there away to make this quiver easily with morgh tools? I have no modding skills at all... I had to get extensive help just to get the extra troops to work lol.
Yes, it's super easy with Morgh's tools.
 
Ok I made them a custom quiver with double the arrows and equiped it and removed the other arrows in the Troop editor...

In game though I think Ive run into a problem... But I cant tell really...

I did a few battles and for some reason I think the arrows the archers fire make no damage as they were shooting lots of them and got no kills until the enemy actually charged into melee?
 
后退
顶部 底部