Exemplo n.º 1
0
#Embedded file name: c:/depot/games/branches/release/EVE-TRANQUILITY/carbon/common/script/entities/AI/hateProcs.py
import zaction
exports = {
    'actionProcTypes.HateTarget':
    zaction.ProcTypeDef(isMaster=False,
                        procCategory='AI',
                        properties=[],
                        description='Increase my hatred of my target'),
    'actionProcTypes.HateMe':
    zaction.ProcTypeDef(isMaster=False,
                        procCategory='AI',
                        properties=[],
                        description="Increase the target's hatred of me"),
    'actionProcTypes.HateRemoveTarget':
    zaction.ProcTypeDef(isMaster=False,
                        procCategory='AI',
                        properties=[],
                        description='Remove target from my hate list'),
    'actionProcTypes.HateRemoveMeFromAll':
    zaction.ProcTypeDef(isMaster=False,
                        procCategory='AI',
                        properties=[],
                        description="Removes all other's hatred of me"),
    'actionProcTypes.HateRemoveAllFromMe':
    zaction.ProcTypeDef(isMaster=False,
                        procCategory='AI',
                        properties=[],
                        description='Removes all my hatred of others')
}
Exemplo n.º 2
0
        perceptionComponent = entity.GetComponent('perception')
        if perceptionComponent:
            clientManager = sm.GetService(
                'perceptionClient').GetPerceptionManager(session.worldspaceid)
            if clientManager:
                if clientManager.DropOneStimulusSimple('Interact', entID,
                                                       session.charid, -1.0):
                    ForceDecisionTreeToRoot(session.charid)


exports = {
    'actionProcTypes.ForceDecisionTreeToRoot':
    zaction.ProcTypeDef(
        isMaster=False,
        procCategory='AI',
        properties=[],
        description=
        'Forces the AI decision tree evaluate from the root node. Will interrupt any waitfor procs'
    ),
    'decisionProcs.ForceDecisionTreeToRoot':
    ForceDecisionTreeToRoot,
    'decisionProcs.ActionPopupMenu':
    ActionPopupMenu,
    'actionProcTypes.AttemptAction':
    zaction.ProcTypeDef(
        isMaster=False,
        procCategory='AI',
        properties=[
            zaction.ProcPropertyTypeDef('NewAction',
                                        'I',
                                        userDataType='ActionList',
#Embedded file name: carbon/common/script/zaction\MovementProcs.py
"""
Code required within Jessica to create and manage ActionProcs for movement system.
"""
import zaction
FollowMode = zaction.ProcTypeDef(isMaster=True, procCategory='Movement', properties=[zaction.ProcPropertyTypeDef('FOLLOW_RANGE', 'F', userDataType=None, isPrivate=True), zaction.ProcPropertyTypeDef('FOLLOW_TELEPORT_ON_STUCK', 'B', userDataType=None, isPrivate=True), zaction.ProcPropertyTypeDef('FOLLOW_MIN_RANGE', 'F', userDataType=None, isPrivate=True)])
IsInMovementMode = zaction.ProcTypeDef(isMaster=True, isConditional=True, procCategory='Movement', displayName='Is in movement mode', properties=[zaction.ProcPropertyTypeDef('evaluateTo', 'B', userDataType=None, isPrivate=True, displayName='Evaluate To True', default=True), zaction.ProcPropertyTypeDef('moveModeName', 'S', userDataType=None, isPrivate=True, displayName='Move Mode Name')], description='Validates if we are in a movement mode.')
TargetedJumpMode = zaction.ProcTypeDef(isMaster=True, procCategory='Movement', displayName='Targeted Jump', description='Initiates a targeted jump movement mode.')
HasTargetedJumpModeJumped = zaction.ProcTypeDef(isMaster=True, isConditional=True, procCategory='Movement', displayName='Has targeted jump mode jumped', properties=[zaction.ProcPropertyTypeDef('evaluateTo', 'B', userDataType=None, isPrivate=True, displayName='Evaluate To True', default=True)], description='Validates if the targeted jump mode has jumped.')
IsWaitingForMoveModeActivation = zaction.ProcTypeDef(isMaster=True, isConditional=True, procCategory='Movement', displayName='Is Wating For Move Mode Activation', properties=[zaction.ProcPropertyTypeDef('evaluateTo', 'B', userDataType=None, isPrivate=True, displayName='Evaluate To True', default=True)], description='Check to see if the current entity move mode manager needs to activate a move mode.')
exports = {'actionProcTypes.FollowMode': FollowMode,
 'actionProcTypes.IsInMovementMode': IsInMovementMode,
 'actionProcTypes.TargetedJumpMode': TargetedJumpMode,
 'actionProcTypes.HasTargetedJumpModeJumped': HasTargetedJumpModeJumped,
 'actionProcTypes.IsWaitingForMoveModeActivation': IsWaitingForMoveModeActivation}
Exemplo n.º 4
0
        retList.append((param, param, ''))

    retList.sort()
    return retList


exports = {
    'actionProperties.ControlParameters': ('listMethod', GetControlParameters),
    'actionProcTypes.OrAllCondition':
    zaction.ProcTypeDef(
        isMaster=True,
        isConditional=True,
        procCategory='Condition',
        displayName=' Or All',
        properties=[
            zaction.ProcPropertyTypeDef('NegateAll',
                                        'B',
                                        isPrivate=True,
                                        default=False)
        ],
        description=
        "Conditional procs can be used to modify the result of a conditional step or prereq container. Only a single Conditional proc will be respected, so don't use more than one. \n\nOr All: For all procs in this ProcContainer, evaluate to True if any of them returns True.\nThe Negate All option will cause this to evaluate True if any of them returns False."
    ),
    'actionProcTypes.AndAllCondition':
    zaction.ProcTypeDef(
        isMaster=True,
        isConditional=True,
        procCategory='Condition',
        displayName=' And All',
        properties=[
            zaction.ProcPropertyTypeDef('NegateAll',
                                        'B',
Exemplo n.º 5
0
        return True

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


exports = {
    'actionProcTypes.PerformPythonUICallback':
    zaction.ProcTypeDef(
        isMaster=True,
        procCategory='UI',
        properties=[
            zaction.ProcPropertyTypeDef('callbackKey',
                                        'S',
                                        userDataType=None,
                                        isPrivate=True)
        ],
        description=
        'Performs a UI callback (opens a UI window, etc.). These are set per-game.'
    ),
    'actionProcTypes.PlayEntityAudio':
    zaction.ProcTypeDef(
        isMaster=True,
        procCategory='Audio',
        properties=[
            zaction.ProcPropertyTypeDef('audioName',
                                        'S',
                                        userDataType=None,
                                        isPrivate=True,
                                        displayName='Audio Name'),
Exemplo n.º 6
0
        locatorList.append((loc.GetName(), loc.GetName(), ''))

    return locatorList


exports = {
    'actionProperties.MotionState': ('list', MotionStateList),
    'actionProperties.TargetTypeList': ('list', TargetTypeList),
    'actionProperties.LocatorList': ('listMethod', CreateLocatorList),
    'actionProcTypes.SetEntityPosition':
    zaction.ProcTypeDef(
        isMaster=True,
        procCategory='Entity',
        properties=[
            zaction.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.'
    ),
    'actionProcTypes.GetEntitySceneID':
    zaction.ProcTypeDef(
        isMaster=True,
        procCategory='Entity',
        description=
        'Gets the entity scene ID of the entity performing this action.'),
    'actionProcTypes.GetBonePosRot':
    zaction.ProcTypeDef(
        isMaster=True,
        procCategory='Entity',
Exemplo n.º 7
0
                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


exports = {
    'actionProcTypes.UseActionObject':
    zaction.ProcTypeDef(
        isMaster=True,
        procCategory='ActionObject',
        properties=[
            zaction.ProcPropertyTypeDef('Distance',
                                        'F',
                                        userDataType=None,
                                        isPrivate=False)
        ],
        description='Set the ActionObject in use by the requesting entity.'),
    'actionProcTypes.StopUsingActionObject':
    zaction.ProcTypeDef(
        isMaster=True,
        procCategory='ActionObject',
        description=
        'Set the ActionObject as no longer in use by the requesting entity.'),
    'actionProcTypes.IsActionObjectActionAvailable':
    zaction.ProcTypeDef(
        isMaster=True,
        isConditional=True,
        procCategory='ActionObject',
Exemplo n.º 8
0
                            if 'Tr2PyBindingSentinelVector2' == typename and len(prop) >= 2:
                                binding.sourceObject.value = prop[:2]
                            elif 'Tr2PyBindingSentinelVector3' == typename and len(prop) >= 3:
                                binding.sourceObject.value = prop[:3]
                            elif 'Tr2PyBindingSentinelVector4' == typename and len(prop) >= 4:
                                binding.sourceObject.value = prop[:4]
                            else:
                                self.LogWarn('Found Tr2PyBindingSentinel for a particle effect and matching list property, but types or list lengths do not match!', binding.sourceObject.name, typename, type(prop))
                        else:
                            self.LogWarn('Found Tr2PyBindingSentinel for a particle effect and matching property, but types do not match!', binding.sourceObject.name, typename, type(prop))
                    else:
                        self.LogWarn('Found Tr2PyBindingSentinel for a particle effect and no matching attribute or property!', binding.sourceObject.name, typename)
                    removableBindings.append(binding)

            curveSet.Update()
            for binding in removableBindings:
                curveSet.bindings.remove(binding)


exports = {'actionProcTypes.ApplyParticleEffect': zaction.ProcTypeDef(isMaster=True, procCategory='Graphics', displayName='Apply Particle Effect', properties=[zaction.ProcPropertyTypeDef('redFile', 'S', userDataType=None, isPrivate=True, displayName='Red File'),
                                         zaction.ProcPropertyTypeDef('duration', 'I', userDataType=None, isPrivate=True, displayName='Duration (milliseconds)'),
                                         zaction.ProcPropertyTypeDef('boneName', 'S', userDataType=None, isPrivate=True, displayName='Bone Name'),
                                         zaction.ProcPropertyTypeDef('xOffset', 'F', userDataType=None, isPrivate=True, displayName='X Offset'),
                                         zaction.ProcPropertyTypeDef('yOffset', 'F', userDataType=None, isPrivate=True, displayName='Y Offset'),
                                         zaction.ProcPropertyTypeDef('zOffset', 'F', userDataType=None, isPrivate=True, displayName='Z Offset'),
                                         zaction.ProcPropertyTypeDef('yawOffset', 'F', userDataType=None, isPrivate=True, displayName='Yaw Offset (deg)'),
                                         zaction.ProcPropertyTypeDef('pitchOffset', 'F', userDataType=None, isPrivate=True, displayName='Pitch Offset (deg)'),
                                         zaction.ProcPropertyTypeDef('rollOffset', 'F', userDataType=None, isPrivate=True, displayName='Roll Offset (deg)'),
                                         zaction.ProcPropertyTypeDef('ignoreTransform', 'B', userDataType=None, isPrivate=True, displayName='Ignore Effect Transform'),
                                         zaction.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.'),
 'actionProcTypes.RemoveParticleEffect': zaction.ProcTypeDef(isMaster=True, procCategory='Graphics', displayName='Remove Particle Effect', properties=[zaction.ProcPropertyTypeDef('effectIDProp', 'S', userDataType=None, isPrivate=True, displayName='Effect ID Storage Property')], description='Removes a particle effect on the entity. This uses a previously stored effect ID in the specified property.')}
Exemplo n.º 9
0
    return retList


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

    def _SetClientPrefBoolTasklet(self, Name, Value):
        prefs.SetValue(Name, Value)

    def _ClientPrefEqualsBool(self, Name, Value):
        prefVal = prefs.GetValue(Name, None)
        if prefVal is None:
            return False
        return prefVal == Value

    def _SetCharacterPrefBool(self, Name, Value):
        uthread.worker('_SetCharacterPrefBool', self._SetCharacterPrefBoolTasklet, Name, Value)
        return True

    def _SetCharacterPrefBoolTasklet(self, Name, Value):
        settings.char.zaction.Set(Name, Value)

    def _CharacterPrefEqualsBool(self, Name, Value):
        prefVal = settings.char.zaction.Get(Name, None)
        if prefVal is None:
            return False
        return prefVal == Value


exports = {'actionProcTypes.SetClientPrefInt': zaction.ProcTypeDef(isMaster=True, procCategory='Client Preferences', properties=[zaction.ProcPropertyTypeDef('Name', 'S', userDataType=None, isPrivate=True, displayName='Pref Name'), zaction.ProcPropertyTypeDef('Value', 'I', userDataType=None, isPrivate=True, displayName='Value')], description='Sets a client preference (integer value).'),
 'actionProcTypes.ClientPrefEqualsInt': zaction.ProcTypeDef(isMaster=True, procCategory='Client Preferences', isConditional=True, properties=[zaction.ProcPropertyTypeDef('Name', 'S', userDataType=None, isPrivate=True, displayName='Pref Name'), zaction.ProcPropertyTypeDef('Value', 'I', userDataType=None, isPrivate=True, displayName='Value')], description='Tests a client pref against a value (integer).'),
 'actionProcTypes.SetClientPrefBool': zaction.ProcTypeDef(isMaster=True, procCategory='Client Preferences', properties=[zaction.ProcPropertyTypeDef('Name', 'S', userDataType=None, isPrivate=True, displayName='Pref Name'), zaction.ProcPropertyTypeDef('Value', 'B', userDataType=None, isPrivate=True, displayName='Value')], description='Sets a client preference (boolean value).'),
 'actionProcTypes.ClientPrefEqualsBool': zaction.ProcTypeDef(isMaster=True, procCategory='Client Preferences', isConditional=True, properties=[zaction.ProcPropertyTypeDef('Name', 'S', userDataType=None, isPrivate=True, displayName='Pref Name'), zaction.ProcPropertyTypeDef('Value', 'B', userDataType=None, isPrivate=True, displayName='Value')], description='Tests a client pref against a value (boolean).'),
 'actionProcTypes.SetCharacterPrefBool': zaction.ProcTypeDef(isMaster=True, procCategory='Client Preferences', properties=[zaction.ProcPropertyTypeDef('Name', 'S', userDataType=None, isPrivate=True, displayName='Pref Name'), zaction.ProcPropertyTypeDef('Value', 'B', userDataType=None, isPrivate=True, displayName='Value')], description='Sets a character preference (boolean value).'),
 'actionProcTypes.CharacterPrefEqualsBool': zaction.ProcTypeDef(isMaster=True, procCategory='Client Preferences', isConditional=True, properties=[zaction.ProcPropertyTypeDef('Name', 'S', userDataType=None, isPrivate=True, displayName='Pref Name'), zaction.ProcPropertyTypeDef('Value', 'B', userDataType=None, isPrivate=True, displayName='Value')], description='Tests a character pref against a value (boolean).')}
Exemplo n.º 11
0
 zaction.ProcTypeDef(
     isMaster=False,
     procCategory='AI',
     properties=[
         zaction.ProcPropertyTypeDef('Target',
                                     'I',
                                     userDataType='AITarget',
                                     isPrivate=True,
                                     displayName='Set Target'),
         zaction.ProcPropertyTypeDef('Candidate',
                                     'I',
                                     userDataType='AICandidate',
                                     isPrivate=True,
                                     displayName='From Candidate List'),
         zaction.ProcPropertyTypeDef('Subject',
                                     'I',
                                     userDataType='AISubject',
                                     isPrivate=True,
                                     displayName='Where Subject is'),
         zaction.ProcPropertyTypeDef('Confidence',
                                     'I',
                                     userDataType='AIConfidence',
                                     isPrivate=True,
                                     displayName='If Confidence >='),
         zaction.ProcPropertyTypeDef('ConfidenceWeight',
                                     'B',
                                     userDataType=None,
                                     isPrivate=True,
                                     displayName='Confidence weighting'),
         zaction.ProcPropertyTypeDef('DistanceNearest',
                                     'B',
                                     userDataType=None,
                                     isPrivate=True,
                                     displayName='Pick Nearest'),
         zaction.ProcPropertyTypeDef('DistanceMin',
                                     'F',
                                     userDataType=None,
                                     isPrivate=True,
                                     displayName='Minimum distance'),
         zaction.ProcPropertyTypeDef('DistanceOptimal',
                                     'F',
                                     userDataType=None,
                                     isPrivate=True,
                                     displayName='Optimal distance'),
         zaction.ProcPropertyTypeDef('Tags',
                                     'S',
                                     userDataType=None,
                                     isPrivate=True,
                                     displayName='Tags')
     ],
     description='Select a target if possible.'),