1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef CL_RACE_STATS_SHEET_H
19 #define CL_RACE_STATS_SHEET_H
22 #include "entity_sheet.h"
23 #include "ground_fx_sheet.h"
24 #include "body_to_bone_sheet.h"
26 #include "game_share/people.h"
27 #include "game_share/slot_types.h"
28 #include "game_share/characteristics.h"
31 //=======================================================================================================
37 /** Per Gender Infos. Used by RaceStats sheets
41 static const std::string UnknownItemName
;
45 std::string Skelfilename
;
47 std::string AnimSetBaseName
;
48 // default equipment, sheath are not included
49 std::string Items
[SLOTTYPE::NB_SLOT
];
51 std::string LodCharacterName
;
52 float LodCharacterDistance
;
53 // value to scale the "pos" channel of the animation of the player.
54 float CharacterScalePos
;
56 std::vector
<CGroundFXSheet
> GroundFX
;
58 // Blendshapes minimum and maximum values
59 float BlendShapeMin
[8], BlendShapeMax
[8];
61 // Name positions on Z axis
66 /////////////////////////////////////////////////////////////////////////////////////////////////////
67 /////////////////////////////////////////////////////////////////////////////////////////////////////
71 void build(const NLGEORGES::UFormElm
&form
, const std::string
&prefix
);
73 void serial(NLMISC::IStream
&f
);
75 /// Get the item name for a given slot.
76 const std::string
&getItemName(SLOTTYPE::EVisualSlot slot
) const;
80 //=======================================================================================================
82 /** Class to manage .race_stats sheets
84 class CRaceStatsSheet
: public CEntitySheet
87 enum { NumAttackLists
= 8 };
88 EGSPD::CPeople::TPeople People
;
89 // Start characteristics values for this race
90 sint8 CharacStartValue
[CHARACTERISTICS::NUM_CHARACTERISTICS
];
91 // Per gender infos. 0 is for male and 1 is for female
92 CGenderInfo GenderInfos
[2];
93 /// Skin to use for this race.
96 std::string Automaton
;
97 // Body to bone. For meleeImpact localisation
98 CBodyToBoneSheet BodyToBone
;
99 // attack lists filenames
100 std::vector
<NLMISC::TSStringId
> AttackLists
;
105 virtual void build(const NLGEORGES::UFormElm
&item
);
106 /// Serialize rce_stats sheet into binary data file.
107 virtual void serial(NLMISC::IStream
&f
);
109 void buildGroundFXs(const NLGEORGES::UFormElm
&item
, const std::string
&name
, std::vector
<CGroundFXSheet
> &dest
);