cyberdeck brainstorm/questions for George

Post ideas & suggestions you have pertaining to the game here.
Post Reply
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

The two cyberdecks used by the sung slavers (shields down and peaceful constraint) are both linked to virtual cyberdeck devices and they do work if installed on the playership.
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>
or possibly 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=		"=(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.
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
User avatar
Atarlost
Fleet Admiral
Fleet Admiral
Posts: 2391
Joined: Tue Aug 26, 2008 12:02 am

In the second case I think this should work, and it avoids the global. This makes it the more flexible option because it allows either a global used for multiple decks of different ailevel, or individual inlined functions.

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=		"=(lambda Nil
        (objProgramDamage (objGetTarget gplayership) gPlayerShip 'mycyberdeck 1 (objDestroy (objGetTarget gplayership) gPlayerShip))
    )"
            programName=	"You have just been pWnD, nOOb!"
            />

</ItemType>
george moromisato
Developer
Developer
Posts: 2998
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Some answers:

1. Are the cyberdeck devices calling this function?
Unfortunately, no. They are calling hard-coded function. But in the future, it should all go through functions.

2. what is the rate of fire of these devices? can it be defined in the xml?
The fire-rate is currently hard-coded at 60 (equivalent to weapon fireRate="60")

3. how does the program level and target ship's cyberdefense attribute interact? I noted it's not simply True/Nil, but a curve.
When calling objProgramDamage, the chance of success is:

90 + 10 * (programAILevel - CyberDefenseLevel)

For CyberDecks, it's a little more complicated:

The CyberDeck defines an attack chance. At each fire interval (60 game seconds) we roll the attack chance. If fail, then nothing happens.

Next, we check the program level against the cyber defense level. If the program level is less than cyber defense, then the attack fails.

Next, we make a check depending on the type of attack. For shields down, the chance of a successful attack is:

50 + 10 * (programAILevel - shieldLevel)

For disam, the chance is:

50 + 10 * (programAILevel - primaryWeaponLevel)

I like the proposal for custom CyberDeck attacks. I might support both methods (a new event <OnFireCyberDeck> and, for short programs, an inline property like Atarlost suggests).
User avatar
Prophet
Militia Captain
Militia Captain
Posts: 826
Joined: Tue Nov 18, 2008 6:09 pm

Thank you George, I'm looking forward to them :)
Coming soon: The Syrtian War adventure mod!
A Turret defense genre mod exploring the worst era in Earth's history.
Can you defend the Earth from the Syrtian invaders?
Stay tuned for updates!
Post Reply