mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-30 00:15:57 -04:00
example of heroic jewelry stats
would need to move this out of demo. but the basic idea how to create them.
This commit is contained in:
@@ -44,6 +44,42 @@ def CreateStartingCharacter(core, object):
|
||||
inventory.add(testCloak)
|
||||
profession = object.getSlottedObject('ghost').getProfession()
|
||||
addProfessionAbilities(core, object, profession)
|
||||
|
||||
heroism1 = core.objectService.createObject('object/tangible/wearables/necklace/shared_necklace_s10.iff', object.getPlanet())
|
||||
heroism1.setStfFilename('static_item_n')
|
||||
heroism1.setStfName('item_necklace_set_hero_01_01')
|
||||
heroism1.setDetailFilename('static_item_d')
|
||||
heroism1.setDetailName('item_necklace_set_hero_01_01')
|
||||
heroism1.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1')
|
||||
heroism1.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2')
|
||||
heroism1.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3')
|
||||
heroism1.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30)
|
||||
heroism1.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30)
|
||||
heroism1.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30)
|
||||
|
||||
|
||||
inventory = object.getSlottedObject('inventory')
|
||||
if not inventory:
|
||||
return
|
||||
inventory.add(heroism1)
|
||||
|
||||
heroism2 = core.objectService.createObject('object/tangible/wearables/bracelet/shared_bracelet_s03_r.iff', object.getPlanet())
|
||||
heroism2.setStfFilename('static_item_n')
|
||||
heroism2.setStfName('item_bracelet_r_set_hero_01_01')
|
||||
heroism2.setDetailFilename('static_item_d')
|
||||
heroism2.setDetailName('item_bracelet_r_set_hero_01_01')
|
||||
heroism2.setStringAttribute('@set_bonus:piece_bonus_count_2', '@set_bonus:set_bonus_hero_1')
|
||||
heroism2.setStringAttribute('@set_bonus:piece_bonus_count_3', '@set_bonus:set_bonus_hero_2')
|
||||
heroism2.setStringAttribute('@set_bonus:piece_bonus_count_5', '@set_bonus:set_bonus_hero_3')
|
||||
heroism2.setIntAttribute('cat_stat_mod_bonus.food_luck_modified' , 30)
|
||||
heroism2.setIntAttribute('cat_stat_mod_bonus.food_precision_modified' , 30)
|
||||
heroism2.setIntAttribute('cat_stat_mod_bonus.food_strength_modified' , 30)
|
||||
|
||||
|
||||
inventory = object.getSlottedObject('inventory')
|
||||
if not inventory:
|
||||
return
|
||||
inventory.add(heroism2)
|
||||
return
|
||||
|
||||
def addProfessionAbilities(core, object, profession):
|
||||
|
||||
@@ -1,4 +1,25 @@
|
||||
import sys
|
||||
|
||||
def setup(core, object):
|
||||
return
|
||||
|
||||
def equip(core, actor, object):
|
||||
|
||||
|
||||
##Heroism
|
||||
if object.getStfName() == ('item_bracelet_r_set_hero_01_01'):
|
||||
core.skillModService.addSkillMod(actor, 'strength_modified', 30)
|
||||
core.skillModService.addSkillMod(actor, 'precision_modified', 30)
|
||||
core.skillModService.addSkillMod(actor, 'luck_modified', 30)
|
||||
return
|
||||
return
|
||||
|
||||
def unequip(core, actor, object):
|
||||
|
||||
##Heroism
|
||||
if object.getStfName() == ('item_bracelet_r_set_hero_01_01'):
|
||||
core.skillModService.deductSkillMod(actor, 'strength_modified', 30)
|
||||
core.skillModService.deductSkillMod(actor, 'precision_modified', 30)
|
||||
core.skillModService.deductSkillMod(actor, 'luck_modified', 30)
|
||||
return
|
||||
return
|
||||
@@ -1,4 +1,25 @@
|
||||
import sys
|
||||
|
||||
def setup(core, object):
|
||||
return
|
||||
|
||||
def equip(core, actor, object):
|
||||
|
||||
|
||||
##Heroism
|
||||
if object.getStfName() == ('item_necklace_set_hero_01_01'):
|
||||
core.skillModService.addSkillMod(actor, 'strength_modified', 30)
|
||||
core.skillModService.addSkillMod(actor, 'precision_modified', 30)
|
||||
core.skillModService.addSkillMod(actor, 'luck_modified', 30)
|
||||
return
|
||||
return
|
||||
|
||||
def unequip(core, actor, object):
|
||||
|
||||
##Heroism
|
||||
if object.getStfName() == ('item_necklace_set_hero_01_01'):
|
||||
core.skillModService.deductSkillMod(actor, 'strength_modified', 30)
|
||||
core.skillModService.deductSkillMod(actor, 'precision_modified', 30)
|
||||
core.skillModService.deductSkillMod(actor, 'luck_modified', 30)
|
||||
return
|
||||
return
|
||||
Reference in New Issue
Block a user