Nice Shooting codes
- DigaRW
- Militia Captain
- Posts: 517
- Joined: Thu Jul 30, 2015 3:10 pm
- Location: The place where I belong
- Contact:
Anyone know where I can find 'nice shooting' codes. I can't find in RPG Wingmen.
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
Click this link!
- AssumedPseudonym
- Fleet Officer
- Posts: 1190
- Joined: Thu Aug 29, 2013 5:18 am
- Location: On the other side of the screen.
For Volkov, Jenna, and Rama, it’s in their respective XML files.
Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)
My mods on Xelerus: Click here!
Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
-
- Fleet Officer
- Posts: 1533
- Joined: Tue Mar 22, 2011 8:43 pm
- Location: Alaska
- Contact:
Also , most language is in the &Sov itself, if the &Sov if your wingmen are custom, you can put it there :
you were not explicit as to the wingman being Auton or regular Militia ships.......
Code: Select all
<Sovereign UNID="&svDefectiveAuton;"
name="auton"
alignment="constructive chaos"
>
<Language>
<Text id="WatchYourTargets">""</Text>
<Text id="NiceShooting">""</Text>
</Language>
<Relationships>
<Relationship sovereign="&svPlayer;" disposition="enemy" mutual="true"/>
</Relationships>
</Sovereign>
you were not explicit as to the wingman being Auton or regular Militia ships.......
Flying Irresponsibly In Eridani......
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
- DigaRW
- Militia Captain
- Posts: 517
- Joined: Thu Jul 30, 2015 3:10 pm
- Location: The place where I belong
- Contact:
What I mean is how to make the 'nice shooting' codes using <events>. As I search through in RPGWingman, I didn't find that codes. 'Watch your target' and 'Nice shooting' codes seem not in RPGWingman as most friendly ship use that codes.
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
Click this link!
-
- Fleet Officer
- Posts: 1533
- Joined: Tue Mar 22, 2011 8:43 pm
- Location: Alaska
- Contact:
ok: let me try again :
RPGWingmen.xml : <OnTranslateMessage> near the bottom ( this is for 1.7 )
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<TranscendenceModule>
<!-- Wingman Base Class
USAGE NOTES
Do not rely on the implementation of this class across versions. If you wish
to inherit from this class in an Extension, you should copy the class into
your own Extension and then inherit from that.
EXTRA DATA
The following data is stored on the wingman object. These track internal state
used by the base class. You should not change these values nor make assumptions
about their meaning.
behavior: Ship's current behavior
Nil = nothing
'attackingAtWill = attacking any target in range
'attackingTarget = attacking a target
'escorting = escorting the player
'goingHome = wingman wants to go home
'repairingArmor = docking with station to repair
'waiting = waiting for the player
homeSystem System nodeID where we were created
nextArmorRepairMsg Tick at which we should tell player about armor damage
welcomeMsg True if we already said hello to player
GLOBAL DATA
status: Ship's status
Nil = never encountered
'joined = Has joined the player
'declined = Player has declined escort
'destroyed = Dead
'destroyedByPlayer = Killed by player
'returnedHome = Left the player to return home
ORDERS
orderJoinPlayer: Fire this event to order the wingman to join the player. The
object will receive an OnWingmanJoinedPlayer event.
OPTIONS
These variables may be set in StaticData to alter the behavior of wingmen.
maxSystemLevel: If set, the wingman will leave the player if they exceed
this system level.
EVENTS
The wingman type may override these events.
OnWingmanJoinedPlayer: Fired when the wingman joins the player.
-->
<ShipClass UNID="&baStdWingmanBase;"
class= "(wingman base class)"
virtual= "true"
attributes= "baseClass"
>
<Communications>
<Message name="Attack target" key="A">
<OnShow>
(and (objGetTarget gSender)
(not (eq (objGetTarget gSender) (objGetTarget gSource)))
(not (eq (objGetData gSource "behavior") 'goingHome))
)
</OnShow>
<Invoke>
(switch
(eq (objGetTarget gSender) gSource)
(objSendMessage gSender gSource (objTranslate gSource 'IcantAttackMyself "\"Unable to comply\""))
(and (not (objIsEnemy gPlayerShip (objGetTarget gSender)))
(not (objIsAngryAt (objGetTarget gSender) gPlayerShip))
)
(objSendMessage gSender gSource (objTranslate gSource 'IcantAttackFriends "\"Unable to comply\""))
(block Nil
(shpCancelOrders gSource)
(shpOrder gSource 'attack (objGetTarget gSender))
(objSetData gSource "behavior" 'attackingTarget)
(objSendMessage gSender gSource (objTranslate gSource 'AttackTargetAck "\"Acknowledged\""))
)
)
</Invoke>
</Message>
<Message name="Break & attack" key="B">
<OnShow>
(eq (objGetData gSource "behavior") 'escorting)
</OnShow>
<Invoke>
(block (theTarget)
(switch
(or (not (setq theTarget (sysFindObject gPlayerShip "sTYAN")))
(gr (objGetDistance gPlayerShip theTarget) 100)
)
(objSendMessage gSender gSource (objTranslate gSource 'NoTargetInRange "\"No target in range\""))
(block Nil
(shpCancelOrders gSource)
(shpOrder gSource 'attack theTarget)
(objSetData gSource "behavior" 'attackingAtWill)
(objSendMessage gSender gSource (objTranslate gSource 'AttackTargetAck "\"Acknowledged\""))
)
)
)
</Invoke>
</Message>
<Message name="Form up" key="F">
<OnShow>
(and
(or (eq (objGetData gSource "behavior") 'waiting)
(objCommunicate gSource gSender 'QueryAttackStatus)
)
(not (eq (objGetData gSource "behavior") 'goingHome))
)
</OnShow>
<Invoke>
(block (behavior)
(setq behavior (objGetData gSource "behavior"))
(switch
(eq behavior 'escorting)
(block Nil
(objCommunicate gSource gSender 'FormUp)
(objSendMessage gSender gSource (objTranslate gSource 'FormUpAck "\"Acknowledged\""))
)
(block Nil
(shpCancelOrders gSource)
(shpOrder gSource 'follow gPlayerShip)
(objSetData gSource "behavior" 'escorting)
(if (or (eq behavior 'attackingTarget) (eq behavior 'attackingAtWill))
(objSendMessage gSender gSource (objTranslate gSource 'CancelAttackAck "\"Acknowledged\""))
(objSendMessage gSender gSource (objTranslate gSource 'FormUpAck "\"Acknowledged\""))
)
)
)
)
</Invoke>
</Message>
<Message name="Status" key="S">
<OnShow>
True
</OnShow>
<Invoke>
(block (behavior armorDamage shieldLevel)
(setq behavior (objGetData gSource "behavior"))
(objSendMessage gSender gSource
(switch
(or (eq behavior 'attackingTarget) (eq behavior 'attackingAtWill))
(objTranslate gSource 'StatusAttackingTarget "\"Engaging target\"")
(eq behavior 'goingHome)
(objTranslate gSource 'StatusGoingHome "\"Returning home\"")
(eq behavior 'repairingArmor)
(objTranslate gSource 'StatusRepairingArmor "\"Repairing armor\"")
(eq behavior 'waiting)
(objTranslate gSource 'StatusWaiting "\"Waiting\"")
(and (eq (setq armorDamage (objGetVisibleDamage gSource)) 0)
(or (eq (setq shieldLevel (objGetShieldLevel gSource)) 100) (eq shieldLevel -1))
)
(objTranslate gSource 'Status100Percent "\"No damage\"")
(eq armorDamage 0)
(cat "Shields down to " shieldLevel "%")
(cat "Armor is " armorDamage "% damaged")
)
)
(objSetShowAsDestination gSource Nil 'autoclear)
)
</Invoke>
</Message>
<Message name="Wait" key="W">
<OnShow>
(eq (objGetData gSource "behavior") 'escorting)
</OnShow>
<Invoke>
(block Nil
(shpCancelOrders gSource)
(shpOrder gSource 'hold)
(objSetData gSource "behavior" 'waiting)
(objSendMessage gSender gSource (objTranslate gSource 'WaitAck "\"Acknowledged\""))
)
</Invoke>
</Message>
</Communications>
<Language>
<Text id="EscortReportingIn">
(if (not (objGetData gSource "welcomeMsg"))
(block Nil
(objSetData gSource "welcomeMsg" True)
(objTranslate gSource 'WingmanJoined "\"Ready\"")
)
""
)
</Text>
<Text id="NiceShooting"> "\"Nice shooting!\""</Text>
<Text id="WatchYourTargets"> "\"Watch your targets!\""</Text>
</Language>
<Events>
<OnBehavior>
(block (behavior theTarget nextTime maxSystemLevel armorDamage)
(setq behavior (objGetData gSource "behavior"))
(switch
; If we're injured and we're near a base that repairs armor then
; dock with the base and get repaired
(and (eq behavior 'escorting)
(geq (setq armorDamage (objGetVisibleDamage gSource)) 10)
(not (objIsUnderAttack gSource))
)
(switch
; Some wingmen (like Jenna) doesn't want to proceed beyond a certain point
(and (setq maxSystemLevel (objGetStaticData gSource "MaxSystemLevel"))
(gr (sysGetLevel) maxSystemLevel)
)
(block Nil
(shpCancelOrders gSource)
(shpOrder gSource 'hold 30)
(shpOrder gSource 'gate (intGetGateToSystem gSource (objGetData gSource "homeSystem")))
(objSetData gSource "behavior" 'goingHome)
(objSendMessage gPlayerShip gSource (objTranslate gSource 'ImGoingHome "\"Going home\""))
)
; If there is a station that can repair armor, dock with it
(setq theTarget (srvFindRepairArmor gSource 60 (itmGetLevel (shpGetArmor gSource 0))))
(block Nil
(shpCancelOrders gSource)
(shpOrder gSource 'dock theTarget)
(shpOrder gSource 'wait (random 3 8))
(objSetData gSource "behavior" 'repairingArmor)
(objSendMessage gPlayerShip gSource (objTranslate gSource 'ImRepairingArmor "\"Docking to repair armor\""))
)
; Otherwise, tell the player that we need repairs
(and (geq armorDamage 50)
(or (not (setq nextTime (objGetData gSource "nextArmorRepairMsg")))
(geq (unvGetTick) nextTime)
)
)
(block Nil
(objSendMessage gPlayerShip gSource (objTranslate gSource 'MyArmorNeedsRepair "\"Armor repair needed\""))
(objSetData gSource "nextArmorRepairMsg" (add (unvGetTick) 3600))
)
)
)
)
</OnBehavior>
<OnCreate>
(block Nil
(objSetData gSource "homeSystem" (sysGetNode))
(sysAddObjRecurringTimerEvent 60 gSource "OnBehavior")
)
</OnCreate>
<OnDestroy>
(switch
(eq (objGetGlobalData gSource "status") 'returnedHome)
Nil
(and gPlayerShip (eq aOrderGiver gPlayerShip))
(objSetGlobalData gSource "status" 'destroyedByPlayer)
(block Nil
(objSetGlobalData gSource "status" 'destroyed)
(plyMessage gPlayer (objTranslate gSource 'WingmanKilled "Wingman killed"))
)
)
</OnDestroy>
<OnEnteredGate>
(if (eq (objGetData gSource "behavior") 'goingHome)
(objSetGlobalData gSource "status" 'returnedHome)
)
</OnEnteredGate>
<OnEnteredSystem>
(block (maxSystemLevel)
(setq maxSystemLevel (objGetStaticData gSource "MaxSystemLevel"))
(switch
(not maxSystemLevel)
Nil
(eq (objGetData gSource "homeSystem") (sysGetNode))
Nil
(geq (sysGetLevel) maxSystemLevel)
(objSendMessage gPlayerShip gSource (objTranslate gSource 'ImTooFarFromHome "\"I'm too far from home\""))
(eq (sysGetLevel) (subtract maxSystemLevel 1))
(objSendMessage gPlayerShip gSource (objTranslate gSource 'ImFarFromHome "\"I'm far from home\""))
)
)
</OnEnteredSystem>
<OnOrdersCompleted>
(block (behavior theTarget)
(setq behavior (objGetData gSource "behavior"))
(switch
(eq behavior 'repairingArmor)
(block Nil
(intArmorRepairAll gSource 25 'alwaysRepair)
(objSendMessage gPlayerShip gSource (objTranslate gSource 'ArmorRepaired "\"Armor repairs completed\""))
)
)
; Set orders and state
(switch
(and (eq behavior 'attackingAtWill)
(setq theTarget (sysFindObject gPlayerShip "sTYAN"))
(leq (objGetDistance gPlayerShip theTarget) 100)
)
(shpOrder gSource 'attack theTarget)
gPlayerShip
(block Nil
(shpOrder gSource 'follow gPlayerShip)
(objSetData gSource "behavior" 'escorting)
)
(block Nil
(shpOrder gSource 'hold)
(objSetData gSource "behavior" 'waiting)
)
)
)
</OnOrdersCompleted>
<OnPlayerLeftSystem>
(block (behavior)
(setq behavior (objGetData gSource "behavior"))
(switch
(or (not behavior)
(eq behavior 'goingHome)
)
Nil
; If we're waiting, stay in this system and wait for the player
(or (eq behavior 'waiting)
(eq behavior 'repairingArmor)
)
'waitForPlayer
; Otherwise, follow the player through the gate
'followPlayer
)
)
</OnPlayerLeftSystem>
<OnTranslateMessage>
(switch
(eq aMessage 'EscortReportingIn)
(if (not (objGetData gSource "welcomeMsg"))
(block Nil
(objSetData gSource "welcomeMsg" True)
(objTranslate gSource 'WingmanJoined "\"Ready\"")
)
""
)
(eq aMessage 'WatchYourTargets)
(objTranslate gSource 'WatchYourTargets "\"Watch your targets!\"")
(eq aMessage 'NiceShooting)
(objTranslate gSource 'NiceShooting "\"Nice shooting!\"")
Nil
)
</OnTranslateMessage>
<OrderJoinPlayer>
(block Nil
(objSetProperty gSource 'playerWingman True)
(objSetGlobalData gSource "status" 'joined)
(objFireEvent gSource "OnWingmanJoinedPlayer")
)
</OrderJoinPlayer>
<OrderLeavePlayer>
(block Nil
(objSetProperty gSource 'playerWingman Nil)
(shpCancelOrders gSource)
(shpOrder gSource 'hold 30)
(shpOrder gSource 'gate)
(objSetData gSource "behavior" 'goingHome)
(objFireEvent gSource "OnWingmanLeftPlayer")
)
</OrderLeavePlayer>
</Events>
</ShipClass>
</TranscendenceModule>
Flying Irresponsibly In Eridani......
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
- DigaRW
- Militia Captain
- Posts: 517
- Joined: Thu Jul 30, 2015 3:10 pm
- Location: The place where I belong
- Contact:
No, not translate message. But reffering how 'nice shooting' codes do it, using (block (target and bla-bla-bla until we have events that playership has destroy enemy, then codes give an action by sending a message to player 'nice shooting' from friendly ship nearby.
Download Transcendence mods from Reinvented Workbench Project!
Click this link!
Click this link!
-
- Fleet Officer
- Posts: 1533
- Joined: Tue Mar 22, 2011 8:43 pm
- Location: Alaska
- Contact:
<Language>
<Text id="NiceShooting"> "\"Nice shooting!\""</Text>
<Text id="WatchYourTargets"> "\"Watch your targets!\""</Text>
</Language>
is NOT part of an actual <Event> in .xml I gave you examples of where it is found.
Now, if you want anything to go down that road of finding it in the deeper engine workings, you will have to go to IRC.
<Text id="NiceShooting"> "\"Nice shooting!\""</Text>
<Text id="WatchYourTargets"> "\"Watch your targets!\""</Text>
</Language>
is NOT part of an actual <Event> in .xml I gave you examples of where it is found.
Now, if you want anything to go down that road of finding it in the deeper engine workings, you will have to go to IRC.
Flying Irresponsibly In Eridani......
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
I don't like to kill pirates in cold blood ..I do it.. but I don't like it..
Possibly you are looking for the functions 'objTranslate' and 'plyMessage'. EDIT: Errgh, I meant 'objSendMessage' not 'objTranslate'.
objSendMessage will make a non-playership print a message on the screen centred on that ship, which means if that ship is out of sight the message will appear on the edge of the screen in the direction of that non-playership.
plyMessage will print a message in the middle of the screen (because it is centred on the playership).
objSendMessage will make a non-playership print a message on the screen centred on that ship, which means if that ship is out of sight the message will appear on the edge of the screen in the direction of that non-playership.
plyMessage will print a message in the middle of the screen (because it is centred on the playership).
Stupid code. Do what I want, not what I typed in!