Crispy on 15/1/2006 at 01:40
Since I find messing around in T3Ed more fun than creating actual missions, I've been trying to hack a spider enemy into T3 using only a minimal amount of custom content. Luckily the rust bug mesh is nearly perfect (except it has 6 legs instead of 8, but I'm willing to ignore that for now - maybe we can RigidAttach more legs to it somehow :D). If one applies a green tint (Render->Tint), it nearly looks like a spider; and its voice set is just about perfect.
Unfortunately, I've had zero success in getting a rust bug to attack me. I've tried copying across parameters from various other enemies - notably tree beasts (for natural weapons) and Kurshoks (for movement) and undead (for AI and faction alignment). No dice. I thought maybe it wouldn't work because the rust bug lacks attack animations, but it should at least try and approach me - or run away. It does neither; just sits there and ignores me.
I also tried the opposite approach - taking a Kurshok and giving it a rust bug mesh. Unfortunately I can't seem to figure out how to give AIs new meshes - I've only succeeding in crashing T3Ed (when applying a new mesh to an instance) or creating missing archetypes (when doing it via the gamesys).
Anyone got any insights into either problem, or other ideas on implementing this?
norbik on 15/1/2006 at 05:55
I had the same problem with creating undead lord to "The crypt" mission. I wanted get nobleman mesh to zombie and editor crashed. Then i got nobleman mesh to cradle staff and it´s o.k.
Rantako on 15/1/2006 at 11:27
Maybe the attacking problem is the same sort of thing as the Hammer/Kurshok overhead swing being unable to hurt you when you crouch - which I don't think was ever resolved. What weapon are you giving it in the 'edit weapon loadout'? The problem could be as simple as it doesn't have the right bones to use it.
The missing archetypes from the gamesys happens sometimes - usually you just need to save the gamesys then restart T3ed, and they should work (although it could be something completely different here).
If all else fails, you could try Rigid Attaching an invisible guard to it :joke: . Knowing T3ed, that might even work.
Krypt on 15/1/2006 at 11:31
Hmm, I don't think you'd be able to make it attack you because the rustmite model has no hardpoints for weapon slots. The way melee attacks worked for zombies and treebeasts was by giving them a fake weapon which was invisible in the game. I'm not sure if the attack animation is required as long as you have the weapon hardpoint.
Crispy on 15/1/2006 at 12:46
Quote Posted by Rantako
What weapon are you giving it in the 'edit weapon loadout'? The problem could be as simple as it doesn't have the right bones to use it.
I didn't; and, in fact, when I look there now...
Quote Posted by Krypt
Hmm, I don't think you'd be able to make it attack you because the rustmite model has no hardpoints for weapon slots. The way melee attacks worked for zombies and treebeasts was by giving them a fake weapon which was invisible in the game.
Ah - I didn't realise about the fake weapons (silly of me, I should have), and you're absolutely right; it has no weapon hardpoints. The weapon loadout screen is completely blank. :(
I just tried rigid-attaching an AIFakeMeleeWeapon to it (same weapon the Treebeast uses). Still doesn't show any inclination to attack.
I also can't kill it, despite attempting to give normal human vulnerabilities. No blood spurts, no reaction, no death animation; it just sits there in its bobbing-up-and-down idle animation while my vorpal sword (well, dagger) goes snicker-snack.
Quote Posted by Rantako
If all else fails, you could try Rigid Attaching an invisible guard to it :joke: . Knowing T3ed, that might even work.
Hey, it's worth a try. :cheeky:
You wouldn't get any animations at all though (walking, attacking, anything)... unless you could use some clever scripting to fake it, which is doubtful. So you'd end up with the spiders sliding along the ground towards you! Freaky.
STiFU on 17/1/2006 at 13:22
But besides the rust bug can't attack you, because it has no weapon hardpoint, it should at least approach you. So there must still be some other reason. If you got the movement working you could still script the stim. "while player is within 64 units >> wait 0,3 ingame seconds; apply a stim of 3 to player; wait 0,5 ingame seconds; reset script conditions and actions". I have no T3ED on this computer so i don't know the exact commands right now.... And perhaps there is still some other animation in the rust bugs that could be used as an attack animation, which could then be added to the script, though i am not quiet sure whether triggering animations on AIs is possible.
ProjectX on 17/1/2006 at 19:27
Maybe since it's been rehacked as an AI and it has no weapon it's attempting to run through the cower routines?
It would certainly be odd if one of the rust bugs started shouting "please don't hurt me!" in an effeminate voice.
Crispy on 18/1/2006 at 02:12
STiFU - Yeah, that's what I was thinking. Unless the lack of a hardpoint disables the attacking routine altogether, including the decision to approach. After all, it only approaches so that it's within attacking range - so maybe the lack of a hardpoint simply disables it.
Quote Posted by ProjectX
Maybe since it's been rehacked as an AI and it has no weapon it's attempting to run through the cower routines?
Perhaps, but it doesn't look like it's doing that either. I'm fairly sure there's a flee point in the map, but it's making no effort to go there.
Quote Posted by ProjectX
It would certainly be odd if one of the rust bugs started shouting "please don't hurt me!" in an effeminate voice.
Not likely, it has a different voice set. :cheeky:
It might be possible to get this going using an invisible AI and scripting in some fashion. Perhaps if all the AI routines were controlled by an invisible guard, and the rust bug simply followed the guard around.
Krypt on 18/1/2006 at 04:35
Stifu's idea for the stim radius gave me an idea for a way to hack attacking rustmites through script. Once again, I'm just theorizing here so no guarantees any of this will work.
First of all, you'll want to change the rustmite's sensory and behavior models under AIPawn. Change them to one for any hostile AI, like KurshokBehaviorModel and CityWatchSensoryModel for example. This should allow the rustmite to perceive the player by seeing or hearing him.
Next, make a couple scripts which will be placed on the rustmite. The first will look like this:
CONDITIONS
-When linked AI [MYSELF] sees the player
ACTIONS
-Guard the player
-Delay [5] GAME seconds
-Reset conditions and actions
This should make the rustmite run toward the player when it sees him. Since the rustmite can't actually attack, he isn't really guarding but just following. The 5 second delay may not be necessary. I just added it in to prevent the possibility of the script firing constantly while the player is in its view. You might have to subclass the the BehaviorModel you picked to tweak the follow distances in AIGuardPlayer so it will look right. The default values might have the follow distance set at 15 feet or something, which isn't going to work for a melee attack. Now make this script:
CONDITIONS
-While the AI is in the behavior state [STATE_GUARD]
-Query if linked objects [PLAYER] are within [60] unreal units from linked objects [MYSELF]
ACTIONS
-Play sound schema [???] at my location
-Apply [5] units of stimulus [StimulusType_Edge] to linked objects [PLAYER]
-Delay [5] GAME seconds
-Reset conditions and actions
This will simulate the rustmite's attack. I'm not completely sure that behavior state condition will work, but hopefully it does. The sound schema would be whatever attack sound you would want to use, if you have one in mind. If you don't want/need a sound you can just remove that action. The stimulus is the damage of the attack, and obviously you could tweak these values to whatever you like. The delay acts as the refire rate of the attack, in this case it will be 5 seconds between attacks.
STiFU on 18/1/2006 at 11:44
Thats exactly what i wanted to say regarding the stim script... :) But i think it would be better to have a "delay [1] game seconds" before the attack, because this way the player could still use the classic thief attacking tactics. running forward>hit>running backward. It would be unrealistic if the spider had "instand hit", because even a spider has to strike out in order to attack.