FORUMS
Remove All Ads from XDA

[TUT] How to make tweaks for Diamond TF3D Config

487 posts
Thanks Meter: 9
 
By sushilange, Senior Member on 12th July 2008, 02:54 AM
Post Reply Email Thread
Hi,

since Diamond TF3D Config v.0.5 my app supports a custom tweak-file!

Just create a XML-file called 'tweaks_custom.xml' and copy it to program folder of Diamond TF3D Config! Those tweaks then will be shown in the tweak-list of my app. They have a gray background color in tweak-list.

The XML-file have to look like this:

Code:
<?xml version="1.0" standalone="yes"?>
<Tweaks>
<Tweak>
  <Name>Name of Tweak 1</Name>
  <Description>Description for Tweak 1</Description>
  <RegRoot>HKLM</RegRoot>
  <RegKey>Software\HTC\Manila\Program Launcher\0</RegKey>
  <RegValue>DispName</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>Hello</DefaultValue>
  <NewValue>World</NewValue>
 </Tweak>
<Tweak>
  <Name>Name of Tweak 2</Name>
  <Description>Description for Tweak 2</Description>
  <RegRoot>HKLM</RegRoot>
  <RegKey>SYSTEM\GDI\GLYPHCACHE</RegKey>
  <RegValue>limit</RegValue>
  <RegValueKind>DWord</RegValueKind>
  <DefaultValue>8192</DefaultValue>
  <NewValue>32768</NewValue>
 </Tweak>
 
</Tweaks>
Name: Name of Tweak. Keep it short like I did in my tool
Description: A description of what the tweak will do! DO NOT descripe which reg key will change, because my app will add these information automatically to the description text!
RegRoot: HKLM or HKCU
RegKey: the key
RegValue: the value to change
RegValueKind: String, ExpandString, MultiString or DWord
DefaultValue: the old default value
NewValue: the new value

So it is up to you to share good tweaks! Have fun!

Best regards,
Sascha
 
 
12th July 2008, 08:32 AM |#2  
teddyen66's Avatar
Senior Member
Thanks Meter: 1
 
More
Nice one :)
So much easier than changing it in registry every time.
12th July 2008, 08:41 AM |#3  
Member
Thanks Meter: 0
 
More
Thank you so much!

I modify the xml file, please help me to check, make sure no problems.
If someone want to use it, just rename it to .xml then replace the exist file, and please give me some feedback, thanks!
Attached Files
File Type: txt tweaks_custom.txt - [Click for QR Code] (6.9 KB, 1972 views)
12th July 2008, 08:45 AM |#4  
MonteCristoffOn's Avatar
Senior Member
Thanks Meter: 5
 
More
Good beginning
Hi sushi,

Well, it's a great improvement ! And possibilities are endless...

But you already know that bad registry settings can do a lot of damage on a device.
So everyone must be careful with that !

A suggestion : systematically add the default values for all keys or a reset functionnality for a stock registry restore.

Anyway, good job ! I will try it soon.

Thanks.
12th July 2008, 08:55 AM |#5  
Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by MonteCristoffOn

Hi sushi,

Well, it's a great improvement ! And possibilities are endless...

But you already know that bad registry settings can do a lot of damage on a device.
So everyone must be careful with that !

A suggestion : systematically add the default values for all keys or a reset functionnality for a stock registry restore.

Anyway, good job ! I will try it soon.

Thanks.

we can backup by some backup tools
12th July 2008, 09:10 AM |#6  
MonteCristoffOn's Avatar
Senior Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by boxhillab

we can backup by some backup tools

Of course boxhillab... but it's not very useful for common users.
You could add that a simple hard reset also do the job...

I think it's an important feature for any soft.

12th July 2008, 09:50 AM |#7  
OP Senior Member
Thanks Meter: 9
 
More
@Monte: DefaultValue is the old default value in the registry.

So just unchecking all tweaks in Diamond TF3D Config, and you have restored your registry.


That's why you all should named the tweaks so, that it is clear, why it is unchecked on default.

e.g. i add the tweak "NoFaceDownMuteRing", because "FaceDownMuteRing" is true on default, and on default a tweak in my app should shown unchecked.

I think that is easier for the user to understand.
12th July 2008, 09:57 AM |#8  
OP Senior Member
Thanks Meter: 9
 
More
Quote:
Originally Posted by boxhillab

Thank you so much!

I modify the xml file, please help me to check, make sure no problems.
If someone want to use it, just rename it to .xml then replace the exist file, and please give me some feedback, thanks!

NO!!!

DO NOT replace the exist file! You have to rename your file to 'tweaks_custom.xml' and just put in the program folder.The 'tweaks.xml' file is mine, so don't replace it, because on every new version of Diamond TF3D Config the 'tweaks.xml' will be overwritten with a new version. The 'tweaks_custom.xml' won't be overwritten ;)
12th July 2008, 12:46 PM |#9  
MonteCristoffOn's Avatar
Senior Member
Thanks Meter: 5
 
More
Quote:
Originally Posted by sushilange

@Monte: DefaultValue is the old default value in the registry.

So just unchecking all tweaks in Diamond TF3D Config, and you have restored your registry.


That's why you all should named the tweaks so, that it is clear, why it is unchecked on default.

e.g. i add the tweak "NoFaceDownMuteRing", because "FaceDownMuteRing" is true on default, and on default a tweak in my app should shown unchecked.

I think that is easier for the user to understand.

Reading your xml, I've understood that.
But what about the multi values keys ?

Just a little example with ringtones...
Of course you can change it via the classic WM Phone Settings panel, but imagine we want to add this tweak in TF3D Config... just to illustrate how it could be.
  • The key is : HKCU\ControlPanel\Sounds\RingTone0\Script
  • Values are :
    a (for none)
    apw3r (simple ring)
    c50apw3c150r (increasing ring)
    p (ring once)
    av3w3r (vibrate)
    av0pw3r (vibrate and ring)
    v3w3apw3r (vibrate then ring)
    c50av0pw3c150r (vibrate and increasing ring)
    v1w1v1w1v1w1c50apw3c150r (vibrate 3x then increasing ring, this is my favorite...)

OK, let's do the TF3D Custom xml file with that...
(not tested, it's just for the exercise )
Code:
<?xml version="1.0" standalone="yes"?>
<Tweaks>
<Tweak>
  <Name>Ringtone 1</Name>
  <Description>Change the Ringtone : none</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>a</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 2</Name>
  <Description>Change the Ringtone : ring (default)</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>apw3r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 3</Name>
  <Description>Change the Ringtone : increasing ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>c50apw3c150r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 4</Name>
  <Description>Change the Ringtone : ring once</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>p</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 5</Name>
  <Description>Change the Ringtone : vibrate</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>av3w3r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 6</Name>
  <Description>Change the Ringtone : vibrate and ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>av0pw3r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 7</Name>
  <Description>Change the Ringtone : vibrate then ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>v3w3apw3r</NewValue>
 </Tweak>
 <Tweak>
  <Name>Ringtone 8</Name>
  <Description>Change the Ringtone : vibrate and increasing ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>c50av0pw3c150r</NewValue>
 </Tweak>
<Tweak>
  <Name>Ringtone 7</Name>
  <Description>Change the Ringtone : vibrate 3x then increasing ring</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <NewValue>v1w1v1w1v1w1c50apw3c150r</NewValue>
 </Tweak>
</Tweaks>
I think you will agree with me : this is not a very elegant solution...

What about this kind of xml structure ?

Code:
<?xml version="1.0" standalone="yes"?>
<Tweaks>
<Tweak>
  <Name>Ringtone</Name>
  <Description>Change the Ringtone</Description>
  <RegRoot>HKCU</RegRoot>
  <RegKey>ControlPanel\Sounds\RingTone0</RegKey>
  <RegValue>Script</RegValue>
  <RegValueKind>String</RegValueKind>
  <DefaultValue>apw3r</DefaultValue>
  <Options>
      <OptionValue>a</OptionValue><OptionDescription>None</OptionDescription>
      <OptionValue>apw3r</OptionValue><OptionDescription>Ring (default)</OptionDescription>
      <OptionValue>c50apw3c150r</OptionValue><OptionDescription>Increasing ring</OptionDescription>
      <OptionValue>p</OptionValue><OptionDescription>Ring once</OptionDescription>
      <OptionValue>av3w3r </OptionValue><OptionDescription>Vibrate</OptionDescription>
      <OptionValue>av0pw3r</OptionValue><OptionDescription>Vibrate and ring</OptionDescription>
      <OptionValue>v3w3apw3r</OptionValue><OptionDescription>Vibrate then ring</OptionDescription>
      <OptionValue>c50av0pw3c150r</OptionValue><OptionDescription>Vibrate and increasing ring</OptionDescription>
      <OptionValue>v1w1v1w1v1w1c50apw3c150r</OptionValue><OptionDescription>vibrate 3x then increasing ring</OptionDescription>
</Options>
 </Tweak>

</Tweaks>
Of course, parsing will be different and your app will probably need some modifications...
But I'm sure it would be better !

CU soon.

12th July 2008, 12:51 PM |#10  
OP Senior Member
Thanks Meter: 9
 
More
I know what you mean, but there are so many tools for doing this. For example Advanced Config.

I just want to implement easy tweaks for Diamond and TouchFlo3D, so that the user just have to check or uncheck. I think that is more user friendly.

Advanced user, how know what all these options do, are also know how to change this manually or do this with another config tool like Advanced Config, etc.
12th July 2008, 01:22 PM |#11  
Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by sushilange

NO!!!

DO NOT replace the exist file! You have to rename your file to 'tweaks_custom.xml' and just put in the program folder.The 'tweaks.xml' file is mine, so don't replace it, because on every new version of Diamond TF3D Config the 'tweaks.xml' will be overwritten with a new version. The 'tweaks_custom.xml' won't be overwritten ;)

Oh..Sorry about that! I can't see 'tweaks_custom.xml'.
I'll rename it to 'tweaks_custom.xml'
Thanks!
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes