Tuesday, May 1, 2012

Tutorial: Creating a Guild Master

A lot of functionality in Ryzom Core relies on guilds existing. In the default shard information that is provided with Ryzom Core there is no NPC guild master. Creating a guild master is actually a really simple exercise. In this little tutorial I'll show you a couple quick tricks for development and troubleshooting and then jump right into the meat of creating a guild master and then founding a guild in the game.

Development Tricks

There are a couple quick and dirty tricks I used to make sure I had the necessary access and money to test the guild master out. The first one is to grant your player DEV privileges.

There are two main commands you will use to grant yourself DEV privileges. You can always access the data_shard folder and decipher your player ID from your PDR file name but it is much easier if you log into the shard and use the displayPlayers command. The player ID is pretty evident if you look at the example below. You then use the setPriv command to grant yourself privileges. The DEV privilege is the main one you need for this exercise: setPriv <uid> <priv>

displayPlayers
INF b71126d0 94.136.70.53/EGS-136 : Executing command : 'displayPlayers'
INF b71126d0 94.136.70.53/EGS-136 : Player: 1 Name: Karlin(Open) ID: (0x0000000010:00:00:87) FE: 135 Sheet:fyros.race_stats - 21 Priv: '' Pos: 10305,-11722,5 Session: 302
setPriv 1 :DEV:
INF b71126d0 94.136.70.53/EGS-136 : Executing command : 'setPriv 1 :DEV:'
INF b71126d0 94.136.70.53/EGS-136 : New priv for player 1 is ':DEV:'
displayPlayers
INF b71126d0 94.136.70.53/EGS-136 : Player: 1 Name: Karlin(Open) ID: (0x0000000010:00:00:87) FE: 135 Sheet:fyros.race_stats - 21 Priv: ':DEV:' Pos: 10305,-11722,5 Session: 302

Another one that is useful is the /a command from within the client. In this case you will need money to found the guild so use the /a command to execute Money like this:

/a Money 1000000

There are a slew of handy admin commands available in the client but that is a topic for another article.

Creating the Guild Master

You will have to create an NPC in World Editor that will be responsible for handing out guild creation requests. If you look at your shop_categories.cfg in data_shard you'll note that one of the available categories is "guild_creator." This is the shop category that enables an NPC to found guild for a player.

To place this NPC:
  1. Open up newbieland.worldedit in World Editor
  2. Add or expand the urban_newbieland.primitive
  3. Expand the rangers_starting_city npc_manager
  4. Expand the important_npcs npc_zone
  5. Add a new npc_group, accept the default parameters and set the name to guild_masters
  6. Under guild_masters add a new npc_bot
     
  7. Set the name to nbland_guild_master$fct_nb_guildmaster$
  8. Add two chat_parameters lines:
    1. shop:guild_creator
    2. menu: MENU_WHOAMI WHOAMI_GUILDMASTER
  9. Set the sheet_client to company_of_the_drill_loge_master_z_h_b1. Note that you can use any valid existing .creature sheet here. This just happens to be the one that is used for the existing NPCs on Ryzom Core's Newbieland.
  10. Move the Prim Point representing your NPC to where you want it located on the map.
  11. Save your changes.
  12. Restart your shard.
Bear in mind that we haven't discussed the menu options so nothing will be translated when interacting with the NPC (the whoami menu.)

Optionally you can customize the look of the NPC. You might want to do this since we're going to use the same creature sheet as the other default Newbieland NPCs. You do this by setting the color of the five equipment slots. If you look at the screenshot above you will see that we set each equipment slot to a number. These numbers (0 through 8) denote a color:
ColorValue
Red0
Orange1
Green2
Turquoise3
Blue4
Purple5
White6
Black7



Creating the Guild

Actually creating the guild is the easiest part of the process. Assuming you have enough money (see Development Tricks above) all you need to do is locate your NPC and choose the Create Guild action and begin entering the details.
Creating the guild. Give a name and design your flag.
Viewing your guild information.


Next Steps...


This is only the very basic of guild-based configuration. There are other NPC roles and topics to investigate such as guild_rolemasters, guild_caretakers and charges. Maybe next you'll drop a community building on your map and set up a caretaker and rolemaster in order to buy and customize guild halls. Maybe you'll create a guild-based mission.

Hope this helps get you started in guilds!

No comments:

Post a Comment