Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Standard leather armor consumes custom hides
Author Message
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #1
Standard leather armor consumes custom hides
Hi everyone,
first of all a presentation, since is a couple of months that I started working on sphere again after ~10 years and it's my first post since the old forum Shock
I'm really happy to be part of the community again, hoping that i will be usefull for someone (when i'll get used again xD).

Going to the matter:

I've created new hides carved from some npc to make alternative leather armor

Code:
[ITEMDEF i_hide_rat]
ID=i_hide
TYPE=t_hide
NAME=Rat Hide

CATEGORY=Items by Professions
SUBSECTION=Tailoring
DESCRIPTION=Rat Hide

ON=@CREATE
COLOR=color_rat_hide

Code:
[ITEMDEF i_studded_sleeves_rat]
DEFNAME=i_studded_sleeves_rat
NAME=Rat Studded Sleeves
ID=i_studded_sleeves
TYPE=t_armor_leather
ARMOR=60
REQSTR=10
RESOURCES=12 i_hide_rat
SKILLMAKE=tailoring 50.0, t_sewing_kit

CATEGORY=Provisions - Armor - Leather
SUBSECTION=Rat
DESCRIPTION=Rat Studded Sleeves

ON=@Create
    HITPOINTS={35 80}
    COLOR=color_ratto

It works fine, the matter came out when i tested the skillmenu
I saw that using the sawing kit on the hides, on the menu i can see standard leather armor menu, studded, ecc.. trying to make one of them, it consumes the custom hide and creates the item
I link the tested item with the relative skillmenu

Code:
[ITEMDEF 013c7]
DEFNAME=i_leather_gorget
TYPE=t_armor_leather
FLIP=1
//ARMOR=13
VALUE=32
WEIGHT=1.0
RESOURCES=4 i_hide
SKILLMAKE=Tailoring 53.9,t_sewing_kit,Armslore 10.0
CATEGORY=Provisions - Armor
SUBSECTION=Leather Armor
DESCRIPTION=Leather Gorget
TAG.NotGargoyle=1
TAG.REQSTR=20
TEVENTS=t_equipitem
ON=@Create
   HITPOINTS={36 48}
   TAG.RESCOLD=3
   TAG.RESENERGY=3
   TAG.RESFIRE=4
   TAG.RESPhysical=2
   TAG.RESPOISON=3

Code:
[SKILLMENU sm_leather_armor]
Leather Armour

ON=i_LEATHER_GORGET <name> (<resmake>)
MAKEITEM=i_LEATHER_GORGET
.
.
.

What am i missing?

Thanks in advance
09-12-2014 09:22 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: Standard leather armor consumes custom hides
Did you target the custom hides or the normal hides?
Yeah, it's a bug which don't happens with blacksmith.

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-12-2014 11:48 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #3
RE: Standard leather armor consumes custom hides
Did you cut the custom hide? Transforming it to leather?
I tested here and its ok.
Custom gumps open when targeting custom hide and standard gump opens when targeting normal leather (not hide).
For this, you have to cut the normal hide to get the normal leather gump...

I made this fix to prevent cutting custom hide.
This will prevent you cut the custom hides.
PHP Code:
[TYPEDEF T_SCISSORS]
ON=@TARGON_ITEM
IF (<ARGO.TYPE> == T_HIDE) && (!STRMATCH(I_HIDE,<ARGO.BASEID>))
 RETURN 
1
ENDIF 

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-12-2014 02:40 PM
Find all posts by this user Like Post Quote this message in a reply
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #4
RE: Standard leather armor consumes custom hides
Results of the tests :
Sewing kit on normal hides => fires gump, but i can't see custom armor on menu, making the item consumes the normal hides if enough then custom ones
Sewing kit on normal cut leather => same as 1st
Sewing kit on custom hides => i can see custom and normal armor on menu and both consumes custom hides
Scissors on custom hides => creates i_hides_cut with the custom hide color

If there isn't a way to fix it, i think i will make a script for t_sewing_kit to stop harcoded behavior and open a gump based on the item targetted
(This post was last modified: 09-12-2014 09:56 PM by Artyk.)
09-12-2014 09:55 PM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #5
RE: Standard leather armor consumes custom hides
No, you are wrong.

Sewing kit on custom hides => opens only custom armor gump
Scissors on custom hides => opens normal gump because the leather now is the normal, only colored!!! you can check using .xshow baseid on the cut leather and you will see that you lose your custom hides!

Did you tried my fix for the scissors?

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
09-13-2014 01:00 AM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #6
RE: Standard leather armor consumes custom hides
You can set TDATA1 of the custom hide to specify a custom leather to turn into if cut.
You should also try to set EF_Item_Strict_Comparison in sphere.ini since when it comes to resources, if this is not set, any items of type t_leather or type t_hide can be interchangeable when it comes to crafting.

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
09-13-2014 03:10 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Ben's post
Artyk
Journeyman
*

Posts: 75
Likes Given: 43
Likes Received: 9 in 9 posts
Joined: Sep 2014
Reputation: 0



Post: #7
RE: Standard leather armor consumes custom hides
Sorry if i'm replying only now, thanks both guys, that flags is what i was looking for and Extreme's fix saves me from create cut leather for each custom hide Tongue
(This post was last modified: 09-15-2014 06:53 AM by Artyk.)
09-15-2014 06:52 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)