Premium Play Darkness: Hex code

From Hgames Wiki
Jump to: navigation, search

Illusion

all characters are at least 18


Premium Play Darkness [edit]

Gameplay

Story

Studio

Technical Help

Modding

Hex-Banner.png


Foreword

You have probably been using Hexadecimal a few times in your life, most likely if you have been making a website or perhaps "piffing up" a User Profile. In those cases it have been to generate a color, the Hex in Illusion games works the same way. Now, however, we are generating a function, a way to tell how a mesh or a texture should behave. Should something be transparent? Perhaps glow? Reflect something?

This section is most of all to learn the basics, but also to find out how a certain "effect" is generated. Note that we aren't all knowing about the Hex being used in Illusion Games such as PPD/PSP, this page will be updated as we progress in our search to use the Hex system to improve our modding ability.

Tools

  • SB3UGS by Alamar, enimaroah (essential tool used for everything).

Valid Hex Values

To randomly type a value such as 'ZG-R9-L2-20' may result in that the object/costume may cause a crash. Here down below you can see a table of "valid" Hex values to use. These are unlikely to cause any crashes or other kinds of fatal errors.

Hexadecimal table.gif










Note that solo letters/digits such as 'A' should be e.g typed as '0A'. A value such as 00-A-00-00 is most likely to cause a fatal error. So, a correct segment can look like this: 00-9A-64-00.

To simply add a hex value to a single segment may not always be enough. Think of it as if you were doing math.

[Submesh Flags]Hex segment = Visual glitches.

To correct that we are most likely in need of altering a second Hex segment somewhere else. So our "math equation" gets correct:

[Submesh Flags]Hex segment + [Frame Flags]Hex segment = Working!
or [Submesh Flags]Hex segment + [Frame Flags]Hex segment + [Matrial tab T1-T4*]Hex segment = Working!
(*T1-T4 equals to Texture 1, 2, 3 and 4.)

Transparency

There might come plenty of occasions where you want to add transparency to a object or part of a costume. If you haven't been fiddling with the SB3UGS Hex editor before, then take note of that there will be 3 tabs within it that we will be working with and these are;

  • the Frame tab.
  • the Submesh tab.
  • the Material tab.

Note that certain transparency effects may not require altering of the Material tab. One of those transparency effects is the Goo Man Effect.

Common Transparency

This kind of transparency is commonly used on Costumes. To apply it use the values down below in the example, note that a texture of the type .tga or .dds with a Alpha Channel is required for best reslut.

Submesh - Submesh Flags:
cw_O_bura_00_00[0] 0E-64-00-00 04-00-00-00 00-63-00-00[...]

Frame - Frame Flags:
cw_O_bura_00_00[0] 00-01-00-00 5F-00-00-00[...] <This will cause a object/costume to load correctly without odd bugs.
(Note: There's at the time 2 know parts of this section that will have a impact
on the result of this transparency. The first and the second segments.)

Material - Texture 1:
cw_M_pantu_00_01| 01-00-00-00[...]

Material - Texture 2-4:
cw_M_pantu_00_01| FF-00-00-00[...]
(Note: the FF value is not always required, you can from time to time leave it as a 00 value.)


The Goo Man Effect

The Goo Man Effect does not require a .tga/.dds with a Alpha Channel. It will reacts with such things as the brightness/darkness of a texture. It also reacts to the brightness/darkness in Scenes(Maps).

Submesh - Submesh Flags:
cm_O_body_99_00[0] 04-64-00-00[...]

Frame - Frame Flags:
cm_O_body_99_00[0] 00-01-00-00 xx*-00-00-00[...]
(* xx ranges from 01 to 64.)

Glow

What we do know about the glow at the time is that it is highley influed by the Map/Scene that we are using at the time. Some Maps/Scenes may not cause a object to glow while other will. Due to this it have so far been hard to perfect a glowing object (More research about glow needs to be done).

To turn glow on or off we need to locate the Mesh Flags section, it is located in the Frame tab and is the second section (right after Frame Flags). The Mesh Flags values might look similar to the example below.

cw_O_body_99_00|Frame Flags| 00-02-00-00 00-00-00-00 00-08-00-00

To turn the Glow on for a certain object it's the second segment that we need to alter:

00-02-00-00 00-00-00-00 00-08-00-00

The most common values to turn ON or OFF the glow are these:

  • 00-02-00-00 00-02-00-00 00-08-00-00 - Glow ON
  • 00-02-00-00 00-06-00-00 00-08-00-00 - Glow ON
  • 00-02-00-00 00-00-00-00 00-08-00-00 - Glow OFF


Syncroz (talk) 09:27, August 6, 2013 (UTC)