Complex Vehicles (Savage): Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
===Overview=== | ===Overview=== | ||
Now that all the basics of vehicles are in place, we can look at how to support more complex vehicles, such as military vehicles with weapons. | Now that all the basics of vehicles are in place, we can look at how to support more complex vehicles, such as military vehicles with weapons. Each such vehicle needs to be managed as a user-selectable pick, plus the weapons need to be associated directly with each vehicle. We also need to handle the appropriate display of the weapons for each vehicle, which can be handled a few different ways. | ||
===Assigning Weapons to Vehicles=== | |||
The biggest wrinkle posed by complex vehicles is how to define the various weapons separately (as weapons) and then associate those weapons with the vehicle. Your first thought might be to use a bootstrap to associate the weapons, but that won't work. The vehicle is assigned to the character, so any things bootstrapped by the vehicle will also be assigned to the character. What we need is to treat each vehicle as its own container, into which the various weapon picks can be added. | |||
In order to accomplish this, we must use a entity. When the entity is added to the character, it becomes a gizmo, which is a separate container. We can then add the various weapons into the gizmo. Entities are defined separately and then added via a thing. When the thing is added to the character as a pick, the associated entity is automatically added as a gizmo. | |||
So our first task is to define an entity that we can use with vehicles. When we define the entity, we can automatically assign things into the entity, which will be added to every gizmo that derives from the entity. However, every vehicle is unique and there is nothing that must exist for every vehicle. We can also assign tags to every entity that will always be assigned to every derived gizmo, but we don't need any of those either. | |||
This leaves us with an incredibly simple entity. The entity is merely a shell that will be separately customized for every vehicle. Since the entity is used to contain the various equipment possessed by each vehicle, we'll refer to it as the "load-out" for a vehicle and name it accordingly. This results in an entity definition that looks like the one below, which we can define at the bottom of the file "equipment.str". | |||
<pre> | |||
<entity | |||
id="LoadOut"> | |||
</entity> | |||
</pre> | |||
Revision as of 02:30, 12 January 2009
Context: HL Kit … Authoring Examples … Savage Worlds Walk-Through
Overview
Now that all the basics of vehicles are in place, we can look at how to support more complex vehicles, such as military vehicles with weapons. Each such vehicle needs to be managed as a user-selectable pick, plus the weapons need to be associated directly with each vehicle. We also need to handle the appropriate display of the weapons for each vehicle, which can be handled a few different ways.
Assigning Weapons to Vehicles
The biggest wrinkle posed by complex vehicles is how to define the various weapons separately (as weapons) and then associate those weapons with the vehicle. Your first thought might be to use a bootstrap to associate the weapons, but that won't work. The vehicle is assigned to the character, so any things bootstrapped by the vehicle will also be assigned to the character. What we need is to treat each vehicle as its own container, into which the various weapon picks can be added.
In order to accomplish this, we must use a entity. When the entity is added to the character, it becomes a gizmo, which is a separate container. We can then add the various weapons into the gizmo. Entities are defined separately and then added via a thing. When the thing is added to the character as a pick, the associated entity is automatically added as a gizmo.
So our first task is to define an entity that we can use with vehicles. When we define the entity, we can automatically assign things into the entity, which will be added to every gizmo that derives from the entity. However, every vehicle is unique and there is nothing that must exist for every vehicle. We can also assign tags to every entity that will always be assigned to every derived gizmo, but we don't need any of those either.
This leaves us with an incredibly simple entity. The entity is merely a shell that will be separately customized for every vehicle. Since the entity is used to contain the various equipment possessed by each vehicle, we'll refer to it as the "load-out" for a vehicle and name it accordingly. This results in an entity definition that looks like the one below, which we can define at the bottom of the file "equipment.str".
<entity id="LoadOut"> </entity>
define an entity to encapsulate the load-outs for vehicles with weapons, and bootstrap all weapons into the entity for each vehicle
override values and tags on the weapons via the bootstraps to customize small differences
fields that need to be overridden via bootstraps must be changed from static to derived
add "reload1" weapon ability
modify "InfoVeh" procedure to output the appropriate details of the load-out for each vehicle
add "vhLoadout" field for display of things