Page 1 of 1

Help with Armor

Posted: April 21st, 2012, 1:25 pm
by donnelly517

Code: Select all

r_item_name "Iron Buckler"
r_item_icon "items/ironbuckler"
r_item_mdl "tentus/moneybag"
r_item_description "A small very light shield. Hardly slows you down at all."

r_item_use_new_armour // 0
r_item_use_name "Iron Buckler"
r_item_use_description "Weaker, but lighter than other shields."
r_item_use_new_status 5 1

r_item_use_slots (| $SLOT_LHAND)
r_item_use_skill $SKILL_ARMOUR

 

Code: Select all

\\base shield status for iolar
r_status_friendly 1
r_status_addgeneric $STATUS_PIERCE_R 1 -1
r_status_addgeneric $STATUS_BLUNT_R 1 -1
r_status_addgeneric $STATUS_SLASH_R 1 -1
r_status_addgeneric $STATUS_MOVE 1 -1
First one is my shields item code and second is it's status. The game says I put something in item_use that is incorrect. It's not specific and dosn't exactly help to find the problem. Do you know what I did wrong?

Re: Help with Armor

Posted: April 21st, 2012, 8:54 pm
by Hirato
Looks right to me, though you'll probably want to change the invocation of r_item_use_new_status to the following so it follows the "status element multiplier" rule.

Code: Select all

r_item_use_new_status 5 $ATTACK_NONE 1

I only have 2 ideas right now for what's wrong.
1) the status group is not in 5.cfg
2) you're not using 2.7.1 or newer

Re: Help with Armor

Posted: April 22nd, 2012, 11:14 am
by donnelly517
Says I', trying to set an unavailable use property. And my pierce/blunt/slash resistance didn't increase.

Re: Help with Armor

Posted: April 22nd, 2012, 7:39 pm
by Hirato
I see... That's just the HUD.
I'll make a fix for that later today.

I'm not getting the resistances to increase either, this warrants further investigation, I'll let you know what I find later today as well.
EDIT: I just remembered, the GUI currently doesn't show that information.. I'll fix the HUD ater anyway

Re: Help with Armor

Posted: April 23rd, 2012, 7:31 am
by Hirato
you should see a line in hud_standard.cfg that looks like this

Code: Select all

if (&& (>= (r_item_use_type_get) $USE_WEAPON) (r_item_use_cost_get)) [
Change it to this

Code: Select all

if (&& (>= (r_item_use_type_get) $USE_WEAPON) [r_item_use_cost_get]) [
You're right though, the status changes weren't taking effect properly... well they were but they were reset after the character entity's update cycle.
This isn't a huge problem though, as incoming damage and stuff is queued for your update cycle and they won't take effect until after the deltas have been properly updated.
so.. in effect it just meant the wrong values were reported... (unless your spells affect hp/mana regen)

Thanks for the reports, I've fixed both in SVN.

EDIT:
if the latter's a huge issue, open rpgchar.cpp and look inside the update() function. move the following which you'll find at the very end

Code: Select all

base.resetdeltas();
up several lines and put it right before "loopv(equipped)", ie

Code: Select all

	//handle equipment
	equipment *eleft = NULL, //primary
	          *eright = NULL, //secondary
	          *quiver = NULL;

	base.resetdeltas();
	loopv(equipped)

Re: Help with Armor

Posted: April 23rd, 2012, 8:02 pm
by donnelly517
So basically, the armor dosn't have an effect until you are hit? That's not a problem, as long as the armor works.