weird item behavior

Users who are viewing this thread

lysergicD

Recruit
Theres a problem with the item I just modded and I cant seem to figure it out (code below) I copied the bastard sword and changed its code because I like the option to go one handed or two handed, anyways the problem is when I equip it, the sword acts like a bow, as such it goes through the whole bow animation and is therefore useless also what does the unique modifier really do i know you cant buy the "strange" items and they have an abundance(100) modifier i just want to make it so i can put my item into a chest put it into the game with edit mode and get it, also for obvious reasons i don't want enemies to have it, I didn't use the item editor.

Code:
["masterbators_pride",  "Masterbator's pride", [("bastard_sword_b",0),("bastard_sword_b_scabbard", ixmesh_carry)],
  itp_type_two_handed_wpn | itp_merchandise | itp_primary, itc_bastardsword | itcf_carry_sword_left_hip | itcf_show_holster_when_drawn | itp_unique ,
 5000 , weight(1) | difficulty(15) | spd_rtng(200) | weapon_length(95) | swing_damage(60 , cut) | thrust_damage(50 , pierce), imodbits_none],
 
You cannot buy the strange items because they don't have the itp_merchandise flag, so if you don't want your weapon showing up on merchants, remove that flag. I'm not sure why your weapon is acting like a bow but it might have something to do with the fact that you changed the imodbits to none. Imodbits determine what kind of modifiers the item gets (such as rusty or balanced). I would suggest imodbits_sword_high. I believe itp_unique means that only one copy of that item will be generated, but after doing a search of module_items, there are no native items that use it, so I would just remove it since you don't plan on making it available on troops or merchants. I am assuming you are planning to put it in one of the existing chests that have the strange items? If that is the case you have to add it to the inventory of the chest troop in module_troops (just do a search for "chest"). Otherwise you have to add a new chest troop, and then open up module_scenes and add the new chest troop to the scene like in this example:
Code:
  ("town_13_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x300416a600035cd600007ee80000012100003fbc",
    [],["bonus_chest_1"]),
 
lysergicD said:
Code:
["masterbators_pride",  "Masterbator's pride", [("bastard_sword_b",0),("bastard_sword_b_scabbard", ixmesh_carry)],
  itp_type_two_handed_wpn | itp_merchandise | itp_primary, itc_bastardsword | itcf_carry_sword_left_hip | itcf_show_holster_when_drawn |[color=red][b] itp_unique[/b][/color] ,
 5000 , weight(1) | difficulty(15) | spd_rtng(200) | weapon_length(95) | swing_damage(60 , cut) | thrust_damage(50 , pierce), imodbits_none],

Don't mix up item properties (itp_ ) with item capabilities (itc_ / itcf_ )

In this case if we look in header_items.py we find :

itp_unique              = 0x00001000

and further down :

itcf_shoot_bow                                      = 0x0000000000001000

So what you really did was tell the code your bastard sword can be drawn and shot like a bow...

move the '| itp_unique' part right after itp_primary, before the comma. Though to be honest, I'm not even sure that flag does anything at all.
 
issue resolved, thanks to both of you. While this thread is here I have a question about getting hero npcs into the game the (code below) I tried everything but fido just wont spawn in a tavern I even put in new entry points I tried to change the trainer's dialog so on click fido would be added to my party but i go some error.

Code:
["npc17", "Fido", "Fido", tf_hero | tf_unmoveable_in_party_window, scn_town_5_tavern | entry(1), reserved,  fac_commoners, [itm_leather_jerkin, itm_nomad_boots, itm_masterbators_pride],
   str_15 | agi_15 | int_15 | cha_15 | level(10), wp(200), knows_warrior_npc | knows_weapon_master_4 | knows_ironflesh_6 | knows_power_strike_10 | knows_riding_2|
   knows_athletics_5 | knows_power_throw_2|knows_first_aid_3 | knows_surgery_3 | knows_tactics_2 | knows_leadership_2, 0x0000000412083309342291c8d6713b2d00000000001e94ea0000000000000000],
 
Back
Top Bottom