diino
Skirmisher
posted 06-03-09 06:18 AM EDT (US)
I'm trying to mod this villager to keep him from auto gathering from crates. I still want him to be able to gather from them though, but only manually. I've tried changing the UnitAIType, but that's obviously not it. I tried going into it's tactics file under the crategather action, but i don't see anything there that i should be changing. Anyone have any ideas?
Skyrate
Scenario Contest Winner
posted 06-03-09 10:02 PM
EDT (US)
2 / 30
If you do what Ninja said then make sure you add the info for gathering crates to both the tactics and proto for normal gathering. Removing the normal crate gather action may make the model freeze when he tries to gather crates since no animation would be defined, though it may default to the crategather anim.
If that doesn't work then I think the only way you can do what you want is by giving the settler tactics like a military unit (Volley, Stagger, stand ground, etc). Then you would make it so that only on, let's say, stand ground could the villager gather crates. This would be a little complicated to do, but I could tell you how (I've done something like it before).
Could I ask why you want the villy to not autogather crates?
And also, are you making a new villy? Or editing the base?
TIP: The UnitAIType only controls what it does when attacked and what it autoattacks. Check the file unitaitype.txt in Data.bar for a full list of them and more details.
diino
Skirmisher
posted 06-03-09 10:08 PM
EDT (US)
3 / 30
Oh i'm kind of new to modding, so i'm just trying to figure out a lot of what the game can do. I set the villy's LOS to 500 and it just goes around the whole map gathering from crates from enemy towns LOL. I couldn't figure out what to do, so i just made it so that the crategather range was 500, that way it could gather from crates from basically anywhere on map. With out having to step into enemy LOS
Skyrate
Scenario Contest Winner
posted 06-04-09 10:12 PM
EDT (US)
5 / 30
The AIType does not affect auto-gathering in anyway. I'm not sure why your military unit wouldn't have auto-gathered, Bilbo. I have 3 military units that auto-gather perfectly(one uses HandCombative and the other two use RangedCombative AIs). 2 are based off of John Black (but are completely different, only the model is the same) and the other is based off of Lizzie(and, likewise, is unique).
If you want that unit to auto-gather, Bilbo, just message me and I'll help you with it.
diino
Skirmisher
posted 06-05-09 01:36 AM
EDT (US)
6 / 30
oh i wasn't really goin for realism, just trying to learn what everything does. Right now i'm trying to learn about the attack ranges. I set my villagers attack range to 500 and it's LOS to 500, but when it shoots at a target, it never connects. Not sure if it's because it's too far for the projectile or something's up with the accuracy or ballistics maybe? You guys have any ideas?
BilboBeutlin
Skirmisher
posted 06-05-09 02:14 AM
EDT (US)
7 / 30
Like you already assumed: way too far. All projectiles have a limited lifespan and disappear after a certain distance.
@Skyrate: thx for offer. Meanwhile I deleted the unit - it was just a try. The reason could be also the TWC/TAD trial vs. I'm using these for tests because they launch quicker and don't need a CD *g*
diino
Skirmisher
posted 06-05-09 11:20 AM
EDT (US)
8 / 30
Alright so i have a new problem. I have that crate gathering problem you have bilbo, except it isn't for crates. I have a military unit that can gather from a ricepaddy but it only gathers for a second... probably because it gathers only until it reaches it's max capacity. After that, it stops gathering for some reason. Weird i tell ya....
BilboBeutlin
Skirmisher
posted 06-05-09 11:40 AM
EDT (US)
9 / 30
Check your proto for the tag CarryCapacity. To be sure, enable all wanted resources.
But after your description it looks more like missing anims in anim file. Take for reference a settler's anim - the gathering theme requires a bunch of sub-anims.
diino
Skirmisher
posted 06-05-09 12:13 PM
EDT (US)
10 / 30
okay well here are the anims that i implemented within my military unit:
GatherFarm
GatherFarmWalk
GatherFarmSow
GatherFarmWeed
GatherFarmHoe
which ones would i be missing?
Skyrate
Scenario Contest Winner
posted 06-05-09 10:24 PM
EDT (US)
11 / 30
Does the model freeze or does it revert to idle?
If it freezes then you're missing an anim. If it goes to idle then you probably didn't give it a Carrycapacity.
Make sure to copy the proto action info for gathering exactly from a settler. Also make sure you copy the tactic info for the Gather action exactly. You can change the rates to whatever you want (Warning: Over 10 Gathers extremely fast), just make sure there are always the same amount of decimal places.
Which unit are you trying to mod?
I suggest copying the unit's original anim file and then place it in a new folder (I put them in units\mod) and then copy the anims exactly from the villager file (units\villagers\villager.xml) and put them on the bottom of the new units anim file (make sure the end 'animfile' tag is below everything else).
Your unit should gather correctly if you've done all that. If it still doesn't work then post the proto and anim code here or message it to me (use <xmp>replace with code</xmp> around your code so that it shows up when you post it).