Display some uncommon values
#4
Err... delete the $fontsize or $fontname or $fontface stuff, XP doesn't need it, it should be equal to nil anyway (non existing) so replace $fontsize with some constant or with any specific integer.

Where it says...

Code:
if getitem_scope == 0
        getitem_scope = "No Use"
      end
      if getitem_scope == 1
        getitem_scope = "One Enemy"
      end
      if getitem_scope == 2
        getitem_scope = "All Enemies"
      end
      if getitem_scope == 3
        getitem_scope = "One Ally"
      end
      if getitem_scope == 4
        getitem_scope = "Party"
      end
      if getitem_scope == 5
        getitem_scope = "Down Ally (HP = 0)"
      end
      if getitem_scope == 6
        getitem_scope = "Down Allies (HP = 0)"
      end
      if getitem_scope == 7
        getitem_scope = "User"
      end

Paste this...

Code:
getitem_scope = case getitem_scope
when 0 then "No Use"
when 1 then "One Enemy"
when 2 then "All Enemies"
when 3 then "One Ally"
when 4 then "Party"
when 5 then "Down Ally (HP = 0)"
when 6 then "Down Allies (HP = 0)"
when 7 then "User"
end

...to make it look less crappy and make it easier to add more lines in case some other scripter added custom skill or item scopes anywhere else.

BlizzCFG.weapon_hp_plus(item_id)
BlizzCFG.weapon_sp_plus(item_id)

Where it says...

Code:
type = $data_armors[item_id].kind
      if type == 0
        type = "Handschuhe"
      end
      if type == 1
        type = "Helm"
      end
      if type == 2
        type = "RĂ¼stung"
      end
      if type == 3
        type = "Stiefel"
      end
      if type == 4
        type = "Insigne"
      end
      if type == 5
        type = "Amulett"
      end
      if type == 6
        type = "Ring"
      end
      if type == 7
        type = "Schwingen"
      end
      if type == 8
        type = "Schild"
      end
      if type == 9
        type = "Accessory"
      end
      if type == 10
        type = "Accessory"
      end

Replace it with...

Code:
type = case $data_armors[item_id].kind
when 0 then "Handschuhe"
when 1 then "Helm"
when 2 then "RĂ¼stung"
when 3 then "Stiefel"
when 4 then "Insigne"
when 5 then "Amulett"
when 6 then "Ring"
when 7 then "Schwingen"
when 8 then "Schild"
when 9 then "Accessory"
when 10 then "Accessory"
end

If you ever ever use mkxp to let people play your game on Linux as well, you'll thank me for making sure the case statement is compatible with Ruby 2.1 as well. Let's admit it, it's easier to read like these and saves many lines of code and multiple checks.

Not much later on you'll find a perfect place to add armor stuff so paste these lines...

hp_plus = 'My Custom Label: ' + BlizzCFG.armor_hp_plus(item_id).to_s
sp_plus = BlizzCFG.armor_sp_plus(item_id).to_s

...then pick a place for new draw_text lines to make it visible, i.e.

self.contents.draw_text(x + 170, y + 70, 420, 24, hp_plus, 0)
self.contents.draw_text(x + 170, y + 90, 420, 24, sp_plus, 0)

In the weapon section you would have to do the same for the pair of lonely lines I left behind that handle weapon stuff, don't forget to customize it under your own risk XP
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

Maranatha!

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

[Image: SP1-Scripter.png]
[Image: SP1-Writer.png]
[Image: SP1-Poet.png]
[Image: SP1-PixelArtist.png]
[Image: SP1-Reporter.png]

My Original Stories (available in English and Spanish)

List of Compiled Binary Executables I have published...
HiddenChest & Roole

Give me a free copy of your completed game if you include at least 3 of my scripts! Laughing + Tongue sticking out

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX & ACE, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX, OpenChest XP VX & ACE
Reply }


Messages In This Thread
Display some uncommon values - by Mel - 08-07-2017, 10:05 PM
RE: Display some uncommon values - by kyonides - 08-08-2017, 07:06 AM
RE: Display some uncommon values - by Mel - 08-08-2017, 04:20 PM
RE: Display some uncommon values - by kyonides - 08-08-2017, 10:15 PM
RE: Display some uncommon values - by Mel - 08-08-2017, 11:45 PM
RE: Display some uncommon values - by kyonides - 08-13-2017, 04:44 AM
RE: Display some uncommon values - by Mel - 08-15-2017, 05:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Multi Attack & Combo Display Keeroh 9 13,980 05-15-2017, 06:39 PM
Last Post: DerVVulfman
   Display State Ranks in Status Screen Mel 3 7,412 04-02-2017, 12:46 AM
Last Post: marketing small business ideas
Question  Lycan ABS - Weapon display Jetboy 4 7,169 07-14-2015, 06:02 AM
Last Post: DerVVulfman
  Icon Display 1.0 scripts makes events impossible to go to events, which are passable Djigit 0 3,891 01-03-2015, 09:11 PM
Last Post: Djigit



Users browsing this thread: 4 Guest(s)