Scout-kun is a lie... right?

Firetrucks and You: A Five Part Series

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: Semfry, ividyon

User avatar ebd
Trustee Member Trustee Member
Posts: 441
Joined: 05 Apr 2008, 19:08
Contact:

Subject: Firetrucks and You: A Five Part Series

Post Posted: 21 Jun 2014, 02:35

As part of supporting firetrucks I will be authoring a 5 part series of tutorials, each designed to help mappers of all experience levels make the best use they can out of the package and its contents.

Table of Contents:
  • Part 1: The Basics: So you want to be a firetrucks?
  • Part 2: Dialog and Cutscenes: A Narrative is You! (Coming Soon)
  • Part 3: Advanced Triggers in firetrucks: Trigger Warning. (Coming Soon-ish)
  • Part 4: Finite State Machines: Can't Make This Part Fun Sorry (Coming Later)
  • Part 5: Mouse Triggers: Myst is a Four Letter Word (Coming Eventually)

Before I begin I'd also like to call attention to the official documentation page. It is a bit technical but a lot of quick questions can be answered there.

So without further ado, I present to you the first in the five part series:

Part 1: The Basics: So you want to be a firetrucks?

The purpose of these tutorials is to familiarize mappers with firetrucks. It might first be helpful to state what firetrucks is. If you follow along it should rather quickly teach mappers like you to use these tools (or that's the theory anyway). The best way to learn is by doing, but if you'd rather just read along I won't judge you.

http://ebd.unrealsp.org/firetrucks/ wrote:firetrucks.u is the super cool toolkit for use in OldUnreal's Unreal 227 mod/patch thing.


That's actually a pretty crappy description. Here, I'll write a better one:

ebd wrote:firetrucks.u is a toolkit for use with OldUnreal's 227 Unreal patch that allows mappers to have strong narrative based gameplay. It adds support for dialog, cutscenes, more inventory interactivity, more interactivity in general, a more functional replacement for the translator, and many, many triggers that allow for complex puzzles and scripted sequences.


It isn't a mutator. It is a package for mappers to add to future projects. I've tried in many places to make the new actors as easy to use as possible, but I'm certainly not perfect (hence the need for this document).

It would also be beneficial if I establish some conventions within this document.

A name in this lovely color denotes a package, such as firetrucks or UnrealShare. This much less lovely color will be used to signify a class name such as ItemTrigger or SpecialEvent. The names of actor properties will be encased in double quotes, "like this ."

The first thing you will usually want to do when creating a firetrucks map is set the gametype to firetrucks.FiretrucksGame in the level properties. This can be done by selecting it in the actor browser or just by typing it in. This gametype will ensure that the proper player class and HUD class are used.

Image

Now onto a few basic things. Probably the first thing you might notice if you play a level with the FiretrucksGame gametype and little else is that the player resembles FemaleOne pretty closely. This can be changed.

UnderTriggers there is a new class called PostBeginPlayTrigger. Go ahead and add one to your level and set the event field to something memorable. A PostBeginPlayTrigger is a trigger that fires its event immediately unless otherwise configured. Due to the unspecified nature of the trigger, there is no event instigator, which for the most part isn't something mappers need to care about, but in this case it will come up again later.

Image

Next you will want to add a Identitron3000. This special type of event allows mappers to change the player's appearance and other properties when triggered. Go ahead and set the tag to that memorable something from earlier. Also, you will want to change the actor properties. Set "targetEveryone" to true. Normally the Identitron3000 can acquire its target based on the event instigator, but because of that non-specificity mentioned earlier, it has to be able to affect everyone. It isn't a big deal.

Image

The Identitron3000 has a lot of properties allowing mappers to set each detail of the player's being if they so desire. For now, lets just set "copyFromPlayerConfig" to true. This means that when the level starts the players model preferences will be copied. You could also easily set a class of UnrealIPlayer to copy from, if you would rather the player character be something specific.

Image

All of this might feel a little boiler-plate-ish, so lets add something a little more fun. Under Inventory->Pickups->FiretrucksPickup there is a class called Journal. Add one to the Level. This is the improved replacement for the translator.

Journal entries are a lot like translator entries, but with a few key exceptions. Journal entries are stored should the player decide to revisit them later. Journal entries are also capable of having titles and imagines. Journal entries also support line breaks through a special character sequence (The sequence is '#n' if you are interested. It isn't '\n' because it turns out there are a few very unhappy problems with traditional escape characters and unrealscript, but this is getting a little off topic). Due to these differences, journal entries have their own class to represent them called JournalEvent. Like the TranslatorEvent, they are configured by default to trigger if the player touches them, but they can also be triggered manually through their "tag" field like many other triggers.

A JournalEvent has a fair amount of properties pertaining to text and images. One property of note is the "entryType" property which controls the visual style of the entry. The default value, SET_PLAIN, is rather plain (as one might expect). Make you set the "EntryName" and "entryText" properties.

Image

After that save your level, rebuild, and give it a try. Don't forget to add a PlayerStart! This concludes the first in a series of tutorials dedicated to the subtle nuances of firetrucks. I suspect a lot of stuff covered here is pretty basic for most of you, but I felt it best to start from the beginning.

The level so far: http://ebd.unrealsp.org/firetrucks/tutorial/firetrucks_tutorial1.zip

User avatar ebd
Trustee Member Trustee Member
Posts: 441
Joined: 05 Apr 2008, 19:08
Contact:

Subject: Re: Firetrucks and You: A Five Part Series

Post Posted: 09 Jul 2014, 03:14

Part 2: Dialog and Cutscenes: A Narrative is You!

This tutorial will cover dialog and cutscenes. These were actually to two first features of firetrucks! To have dialog, first you will need some actor for the player to talk to. Typically, this is a ScriptedPawn, but any class of Actor will do. Next you will need a DialogueNode, which is a subclass of Triggers.

Image

You wrote:Hey ebd, why does DialogueNode use the British English spelling when you are a fat American? Is it because of the poor quality of education in the United States? Or is it something else?

Because, like many of the design decisions for firetrucks, whoever decided on the class names for firetrucks clearly isn't very intelligent and is likely confused by the English language, despite it being the only language they know. I wouldn't fault them for that though; it isn't as if they choose to be lacking in mental acuity. Had circumstances been different the class would either be called DialogNode, or British English would be used consistently throughout firetrucks.

The DialogueNode class has a lot of properties, but many of them are not so difficult to figure out. One nuance is that a DialogueNode must have a "prompt" in order to function. It sort of makes sense if you think about it, or maybe it doesn't.

Ok, so I'll be straight with you. One particular aspect of firetrucks usage is slightly obtuse. I wouldn't describe it as baroque though. In part I blame UnrealED, for not having a good UI for this, but everyone else seems to blame me, probably because they are right and it is all my fault. Simply put, some of the actors in firetrucks require a reference to a specific actor that has been placed in the world, instead of using a tag system as per previously defined conventions. There isn't a convenient way to do this, but it isn't unworkable.

By examining the "Name" property of an Actor and then manually typing in to the desired field of another class it is possible to directly reference existing instances of Actor. This is unfortunately necessary for a couple of the fields of the DialogueNode class, such as the "speaker" field and the "cameraToUse", although both fields are optional. If the "speaker" is left blank, it is assumed the player is speaking. If the "cameraToUse" is left blank, then the dialog will be in first-person. The "responses" array also isn't necessary unless the "responseType" is set to RT_CHOICE.

Image

The EasyMode parameter grouping contains an alternative for the "speaker" property intended to help those who experience undue difficulties using the "speaker" property. As the warning indicates, its usage is not encouraged.

A full breakdown of the DialogueNode class, and others is available in the online documentation at: http://ebd.unrealsp.org/firetrucks/#DialogueNode

One really cool feature about RT_CHOICE is that you can specify a different event to trigger for each dialog option. Regardless of whether you use RT_CHOICE or not, it is of course possible for a DialogueNode to trigger another DialogueNode. In this way it is possible to create expansive and branching dialog trees, if you find that sort of thing desirable.

Setting the camera for a DialogueNode isn't so different for setting the speaker. First, create an instance of FiretrucksCamera somewhere in your level, usually pointing at where you'd like the conversation to take place. Then, examine its "Name" property and type it into the DialogueNode's "cameraToUse" property.

Now that the dialog is all set up it will need to be triggered. This can be done with an ordinary Trigger, but firetrucks includes a really cool class called UseEventAssociator which allows players to 'use' things in the world, and fire an event associated with this usage. A lot of modern FPS games allow for many such interactions with the environment, and also some not-so-new games you may fondly remember. Whatever.

Anyway, place a UseEventAssociator in your level. UEAs have a few properties you will absolutely want to configure, but the most important bits are the "Tag" and "Event" fields, which should be familiar to many of you if you have been mapping for Unreal for any length of time. Set the UseEventAssociator's "Event" to match the "Tag" of the DialogueNode. You will also want to set the "useTarget" in a very similar way to how the "speaker" was set with the DialogueNode earlier.

Image

Now for the other properties. "targetName" is a string where you can type in the name that will appear on screen when the player looks at the useTarget. "useType" allows you to select from several fun types that change the on screen prompt. They include things like 'use', 'talk', 'open', and others. Note that the types are only cosmetic. "useDistance" indicates the distance (in uu) from which the object can be used. "precision" is the maximum angle from which it can be used (in radians). More specifically, this controls how near the player has to look towards the object's pivot point in order to use the object. A value of around 3.142 or greater means the object can be used even if the player is completely looking away from it, and is thus equivalent to setting "precise" to false. The default value is fine in most situations.

One neat trick with a UseEventAssoiator is that it is possible for its "useTarget" to be itself. This is especially handy if you want the player to interact with BSP, or other situations where there might not be any convenient actors around to set as the "useTarget."

Like other features of firetrucks, the full details of the UseEventAssociator can be found in the online documentation.

If you give your level a try now, you should be able to walk up to your pawn and press the "use/activate item" key to talk to your pawn. If it doesn't work, a reference level is available for download at the end of this document.

The last topic to be covered by this document is the CameraEvent. The design of the CameraEvent is very simple because was the only way our programmer could understand it.

In some ways you can think of it like a DialogueNode, but without the dialog. It is triggered like aSpecialEvent, and all the mapper has to do is set a duration, and a camera. Like the DialogueNode, not specifying a camera will simply cause the event to be in a first-person perspective.

CameraEvents also fire their "Event" when they finish, making it very easy to chain together multiple CameraEvents into a longer cutscene.

It must be noted however that one limitation of FiretrucksCamera is that it cannot move on its own. For this purpose, I suggest attaching it to a mover with the same tag as the CameraEvent.

Image

That should conclude the second in what may still end up being a five part series. After the overwhelming feedback I have received from the first tutorial I certainly hope this one lives up to everyone's expectations.

The level so far: http://ebd.unrealsp.org/firetrucks/tutorial/firetrucks_tutorial2.zip

User avatar Tarydax
Skaarj Elder Skaarj Elder
Posts: 1052
Joined: 11 Apr 2009, 04:10

Subject: Re: Firetrucks and You: A Five Part Series

Post Posted: 09 Jul 2014, 20:19

That dialogue system is really cool! I didn't think something like that would be possible for an older Unreal game. A campaign taking place in a Nali village or in a human ship could really come to life with something like this. :tup:

I did notice a few issues playing as the SkaarjPlayer and Nali. I didn't seem to have any animations, and when I used feign death, I couldn't get up again. I'm not sure how big of an issue that is, though, when I could probably force the player to use specific player classes from the start with the Identitron3000. The human classes seemed to work fine.

Also, with your screenshots, I noticed that the little + is right inside the text. You can fix that by going into Unreal.ini and changing Language=jpt to Language=int.
Image

Doublez-Down
Skaarj Warlord Skaarj Warlord
Posts: 993
Joined: 27 Feb 2010, 22:46

Subject: Re: Firetrucks and You: A Five Part Series

Post Posted: 10 Jul 2014, 14:46

Really great stuff ebd. I should go back and use firetrucks in the monastery map I released a while back.
I swear to god this forum isn't going to evaporate into ether within the next hour or so. - Bug Horse

User avatar Sat42
Skaarj Warlord Skaarj Warlord
Posts: 865
Joined: 14 Jul 2013, 16:42
Contact:

Subject: Re: Firetrucks and You: A Five Part Series

Post Posted: 10 Jul 2014, 18:59

Doublez-Down wrote:I should go back and use firetrucks in the monastery map I released a while back.


I would wholeheartedly support this! :tup:
Nali: Magic or Telekinesis
Waffnuffly wrote:It's tarydium-doped smoothies. Drunk by the player, I mean. The player is tripping balls. The whole game actually takes place in a large city and the player thinks he's on an alien world.

User avatar LannFyre
Skaarj Scout Skaarj Scout
Posts: 31
Joined: 29 Dec 2014, 02:55

Subject: Re: Firetrucks and You: A Five Part Series

Post Posted: 21 Feb 2015, 16:57

Is this topic planned to be finished?
way2goslugger

User avatar ebd
Trustee Member Trustee Member
Posts: 441
Joined: 05 Apr 2008, 19:08
Contact:

Subject: Re: Firetrucks and You: A Five Part Series

Post Posted: 21 Feb 2015, 20:32

LannFyre wrote:Is this topic planned to be finished?
At the time there wasn't a lot of interest, and after that I ended up being caught up in a never ending crunch at work.

I'm not saying it won't happen, but even though the two in the past were rather short there was a lot of time committed to each one (to prepare the example map and take screenshots, to edit the screenshots, to draft all the text and then revise and format etc...)

User avatar LannFyre
Skaarj Scout Skaarj Scout
Posts: 31
Joined: 29 Dec 2014, 02:55

Subject: Re: Firetrucks and You: A Five Part Series

Post Posted: 21 Feb 2015, 23:15

If you could even just do parts 3 and 4 at a later date then that would be appreciated. I certainly do not need them now but at some point I really would like to implement your mod into the RPG/platformer I am working on.
way2goslugger


Who is online

Users browsing this forum: No registered users and 40 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited