Guides
Cloning Dungeons
CLONING, HOW TO CLONE A MAP:
Locations of What Needs to be Changed: -The map folder itself (in /element/maps) -instance.txt =>inside=> CONFIGS.PCK (contains World ID and above map directory location) -LITMODELS.PCK -SURFACES.PCK (Map and mini map) -LODDATA.PCK (For some maps) -Directory: \element\maps\ -Server-side: /root/kdxy/gamed/config " From cloning existing maps, I have noticed something when it comes to naming (without changing any of the actual map files "inside"). I cloned b05 -to- house, well here was the file naming scheme within /element/maps/house:" - The file can be named whatever you want. But some file names CAN NOT be changed. (Specified later).
Directory of E:\PW_Client\element\maps\house (Example is for PWE, but works the same)
06/01/2011 08:37 PM
. 06/01/2011 08:37 PM .. 06/01/2011 08:37 PM bsdata 09/17/2010 05:17 AM 703,718 b05_1.t2bk 09/17/2010 05:17 AM 526,424 b05_1.t2lm 09/17/2010 05:17 AM 526,424 b05_1.t2lm1 09/17/2010 05:17 AM 249,272 b05_1.t2mk 09/17/2010 05:17 AM 38,236 b05_light.dat 09/17/2010 05:17 AM 32 house.cld 09/17/2010 05:17 AM 7,519 house.ecbsd 09/17/2010 05:17 AM 92,459 house.ecwld 09/17/2010 05:17 AM 4,372 house.t2hc 09/17/2010 05:17 AM 404 house.trn2 09/17/2010 06:27 AM 834 precinct.clt 01/19/2011 04:27 PM 1,914 region.clt 09/17/2010 05:17 AM 3,704 scenelights.dat
"and ofc the map itself I called "house" -- so it's in /element/maps/house ==> instance.txt points to "house" ==> and LITMODELS/house ==> SURFACES.PCK house.dds etc..."
So... I guess what if anything I've learned about using (or "cloning") an existing map is you can name it whatever you want. However the above files (just like in my b05~house example) should NOT have their filenames changed (unless you feel like editing "INSIDE" the files that actually point to those)...
So, the files that CANNOT have a name change from their original names (in /element/maps/mapname) are:
.t2bk .t2lm .t2lm1 .t2mk xxx_light.dat
The ones that HAVE to be changed (to match your new map name)
.cld .ecbsd .ecwld .t2hc .trn2 Server Side: Server side is really simple, just copy the map you're cloning to another directory within ../gamed/config/ with the new name you will be giving the new clone map. This time you won't have to change any file names.
EX, say you're cloning b05 => house, you would make a copy of the directory (and all the files in it):
../gamed/config/b05/ => ../gamed/config/house/ Then, all you have to do is configure your new map/clone in GS.CONF and GSALIAS.CONF. Duplicate the section from the map you're cloning and change a few settings to make your new map/clone work. Perfect World Edit Example:
EX:
[Original b05 GS.CONF section:]
;---------------------------------------------------------------------------- [World_b05] index = 25 tag = 205 base_path = b05/ limit = allow-root;
grid = {80,80,25,-1000.0,-1000.0} base_region = {-512.0,-512.0} , {512,512.0} local_region = {-512.0,-512.0} , {512,512.0}
;instance_capacity = 400 ;save_point = 1,1285.881,219.612,1274.732
;player_per_instance = 15 player_capacity = 6000 npc_count = 131072 matter_count = 262144
pool_threshold_low = 10 pool_threshold_high = 20
cid = 0,2,13
[Terrain_b05] szMapPath = map nAreaWidth = 512 nAreaHeight = 512 nNumAreas = 1 nNumCols = 1 nNumRows = 1 vGridSize = 2.0f vHeightMin = 0.0f vHeightMax = 800.0f
[MsgReceiverTCP_b05] type = tcp listen_addr = INSTANCEB05:10945 so_sndbuf = 16384 so_rcvbuf = 16384 tcp_nodelay = 1 listen_backlog = 10
[MsgReceiverUNIX_b05] type = unix listen_addr = /tmp/gssock_b05 so_sndbuf = 16384 so_rcvbuf = 16384 listen_backlog = 10
[duplicated and modified for new map/clone:]
;---------------------------------------------------------------------------- [World_house] index = 76 tag = 400 base_path = house/ limit = allow-root;
grid = {80,80,25,-1000.0,-1000.0} base_region = {-512.0,-512.0} , {512,512.0} local_region = {-512.0,-512.0} , {512,512.0}
;instance_capacity = 400 ;save_point = 1,1285.881,219.612,1274.732
;player_per_instance = 15 player_capacity = 6000 npc_count = 131072 matter_count = 262144
;pool_threshold_low = 10 ;pool_threshold_high = 20
cid = 0,2,13
[Terrain_house] szMapPath = map nAreaWidth = 512 nAreaHeight = 512 nNumAreas = 1 nNumCols = 1 nNumRows = 1 vGridSize = 2.0f vHeightMin = 0.0f vHeightMax = 800.0f
[MsgReceiverTCP_house] type = tcp listen_addr = HOUSE:11946 so_sndbuf = 16384 so_rcvbuf = 16384 tcp_nodelay = 1 listen_backlog = 10
[MsgReceiverUNIX_house] type = unix listen_addr = /tmp/gssock_house so_sndbuf = 16384 so_rcvbuf = 16384 listen_backlog = 10
;---------------------------------------------------------------------------- Ether Saga Odyssey GS.CONF Example: What needs to be changed: Battle ID: Match with new Directory folder name (b37 = 37) Template ID: (this will be the cloned dungeon's number in Seledit edit or another element editor) Index = (You can choose whatever, but have this match the bg#) Tag = Match with Index [World_bg 3701 ] SACRED HUNT CONFIGURATION: is_battle_world = 1 battle_id = 37 template_id = 178 index = 3701 tag = 3701 cid = 10001,2,13 base_path = b37/ max_sight_range = 50 max_flight_height = 500 grid = {125,125,20.5,-1280.5,-1280.5} local_region = {-1024,-1024.0} , {1024.0,1024.0} limit = allow-root;no-couple-jump;no-fly;no-duel;no-bind;no-market; player_capacity = 4096
[Terrain_bg 3701 ] szMapPath = map nAreaWidth = 512 nAreaHeight = 512 nNumAreas = 4 nNumCols = 2 nNumRows = 2 vGridSize = 2.0f vHeightMin = 0.0f vHeightMax = 800.0f
[World_bg 3702 ] is_battle_world = 1 battle_id = 37 template_id = 178 index = 3702 tag = 3702 cid = 10001,2,13 base_path = b37/ max_sight_range = 50 max_flight_height = 500 grid = {125,125,20.5,-1280.5,-1280.5} local_region = {-1024,-1024.0} , {1024.0,1024.0} limit = allow-root;no-couple-jump;no-fly;no-duel;no-bind;no-market; player_capacity = 4096
[Terrain_bg 3702 ] szMapPath = map nAreaWidth = 512 nAreaHeight = 512 nNumAreas = 4 nNumCols = 2 nNumRows = 2 vGridSize = 2.0f vHeightMin = 0.0f vHeightMax = 800.0f
[World_bg3703] is_battle_world = 1 battle_id = 37 template_id = 178 index = 3703 tag = 3703 cid = 10001,2,13 base_path = b37/ max_sight_range = 50 max_flight_height = 500 grid = {125,125,20.5,-1280.5,-1280.5} local_region = {-1024,-1024.0} , {1024.0,1024.0} limit = allow-root;no-couple-jump;no-fly;no-duel;no-bind;no-market; player_capacity = 4096
[Terrain_bg3703] szMapPath = map nAreaWidth = 512 nAreaHeight = 512 nNumAreas = 4 nNumCols = 2 nNumRows = 2 vGridSize = 2.0f vHeightMin = 0.0f vHeightMax = 800.0f
CLONED SACRED HUNT:
[World_bg3006] is_battle_world = 1 battle_id = 51 template_id = 35790 index = 3006 tag = 3006 cid = 10001,2,13 base_path = b51/ max_sight_range = 50 max_flight_height = 500 grid = {125,125,20.5,-1280.5,-1280.5} local_region = {-1024,-1024.0} , {1024.0,1024.0} limit = allow-root;no-couple-jump;no-fly;no-duel;no-bind;no-market; player_capacity = 4096
[Terrain_bg3006] szMapPath = map nAreaWidth = 512 nAreaHeight = 512 nNumAreas = 4 nNumCols = 2 nNumRows = 2 vGridSize = 2.0f vHeightMin = 0.0f vHeightMax = 800.0f
[World_bg3007] is_battle_world = 1 battle_id = 51 template_id = 35790 index = 3007 tag = 3007 cid = 10001,2,13 base_path = b51/ max_sight_range = 50 max_flight_height = 500 grid = {125,125,20.5,-1280.5,-1280.5} local_region = {-1024,-1024.0} , {1024.0,1024.0} limit = allow-root;no-couple-jump;no-fly;no-duel;no-bind;no-market; player_capacity = 4096
[Terrain_bg3007] szMapPath = map nAreaWidth = 512 nAreaHeight = 512 nNumAreas = 4 nNumCols = 2 nNumRows = 2 vGridSize = 2.0f vHeightMin = 0.0f vHeightMax = 800.0f
[World_bg3008] is_battle_world = 1 battle_id = 51 template_id = 35790 index = 3008 tag = 3008 cid = 10001,2,13 base_path = b51/ max_sight_range = 50 max_flight_height = 500 grid = {125,125,20.5,-1280.5,-1280.5} local_region = {-1024,-1024.0} , {1024.0,1024.0} limit = allow-root;no-couple-jump;no-fly;no-duel;no-bind;no-market; player_capacity = 4096
[Terrain_bg3008] szMapPath = map nAreaWidth = 512 nAreaHeight = 512 nNumAreas = 4 nNumCols = 2 nNumRows = 2 vGridSize = 2.0f vHeightMin = 0.0f vHeightMax = 800.0f
EXAMPLE of edited Instance.txt for Sacred Hunt (just change the IDs):
"Battlefield Sacred Hunt 124+" { 3006 // ID 0 // Zone ID XXX "X5" // path "X5" // data path "Textures\Maps\detail\x5_0.dds" // detail texture 2, 2 // row, column 37, 79, 85 // water color 0 // 0-normal scene, 1-under water scene 500 // max fly height }
"Battlefield Sacred Hunt 124+" { 3007 // ID 0 // Zone ID XXX "X5" // path "X5" // data path "Textures\Maps\detail\x5_0.dds" // detail texture 2, 2 // row, column 37, 79, 85 // water color 0 // 0-normal scene, 1-under water scene 500 // max fly height }
"Battlefield Sacred Hunt 124+" { 3008 // ID 0 // Zone ID XXX "X5" // path "X5" // data path "Textures\Maps\detail\x5_0.dds" // detail texture 2, 2 // row, column 37, 79, 85 // water color 0 // 0-normal scene, 1-under water scene 500 // max fly height } Note: Tested and Revised for Ether Saga and Edited from Ragezone's "Perfect World" Guide by Omega
Locations on Editing Areas
Pets - Petbedge_interface.lua - This file needs to be edited both client and server (separately as it has specifics exclusive to both server and client side). Clone a pet in Seledit or Rody's Angelica Editor (much easier in this editor but it's subscription based). A more detailed guide will be added for this in it's own section. Boss AI connection - View in Seledit (elements editor) under "common_strategy" For example: The world boss Aughorn Champion uses ai9 (server side) Lottery Items - Needs to be edited via lottery.lua and client side (elements). These accept item IDs from Seledit or RAE. In the example "15832" is the number for "Lady Whiteskull Jewelry Box" and the number "10682" is for the item "Portal Tome" and the other numbers in this position are all the items you can win as well as probabilties. Map IDs: Gaap - 1 Gallion - 2 Amaz/Judium/Dizzet - 6 Leandris: 9 Future's End: 18 Future's Finale: 21 Dream Lost World: 17 Lost World: 14 Change time of Deletion for Item/Character Server side: gamedbd folder - gamesys.conf - delete_timeout = 604800 Fix for maxed bag not being centered correctly: element\interfaces.pck.files\interfaces inventory.xml Activating Bosses/Events in realm (like realm 8) - enable instead of disabled for Spawn Controller (gsalias - realm files). 100000 "Amaymonia Virtue" 100001 "Korson Heights Virtue" 100002 "Gaap Lands Virtue" 100003 "Ziminian Domain Virtue" 100004 "Scalen Bond" 100005 "Aerax Bond" 100006 "Vena Bond" 100010 "Buyer Credit" 100011 "Charisma" 100012 "Elmenta Bond" 100013 "Mechen Bond" 100014 "Haunten Bond" 100015 "Humanoid Bond" 100016 "Beastkin Bond" 100017 "Florax Bond" 100018 "Karma" 100019 "Reputation" 100020 "Culture" 100021 "Gems" 100022 "Honor" 100023 "Achievements" 100024 "Personal Funds" 100032 "Valor" -------------
Adding New Pets
Pets - Petbedge_interface.lua - This file needs to be edited both client and server (separately as it has specifics exclusive to both server and client side). Clone a pet in Seledit or Rody's Angelica Editor (much easier in this editor, but it's subscription based). Locations: Client Side - Found in interfaces.pck, location: element\interfaces.pck.files\interfaces\script Server Side - Found in /root/kdxy/gamed/config We'll be using Pandapocalypse (Item ID: 34460) as an example for cloning. Basically we're going to copy everything with the ID 34460 for a new ID. Pet Speech (continue the sequence): If the last ending number were 2446, add 2447 and so on. NOTE: ALL OF THE FOLLOWING IS FOR SERVER-SIDE AS THIS AS MORE SETTINGS TO BE CHANGED. Unconfirmed as to what this edits, but we need to make sure to copy the format of #34460. This location is the actual pet stats (this option needs to be different for both server and client side). Server Side (all you need to do is change the number to another item ID): Client Side (change the item ID, but the name must remain Chinese for this section to work or your game will crash): Elements (shown in Rody's Angelica Editor): -Game model is changed in the highlighted area to whatever you want the pet to look like -Drop path: What the pet will look like if you drop it (default is an egg) -Icon path (item appearance in inventory) -File Icon Unidentify: what the pet looks like in inventory without mirror identification (suggested not to change) -G1 Normal Icon - Usual icon -G1 Mutated Icon - Usual icon -File Head Icon - Uses egg icon (suggested not to change)
Models
Model Effect Paths
.smd file (SkinModelPath:) files located at .\Game\element\models.pck.files
.ski files (AddiSkinPath:) files located at .\Game\element\models.pck.files\Models
.wav files (FxFilePath:) files located at .\Game\element\sfx.pck.files\sfx
.gfx files (FxFilePath:) files located at .\Game\element\gfx.pck.files\gfx
.att files (AtkPath:) files located at .\Game\element\gfx.pck.files\gfx\skillattack
About animation: .ecm files links to animation by CombineActName. In .smd file there's name, and link to animation file (in 8 version of smd file).
About effects: .att files links to .gfx files, and that's how it works.
Configuring LoMA
Models should be below MOXTVersion: 67 (anything 67 does not work) Use MODFIX for these and change version to 60 or 59 or lower CustomData AtkOrient PSFileVersion GfxRotWithModel Downgrading from MOXTVersion: 71 MOXTVersion: 71, 1.5.5 only supports 67. To downgrade these, remove lines that say "AudioEventGroupEnable: 1", "ParticleBonesCount: 0" and "GfxUseFixedPoint: 0" and then obviously change the version number on the 1st line. AudioEventGroupEnable: 1 ParticleBonesCount: 0 GfxUseFixedPoint: 0 These settings are listed multiple times in the .ecm file and need to be removed with Notepad or Notepad++
Structure of Model
.smd = Skeleton Model .ski = Skin Information .bon = Bone Model .stck = Skeleton Track Animation .phy = Not currently used .ecm = link gfx (effects) to items/equipements.
Model Description .smd (v5, v6, v8)
contains pathes to the seperated files
contains animation blocks with start_sample and end_sample (stored in bon file or in seperated stck files)
Skeleton Bones .bon (v5, v6)
contains bones + properties
contains animation samples (position + quaternions) for each bone for all animation (directly concateneted, splited by start-end sample from .smd animation blocks)
contains hooks (for gfx / other models i.e. player) & hook matrices
Skin Mesh .ski (v8, v9)
contains textures
contains material properties
contains vertices & polygons
Seperated Bone Animation .stck (v1)
belongs to .bon file but was outsourced since .bon v6 to make editing of single animations easier
contains animation samples (positions and quaternions) for each bone for a single animation
GFX Guide
Changing colors of GFX (effects on models) via the .ecm file Test code colors: black - 16776960 mauve - 9502584 green - 9437304 dark weak green - 3211384 ( like a dust) dark mauve - 13565816 grady - 8417086 light mauve - 3984446 dark yellow - 27135 dark red - 63232 smoke like - 73232 good looking black - 16777215 red to mauve - 65280 verry dark orange - 165280 light green - 512128 dark green - 13079039 verry light green - 4259906 good looking green - 4260095 lighter dark - 16711680 9051137 - blue 16404230 dark blue 2.You can search for a gfx with the color that you want and simply add the code to your gfx. -------------- Editing GFX in the .ecm Example: xFilePath: 怪物\通用\红黑灵魂.gfx HookName: HookOffset: 0.000000, 4.652373, 0.137119 HookYaw: 0.000000 HookPitch: 0.000000 HookRot: 0.000000 BindParent: 1 FadeOut: 1000 UseModelAlpha: 1 GfxScale: 3.000000 ------> scale size GfxAlpha: 1.000000------> transparency GfxSpeed: 1.000000------> overall speed GfxOuterPath: 0 GfxParamCount: 0 EventType: 100 StartTime: 0 TimeSpan: -1 Once: 0 Credit: to Jacknife on RageZone
Dungeon Timers
Need to add setting in gs.conf for each dungeonlife_time = (number in seconds here)Example 300 (this would be 3 minutes)Refer to [Tutorial] Perfect World: Change Dungeon Timers on by qwename for more specifics Do not add idle_time as this is in elements.data "Instance" settings. Thanks to Ashborn for bringing that to attention
AI scripts
ai1 = local tips and Amaz queen instance ai2 = N/A ai3 = N/A ai4 = N/A ai5 = Mini Bosses spawn announcements: Blackskull Sorceress, Inari Minister, Aughorn Legend and Aughorn Champion, Fugubokuh Minister, Dracofin First Class, Saint Bull, Nether Lutist, Blue Kirin, Leaffan Roxaress ai6 = Den of the Skeletons - Lady Whiteskull announcement ai7 = ??? ai8 = Metallon Cavern comes the call of the Aughorn Legend and Aughorn Champion announcements ai9 = Aughorn Champion and Aughorn Legend death announcements ai10 = Inari Minister announcements ai11 = Spawners for triggers 309-312 ai12 = ??? Oxen Ultera event ai13 = Bulletin Board quests reward extra EXP announcement ai14 = Fight to Death Trial and Zappah death announcement and River Temple Dungeons ai15 = Fight to Death Trial Dungeon spawns ai16 = Some battlefield spawn ai17 = "Astral Spirit","Pokari Feast! Drinks!","City Filled With Love","Harvest Season","Purify the Water" announcements. Triggers: 551,554,552,550,553 ai18 = ??? Some sort of dungeon or pokari event with champion monsters attacking ai19 = Banner of Heaven Event. Triggers: spawner={587,588,589,590} and close={586,594,595} ai20 = ??? Underworld monsters ai21 = Messenger of Chaos - Realm 15 announcement ai22 = White Dragon - Dragon Colts ai23 = ??? Random combat? ai24 = Amaz and Dizzet monster spawns in Realm 6. Veteran quests has for them ai25 = Dragontown Fight and 15 Minutes Stand ai26 = The Lucky You Event ai27 = The Territory War of Gaap ai28 = The Territory War of Gallio ai29 = The Territory War of Ziminian ai30 = Cattle Ranch ai31 = Mystic Merchant ai32 = Ether Castle ai33 = Fruit of Celestial Roots ai34 = Pig Race ai35 = Immortal Search Event for realm 8 - Hide and Seek? ai36 = Halloween Event ai37 = Families at War Event ai38 = ??? Underworld? ai39 = The Queen of Cosmos boss appears at Taichi Graphic ai40 = ??? Some spawner ai41 = Pit of Champions ai42 = ??? Chinese ai43 = ??? Some spawner ai44 = Red Horned Ape ai45 = Twisted Moon (both versions) ai46 = Sacred Hunt ai47 = Risen Phoenix, Astral Overlord ai48 = ??? Chinese. Mentions snowball buff from Christmas time. ai49 = ??? Chinese ai50 = Monkey King's Gauntlet ai51 = ??? ai123 = ??? Current Unknowns: ai2 ai3 ai4 ai7