RigsofRods
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TuneupFileFormat.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2013-2024 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #pragma once
23 
29 #include "Application.h"
30 #include "CacheSystem.h"
31 #include "RefCountingObject.h"
32 
33 #include <OgreResourceManager.h>
34 
35 #include <array>
36 #include <vector>
37 #include <string>
38 #include <set>
39 
40 namespace RoR {
41 
42 const size_t TUNEUP_BUF_SIZE = 2000;
43 
45 {
47  Ogre::Vector3 tnt_pos = Ogre::Vector3::ZERO;
48  std::string tnt_origin;
49 };
50 
52 {
54  Ogre::Vector3 tct_pos = Ogre::Vector3::ZERO;
55  std::string tct_origin;
56 };
57 
59 {
61  std::array<std::string, 2> twt_media;
65  float twt_tire_radius = -1.f;
66  float twt_rim_radius = -1.f;
67  std::string twt_origin;
68 
69 };
70 
72 {
74  std::array<std::string, 2> tpt_media;
75  Ogre::Vector3 tpt_offset = Ogre::Vector3::ZERO;
76  Ogre::Vector3 tpt_rotation = Ogre::Vector3::ZERO;
77  std::string tpt_origin;
78 };
79 
81 {
83  std::string tft_media;
84  Ogre::Vector3 tft_offset = Ogre::Vector3::ZERO;
85  Ogre::Vector3 tft_rotation = Ogre::Vector3::ZERO;
86  std::string tft_origin;
87 };
88 
90 {
91  std::string tmt_name;
92  std::string tmt_type;
93  std::array<std::string, 3> tmt_media;
94  std::string tmt_origin;
95 };
96 
100 struct TuneupDef: public RefCountingObject<TuneupDef>
101 {
104  std::string name;
105  std::string guid;
106  std::string filename;
107  std::string thumbnail;
108  std::string description;
109  std::string author_name;
110  int author_id = -1;
113 
116  std::set<std::string> use_addonparts;
117 
118  std::map<NodeNum_t, TuneupNodeTweak> node_tweaks;
119  std::map<CineCameraID_t, TuneupCineCameraTweak> cinecam_tweaks;
120  std::map<WheelID_t, TuneupWheelTweak> wheel_tweaks;
121  std::map<PropID_t, TuneupPropTweak> prop_tweaks;
122  std::map<FlexbodyID_t, TuneupFlexbodyTweak> flexbody_tweaks;
123  std::map<std::string, TuneupManagedMatTweak> managedmat_tweaks;
124  std::set<PropID_t> unwanted_props;
125  std::set<FlexbodyID_t> unwanted_flexbodies;
126  std::set<FlareID_t> unwanted_flares;
127  std::set<ExhaustID_t> unwanted_exhausts;
128  std::set<std::string> unwanted_managedmats;
129 
133  std::set<PropID_t> force_remove_props;
134  std::set<FlexbodyID_t> force_remove_flexbodies;
135  std::map<WheelID_t, WheelSide> force_wheel_sides;
136  std::map<VideoCameraID_t, VideoCamRole> force_video_cam_roles;
137  std::set<FlareID_t> force_remove_flares;
138  std::set<ExhaustID_t> force_remove_exhausts;
139  std::set<std::string> force_remove_managedmats;
140 
144  std::set<NodeNum_t> protected_nodes;
145  std::set<CineCameraID_t> protected_cinecams;
146  std::set<WheelID_t> protected_wheels;
147  std::set<PropID_t> protected_props;
148  std::set<FlexbodyID_t> protected_flexbodies;
149  std::set<FlareID_t> protected_flares;
150  std::set<ExhaustID_t> protected_exhausts;
151  std::set<std::string> protected_managedmats;
152 
155  void reset();
156 
159  bool isPropProtected(PropID_t propid) const { return protected_props.find(propid) != protected_props.end(); }
160  bool isFlexbodyProtected(FlexbodyID_t flexbodyid) const { return protected_flexbodies.find(flexbodyid) != protected_flexbodies.end(); }
161  bool isWheelProtected(WheelID_t wheelid) const { return protected_wheels.find(wheelid) != protected_wheels.end(); }
162  bool isNodeProtected(NodeNum_t nodenum) const { return protected_nodes.find(nodenum) != protected_nodes.end(); }
163  bool isCineCameraProtected(CineCameraID_t cinecamid) const { return protected_cinecams.find(cinecamid) != protected_cinecams.end(); }
164  bool isFlareProtected(FlareID_t flareid) const { return protected_flares.find(flareid) != protected_flares.end(); }
165  bool isExhaustProtected(ExhaustID_t exhaustid) const { return protected_exhausts.find(exhaustid) != protected_exhausts.end(); }
166  bool isManagedMatProtected(const std::string& matname) const { return protected_managedmats.find(matname) != protected_managedmats.end(); }
168 
171  bool isPropUnwanted(PropID_t propid) { return unwanted_props.find(propid) != unwanted_props.end(); }
172  bool isFlexbodyUnwanted(FlexbodyID_t flexbodyid) { return unwanted_flexbodies.find(flexbodyid) != unwanted_flexbodies.end(); }
173  bool isFlareUnwanted(FlareID_t flareid) { return unwanted_flares.find(flareid) != unwanted_flares.end(); }
174  bool isExhaustUnwanted(ExhaustID_t exhaustid) { return unwanted_exhausts.find(exhaustid) != unwanted_exhausts.end(); }
175  bool isManagedMatUnwanted(const std::string& matname) { return unwanted_managedmats.find(matname) != unwanted_managedmats.end(); }
177 
180  bool isPropForceRemoved(PropID_t propid) { return force_remove_props.find(propid) != force_remove_props.end(); }
181  bool isFlexbodyForceRemoved(FlexbodyID_t flexbodyid) { return force_remove_flexbodies.find(flexbodyid) != force_remove_flexbodies.end(); }
182  bool isWheelSideForced(WheelID_t wheelid, WheelSide& out_val) const;
183  bool isFlareForceRemoved(FlareID_t flareid) { return force_remove_flares.find(flareid) != force_remove_flares.end(); }
184  bool isExhaustForceRemoved(ExhaustID_t exhaustid) { return force_remove_exhausts.find(exhaustid) != force_remove_exhausts.end(); }
185  bool isManagedMatForceRemoved(const std::string& matname) { return force_remove_managedmats.find(matname) != force_remove_managedmats.end(); }
186  bool isVideoCameraRoleForced(VideoCameraID_t camera_id, VideoCamRole& out_val) const;
188 };
189 
191 {
192 public:
193 
194  static std::vector<TuneupDefPtr> ParseTuneups(Ogre::DataStreamPtr& stream);
195  static void ExportTuneup(Ogre::DataStreamPtr& stream, TuneupDefPtr& tuneup);
196 
199  static bool isAddonPartUsed(TuneupDefPtr& tuneup_entry, const std::string& filename);
201 
204  static float getTweakedWheelTireRadius(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, float orig_val);
205  static float getTweakedWheelRimRadius(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, float orig_val);
206  static std::string getTweakedWheelMedia(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, int media_idx, const std::string& orig_val);
207  static std::string getTweakedWheelMediaRG(TuneupDefPtr& tuneup_def, WheelID_t wheel_id, int media_idx, const std::string& orig_val);
208  static WheelSide getTweakedWheelSide(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, WheelSide orig_val);
209  static bool isWheelTweaked(TuneupDefPtr& tuneup_entry, WheelID_t wheel_id, TuneupWheelTweak*& out_tweak);
211 
214  static Ogre::Vector3 getTweakedNodePosition(TuneupDefPtr& tuneup_entry, NodeNum_t nodenum, Ogre::Vector3 orig_val);
215  static bool isNodeTweaked(TuneupDefPtr& tuneup_entry, NodeNum_t nodenum, TuneupNodeTweak*& out_tweak);
217 
220  static Ogre::Vector3 getTweakedCineCameraPosition(TuneupDefPtr& tuneup_entry, CineCameraID_t cinecamid, Ogre::Vector3 orig_val);
221  static bool isCineCameraTweaked(TuneupDefPtr& tuneup_entry, CineCameraID_t cinecamid, TuneupCineCameraTweak*& out_tweak);
223 
226  static bool isPropAnyhowRemoved(TuneupDefPtr& tuneup_def, PropID_t prop_id);
227  static Ogre::Vector3 getTweakedPropOffset(TuneupDefPtr& tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val);
228  static Ogre::Vector3 getTweakedPropRotation(TuneupDefPtr& tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val);
229  static std::string getTweakedPropMedia(TuneupDefPtr& tuneup_entry, PropID_t prop_id, int media_idx, const std::string& orig_val);
230  static std::string getTweakedPropMediaRG(TuneupDefPtr& tuneup_def, PropID_t prop_id, int media_idx, const std::string& orig_val);
231  static bool isPropTweaked(TuneupDefPtr& tuneup_entry, PropID_t flexbody_id, TuneupPropTweak*& out_tweak);
233 
236  static bool isFlexbodyAnyhowRemoved(TuneupDefPtr& tuneup_def, FlexbodyID_t flexbody_id);
237  static Ogre::Vector3 getTweakedFlexbodyOffset(TuneupDefPtr& tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val);
238  static Ogre::Vector3 getTweakedFlexbodyRotation(TuneupDefPtr& tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val);
239  static std::string getTweakedFlexbodyMedia(TuneupDefPtr& tuneup_entry, FlexbodyID_t flexbody_id, int media_idx, const std::string& orig_val);
240  static std::string getTweakedFlexbodyMediaRG(TuneupDefPtr& tuneup_def, FlexbodyID_t flexbody_id, int media_idx, const std::string& orig_val);
241  static bool isFlexbodyTweaked(TuneupDefPtr& tuneup_entry, FlexbodyID_t flexbody_id, TuneupFlexbodyTweak*& out_tweak);
243 
246  static bool isFlareAnyhowRemoved(TuneupDefPtr& tuneup_def, FlareID_t flare_id);
248 
251  static bool isExhaustAnyhowRemoved(TuneupDefPtr& tuneup_def, ExhaustID_t exhaust_id);
253 
256  static bool isManagedMatAnyhowRemoved(TuneupDefPtr& tuneup_def, const std::string& matname);
257  static std::string getTweakedManagedMatType(TuneupDefPtr& tuneup_def, const std::string& matname, const std::string& orig_val);
258  static std::string getTweakedManagedMatMedia(TuneupDefPtr& tuneup_def, const std::string& matname, int media_idx, const std::string& orig_val);
259  static std::string getTweakedManagedMatMediaRG(TuneupDefPtr& tuneup_def, const std::string& matname, int media_idx, const std::string& orig_val);
260  static bool isManagedMatTweaked(TuneupDefPtr& tuneup_def, const std::string& matname, TuneupManagedMatTweak*& out_tweak);
262 
265  static VideoCamRole getTweakedVideoCameraRole(TuneupDefPtr& tuneup_def, VideoCameraID_t camera_id, VideoCamRole orig_val);
267 
268 private:
269 
270  static void ParseTuneupAttribute(const std::string& line, TuneupDefPtr& tuneup_def);
271 };
272 
273 }; // namespace RoR
RoR::TuneupDef
Dual purpose:
Definition: TuneupFileFormat.h:100
RoR::TuneupDef::isFlexbodyForceRemoved
bool isFlexbodyForceRemoved(FlexbodyID_t flexbodyid)
Definition: TuneupFileFormat.h:181
RoR::WheelSide
WheelSide
Used by rig-def/addonpart/tuneup formats to specify wheel rim mesh orientation.
Definition: Application.h:542
RoR::TuneupDef::clone
TuneupDefPtr clone()
Definition: TuneupFileFormat.cpp:38
RoR::TuneupDef::force_remove_flexbodies
std::set< FlexbodyID_t > force_remove_flexbodies
UI overrides.
Definition: TuneupFileFormat.h:134
RoR::TuneupWheelTweak::twt_origin
std::string twt_origin
Addonpart filename.
Definition: TuneupFileFormat.h:67
RoR::TuneupUtil::isAddonPartUsed
static bool isAddonPartUsed(TuneupDefPtr &tuneup_entry, const std::string &filename)
Definition: TuneupFileFormat.cpp:583
RoR::TuneupDef::protected_flares
std::set< FlareID_t > protected_flares
Flares which cannot be altered via 'addonpart_unwanted_flare' directive.
Definition: TuneupFileFormat.h:149
RoR::TuneupUtil::ParseTuneups
static std::vector< TuneupDefPtr > ParseTuneups(Ogre::DataStreamPtr &stream)
Definition: TuneupFileFormat.cpp:589
RoR::TuneupNodeTweak::tnt_nodenum
NodeNum_t tnt_nodenum
Arg#1, required.
Definition: TuneupFileFormat.h:46
RoR::TuneupUtil::getTweakedCineCameraPosition
static Ogre::Vector3 getTweakedCineCameraPosition(TuneupDefPtr &tuneup_entry, CineCameraID_t cinecamid, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:264
RoR::TuneupUtil::isWheelTweaked
static bool isWheelTweaked(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, TuneupWheelTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:233
RoR::TuneupDef::isManagedMatProtected
bool isManagedMatProtected(const std::string &matname) const
Definition: TuneupFileFormat.h:166
RoR::TuneupWheelTweak::twt_tire_radius
float twt_tire_radius
Arg#5, optional.
Definition: TuneupFileFormat.h:65
RoR::TuneupDef::force_remove_props
std::set< PropID_t > force_remove_props
UI overrides.
Definition: TuneupFileFormat.h:133
RoR::TuneupDef::unwanted_props
std::set< PropID_t > unwanted_props
'addonpart_unwanted_prop' directives.
Definition: TuneupFileFormat.h:124
RoR::TuneupPropTweak
< Data of 'addonpart_tweak_prop <prop ID> <offsetX> <offsetY> <offsetZ> <rotX> <rotY> <rotZ> <media1>...
Definition: TuneupFileFormat.h:71
RoR::TuneupWheelTweak::twt_rim_radius
float twt_rim_radius
Arg#6, optional, only applies to some wheel types.
Definition: TuneupFileFormat.h:66
RoR::TuneupFlexbodyTweak::tft_rotation
Ogre::Vector3 tft_rotation
Definition: TuneupFileFormat.h:85
RoR::CineCameraID_t
int CineCameraID_t
Index into Actor::ar_cinecam_node and Actor::ar_camera_node_* arrays; use RoR::CINECAMERAID_INVALID a...
Definition: ForwardDeclarations.h:79
RoR::TuneupUtil::isPropTweaked
static bool isPropTweaked(TuneupDefPtr &tuneup_entry, PropID_t flexbody_id, TuneupPropTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:384
RoR::TuneupFlexbodyTweak::tft_origin
std::string tft_origin
Addonpart filename.
Definition: TuneupFileFormat.h:86
RoR::TuneupManagedMatTweak::tmt_type
std::string tmt_type
Arg#2, required.
Definition: TuneupFileFormat.h:92
RoR::TuneupFlexbodyTweak::tft_media
std::string tft_media
Definition: TuneupFileFormat.h:83
RoR::TuneupUtil::isPropAnyhowRemoved
static bool isPropAnyhowRemoved(TuneupDefPtr &tuneup_def, PropID_t prop_id)
Definition: TuneupFileFormat.cpp:310
RoR::TuneupDef::unwanted_managedmats
std::set< std::string > unwanted_managedmats
'addonpart_unwanted_managedmaterial' directives.
Definition: TuneupFileFormat.h:128
RoR::TuneupDef::prop_tweaks
std::map< PropID_t, TuneupPropTweak > prop_tweaks
Mesh name(s), offset and rotation overrides via 'addonpart_tweak_prop'.
Definition: TuneupFileFormat.h:121
RoR::NODENUM_INVALID
static const NodeNum_t NODENUM_INVALID
Definition: ForwardDeclarations.h:55
RoR::PROPID_INVALID
static const PropID_t PROPID_INVALID
Definition: ForwardDeclarations.h:62
RoR::TuneupDef::unwanted_flexbodies
std::set< FlexbodyID_t > unwanted_flexbodies
'addonpart_unwanted_flexbody' directives.
Definition: TuneupFileFormat.h:125
RoR::TuneupUtil
Definition: TuneupFileFormat.h:190
RoR::WheelSide::INVALID
@ INVALID
RoR::TuneupUtil::ExportTuneup
static void ExportTuneup(Ogre::DataStreamPtr &stream, TuneupDefPtr &tuneup)
Definition: TuneupFileFormat.cpp:681
RoR::TuneupDef::isFlexbodyProtected
bool isFlexbodyProtected(FlexbodyID_t flexbodyid) const
Definition: TuneupFileFormat.h:160
RoR::TuneupDef::name
std::string name
Definition: TuneupFileFormat.h:104
RoR::TuneupPropTweak::tpt_prop_id
PropID_t tpt_prop_id
Definition: TuneupFileFormat.h:73
RoR::TuneupDef::protected_nodes
std::set< NodeNum_t > protected_nodes
Nodes that cannot be altered via 'addonpart_tweak_node'.
Definition: TuneupFileFormat.h:144
RoR::TuneupDef::use_addonparts
std::set< std::string > use_addonparts
Addonpart filenames.
Definition: TuneupFileFormat.h:116
RoR::TuneupDef::isExhaustUnwanted
bool isExhaustUnwanted(ExhaustID_t exhaustid)
Definition: TuneupFileFormat.h:174
RoR::TuneupDef::isPropUnwanted
bool isPropUnwanted(PropID_t propid)
Definition: TuneupFileFormat.h:171
RoR::CID_None
@ CID_None
Definition: Application.h:479
RoR::TuneupUtil::getTweakedPropOffset
static Ogre::Vector3 getTweakedPropOffset(TuneupDefPtr &tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:316
RoR::TuneupUtil::getTweakedPropRotation
static Ogre::Vector3 getTweakedPropRotation(TuneupDefPtr &tuneup_entry, PropID_t prop_id, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:330
RoR::TuneupPropTweak::tpt_rotation
Ogre::Vector3 tpt_rotation
Definition: TuneupFileFormat.h:76
RefCountingObjectPtr< TuneupDef >
RoR::ExhaustID_t
int ExhaustID_t
Index into GfxActor::m_exhausts, use RoR::EXHAUSTID_INVALID as empty value.
Definition: ForwardDeclarations.h:73
RoR::TuneupDef::protected_props
std::set< PropID_t > protected_props
Props which cannot be altered via 'addonpart_tweak_prop' or 'addonpart_unwanted_prop' directive.
Definition: TuneupFileFormat.h:147
RoR::TuneupWheelTweak::twt_wheel_id
WheelID_t twt_wheel_id
Arg#1, required.
Definition: TuneupFileFormat.h:60
RoR::TuneupDef::isPropProtected
bool isPropProtected(PropID_t propid) const
Definition: TuneupFileFormat.h:159
RoR::TuneupCineCameraTweak::tct_cinecam_id
CineCameraID_t tct_cinecam_id
Arg#1, required.
Definition: TuneupFileFormat.h:53
RoR::TuneupUtil::isNodeTweaked
static bool isNodeTweaked(TuneupDefPtr &tuneup_entry, NodeNum_t nodenum, TuneupNodeTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:278
RoR::TuneupDef::isVideoCameraRoleForced
bool isVideoCameraRoleForced(VideoCameraID_t camera_id, VideoCamRole &out_val) const
Definition: TuneupFileFormat.cpp:105
RoR::TuneupUtil::getTweakedFlexbodyMediaRG
static std::string getTweakedFlexbodyMediaRG(TuneupDefPtr &tuneup_def, FlexbodyID_t flexbody_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:450
RoR::TuneupCineCameraTweak
< Data of 'addonpart_tweak_cinecam <cinecam ID> <posX> <posY> <posZ>'
Definition: TuneupFileFormat.h:51
RoR::TuneupFlexbodyTweak::tft_flexbody_id
FlexbodyID_t tft_flexbody_id
Definition: TuneupFileFormat.h:82
RoR::TuneupDef::managedmat_tweaks
std::map< std::string, TuneupManagedMatTweak > managedmat_tweaks
Managed material overrides via 'addonpart_tweak_managedmaterial'.
Definition: TuneupFileFormat.h:123
RoR::TuneupDef::node_tweaks
std::map< NodeNum_t, TuneupNodeTweak > node_tweaks
Node position overrides via 'addonpart_tweak_node'.
Definition: TuneupFileFormat.h:118
RoR::TuneupDef::unwanted_flares
std::set< FlareID_t > unwanted_flares
'addonpart_unwanted_flare' directives.
Definition: TuneupFileFormat.h:126
RoR::TuneupManagedMatTweak
< Data of 'addonpart_tweak_managedmaterial <name> <type> <media1> <media2> [<media3>]'
Definition: TuneupFileFormat.h:89
RoR::VideoCameraID_t
int VideoCameraID_t
Index into GfxActor::m_videocameras, use RoR::VIDEOCAMERAID_INVALID as empty value.
Definition: ForwardDeclarations.h:85
RoR::FLEXBODYID_INVALID
static const FlexbodyID_t FLEXBODYID_INVALID
Definition: ForwardDeclarations.h:65
RoR::TuneupManagedMatTweak::tmt_origin
std::string tmt_origin
Addonpart filename.
Definition: TuneupFileFormat.h:94
RoR::NodeNum_t
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
Definition: ForwardDeclarations.h:54
RoR::TuneupUtil::isManagedMatAnyhowRemoved
static bool isManagedMatAnyhowRemoved(TuneupDefPtr &tuneup_def, const std::string &matname)
Definition: TuneupFileFormat.cpp:507
RoR::TuneupUtil::isFlexbodyAnyhowRemoved
static bool isFlexbodyAnyhowRemoved(TuneupDefPtr &tuneup_def, FlexbodyID_t flexbody_id)
Definition: TuneupFileFormat.cpp:402
RoR::TuneupDef::isManagedMatForceRemoved
bool isManagedMatForceRemoved(const std::string &matname)
Definition: TuneupFileFormat.h:185
RoR::TuneupNodeTweak
< Data of 'addonpart_tweak_node <nodenum> <posX> <posY> <posZ>'
Definition: TuneupFileFormat.h:44
CacheSystem.h
A database of user-installed content alias 'mods' (vehicles, terrains...)
RoR::WHEELID_INVALID
static const WheelID_t WHEELID_INVALID
Definition: ForwardDeclarations.h:59
RoR::TuneupDef::protected_wheels
std::set< WheelID_t > protected_wheels
Wheels that cannot be altered via 'addonpart_tweak_wheel'.
Definition: TuneupFileFormat.h:146
RoR::TuneupWheelTweak::twt_side
WheelSide twt_side
Arg#4, optional, default LEFT (Only applicable to mesh/flexbody wheels)
Definition: TuneupFileFormat.h:64
RoR::TuneupUtil::getTweakedPropMedia
static std::string getTweakedPropMedia(TuneupDefPtr &tuneup_entry, PropID_t prop_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:344
RoR::TuneupDef::flexbody_tweaks
std::map< FlexbodyID_t, TuneupFlexbodyTweak > flexbody_tweaks
Mesh name, offset and rotation overrides via 'addonpart_tweak_flexbody'.
Definition: TuneupFileFormat.h:122
RoR::WheelID_t
int WheelID_t
Index to Actor::ar_wheels, use RoR::WHEELID_INVALID as empty value.
Definition: ForwardDeclarations.h:58
RoR::TuneupNodeTweak::tnt_pos
Ogre::Vector3 tnt_pos
Args#234, required.
Definition: TuneupFileFormat.h:47
RoR::TuneupDef::thumbnail
std::string thumbnail
Definition: TuneupFileFormat.h:107
RoR::TUNEUP_BUF_SIZE
const size_t TUNEUP_BUF_SIZE
Definition: TuneupFileFormat.h:42
RoR::TuneupDef::protected_managedmats
std::set< std::string > protected_managedmats
Managed materials which cannot be altered via 'addonpart_tweak_managedmaterial' directive.
Definition: TuneupFileFormat.h:151
RoR::TuneupDef::isWheelProtected
bool isWheelProtected(WheelID_t wheelid) const
Definition: TuneupFileFormat.h:161
RoR::TuneupDef::isFlareUnwanted
bool isFlareUnwanted(FlareID_t flareid)
Definition: TuneupFileFormat.h:173
RefCountingObject.h
RoR::CacheCategoryId
CacheCategoryId
Definition: Application.h:477
Application.h
Central state/object manager and communications hub.
RoR::TuneupPropTweak::tpt_origin
std::string tpt_origin
Addonpart filename.
Definition: TuneupFileFormat.h:77
RoR::TuneupDef::description
std::string description
Definition: TuneupFileFormat.h:108
RoR::TuneupUtil::isCineCameraTweaked
static bool isCineCameraTweaked(TuneupDefPtr &tuneup_entry, CineCameraID_t cinecamid, TuneupCineCameraTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:293
RoR::TuneupUtil::getTweakedFlexbodyMedia
static std::string getTweakedFlexbodyMedia(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:436
RoR::TuneupDef::unwanted_exhausts
std::set< ExhaustID_t > unwanted_exhausts
'addonpart_unwanted_exhaust' directives.
Definition: TuneupFileFormat.h:127
RoR::TuneupUtil::getTweakedManagedMatMediaRG
static std::string getTweakedManagedMatMediaRG(TuneupDefPtr &tuneup_def, const std::string &matname, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:557
RoR::TuneupUtil::getTweakedWheelRimRadius
static float getTweakedWheelRimRadius(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, float orig_val)
Definition: TuneupFileFormat.cpp:135
RoR::TuneupDef::isFlareForceRemoved
bool isFlareForceRemoved(FlareID_t flareid)
Definition: TuneupFileFormat.h:183
RoR::TuneupUtil::isFlareAnyhowRemoved
static bool isFlareAnyhowRemoved(TuneupDefPtr &tuneup_def, FlareID_t flare_id)
Definition: TuneupFileFormat.cpp:493
RoR::TuneupDef::force_remove_managedmats
std::set< std::string > force_remove_managedmats
User unticked an UI checkbox in Tuning menu, section Managed Materials.
Definition: TuneupFileFormat.h:139
RoR::TuneupUtil::getTweakedFlexbodyRotation
static Ogre::Vector3 getTweakedFlexbodyRotation(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:422
RoR::TuneupWheelTweak::twt_media
std::array< std::string, 2 > twt_media
twt_media[0] Arg#2, required ('wheels[2]': face material, 'meshwheels[2]/flexbodywheels': rim mesh) t...
Definition: TuneupFileFormat.h:63
RoR::TuneupDef::author_id
int author_id
Definition: TuneupFileFormat.h:110
RoR::TuneupPropTweak::tpt_media
std::array< std::string, 2 > tpt_media
Media1 = prop mesh; Media2: Steering wheel mesh or beacon flare material.
Definition: TuneupFileFormat.h:74
RoR::TuneupDef::author_name
std::string author_name
Definition: TuneupFileFormat.h:109
RoR::TuneupDef::force_video_cam_roles
std::map< VideoCameraID_t, VideoCamRole > force_video_cam_roles
UI overrides.
Definition: TuneupFileFormat.h:136
RoR::TuneupDef::protected_exhausts
std::set< ExhaustID_t > protected_exhausts
Exhausts which cannot be altered via 'addonpart_unwanted_exhaust' directive.
Definition: TuneupFileFormat.h:150
RoR::TuneupUtil::getTweakedFlexbodyOffset
static Ogre::Vector3 getTweakedFlexbodyOffset(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:408
RoR::TuneupNodeTweak::tnt_origin
std::string tnt_origin
Addonpart filename.
Definition: TuneupFileFormat.h:48
RoR::TuneupDef::protected_flexbodies
std::set< FlexbodyID_t > protected_flexbodies
Flexbodies which cannot be altered via 'addonpart_tweak_flexbody' or 'addonpart_unwanted_flexbody' di...
Definition: TuneupFileFormat.h:148
RoR::TuneupPropTweak::tpt_offset
Ogre::Vector3 tpt_offset
Definition: TuneupFileFormat.h:75
RoR::TuneupUtil::getTweakedPropMediaRG
static std::string getTweakedPropMediaRG(TuneupDefPtr &tuneup_def, PropID_t prop_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:359
RoR::VideoCamRole
VideoCamRole
Definition: Application.h:590
RoR::TuneupUtil::getTweakedManagedMatType
static std::string getTweakedManagedMatType(TuneupDefPtr &tuneup_def, const std::string &matname, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:528
RoR::TuneupDef::cinecam_tweaks
std::map< CineCameraID_t, TuneupCineCameraTweak > cinecam_tweaks
Cinecam position overrides via 'addonpart_tweak_cinecam'.
Definition: TuneupFileFormat.h:119
RoR::TuneupDef::filename
std::string filename
target vehicle filename
Definition: TuneupFileFormat.h:106
RoR::TuneupUtil::isExhaustAnyhowRemoved
static bool isExhaustAnyhowRemoved(TuneupDefPtr &tuneup_def, ExhaustID_t exhaust_id)
Definition: TuneupFileFormat.cpp:500
RoR::TuneupUtil::isManagedMatTweaked
static bool isManagedMatTweaked(TuneupDefPtr &tuneup_def, const std::string &matname, TuneupManagedMatTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:513
RoR::TuneupUtil::getTweakedWheelMediaRG
static std::string getTweakedWheelMediaRG(TuneupDefPtr &tuneup_def, WheelID_t wheel_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:164
RoR::FlareID_t
int FlareID_t
Index into Actor::ar_flares, use RoR::FLAREID_INVALID as empty value.
Definition: ForwardDeclarations.h:70
RoR::TuneupUtil::getTweakedWheelSide
static WheelSide getTweakedWheelSide(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, WheelSide orig_val)
Definition: TuneupFileFormat.cpp:191
RoR::TuneupDef::isFlareProtected
bool isFlareProtected(FlareID_t flareid) const
Definition: TuneupFileFormat.h:164
RoR::TuneupUtil::getTweakedWheelTireRadius
static float getTweakedWheelTireRadius(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, float orig_val)
Definition: TuneupFileFormat.cpp:121
RoR::TuneupDef::isExhaustForceRemoved
bool isExhaustForceRemoved(ExhaustID_t exhaustid)
Definition: TuneupFileFormat.h:184
RoR::TuneupUtil::getTweakedManagedMatMedia
static std::string getTweakedManagedMatMedia(TuneupDefPtr &tuneup_def, const std::string &matname, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:542
RoR::TuneupDef::category_id
CacheCategoryId category_id
Definition: TuneupFileFormat.h:111
RoR::TuneupDef::reset
void reset()
RoR::CINECAMERAID_INVALID
static const CineCameraID_t CINECAMERAID_INVALID
Definition: ForwardDeclarations.h:80
RoR::TuneupManagedMatTweak::tmt_name
std::string tmt_name
Arg#1, required.
Definition: TuneupFileFormat.h:91
RoR::TuneupWheelTweak
< Data of 'addonpart_tweak_wheel <wheel ID> <media1> <media2> <side flag> <tire radius> <rim radius>'
Definition: TuneupFileFormat.h:58
RoR::TuneupUtil::getTweakedNodePosition
static Ogre::Vector3 getTweakedNodePosition(TuneupDefPtr &tuneup_entry, NodeNum_t nodenum, Ogre::Vector3 orig_val)
Definition: TuneupFileFormat.cpp:250
RoR::TuneupDef::force_remove_flares
std::set< FlareID_t > force_remove_flares
User unticked an UI checkbox in Tuning menu, section Flares.
Definition: TuneupFileFormat.h:137
RoR::TuneupDef::force_wheel_sides
std::map< WheelID_t, WheelSide > force_wheel_sides
UI overrides.
Definition: TuneupFileFormat.h:135
RoR::TuneupDef::isExhaustProtected
bool isExhaustProtected(ExhaustID_t exhaustid) const
Definition: TuneupFileFormat.h:165
RoR::TuneupDef::isFlexbodyUnwanted
bool isFlexbodyUnwanted(FlexbodyID_t flexbodyid)
Definition: TuneupFileFormat.h:172
RoR::TuneupDef::isCineCameraProtected
bool isCineCameraProtected(CineCameraID_t cinecamid) const
Definition: TuneupFileFormat.h:163
RoR::FlexbodyID_t
int FlexbodyID_t
Index to GfxActor::m_flexbodies, use RoR::FLEXBODYID_INVALID as empty value.
Definition: ForwardDeclarations.h:64
RefCountingObject
Self reference-counting objects, as requred by AngelScript garbage collector.
Definition: RefCountingObject.h:26
RoR::TuneupDef::isWheelSideForced
bool isWheelSideForced(WheelID_t wheelid, WheelSide &out_val) const
Definition: TuneupFileFormat.cpp:91
RoR::TuneupCineCameraTweak::tct_origin
std::string tct_origin
Addonpart filename.
Definition: TuneupFileFormat.h:55
RoR::TuneupUtil::isFlexbodyTweaked
static bool isFlexbodyTweaked(TuneupDefPtr &tuneup_entry, FlexbodyID_t flexbody_id, TuneupFlexbodyTweak *&out_tweak)
Definition: TuneupFileFormat.cpp:475
RoR::TuneupDef::guid
std::string guid
target vehicle GUID
Definition: TuneupFileFormat.h:105
RoR::TuneupUtil::ParseTuneupAttribute
static void ParseTuneupAttribute(const std::string &line, TuneupDefPtr &tuneup_def)
Definition: TuneupFileFormat.cpp:648
RoR::TuneupFlexbodyTweak::tft_offset
Ogre::Vector3 tft_offset
Definition: TuneupFileFormat.h:84
RoR::TuneupFlexbodyTweak
< Data of 'addonpart_tweak_flexbody <flexbody ID> <offsetX> <offsetY> <offsetZ> <rotX> <rotY> <rotZ> ...
Definition: TuneupFileFormat.h:80
RoR::TuneupUtil::getTweakedWheelMedia
static std::string getTweakedWheelMedia(TuneupDefPtr &tuneup_entry, WheelID_t wheel_id, int media_idx, const std::string &orig_val)
Definition: TuneupFileFormat.cpp:149
RoR::TuneupDef::protected_cinecams
std::set< CineCameraID_t > protected_cinecams
Cinecams that cannot be altered via 'addonpart_tweak_cinecam'.
Definition: TuneupFileFormat.h:145
RoR::TuneupDef::isPropForceRemoved
bool isPropForceRemoved(PropID_t propid)
Definition: TuneupFileFormat.h:180
RoR::TuneupUtil::getTweakedVideoCameraRole
static VideoCamRole getTweakedVideoCameraRole(TuneupDefPtr &tuneup_def, VideoCameraID_t camera_id, VideoCamRole orig_val)
Definition: TuneupFileFormat.cpp:217
RoR
Definition: AppContext.h:36
RoR::TuneupManagedMatTweak::tmt_media
std::array< std::string, 3 > tmt_media
Arg#3, required, Arg#4, optional, Arg#5, optional.
Definition: TuneupFileFormat.h:93
RoR::TuneupDef::force_remove_exhausts
std::set< ExhaustID_t > force_remove_exhausts
User unticked an UI checkbox in Tuning menu, section Exhausts.
Definition: TuneupFileFormat.h:138
RoR::TuneupDef::wheel_tweaks
std::map< WheelID_t, TuneupWheelTweak > wheel_tweaks
Mesh name and radius overrides via 'addonpart_tweak_wheel'.
Definition: TuneupFileFormat.h:120
RoR::TuneupDef::isManagedMatUnwanted
bool isManagedMatUnwanted(const std::string &matname)
Definition: TuneupFileFormat.h:175
RoR::PropID_t
int PropID_t
Index to GfxActor::m_props, use RoR::PROPID_INVALID as empty value.
Definition: ForwardDeclarations.h:61
RoR::TuneupCineCameraTweak::tct_pos
Ogre::Vector3 tct_pos
Args#234, required.
Definition: TuneupFileFormat.h:54
RoR::TuneupDef::isNodeProtected
bool isNodeProtected(NodeNum_t nodenum) const
Definition: TuneupFileFormat.h:162