[TUTORIALS] Getting started with mapping for PVKII 3.0

LhorkanLhorkan PVKII Team, Senior
edited January 2015 in Community Maps

Comments

  • LhorkanLhorkan PVKII Team, Senior
    edited January 2015
    1. Setting up Hammer

    So, you've decided to create a custom map? Great! Let's get you set up. The Source engine world editor is called Hammer, and it now ships with every Source game instead of being stand alone in the Source SDK package.

    1.1 Start Hammer for the first time

    You will find hammer.exe in \Steam\SteamApps\common\Pirates, Vikings and Knights II\sdkbase_pvkii\bin. You'll do well to create a shortcut to it. Start it, then go to Tools -> Options. You'll see the following:

    options_zps71f0ec0d.jpg

    Hammer does a guess at what files and paths to use, but many of them are wrong. You will need to change them accordingly for Hammer to work:
    1. Select the item in Game Data Files and remove it.
    2. Still under Game Data Files, click Add, and browse to \Steam\SteamApps\common\Pirates, Vikings and Knights II\pvkii. Select pvkii.fgd and hit OK.
    3. At the bottom of the window, under Game Directory, hit Browse and navigate to \Steam\SteamApps\common\Pirates, Vikings and Knights II\pvkii. Hit OK.
    4. The VMF directoy can be freely chosen (.vmf is what Hammer saves maps in - not to be confused with the compiled maps you can play on, those are .bsp). However, it is common practice to place them in \Steam\SteamApps\common\Pirates, Vikings and Knights II\pvkii\mapsrc. You'll probably have to make this directory first.
    5. Lastly, go to the final tab, Build Programs. All the executables should already be filled out correctly (if they aren't, they are all located in \Steam\SteamApps\common\pirates, vikings and knights ii\sdkbase_pvkii\bin\). However, the compiled maps directory is wrong. Change it to \Steam\SteamApps\common\pirates, vikings and knights ii\pvkii\maps.
    6. Hit OK to close the options window, and restart Hammer. You're good to go!


    1.3 Start mapping

    To get to know Hammer, I will refer you to the very capable hands of Interlopers. You can find an extended list of tutorials here. I am assuming you have basic Hammer knowledge from here on out.

    The Valve developer wiki should be your go-to site whenever you need info about how a specific brush or entity works, or about general mapping concepts. For instance, it has great articles on lighting.

    In the next post, I'll show you how to create a map that uses one of PVKII's game modes.
    dragonattacksig03-1.png
  • LhorkanLhorkan PVKII Team, Senior
    edited 2:47PM
    2. PVKII Game modes

    2.1 info_pvk

    info_pvk_zps0e9ec696.png


    Every PVKII map needs to have the point entity info_pvk. It defines what game mode the map uses, and gives access to some useful events and parameters. It can be placed at any location in the map.

    Hint wrote:
    If you quickly want to select or navigate to an entity, go to Map -> Entity Report..., and enter the class of the entity in the "by class" textbox. You can also search by targetname or other properties in the key/value field. This is very useful if your map grows in size and you don't remember where you put a certain object.


    With the info_pvk in place, I'll show you what a map needs for every game mode in order to work, with the exception of Deathmatch; that is the lack of a game mode, as it just lets the teams kill each other without any type of scoring system.
    dragonattacksig03-1.png
  • LhorkanLhorkan PVKII Team, Senior
    edited May 2014
    2.2 Booty

    booty_zpsb19377e6.png


    2.2.1 info_pvk settings

    The first step in creating a booty map is setting the game mode to Booty in your info_pvk. By default, all teams will have an equal amount of tickets (the actual round time is a server setting, and can't be changed by the mapper). However, in some scenarios you want a certain team to take longer to win. Take bt_island, for instance. This is where the P / V / K Timer Add (minutes) property in the info_pvk comes in. Another Booty related property is Booty Chest Lock Time; I don't think you need an explanation on what this does.

    2.2.2 Adding the booty

    With the game mode set up, it's time to add chests o' booty to your map. This is as simple as adding the weapon_chest point entity at the location where you want a chest to spawn at round start. PVKII will automatically count the amount of chests you have in the map, so you don't need to worry about a thing.

    2.2.3 Defining chest zones

    No use in having booty without a place to drop it off. Each team needs a func_chestzone brush entity, with the tools/tooltrigger texture applied to it. Intuitively, the volume of the brush marks the area in which chests will be captured. All you have to change in its properties is the Team Number property.

    With a chest zone for every team and booty to put in it, you're good to go!

    Hint wrote:
    When you're testing your map in single player through the Create Game menu option, you will still get the "Waiting for players" message. To start the round and see if everything is in order, you can add bots. Open up the console, enter sv_cheats 1, then sv_lan 1 and finally spam bot_add a number of times. You'll still have to wait a bit for the round to start.

    If you're like me and don't have a keyboard that allows the console to open, the easiest way around this is opening Steam, right clicking on PVKII, opening its Properties and adding

    -toconsole

    to its Launch Options.
    dragonattacksig03-1.png
  • LhorkanLhorkan PVKII Team, Senior
    edited May 2014
    2.3 Trinket Wars

    tw_zps8a711cba.png


    2.3.1 info_pvk settings

    Trinket wars maps are by far the easiest in the game mode preparations department: All it takes is setting the game mode in the info_pvk to Trinket Wars. PVKII will take care of the rest.
    dragonattacksig03-1.png
  • LhorkanLhorkan PVKII Team, Senior
    edited May 2014
    2.4 Territory

    te_zpsb18ccf05.png


    2.4.1 info_pvk settings

    Set the game mode to Territory in the info_pvk. By default, a team can only win by decreasing its tickets to 0. By changing the Territory Win Condition property, you can also make a team win that's holding all territories for a set amount of time; the Territory Win Delay.

    2.4.2 Adding territories

    You create a territory by making a func_territory brush entity at the desired location, with the tools/toolstrigger texture. The volume of the brush marks the bounds of the territory.

    When making more than one territory, keep in mind that each territory must have a unique Territory Index. All the necessary info on that and the territory icon are provided in the Help section of the properties window.

    Since the map update patch, territory bounds are displayed visually with a semi transparent ring that changes color along with the owning team. On top of that, the team holding a territory will get their health regenerated while standing in it. This is all done in Hammer. To make it easy for you and to promote uniformity, I attached a sample .vmf with four territories ready to be used, fully equipped with these two features. Don't forget to copy the three filter_activator_teams if you decide to use this template.

    Hint wrote:
    If you look at the template .vmf, you'll see that the func_territory, trigger_hurt and func_brush brush entities are all inside of each other, making it hard to select the right one. You can click and hold with the Select tool in the Perspective view to cycle through every object under your cursor. It's a good idea to keep the Properties windows open while doing this, so you can quickly see what object you have currently selected.


    Hint wrote:
    If you want a fifth territory with the two additional features, you don't have to go through the effort of manually remaking every brush entity and setting up the Input/Output chain. Simply select the group of objects you wish to duplicate, hit Ctrl-C, and then go to Edit -> Paste special.... Check the Add this prefix to all named entities option, and enter a meaningful prefix there. Hammer will then not only add that prefix to every copied object, but also automatically fix the names in the Input/Output chain for all the new copies.
    dragonattacksig03-1.png
  • LhorkanLhorkan PVKII Team, Senior
    edited May 2014
    2.5 Last Team Standing

    lts_zps8d956d44.png


    2.5.1 info_pvk settings

    Set the game mode to Last Team Standing. The property Sudden Death Duration (seconds) overwrites the time to round draw after sudden death has started.

    2.5.2 Sudden Death

    Just changing the game mode is enough to make a working LTS map, but it's not going to be a very interesting one. The star of any LTS map is the sudden death, in which you can get as creative as you like. You can make anything happen that's possible with Source through the OnSuddenDeath output in info_pvk.

    The info_point_vulture which used to spawn vultures at sudden death no longer works.
    dragonattacksig03-1.png
  • LhorkanLhorkan PVKII Team, Senior
    edited June 2017
    2.6 Objective push

    obj_zps117bcc04.png


    2.6.1 info_pvk settings

    Set the game mode to Objective Push. You can't set the round time in the properties, but you can change it with an input to the entity: OnRoundRestart -> info_pvk -> SetRoundTimer <value in seconds>.

    2.6.2 Complete freedom

    Objective push is a very special game mode: It allows the mapper to invent his own victory conditions. Only your skill with Hammer limits what you can do with it. You control everything through entity i/o, and the commands you need for the game mode are explained in Crackapolly's thread.


    3.0 Best Practices
    Will2k's Source Optimization Tutorials https://www.mapcore....zation-roadmap/

    And more resources: http://forums.pvkii.com/index.php?showtopic=3404&#entry52852
    dragonattacksig03-1.png
This discussion has been closed.