I also recently discovered (objProgramDamage obj hacker progName aiLevel code) and how to use it.
My questions:
1. Are the cyberdeck devices calling this function?
2. what is the rate of fire of these devices? can it be defined in the xml?
3. how does the program level and target ship's cyberdefense attribute interact? I noted it's not simply True/Nil, but a curve.
My idea for a new cyberdeck would be something like this:
Code: Select all
<ItemType UNID="&itMyCyberDeck;"
name= "My CyberDeck"
level= "6"
value= "50000"
mass= "1"
frequency= "rare"
numberAppearing= "1"
modifiers= "MajorItem; Military; NotForSale; cyberDeck; sungSlavers"
description= "This cyberDeck will separate cyber-wizards from noobs."
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<CyberDeckDevice
fireRate= "15"
powerUse= "600"
range= "30"
attackChance= "1"
aiLevel= "7"
program= "None"
programName= "You have just been pWnD, nOOb!"
/>
<Events>
<OnFireWeapon>
(objProgramDamage aTargetObj gSource 'mycyberdeck 1 (objDestroy aTargetObj gSource))
</OnFireWeapon>
</Events>
</ItemType>
Code: Select all
<ItemType UNID="&itMyCyberDeck;"
name= "My CyberDeck"
level= "6"
value= "50000"
mass= "1"
frequency= "rare"
numberAppearing= "1"
modifiers= "MajorItem; Military; NotForSale; cyberDeck; sungSlavers"
description= "This cyberDeck will separate cyber-wizards from noobs."
>
<Image imageID="&rsItems1;" imageX="96" imageY="0" imageWidth="96" imageHeight="96"/>
<CyberDeckDevice
fireRate= "15"
powerUse= "600"
range= "30"
attackChance= "1"
aiLevel= "7"
program= "=(myCyberDeck)"
programName= "You have just been pWnD, nOOb!"
/>
</ItemType>
<Globals>
(setq myCyberDeck (lambda Nil
(objProgramDamage (objGetTarget gplayership) gPlayerShip 'mycyberdeck 1 (objDestroy (objGetTarget gplayership) gPlayerShip))
))
</Globals>
In the first example, the program attribute is set to none and the onFireWeapon code is run instead. This could be done now with a normal weapon but would not use any of the cyberDefense values.
In the second example, the program attribute holds a function name that gets called, the function is defined in <Globals> and is a messy, round about way of working IMO.