Rantako on 31/3/2005 at 19:03
Here's how to make working rope arrows in T3Ed. There are still a few bugs, and they're not quite the same as the good old T1/2 rope arrows, but here goes...
Creating the Arrow
Open the Actor Class Browser and create a new archetype under WorldObj -> InventoryObject -> PowerUp -> Arrow, and call it RopeArrow. You probably could create it under BroadheadArrow, but I didn’t in case it inherited any properties I didn’t want from the Broadhead. Add the following properties to your RopeArrow:
Contact -> ContactResponse: eCR_Stick_On_Material_Or_Destroy
Inventory -> HelpText: < string=T_InventoryHelpTextRopeArrow >
Inventory -> InvName: < string=t_RopeArrow >
For some reason this forum won't let me write these bits properly - there are really no spaces in the HelpText or InvName properties.
Inventory -> MaxInventoryStack: 5
You can set this property to whatever you want, but I thought a low value would be best because these things could be pretty useful – and valuable.
Render -> FXMaterial: (Material=”MemHiLite”,Mode=FXMaterialMode_None)
Render -> ObjectMesh: INVarrowSHAFT1A1 (Default)
This can be found in Static Meshes -> INV_WEAPON_UI -> GarrettWeapons
Scripts -> TriggerScripts: RopeArrowSound, ArrowPhysicsChange, HilightArrowOff, HilightArrowOn
The next few are all under Stimulus
Stimulus -> ContactXfrInfo -> DeleteOnXfr: True
Inactive: True
Stim -> [0] -> Amount -> Amount: 1.00
Stimulus: StimulusType_DX2Bullet
TotalTime: 0.00
This allows the RopeArrow to be used like a broadhead as in T1/2, but does less damage. You could leave it out if you want.
[1] -> Amount -> Amount: 1500.00
Stimulus: StimulusType_Impulse
TotalTime: 0.00
Now righ click the RopeArrow archetype and click Placeable/Unplaceable.
We now have an arrow, but it has no arrowhead, and doesn’t yet spawn ropes. It also has no help text (more on this later).
Creating the Arrowhead
A static mesh for the rope arrow head already exists, but we’ll have to create a new actor so we can link it to the arrow. In the Actor Class Browser create a new archetype under MetaData -> UI and call it RopeArrowhead. Give your RopeArrowhead these properties:
Inventory -> HelpText: < string=t_InventoryHelpTextRopeArrow >
Inventory -> InvName: < string=t_RopeArrow >
Don’t know why these are needed here, but all other arrows have these on both the arrow and the arrowhead. Again, there are no spaces in those properties, but the forum won't let me post them like that.
Render -> ObjectMesh: INVarrowheadROPE (Default)
Render -> RenderType -> DrawType: DT_StaticMesh
Render -> RenderType -> Style: STY_Normal
Creating the Rope
The rope is the most problematic part of this arrow. Rope actors do exist, but none of them work, so we’re going to have to make our own. Open the Static Mesh Browser, select SETDRESSING -> Ladders -> GENrope16 and place one in your map (doesn’t matter where, it’ll be deleted later anyway). Now open the texture browser and Import All Matlibs. Then go into T3_GEN and select the texture GEN_ROPE. Find your rope in the 3D window and ALT-Leftclick it – this will apply the rope texture. You then need to right-click the rope, expand the Static Mesh menu and click Add New Skin (or something like that – I can’t remember the exact name - could someone post it in here). Call your new skin something obvious, like ‘Rope’. When you try to save your map, you will get a message about unpublished skins – you can get rid of this by clicking Tools -> Auto-Publish meshes in this Map, then doing a few Build Alls.
Now open the Actor Class Browser again. Create a new archetype under WorldObj -> Environmental -> Ladder and call it RopeArrowLadder. Give the following properties to the RopeArrowLadder:
Actor -> bNotMoveablePhysics: True
Actor -> bNotMoveableRender: True
Frob -> FrobBias: 100.00
Frob -> IsFrobbable: True
Highlight -> HighlightDist: 200
These frob settings will be needed later.
Render -> ObjectMesh: GENrope16 (Rope)
This is why we made the new skin earlier.
Sound -> SoundSpawn: hit_arrowrope
Linking Things Together
Go back to the RopeArrow archetype you made earlier and open its Links (right click, show links). Create a RigidAttachment link FROM RopeArrow TO RopeArrowhead. Click Edit Selected Link and set up the following properties: (I can’t remember which are set like this by default, so I’ll list them all)
Attachment -> m_attachmentBone: hp_arrowshaft
Attachment -> m_parentBone: HP_arrowhead
Hidden -> bDontPropogateHiddenFlagToChild: False
Highlight -> bPropagatesHighlight: True
Lifetime -> bDeleteChildOnDeath: True
Link -> m_GroupName: None
Link -> m_name:
Spawn -> bDontSpawn: False
Now create another link, a HUDRender link FROM RopeArrow TO RopeArrowhead. Finally, create a third link: a CollisionSpawn link FROM RopeArrow TO RopeArrowLadder. Edit the link’s properties:
Collision -> Active: True
Hardpoint -> bAttachObjects: True
Hardpoint -> m_parentBone: HP_arrowhead
Lifetime -> bDeleteOnDeath: False
Spawn -> bTakeParentRotation: False
Spawn -> NumberToSpawn: 1
Trigger Script
That’s right – there’s just one new Trigger script involved. Open the Trigger Script Manager and create a new script (for the sake of convenience, I put mine in the Weapons group) and call it RopeArrow1.
The Conditions are:
When I am frobbed by player
The Actions are:
Add [1] [RopeArrow] objects to the player inventory
Play sound schema [pu_power]
Destroy linked object(s) [MYSELF]
Reset script conditions and actions
Finally go back to your RopeArrowLadder in the Actor Class Browser and give it the property Scripts -> TriggerScripts: RopeArrow1.
And that’s it – the rope arrow is now ready for use! Just place the RopeArrow archetype - the other parts will follow (you can also put it in the default inventory if you want).
Setting up the Help Text
This part is completely optional. Each type of arrow in T3 displayed an on-screen help message the first time you picked one up. This is how to do it.
Open the file CONTENT\T3\Books\English\String_Tags\Inventory.sch and create a new entry, which should look like this:
TextEntry
T_InventoryHelpTextRopeArrow
lang_english 2005-03-31 11:49:50 "When a rope arrow is fired at a wooden surface, a rope will extend straight downward from the point of impact. These ropes can be climbed just like ladders."
lang_french 2005-03-31 11:49:50 "When a rope arrow is fired at a wooden surface, a rope will extend straight downward from the point of impact. These ropes can be climbed just like ladders."
lang_german 2005-03-31 11:49:50 "When a rope arrow is fired at a wooden surface, a rope will extend straight downward from the point of impact. These ropes can be climbed just like ladders."
lang_italian 2005-03-31 11:49:50 "When a rope arrow is fired at a wooden surface, a rope will extend straight downward from the point of impact. These ropes can be climbed just like ladders."
You can make the text in the quotes say whatever you want, but the entry must be called ‘T_InventoryHelpTextRopeArrow’.
Now go to your CONTENT\T3\Books\English folder and make a copy of the file ‘InvHelp_FireArrow.sch’ (any file with InvHelp in front of it will work). Change the file name to ‘InvHelp_RopeArrow.sch’. Open the file and change all the instances of ‘Fire’ to ‘Rope’. Save this, and open T3Ed.
In T3Ed click View -> Global Variables -> Flags. In the window that appears, type ‘HelpTextRopeArrowDone’ in the white box at the top, and click OK. It is this which will let the game know when to display the help text. Now open the Trigger Script Manager and create a new script (for the sake of convenience I put mine in the HelpPopUps group). Call it ‘HelpPopUpRopeArrow’.
The Conditions are:
When I am frobbed by player
Query if flag [HelpTextRopeArrowDone] is set to [FALSE]
The Actions are:
Set flag [HelpTextRopeArrowDone] to [TRUE] expires on map change [FALSE] expires on mission [20]
Popup a window with text from the file [InvHelp_RopeArrow.txt]
Open the Actor Class Browser, and give your RopeArrow the property Scripts -> Trigger Scripts: HelpPopUpRopeArrow.
Now the help text will be displayed the first time you pick up a Rope Arrow, but will not be displayed again, just like all the other arrows. (The same method can be used to give help text to any other custom arrows, or any object.)
(If your arrow doesn't show the name 'Rope Arrow' when you select it in inventory, you will need to create a new entry in Inventory.sch called T_RopeArrow - it should be there already, presumably from before the developers stopped doing rope arrows).
Problems
The part we've all been dreadiing. There are a few bugs in this arrow.
Materials - the rope will deploy no matter what material the arrow hits. As far as I can tell, there's no way to make it only deploy when it hits wood. Because of this, I think these arrows would have to be a lot rarer than in T1/2.
Ladder Animations - because the rope animations are pretty bad, this uses standard ladder animations. This of course means that you can only climb two sides of the rope (it seems to be the ones facing east and west), and if you are very unlucky Garrett will climb through a solid wall or roof when trying to climb off the top of the rope.
Retrieving the Arrow - one of the useful things about the T1/2 rope arrows was that they could be reused by frobbing the arrow - but because the arrow disappears when this collides (I think it's caused by the CollisionSpawn link 'cause I can find a way to stop it) you have to frob the rope instead. You should try to make sure you're not on the rope when you do this, because Garrett will do his *climbing off the top of a ladder* thing when the rope vanishes - often making him climb through the roof.
If anyone knows how to fix these or make any improvements, please say so!
:thumb:
(If anything here doesn't work, let me know and I'll see what I've mistyped)
SneaksieDave on 31/3/2005 at 19:13
Thanks for this effort Rantako. Going to try it out post-haste. :thumb:
demagogue on 31/3/2005 at 19:13
Great!! :D
Thanks for this...
SneaksieDave on 31/3/2005 at 19:22
Reading through it, I have one comment so far. I think it would probably be better to go with standard rope climbing instead of ladder climbing for one simple reason - you can rotate around a rope 360 degrees. As we all know, getting off of a ladder in a desired fashion in T3 is not... um... good. So the way rope arrows could be used (and the levels that use them, be designed) could be that the ledge you need to climb to has the wooden surface above it (for ease - it can be done other ways too, but this would be the "supported method") so the player can climb the rope fully, rotate around the rope till they are overtop of the ledge surface, then dismount with jump. This is because in T1&2, we could simply mantle off of the ropes. Don't know if that will be possible or nearly as easy in T3.
Okay, just wanted to say that.
bukary on 31/3/2005 at 20:01
Rantako, can you upload some demo file with working rope arrows?
New Horizon on 31/3/2005 at 20:08
Quote Posted by bukary
Rantako, can you upload some demo file with working rope arrows?
Indeed. I think I need more ram as my Trigger Script Manager makes the editor chugg like crazy.
SneaksieDave on 31/3/2005 at 20:54
:wot:
Wow. It works better than I expected. Yes, it has bugs, and will probably be tweaked for days to come, but it works!
Okay, now I'm not so sure about what I said above about using ropes over ladders because of one point but not the other - you can mantle/climb (the automatic climb up dismount that happens with ladders - very convenient) perfectly well right onto a ledge, so no "hang over ledge" is needed. However, the rotation thing is still a problem. But anyway, aside from that question, the current functionality is still nice.
A few observations I had in running through the tutorial:
1. don't forget to mention making the arrow placeable (right click actor in browser)
2. might want to mention how to open Links (right click actor in browser, Show Links)
3. Something might be wrong with the following attachment (or maybe it's just my run through of the tutorial):
Attachment -> m_attachmentBone: hp_arrowshaft
I don't get that option. The only options I get are: CENTER, Collision, RopeAttach. (obviously I chose RopeAttach)
Some bugs (obvious, and already mentioned, but for recordkeeping and those who haven't/won't be doing the tutorial):
-Each time I shoot one, I get two ropes - and so they multiply when you pick them up
-the slow "drifting upward into nowhere" issue
-the rope arrow is badass looking, however, the aiming model is bad for a shaft of that length
-arrow disappears (I could care less)
-stick in anything
Great work on this, Rantako! There is no doubt this will be tweaked up to a fully functional rope arrow... in T3! Woot.
NH, tip: Until you're ready to compile, be sure to use Cancel to close the script editor - OK and the 'X' (close) button run through a full compile every time.
bukary on 31/3/2005 at 21:03
Sneaksie, perhaps you could present us with some small demo (just a room and rope arrows in Garrett's inventory)? Please... :cool:
SneaksieDave on 31/3/2005 at 21:12
Sure, do you have some webspace? Not sure about putting a silly work in progress rope arrow room over at thiefmissions... :p
Maximius on 31/3/2005 at 21:17
This is really good news, thanks for the work!
Max