[Snippet] Jump dust particle

How to spawn particle after jump, we can see this kinda things in popular games.

this is extremely easy and lazy, it is just a last minute idea, there’re too many small things that we can do to improve this game to look better

View post on imgur.com

AI_Player.CPP
Look for this

// calculate damage from falling if any
float newHeight = GetPosition().y;
if((StartFallingHeight - newHeight) > 15.0f) // more than 15 meters, we gonna break something (increased to 15 meters, as sometimes on downhill we do not detect properly that we are on the ground and don't want to break legacy code)
{
float damageAmount = ((StartFallingHeight - newHeight))*2.0f; // if falling more than 50 meters - dies immediatelly (damage >=100)
damageAmount = R3D_CLAMP(damageAmount, 0.0f, 255.0f);


// send damage to server
PKT_C2S_FallingDamage_s n;
n.damage = (BYTE)damageAmount;
p2pSendToHost(this, &n, sizeof(n));


SoundSys.PlayAndForget(SoundSys.GetEventIDByPath(m_isFemaleHero?"Sounds/WarZ/PlayerSounds/PLAYER_GRUNTING_F":"Sounds/WarZ/PlayerSounds/PLAYER_GRUNTING_M"), GetPosition());
}

 

After this function add this conditional if

else if ((StartFallingHeight - newHeight) > 0.1f)
{
Flare = (obj_ParticleSystem*)srv_CreateGameObject("obj_ParticleSystem", "Env_FootDust_01", GetPosition());
}

 

btw you can add a low sound after jump in the same function, enjoy it.

here is the particle code, copy and paste in a txt file and save as .prt format
https://pastebin.com/5LZiqeGt

Change WarZ/ISS Studio Interface Color

Customize Studio Interface Color
This is simple and easy

You just need to edit one file
src/Eternity/Source/UI/UIimEdit.cpp

 

at this point you only have to play with the static r3dColor in red
Little example

30, 114, 186
R, G, B

 

I will share a little code which I recently modify for this tutorial

static r3dColor bkgColor(30, 114, 186); // Studio btn color #1e72ba


const void* imgui_val = NULL; // current editable value. == pointer to FOCUS
float imgui_mx;
float imgui_my;
float imgui_mmx;
float imgui_mmy;


int imgui_lbp = 0;
int imgui_rbp = 0;
int imgui_lbr = 0;
int imgui_rbr = 0;
int imgui_mzMotion;
bool imgui_disabled = false;

float imgui_th = 20; // text height (for clicking)
float imgui_dy = 25;


static bool imgui_textEditActive = false;
static bool imgui_textDirty = false;
static char imgui_editText[100] = "";


r3dColor imgui_bkgDlg = r3dColor(22,85,138,220); // background color #16558a


static r3dColor imgui_borderCol = r3dColor(132,132,132); // border large btn #848484
static r3dColor imgui_bkgCol = r3dColor(128,128,128);
static r3dColor imgui_nameCol = r3dColor(255,255,155);
static r3dColor imgui_nameColH = r3dColor(255,255,210);
static r3dColor imgui_valCol = r3dColor(255,255,255);

 

These values aren’t the only codes to edit your interface color, you still have to modify more codes below, for that you’ll have to search for; r3dColor24(x,x,x) in the same file and play with your color

 

https://i0.wp.com/issfilestore.beesocialagency.com/wp-content/uploads/2019/08/5.png?w=980&ssl=1
https://i1.wp.com/issfilestore.beesocialagency.com/wp-content/uploads/2019/08/showoff.png?w=980&ssl=1

if you don’t know how to get Rgb colors you can use Photoshop or this palett –  Paletton – The Color Scheme Designer

 

Change AIM Camera

Snippet to change the aim camera when wasPressed and wasReleased, basically when you’re in TPS and you aim, the camera will change to FPS aim automatic and when you release the aim btn you will return to the TPS camera again i made this in a few mins, need more settings maybe when i get more time i will add the rest of the code like disable the switch fps to tps bottom / fix the back to TPS when you’re in FPS mode

Lets look for this in AI_Player.cpp

bool oldAiming = m_isAiming;

if(g_toggle_aim->GetBool())
{
if(InputMappingMngr->wasPressed(r3dInputMappingMngr::KS_AIM))
m_isAiming = !m_isAiming;
}
else
{
m_isAiming = InputMappingMngr->isPressed(r3dInputMappingMngr::KS_AIM) || gamepadLeftTrigger > 0;
}

 

 

And replace for this simple code

bool oldAiming = m_isAiming;

if (InputMappingMngr->wasPressed(r3dInputMappingMngr::KS_AIM))
{
  if (g_camera_mode->GetInt() == 0)
  {
    switchFPS_TPS();
  }	
  m_isAiming = !m_isAiming;
}
else if (InputMappingMngr->wasReleased(r3dInputMappingMngr::KS_AIM))
{
  if (g_camera_mode->GetInt()==2)
  {
  switchFPS_TPS();
  }	
  m_isAiming = InputMappingMngr->isPressed(r3dInputMappingMngr::KS_AIM) || gamepadLeftTrigger > 0;
}

 

How Add Light To Objects

In case you don’t know where to find the material file so just use level editor and select your mesh, go to the Material editor, select “SELF ILLUMINATION MAP” and search for the illumination file (in case you don’t have any illumination file so just make it in Photoshop using the original diffuse map) “black and white file” (the white color is to show the light, and the black is to block the light) and increase the Self Illumination Option bar to your own liking so there you can edit the light as you want without enter and exit from the client just to test a light mesh effect, well something Like this

More detailed tutorial and better way
Select mesh and use edit bottom then go down and select the .mat that you want to edit!

 

Now click the Material editor and now select SELF ILLUMINATION MAP and select your illumination dds file if you don’t have it so just make it in Photoshop

Like this copy the original diffuse map and draw the area you want to show the light

Like this there is the front light mesh of the car

Save the imported file to the correct folder and use it in the SELF ILLUMINATION MAP and increase in the Self Illumination controller below I show 0.71, just to test and put a Omi Light to show the light more realistic like this