A question about marines and passengers?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Firehawk777
Posts: 15
Joined: Sun, 14. Mar 04, 14:56

A question about marines and passengers?

Post by Firehawk777 » Mon, 15. Feb 10, 07:39

Hi everyone
I was once very active here in the scripting forum though I gave it a break for a while. Now I have reinstalled terran conflict and want to get back into it.
Here is my problem.
I have created loads of scripts that create a universal community I.E Hundreds NPC characters that live and breath in the X universe traveling from ship to station and even to planets. I even had it so that they travel to different parts of a ship or station. The script will allow for spies for both you and the opposition as well as diplomats and many other NPC characters. Now I have discovered a flaw in my scripts due to the inclusion of marines and passengers. One of the main things I also wanted to include was battles which rage though ships, stations and across planets. It would allow for such situations as a captain and his crew besieged on the bridge of a capital ship by marines. Could someone please tell me how you access the marines and passengers stats/info as I want to add a personal ID to each of them to connect them to my global arrays. I.E Is there a global array of marines or are they a local one on each ship?
Also I am new to the new user made menus (very useful for what I am doing) so could someone point me to a post that discusses how to implement them?
Thanks in advance!

User avatar
LV
Sith Lord
Posts: 8255
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by LV » Mon, 15. Feb 10, 12:14

there is a "get marines array" in trade/passengers menu, most of the other things you want are also in that menu
LV's TC Scripts
Readme's For All My Scripts


I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced

si tacuisses, philosophus mansisses

Firehawk777
Posts: 15
Joined: Sun, 14. Mar 04, 14:56

Post by Firehawk777 » Mon, 15. Feb 10, 14:01

Thanks though not quite what I need.
Basically I need to know how this array is set (e.g set as local variable 'marines') and then how the individual marines stats are kept. Do they already have a PID. That kind of stuff.


:? :?

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 15. Feb 10, 15:00

Marines and passengers and objects just like ships
There is no global marine array

Marines have a container which is the ship or station they are currently on

There are quite a few soeduc script commands for handling marines

Firehawk777
Posts: 15
Joined: Sun, 14. Mar 04, 14:56

Post by Firehawk777 » Mon, 15. Feb 10, 16:57

Thanks Cycrow and good to know you're still out there.
What I am having problems with is I need to seperate the name out of the marine or passenger DATA_TYPE.
So what I want to do is get the marine or passenger array then get the variables (which show up as String names in the array) and send them as String names to another script. When I take them from the array however they are a DATA_TYPE and not a String (I hope this is clear).
How do I get just the name from the marine? Is it an array of its own? Can information be added to it like other stats or a PIN (kind of my version of a PID for characters)?
Once again thanks for the input you are almost always the best and most knowledgeable source on the forum.
Once I get this worked out I plan to have characters (including your own marines and passengers) suddenly turning out to be spies that can sabotage your ships or assassins that can kill your or if hired your enemies pilots and crew. They could even give advanced warning of attacks by finding out ship destinations. I think it might add an interesting depth to the game as espionage would now be a problem and/or a way to fight tough enemies. Of course this would then lead to double agents and counter-spying agents as well as a whole lot more!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22201
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Mon, 15. Feb 10, 17:31

there are several ways to get the name, as its an object, you can get the name the same way as a ship.

Code: Select all

$name = $marine -> get name
or

Code: Select all

$name = sprintf: fmt='%s', $marine
also, as they are objects, you can use local varibles on them, to store any additional information that you need

Firehawk777
Posts: 15
Joined: Sun, 14. Mar 04, 14:56

Post by Firehawk777 » Mon, 15. Feb 10, 17:37

You are truly a legend Cycrow!!
I will start trying this out now. :D :D

dreadmessiah
Posts: 56
Joined: Mon, 8. Feb 10, 10:53

Post by dreadmessiah » Mon, 15. Feb 10, 19:32

That is one thing I would like to see more of in this game. Back story news items. Would be great to read/hear about events.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”