ApplyParticleEffect = ProcTypeDef(
    isMaster=True,
    procCategory='Graphics',
    displayName='Apply Particle Effect',
    properties=[
        ProcPropertyTypeDef('redFile',
                            'S',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Red File'),
        ProcPropertyTypeDef('duration',
                            'I',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Duration (milliseconds)'),
        ProcPropertyTypeDef('boneName',
                            'S',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Bone Name'),
        ProcPropertyTypeDef('xOffset',
                            'F',
                            userDataType=None,
                            isPrivate=True,
                            displayName='X Offset'),
        ProcPropertyTypeDef('yOffset',
                            'F',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Y Offset'),
        ProcPropertyTypeDef('zOffset',
                            'F',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Z Offset'),
        ProcPropertyTypeDef('yawOffset',
                            'F',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Yaw Offset (deg)'),
        ProcPropertyTypeDef('pitchOffset',
                            'F',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Pitch Offset (deg)'),
        ProcPropertyTypeDef('rollOffset',
                            'F',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Roll Offset (deg)'),
        ProcPropertyTypeDef('ignoreTransform',
                            'B',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Ignore Effect Transform'),
        ProcPropertyTypeDef('effectIDProp',
                            'S',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Effect ID Storage Property')
    ],
    description=
    'Creates a particle effect on the entity. Effect will offset from entity position if Bone Name is omitted.'
)
                    'Entity with ID %s has no audio component. Audio file %s cannot be played from this entity.'
                    % (entityID, audioName))

        return True

    def _PlayTutorialVoiceOver(self, messageKey):
        sm.GetService('tutorial').Action_Play_MLS_Audio(messageKey)
        return True


PerformPythonUICallback = ProcTypeDef(
    isMaster=True,
    procCategory='UI',
    properties=[
        ProcPropertyTypeDef('callbackKey',
                            'S',
                            userDataType=None,
                            isPrivate=True)
    ],
    description=
    'Performs a UI callback (opens a UI window, etc.). These are set per-game.'
)
PlayEntityAudio = ProcTypeDef(
    isMaster=True,
    procCategory='Audio',
    properties=[
        ProcPropertyTypeDef('audioName',
                            'S',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Audio Name'),
        ProcPropertyTypeDef('mls',
Beispiel #3
0
TargetSelect = ProcTypeDef(
    isMaster=False,
    procCategory='AI',
    properties=[
        ProcPropertyTypeDef('Target',
                            'I',
                            userDataType='AITarget',
                            isPrivate=True,
                            displayName='Set Target'),
        ProcPropertyTypeDef('Candidate',
                            'I',
                            userDataType='AICandidate',
                            isPrivate=True,
                            displayName='From Candidate List'),
        ProcPropertyTypeDef('Subject',
                            'I',
                            userDataType='AISubject',
                            isPrivate=True,
                            displayName='Where Subject is'),
        ProcPropertyTypeDef('Confidence',
                            'I',
                            userDataType='AIConfidence',
                            isPrivate=True,
                            displayName='If Confidence >='),
        ProcPropertyTypeDef('ConfidenceWeight',
                            'B',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Confidence weighting'),
        ProcPropertyTypeDef('DistanceNearest',
                            'B',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Pick Nearest'),
        ProcPropertyTypeDef('DistanceMin',
                            'F',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Minimum distance'),
        ProcPropertyTypeDef('DistanceOptimal',
                            'F',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Optimal distance'),
        ProcPropertyTypeDef('Tags',
                            'S',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Tags')
    ],
    description='Select a target if possible.')
Beispiel #4
0
#Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\carbon\common\script\entities\AI\hateProcs.py
from carbon.common.script.zaction.zactionCommon import ProcTypeDef
HateTarget = ProcTypeDef(isMaster=False,
                         procCategory='AI',
                         description='Increase my hatred of my target')
HateMe = ProcTypeDef(isMaster=False,
                     procCategory='AI',
                     description="Increase the target's hatred of me")
HateRemoveTarget = ProcTypeDef(isMaster=False,
                               procCategory='AI',
                               description='Remove target from my hate list')
HateRemoveMeFromAll = ProcTypeDef(
    isMaster=False,
    procCategory='AI',
    description="Removes all other's hatred of me")
HateRemoveAllFromMe = ProcTypeDef(
    isMaster=False,
    procCategory='AI',
    description='Removes all my hatred of others')
exports = {
    'actionProcTypes.HateTarget': HateTarget,
    'actionProcTypes.HateMe': HateMe,
    'actionProcTypes.HateRemoveTarget': HateRemoveTarget,
    'actionProcTypes.HateRemoveMeFromAll': HateRemoveMeFromAll,
    'actionProcTypes.HateRemoveAllFromMe': HateRemoveAllFromMe
}
Beispiel #5
0
            rows = aoRows.get(actionStationInstanceID)
            if rows is not None:
                for row in rows:
                    quat = geo2.QuaternionRotationSetYawPitchRoll(
                        row.rotY, row.rotX, row.rotZ)
                    pos = (row.posX, row.posY, row.posZ)
                    exits.append({'pos': pos, 'rot': quat})

        return exits


UseActionObject = ProcTypeDef(
    isMaster=True,
    procCategory='ActionObject',
    properties=[
        ProcPropertyTypeDef('Distance',
                            'F',
                            userDataType=None,
                            isPrivate=False)
    ],
    description='Set the ActionObject in use by the requesting entity.')
StopUsingActionObject = ProcTypeDef(
    isMaster=True,
    procCategory='ActionObject',
    description=
    'Set the ActionObject as no longer in use by the requesting entity.')
IsActionObjectActionAvailable = ProcTypeDef(
    isMaster=True,
    isConditional=True,
    procCategory='ActionObject',
    properties=[
        ProcPropertyTypeDef('Distance',
Beispiel #6
0
    locatorObjs = Locator.GetAllLocators()
    for loc in locatorObjs:
        locatorList.append((loc.GetName(), loc.GetName(), ''))

    return locatorList


MotionState = ('list', MotionStateList)
TargetTypeList = ('list', TargetTypeList)
LocatorList = ('listMethod', CreateLocatorList)
SetEntityPosition = ProcTypeDef(
    isMaster=True,
    procCategory='Entity',
    properties=[
        ProcPropertyTypeDef('MotionState',
                            'I',
                            userDataType='MotionState',
                            isPrivate=True)
    ],
    description=
    'Sets the requesting entity\'s position. This uses the ALIGN_POSITION and ALIGN_ROTATION properties right now, though could be altered to use specified properties. The "MotionState" corresponds to move modes -- Keyframe and Character.'
)
GetEntitySceneID = ProcTypeDef(
    isMaster=True,
    procCategory='Entity',
    description='Gets the entity scene ID of the entity performing this action.'
)
GetBonePosRot = ProcTypeDef(
    isMaster=True,
    procCategory='Entity',
    properties=[
        ProcPropertyTypeDef('boneName',
Beispiel #7
0
    def _CharacterPrefEqualsBool(self, Name, Value):
        prefVal = settings.char.zaction.Get(Name, None)
        if prefVal is None:
            return False
        return prefVal == Value


SetClientPrefInt = ProcTypeDef(
    isMaster=True,
    procCategory='Client Preferences',
    properties=[
        ProcPropertyTypeDef('Name',
                            'S',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Pref Name'),
        ProcPropertyTypeDef('Value',
                            'I',
                            userDataType=None,
                            isPrivate=True,
                            displayName='Value')
    ],
    description='Sets a client preference (integer value).')
ClientPrefEqualsInt = ProcTypeDef(
    isMaster=True,
    procCategory='Client Preferences',
    isConditional=True,
    properties=[
        ProcPropertyTypeDef('Name',
                            'S',
                            userDataType=None,
def ActionPopupMenu(entID):
    entity = sm.GetService('entityClient').FindEntityByID(entID)
    if entity:
        perceptionComponent = entity.GetComponent('perception')
        if perceptionComponent:
            clientManager = sm.GetService(
                'perceptionClient').GetPerceptionManager(session.worldspaceid)
            if clientManager:
                if clientManager.DropOneStimulusSimple('Interact', entID,
                                                       session.charid, -1.0):
                    ForceDecisionTreeToRootFunc(session.charid)


ForceDecisionTreeToRootDef = ProcTypeDef(
    isMaster=False,
    procCategory='AI',
    description=
    'Forces the AI decision tree evaluate from the root node. Will interrupt any waitfor procs'
)
AttemptAction = ProcTypeDef(
    isMaster=False,
    procCategory='AI',
    properties=[
        ProcPropertyTypeDef('NewAction',
                            'I',
                            userDataType='ActionList',
                            isPrivate=True)
    ],
    description="Attempt to change the entity's ZAction to the selected action"
)
AttemptActionOnTarget = ProcTypeDef(
    isMaster=False,
    retList.sort(key=lambda row: row[1])
    return retList


def GetAISubjectList(propRow):
    retList = []
    for subject in perception.Subject.GetMyRows(_getDeleted=False):
        retList.append((subject.subjectName, subject.subjectID, ''))

    return retList


def GetAIStimTypeList(propRow):
    retList = []
    for stimType in perception.StimType.GetMyRows(_getDeleted=False):
        retList.append((stimType.stimTypeName, stimType.stimTypeID, ''))

    return retList


AICandidate = ('listMethod', GetAICandidateList)
AIConfidence = ('listMethod', GetAIConfidenceList)
AISubject = ('listMethod', GetAISubjectList)
AIStimType = ('listMethod', GetAIStimTypeList)
DropStimulus = ProcTypeDef(isMaster=False, procCategory='AI', properties=[ProcPropertyTypeDef('StimType', 'I', userDataType='AIStimType', isPrivate=True, displayName='Stimulus type'), ProcPropertyTypeDef('Range', 'F', userDataType=None, isPrivate=True, displayName='Range (-1 for default)'), ProcPropertyTypeDef('SwapTarget', 'B', userDataType=None, isPrivate=True, displayName='Drop from target')])
exports = {'actionProperties.AICandidate': AICandidate,
 'actionProperties.AIConfidence': AIConfidence,
 'actionProperties.AISubject': AISubject,
 'actionProperties.AIStimType': AIStimType,
 'actionProcTypes.DropStimulus': DropStimulus}