User Tools

Site Tools


overview_pre-guts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

overview_pre-guts [2016/03/25 05:54] (current)
phanjam created
Line 1: Line 1:
 +<fs 200%>** Charge bar and custom bonuses (A pre-GUTS Overview) **</​fs>​
  
 +by: OedipusTex
 +
 +Creativity is the limit here. It would take a long time to explain how every version of the charge bar works. To provide a basic example, we'll use the (IMO) simplest one, the Outlander.
 +
 +
 +===== A. Create an Affix that defines the bonuses. =====
 +
 +1. Create an entry in Affixes.RAW that indicates that the new Affix exists and provides a path
 +
 +2. Create the Affix.DAT definition,​. The easiest way to do this is to go to the game source files, and grab WANDERER_PASSIVES.DAT. In your mod files, create a folder tree for MEDIA\AFFIXES\PLAYER ​ and place the copied file there. Now rename it QGH_DEFENDER_PASSIVES_AFFIX.DAT
 +
 +3. Edit the DAT file:
 +
 +<​code>​
 +<​STRING>​NAME:​QGH_DEFENDER_PASSIVES_AFFIX ​ (must match the global name in the RAW file or the Affix won't work)
 +</​code>​
 +
 +If you cloned WANDERER_PASSIVES you'll see a bunch of entries for EFFECTs. ​ Let's remove all of them and create something totally new. We'll do a chance to Stun when the charge bar is high.
 +
 +<​code>​
 +[EFFECT]
 +<​STRING>​NAME:​Defender Charge Bar Stun     (this name is NOT tied to globals, used in debugging and I think also with the EXCLUSIVE flag?)
 +<​STRING>​ACTIVATION:​DYNAMIC
 +<​STRING>​DURATION:​ALWAYS
 +<​STRING>​TYPE:​STUN
 +<​STRING>​STATMODIFYNAME:​Player Charge Percent ​            ​(tells the game to modify the value of this stat by the player'​s charge percent)
 +<​STRING>​STATMODIFYPERCENT:​100 ​                    ​(amount of effect the charge percent has)
 +<​BOOL>​MODIFIERISBONUS:​true
 +<​FLOAT>​MIN:​0.200000 ​                                     (with this value, at 100% charge, the player has a 20% chance to stun)
 +<​FLOAT>​MAX:​0.200000 ​                                    (make this number always match the MIN or you get non-sensical results for always-on skills, you'd only set this different if this were, say, an affix for an item)
 +<​FLOAT>​IGNORE_RESISTANCE:​0.000000 ​             ​
 +<​STRING>​STAT_SOURCE_TYPE:​ON UPDATE SELF        (tells the game to constantly update this stat)
 +[/EFFECT]
 +</​code>​
 +
 +
 +===== B. Create the new chargebar UI element and the rollover text =====
 +
 +1. Create an entry for the chargebar in UI.RAW using techniques discussed throughout this overview for making entries in RAW files.
 +
 +2. Copy the Outlander toolbar LAYOUT from the source files and put it in MEDIA\UI\MENUS\UNITUNIQUEMENUS . Rename it appropriately (QGH_DEFENDER_CHARGEBAR.LAYOUT for example)
 +
 +3. Copy the Outlander toolbar tooltip LAYOUT and put it in MEDIA\UI\PIECES. Rename it appropriately.
 +
 +4. Use the Layout editor to edit the help text in the tooltip Layout. Then use the Layout editor to edit the file reference in the Charge Bar itself that originally pointed to the Wandered Layout tooltip to point to your new tooltip.
 +
 +
 +===== C. Tell the core class file to point to the new affix and new chargebar =====
 +
 +1. Go back to your core class DAT file (HUM_QGH_DEFENDER_BASE.DAT)
 +
 +2. Find the section near the top that mentions charge and edit it:
 +
 +<​code>​
 +<​INTEGER>​CHARGES_MAX:​5
 +<​FLOAT>​CHARGE_DPSMULT:​30.000000 ​  ​(changing these change how fast players build and lose charge)
 +<​FLOAT>​CHARGE_DEGRADE_SECONDS:​6.000000
 +<​FLOAT>​CHARGE_DEGRADE_PAUSE:​3.000000
 +[SHOWUI_ALWAYS]
 +<​STRING>​MENU:​IZAU_DEFENDER_CHARGEBAR ​ (as defined in your RAW file)
 +[/​SHOWUI_ALWAYS]
 +[CHARGE_AFFIXES_TO_WATCH] ​
 +<​STRING>​AFFIX:​QGH_DEFENDER_PASSIVES_AFFIX ​     (tells the game to update the player'​s stats when the affix changes)
 +[/​CHARGE_AFFIXES_TO_WATCH]
 +[AFFIXES]
 +<​STRING>​AFFIX:​QGH_DEFENDER_PASSIVES_AFFIX ​      ​(assigns the QGH_DEFENDER_PASSIVES_AFFIX to the character upon the character'​s creation)
 +[/AFFIXES]
 +[EQUIPMENT]
 +</​code>​
 +
 +When you go into the game, you should now see that when you roll over the chargebar, you get the correct tooltip, and text below it that lists the current amount of Stun bonus the charge is applying.
 +
 +> NOTE: When you make changes to the passive affix, it's possible the changes won't get applied to existing characters. I am not sure why it works this way. You should test your changes on new characters; I don't know how to edit the affix for an existing one.
 +
 +----
 +Tags
 +{{tag>​[classes charge_bar]}}
overview_pre-guts.txt · Last modified: 2016/03/25 05:54 by phanjam